allegroai / clearml

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution

Home Page:https://clear.ml/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parameter type defaults to string in experiment window

CourchesneA opened this issue · comments

Describe the bug

Using the clearml dashboard, I can clone and enqueue experiments with different parameters. When a parameters is null for the base experiments, it does not get assigned a type. If I try to clone and change that parameters, it will default to a string and might not be able to be parsed if another type is expected by argparse / jsonargparse.

I tested with a list type, and got the following error from jsonargparse:

ValueError: Does not validate against any of the Union subtypes
Subtypes: (<class 'list'>, <class 'NoneType'>)
Errors:
  - Expected a <class 'list'>
  - Expected a <class 'NoneType'>
Given value type: <class 'str'>
Given value: [600, 500]

In this scenario, I would have liked that config field to be parsed as a list of int, but it was passed as a string and resulted in an error. If I clone an experiment for which this parameter is non-null, it already has the type "list/int" and works fine

To reproduce

From a Pytorch Lightning or jsonargparse experiment, create an experiment with a list parameter and run it. Then, clone the experiment, and assign this parameter a non-empty value from the dashboard, and enqueue this experiment.

Expected behaviour

The config file should be parsed in the proper type. For example, if jsonargparse is expecting a list for the param and a value of "[1,2] is supplied, it should not be passed as a string and crash the program

Environment

  • Server type app.clear.ml

@CourchesneA How is the parameter initially set with a NULL value (before you try to modify it)?

Using a YAML config file, initially generated with the --print_config flag (i.e. python trainer.py fit --print_config), most parameters are set to null:

min_steps: null

image