clearml icon indicating copy to clipboard operation
clearml copied to clipboard

Task.set_script bug

Open MaxVanHoucke opened this issue 1 year ago • 3 comments

Describe the bug

When using Task.set_script and setting some parameters to the empty string (""), the values are not reset as would be expected. In the method code, the empty string is replaced by a python None, which seems to do nothing in the API call.

To reproduce

After cloning a task that has a repository, try to reset the repository by calling task.set_script(repository="")

Expected behaviour

The repository entry should be cleared, as mentioned in the docs.

Environment

  • Server type: self hosted
  • ClearML SDK Version: 1.9.0
  • ClearML Server Version: WebApp: 1.10.1-359 • Server: 1.10.1-359 • API: 2.24
  • Python Version: 3.8
  • OS: Macos

MaxVanHoucke avatar Aug 28 '23 13:08 MaxVanHoucke

Thanks for reporting @MaxVanHoucke.

We'll update when a fix is available.

ainoam avatar Aug 28 '23 14:08 ainoam

Thanks! For now I'm using the following workaround

script = new_task.data.script
script.repository = ''
new_task._update_script(script)

MaxVanHoucke avatar Aug 29 '23 07:08 MaxVanHoucke

Hey @MaxVanHoucke! Just letting you know that this issue has been resolved in the recently released v1.13.2. Let us know if there are any issues :)

pollfly avatar Nov 14 '23 08:11 pollfly