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

Metrics reporting with OutputModel while in offline mode results in an error #1172

Open
GuillaumeRoy33 opened this issue Dec 11, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@GuillaumeRoy33
Copy link

Describe the bug

Calling one of the reporting methods of the OutputModel class after its task has been set offline results in an error. The method crashes with the following error:

File "/home/(...)/.venv/lib/python3.9/site-packages/clearml/backend_interface/metrics/interface.py", line 62, in __init__
    offline_folder = Path(task.get_offline_mode_folder())
AttributeError: 'OutputModel' object has no attribute 'get_offline_mode_folder'

To reproduce

Here is a code bit reproducing this error:

Task.set_offline(offline_mode=True)
task = Task.init(
    project_name="test",
)
output_model = OutputModel(task=Task.current_task())
output_model.report_scalar(title="Some title", series="Some series", value=1.0, iteration=5)

Expected behaviour

I would have expected the OutputModel class to either log the metrics in its local file system or, if this is not possible, raise an error earlier when it was initialized with an offline task.

Environment

  • Server type (self hosted \ app.clear.ml) : self-hosted
  • ClearML SDK Version : 1.13.2
  • ClearML Server Version : 1.12.0-393
  • Python Version : 3.9.18
  • OS : Ubuntu 20.04

Related Discussion

N/A

@GuillaumeRoy33 GuillaumeRoy33 added the bug Something isn't working label Dec 11, 2023
@ainoam
Copy link
Collaborator

ainoam commented Dec 11, 2023

Thanks for reporting @GuillaumeRoy33. We'll take a look.

@pollfly
Copy link
Contributor

pollfly commented May 9, 2024

Hey @GuillaumeRoy33! Just letting you know that this issue has been resolved in v1.15.0. Let us know if there are any issues :)

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

3 participants