Also, feel free to open a GH ticket (thank you for reporting this issue :d)
HomelyShells16 looks like some changes have been made to jsonargparse
and pytorch_lightning
since we released this binding feature. could you try with jsonargparse==3.19.4
and pytorch_lightning==1.5.0
? (no namespace parsing hack should be needed with these versions I believe)
Thanks SmugDolphin23 for the suggestion.
Sadly this does not solve the problem of having Namespace
s inside the config, which cannot be parsed by jsonargparse
when running remotely. The Error message is the same as shown https://github.com/allegroai/clearml/issues/403#issuecomment-1316689416 .
Hi HomelyShells16 How about doing things this way? does it work for you?
` class ClearmlLightningCLI(LightningCLI):
def init(self, *args, **kwargs):
Task.add_requirements("requirements.txt")
self.task = Task.init(
project_name="example",
task_name="pytorch_lightning_jsonargparse",
)
super().init(*args, **kwargs)
def instantiate_classes(self, *args, **kwargs):
super().instantiate_classes(*args, **kwargs)
self.task.execute_remotely(queue_name="Eugene")
if name == "main":
ClearmlLightningCLI(ImageClassifier, seed_everything_default=42, save_config_overwrite=True, run=True) `
I found a hack! 🎉 See the issue for details: https://github.com/allegroai/clearml/issues/403#issuecomment-1317362482
I'm able to reproduce, but your workaround seems to be the best one for now. I tried launching with clearml-task
command as well, but we have the same issue there: only argparse arguments are allowed.
AgitatedDove14 any better workaround for this, other than waiting for the jsonargparse issue to be fixed?
Awesome, thanks! Make sure to check out the linked issue, as I have added more findings there
HomelyShells16 Thanks for the detailed write-up and minimal example. I'm running it now too
I commented this and a bit more on an existing issue: https://github.com/allegroai/clearml/issues/403#issuecomment-1316689416