Skip to content
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

Mdn cleanup/deprecating hidden features #27

Merged

Conversation

anasbekheit
Copy link
Contributor

Deprecated parameter hidden_features in mdn.py

Problem Description

Previously users were required to pass in hidden_features which is un-necessary and introduces the following problems

  • Users are required to keep track of their hidden_net output in their code in order to pass it properly which adds unnecessary overhead on the user.
  • In the case that the user passes a wrong hidden_features that doesn't match hidden_net output the code fails.

Proposed Solution

Instead of requiring the user to provide hidden_features, the code should infer hidden_features from hidden_net.

Other Considerations

Code has to maintain backwards compatibility with code that is maybe using hidden_features as a positional argument.

This is done by converting hidden_features, hidden_net, num_components into kwargs and manually checking for their existence.

Misc

added .idea/ to .gitignore to support Idea IDEs

Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

Thanks for contributing this @anasbekheit !

It all looks good. I just made a couple of suggestions: keep hidden_net and num_components as required args; use hidden_features when it is passed and make sure it fits.

Once those are in, it's good to be merged.
Thanks again 🙏

pyknos/mdn/mdn.py Outdated Show resolved Hide resolved
pyknos/mdn/mdn.py Outdated Show resolved Hide resolved
pyknos/mdn/mdn.py Outdated Show resolved Hide resolved
@janfb
Copy link
Contributor

janfb commented Apr 9, 2024

Another comment: We are planning to re-license pyknos under the Apache 2.0 license, see #28 .

Please comment under this PR that you approve this re-licensing, otherwise we will not be able to merge the PR.

Thanks!

anasbekheit and others added 3 commits April 9, 2024 12:10
Co-authored-by: Jan <janfb@users.noreply.github.com>
Co-authored-by: Jan <janfb@users.noreply.github.com>
Co-authored-by: Jan <janfb@users.noreply.github.com>
@anasbekheit
Copy link
Contributor Author

Another comment: We are planning to re-license pyknos under the Apache 2.0 license, see #28 .

Please comment under this PR that you approve this re-licensing, otherwise we will not be able to merge the PR.

Thanks!

Sure, no worries! I approve of the re-licensing of the code.

@anasbekheit
Copy link
Contributor Author

Thanks for contributing this @anasbekheit !

It all looks good. I just made a couple of suggestions: keep hidden_net and num_components as required args; use hidden_features when it is passed and make sure it fits.

Once those are in, it's good to be merged. Thanks again 🙏

Hi @janfb, thanks for taking the time to review, I committed your suggestions, let me know if anything else needs polishing.

Cheers!

@janfb
Copy link
Contributor

janfb commented Apr 9, 2024

Yes @anasbekheit , could you please merge main into your branch to resolve the merge conflicts?
That'd be great 🙏

@anasbekheit
Copy link
Contributor Author

@janfb

Yes @anasbekheit , could you please merge main into your branch to resolve the merge conflicts? That'd be great 🙏

I am not sure I understand, I did a git pull, there were no conflicts with main.

@janfb
Copy link
Contributor

janfb commented Apr 11, 2024

@janfb

Yes @anasbekheit , could you please merge main into your branch to resolve the merge conflicts? That'd be great 🙏

I am not sure I understand, I did a git pull, there were no conflicts with main.

My bad, only the rebasing would not work due to your changes. Squashing works just fine.
Thanks!

@janfb janfb merged commit 1ef957d into sbi-dev:main Apr 11, 2024
1 check failed
@janfb janfb mentioned this pull request Apr 11, 2024
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.

2 participants