Skip to content

clearml-agent 2.x ignoring CLI args #248

@OliverColeman

Description

@OliverColeman

Tried upgrading to version 2.0.3 and found that command line arguments do not seem to be passed when tasks have been launched from a CLI script. Downgraded to the latest 1.x version and it all works perfectly again.

The args:
Image

The script:

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Train a model, tracking results in ClearML.")
    parser.add_argument("config", type=argparse.FileType("r"), help="path to a configuration file, can be YAML or JSON")
    parser.add_argument("--overrides", nargs="*", help='eg --overrides a.1=123 a.b="hello"')
    args = parser.parse_args()
    ...

Console output:

[info     ] Command: `src/train_clearml.py` module=__main__
usage: train_clearml.py [-h] [--overrides [OVERRIDES ...]] config
train_clearml.py: error: the following arguments are required: config
Process failed, exit code 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions