Skip to content

[ENH] Migrate ResNetClassifier from sktime-dl to sktime #3881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 11, 2022
Merged

[ENH] Migrate ResNetClassifier from sktime-dl to sktime #3881

merged 8 commits into from
Dec 11, 2022

Conversation

nilesh05apr
Copy link
Contributor

@nilesh05apr nilesh05apr commented Dec 3, 2022

Reference Issues/PRs

Part of #3351. See also #3365

What does this implement/fix? Explain your changes.

Migrating dl estimators from sktime_dl to sktime

Does your contribution introduce a new dependency? If yes, which one?

No

What should a reviewer concentrate their feedback on?

tests

PR checklist

For all contributions
  • I've added myself to the list of contributors.
  • Optionally, I've updated sktime's CODEOWNERS to receive notifications about future changes to these files.
  • I've added unit tests and made sure they pass locally.
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG] indicating whether the PR topic is related to enhancement, maintenance, documentation, or bug.

@nilesh05apr nilesh05apr mentioned this pull request Dec 3, 2022
3 tasks
@achieveordie achieveordie changed the title fix: pre-commit errors [ENH] Migrate ResNetClassifier from sktime-dl to sktime Dec 5, 2022
Copy link
Collaborator

@achieveordie achieveordie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor typos are resulting in current failures in checks. Let's get them sorted so this estimator passes through.

@achieveordie
Copy link
Collaborator

You could go through the tests to see if there are any failures that I missed. LMK if you need any help. This is almost done, great work!

@nilesh05apr
Copy link
Contributor Author

nilesh05apr commented Dec 6, 2022

@fkiraly @achieveordie can you please review test results? it is failing for assertion error. Thank you

@achieveordie
Copy link
Collaborator

Regarding AssertionError in test_fit_does_not_overwrite_hyper_params:

An excellent way to see what went wrong is to check what the error is, here it says:

AssertionError: Estimator ResNetClassifier should not change or mutate the parameter optimizer from None to <keras.optimizers.optimizer_experimental.adam.Adam object at 0x7fbc8d5f2470> during fit.

which makes sense since we don't want to change parameters passed by the user. For that purpose, we actually use self.optimizer_ (and not self.optimizer) as the parameter we set in case the user doesn't provide any value. You can check out any of the accepted estimators to compare your own model since the only change thing that changes is the actual implementation of the estimator, the mechanics remain similar, if not the same.

@achieveordie
Copy link
Collaborator

Regarding AssertionError in test_fit_idempotent:

This is a known problem in DL estimators that sktime currently faces - check out issue #3616 for more details. All existing DL estimators, therefore, skips this test. This can be done by adding this estimator in sktime/tests/_config.py as hyperlinked.

@achieveordie
Copy link
Collaborator

(While we are still changing things, another easy win is renaming lr to learning_rate in the same line to avoid this warning.)

@achieveordie
Copy link
Collaborator

(Also, I would highly recommend adding yourself as a contributor by editing .all-contributorsrc). Check out this subsection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants