question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Support click CLI

See original GitHub issue

I am using ‘click’ instead of argparse for my CLI, therefore command line arguments are not recognised as such. This causes problems when using clearml-agent and remote execution. If i understood correctly, the task is pulled by the agent and after environment setup, the worker calls the training script again, with the command line arguments catched from ArgumentParser. Using click, this leads to the problem, that command line arguments are not recorded, and the remote worker fails, because no command line arguments are provided. My current workaround is, to use default arguments and task.connect() on those, such that the default arguments are updated after the task has been started by the agent. However, this solution does not allow to use ‘required’ command line arguments.

The following MWE, when called with ‘python mwe.py --dataset CUSTOM_DATASET’ would print ‘CUSTOM_DATASET’ on my local machine but on the remote machine it would use the default parameter ‘DEFAULT_DATASET’. Making the parameter --dataset required, the script would crash.

import clearml
import click

@click.command()
@click.option('--dataset', type=str, default='DEFAULT_DATASET')
def main(dataset):

    print(dataset)

    task = clearml.Task.init(project_name='example_project', task_name='example_task')
    task.execute_remotely(queue_name='example_queue')


if __name__ == '__main__':
    main()

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
klekasscommented, Jul 19, 2021

Works! 🥳 Thanks!

1reaction
bmartinncommented, Jul 15, 2021

Hi @klekass A fix was pushed, it should work now 🤞 , could you verify on your code ?

pip install git+https://github.com/allegroai/clearml.git
Read more comments on GitHub >

github_iconTop Results From Across the Web

Welcome to Click — Click Documentation (8.1.x)
Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It's the...
Read more >
create-feature — AWS CLI 1.27.16 Command Reference
Do you have a suggestion to improve the documentation? Give us feedback. ... To view this page for the AWS CLI version 2,...
Read more >
Feature request: cli, cli, cli!
In appCode, you can build and run in the simulator with one click. To the best of my knowledge, nobody has figured out...
Read more >
Submit Feedback — MongoDB Compass
Enterprise Support; Submit a Bug Report; Submit a Feature Request; Other Feedback ... Click Create in the top navigation bar in JIRA to...
Read more >
DrChrono Feature Requests
We check these daily, and welcome every and any suggestion to help keep DrChrono the best EHR on the market! Click here to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found