-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fixing some details for the tutorials to run. #997
Conversation
…ain__' so that it doesnt crash
@@ -52,13 +52,13 @@ | |||
# a ``ValueError`` will be raised. At least one of the results must have the type ``objective``, | |||
# the metric that is minimized by the algorithm. | |||
|
|||
if __name__ == '__main__': |
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.
This one is part of the sphink-gallery, which automatically convert the script into a sphinx page and a jupiter notebook. Maybe there could be a warning for macos user to try it using the jupiter notebook or encapsulating the code in a main function and running under if __name__ == '__main__'
.
@@ -259,8 +259,8 @@ def main( | |||
#%% | |||
# You can test the training pipeline before working with the hyperparameter optimization. | |||
|
|||
|
|||
main(epochs=4) | |||
if __name__ == '__main__': |
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.
Same thing here.
Thanks for the fixes! There is an issue with black formatting. You can look at black plugins in vscode to automatically format your code otherwise you can use the pre-commit hook as documented here: https://orion.readthedocs.io/en/latest/developer/ci.html. |
Description
While doing the tutorials, some code wasn't running properly. This PR is basically to fix that.
Changes
Adding some imports to the tutorial for scikit,
Fixing a small argument mistake for pytorch,
adding if name == 'main': in python script so that they dont crash on macos.
Tests
$ tox -e py38
; replace38
by your Python version if necessary)Documentation
Quality
$ tox -e lint
)