Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] RESTAPI seems to convert null parameter values to a string 'None' #631

Open
jtsextonMITRE opened this issue Aug 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jtsextonMITRE
Copy link
Collaborator

I believe this is a separate bug from #607

While #607 deals with default parameters in the parameters: section of the entrypoint YAML, this is for default literal values of inputs within the task graph. From what I can tell, at least some of these inputs are processed properly, as integers do seem to show up as integers.

For example, this correctly processes .01 and 5 as a float and an integer respectively:

  callbacks:
    get_callbacks:
      - - name: EarlyStopping
          parameters:
            monitor: val_loss
            min_delta: .01
            patience: 5
            restore_best_weights: true
    dependencies:
      - init_tensorflow

However, when I read this in from the YAML file on the client side via python, the null in YAML becomes None in python, which when uploaded to the RESTAPI becomes "None":

  testing_dataset:
    create_dataset:
      data_dir: $testing_dir
      subset: null
      image_size: $image_size
      seed: $dataset_seed
      validation_split: null
      batch_size: $batch_size
    dependencies:
      - init_tensorflow

In this example, subset does not throw a validation error because it is typed as union: [string, "null"] (so string is a valid type), but validation_split is typed as union: [number, "null"], so the validation fails, but both are ultimately wrong as neither are None by the time it reaches the task engine.

I also tried with directly uploading a string "null", which just stays as a string "null" all the way through the task engine.

Long story short if we don't have one already I think there needs to be a way to specify nulls through strings, which seems to have been lost since we're no longer directly uploading the YAML file from the client to the worker.

@jtsextonMITRE jtsextonMITRE added the bug Something isn't working label Aug 22, 2024
@jtsextonMITRE
Copy link
Collaborator Author

after more testing, I believe this was just the fault of uploading JSON-formatted yaml instead of uploading portions of the yaml file directly for the task graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant