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

OutputModel.config_dict causes "E AttributeError: 'DummyModel' object has no attribute 'locked'" #1243

Open
dpinol opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dpinol
Copy link

dpinol commented Apr 9, 2024

Describe the bug

Exception when calling assigning config_dict to an offline Task.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dani/.local/share/virtualenvs/sc-api-DipHMMiG/lib/python3.11/site-packages/clearml/model.py", line 2111, in config_dict
    self.update_design(config_dict=value)
  File "/home/dani/.local/share/virtualenvs/sc-api-DipHMMiG/lib/python3.11/site-packages/clearml/model.py", line 2697, in update_design
    if not self._validate_update():
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dani/.local/share/virtualenvs/sc-api-DipHMMiG/lib/python3.11/site-packages/clearml/model.py", line 2846, in _validate_update
    if self.id and self.published:
                   ^^^^^^^^^^^^^^
  File "/home/dani/.local/share/virtualenvs/sc-api-DipHMMiG/lib/python3.11/site-packages/clearml/model.py", line 2071, in published
    return self._get_base_model().locked
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DummyModel' object has no attribute 'locked'

To reproduce

from clearml import OutputModel, Task
Task.set_offline(True)
_writer: Task = Task.init(project_name="test", task_name="task")
_curr_model = OutputModel(task=self._writer, name="curr")
_curr_model = OutputModel(task=_writer, name="curr")
_curr_model.config_dict = {"kk": 3}

## Expected behaviour
No error

## Environment
* Server type (app.clear.ml)
* ClearML SDK Version: 1.15.0
* Python Version: 3.11.5
* OS: Ubuntu 23.10
 
@dpinol dpinol added the bug Something isn't working label Apr 9, 2024
@ainoam
Copy link
Collaborator

ainoam commented Apr 9, 2024

Thanks for letting us know @dpinol - Hope to have a fix available soon.

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

2 participants