Closed mburges-cvl closed 1 year ago
You need to use the no_cmd_line
flag in the SpockBuilder (https://fidelity.github.io/spock/reference/builder#__init__) since ipython takes args and those clash with the ones that spock
automatically creates
Perfect, it works. Thank you very much 👍
Describe the bug
When loading a trained model together with a Spock config an error is thrown:
usage: ipykernel_launcher.py [-c CONFIG [CONFIG ...]] [-h] [--ModelConfig.save_path MODELCONFIG.SAVE_PATH] [--ModelConfig.lr MODELCONFIG.LR] pykernel_launcher.py: error: unrecognized arguments: --ip=127.0.0.1 --stdin=9028 ...
To Reproduce Steps to reproduce the behavior: Load config inside of a jupyter notebook:
config = SpockBuilder(ModelConfig, desc='Quick start example').save(file_name='config', file_extension='.yaml', create_save_path=True).generate() args = config.ModelConfig
--> Results in error.
Expected behavior The command line should probably be ignored inside a jupyter notebook.
Environment (please complete the following information):
Is this expected behavior? How could I circumvent this problem?