-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow parsing of nested numbers from config #400
Conversation
This pull request was exported from Phabricator. Differential Revision: D64138450 |
Summary: Nested arrays were not directly parseable from the config. E.g., [12, [2, 4], 2, [2.0, 4]] would raise an exception. If a nested array is detected, it will check whether the desired type is either a float or an int and if so, it'll evaluate the string as a number then recursively cast. If the desired type is neither a float nor an int, it will raise a ValueException. Differential Revision: D64138450
ebbf5bd
to
06dfaa7
Compare
Summary: Nested arrays were not directly parseable from the config. E.g., [12, [2, 4], 2, [2.0, 4]] would raise an exception. If a nested array is detected, it will check whether the desired type is either a float or an int and if so, it'll evaluate the string as a number then recursively cast. If the desired type is neither a float nor an int, it will raise a ValueException. Differential Revision: D64138450
06dfaa7
to
13de785
Compare
This pull request was exported from Phabricator. Differential Revision: D64138450 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D64138450 |
Summary: Nested arrays were not directly parseable from the config. E.g., [12, [2, 4], 2, [2.0, 4]] would raise an exception. If a nested array is detected, it will check whether the desired type is either a float or an int and if so, it'll evaluate the string as a number then recursively cast. If the desired type is neither a float nor an int, it will raise a ValueException. Differential Revision: D64138450
13de785
to
d4101eb
Compare
This pull request was exported from Phabricator. Differential Revision: D64138450 |
d4101eb
to
e561dc1
Compare
Summary: Nested arrays were not directly parseable from the config. E.g., [12, [2, 4], 2, [2.0, 4]] would raise an exception. If a nested array is detected, it will check whether the desired type is either a float or an int and if so, it'll evaluate the string as a number then recursively cast. If the desired type is neither a float nor an int, it will raise a ValueException. Differential Revision: D64138450
This pull request was exported from Phabricator. Differential Revision: D64138450 |
Summary: Nested arrays were not directly parseable from the config. E.g., [12, [2, 4], 2, [2.0, 4]] would raise an exception. If a nested array is detected, it will check whether the desired type is either a float or an int and if so, it'll evaluate the string as a number then recursively cast. If the desired type is neither a float nor an int, it will raise a ValueException. Reviewed By: crasanders Differential Revision: D64138450
e561dc1
to
8d5d543
Compare
This pull request was exported from Phabricator. Differential Revision: D64138450 |
Summary: To support more granular parameter settings in the future, we need to change the config style to be able to separately handle settings for each parameter. Currently the only setting for each parameter are the lower and upper bounds, but we also implement parameter types here (which currently does nothing). This is technically not a breaking change. Even though we have changed all documentation to match the new style, it is possible to define parameter bounds the old way. This will throw a warning however as this causes all parameter-specific bounds to be ignored. Old tests in test_config.py are also modified to match the new style unless specifically testing for these changes. Other tests not in test_config.py are left unchanged (this was the case for the previous major config change where experiment was a section). Reviewed By: crasanders Differential Revision: D63679916
Summary: Nested arrays were not directly parseable from the config. E.g., [12, [2, 4], 2, [2.0, 4]] would raise an exception. If a nested array is detected, it will check whether the desired type is either a float or an int and if so, it'll evaluate the string as a number then recursively cast. If the desired type is neither a float nor an int, it will raise a ValueException. Reviewed By: crasanders Differential Revision: D64138450
8d5d543
to
2d2304b
Compare
This pull request was exported from Phabricator. Differential Revision: D64138450 |
This pull request has been merged in a74d426. |
Summary:
Nested arrays were not directly parseable from the config. E.g., [12, [2, 4], 2, [2.0, 4]] would raise an exception.
If a nested array is detected, it will check whether the desired type is either a float or an int and if so, it'll evaluate the string as a number then recursively cast.
If the desired type is neither a float nor an int, it will raise a ValueException.
Differential Revision: D64138450