-
Notifications
You must be signed in to change notification settings - Fork 23
Allow units to be specified as tuple #66
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
Conversation
|
Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:
|
|
We should also change the documentation of what units can be on line 428 of the lstm_model.py file. |
src/progpy/data_models/lstm_model.py
Outdated
| params['units'] = [params['units'] for _ in range(params['layers'])] | ||
| if not isinstance(params['units'], (list, np.ndarray)): | ||
| if not isinstance(params['units'], (list, np.ndarray, tuple)): | ||
| raise TypeError(f"units must be a list of integers, not {type(params['units'])}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the exceptions to mention that 'units must be a sequence of integers' instead of 'a list'?
Actually, I disagree on this one. Any way we change it I think it would make this more confusing for the user. I think it's fine to just have it as an undocumented feature and list one sequence type in the documentation. |
Makes sense. I was going to offer a suggested change, but it was a bit hard to come up with one. Leaving it as it is works! |
Codecov Report
@@ Coverage Diff @@
## dev #66 +/- ##
=======================================
Coverage 84.19% 84.19%
=======================================
Files 99 99
Lines 10110 10111 +1
=======================================
+ Hits 8512 8513 +1
Misses 1598 1598
|
No description provided.