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

upload local tensorboard logs to clearml server #1351

Open
XZLancer opened this issue Nov 25, 2024 · 2 comments
Open

upload local tensorboard logs to clearml server #1351

XZLancer opened this issue Nov 25, 2024 · 2 comments

Comments

@XZLancer
Copy link

Proposal Summary

Hi ClearML team, I have some local tensorboard logs in previous training, I‘d like to upload them to the cleaml server so that I can have a unified management and it is convenient for comparison. Is there a suitable way to achieve this? Thanks for your time and looking forward to your reply!

Motivation

Upload local tensorboard logs to clearml server for unified management and convenience checking

@eugen-ajechiloae-clearml
Copy link
Collaborator

Hi @XZLancer ! You could create a task for each previous training run you have logs for. If the logs contain scalars or plots, you could parse them and report them using https://clear.ml/docs/latest/docs/references/sdk/logger#report_scalar or other appropriate reporting functions from the clearml logger. Text logs can be reported to the experiment console logs with https://clear.ml/docs/latest/docs/references/sdk/logger#report_text.
Tasks can then be compared using the compare functionality in the UI. Reference: https://clear.ml/docs/latest/docs/webapp/webapp_exp_comparing/

@XZLancer
Copy link
Author

XZLancer commented Dec 3, 2024

I tried the following code snippet:

# Initialize TensorBoard EventAccumulator to read the logs
event_accumulator = EventAccumulator(tensorboard_log_dir)
event_accumulator.Reload()  # Load the events

# Get scalar tags (metrics like loss, accuracy, etc.)
scalar_tags = event_accumulator.Tags()["scalars"]

# Report scalar metrics to ClearML
for tag in scalar_tags:
    scalar_events = event_accumulator.Scalars(tag)
    for event in scalar_events:
        task.logger.report_scalar(
            title=tag,
            series=tag,
            value=event.value,
            iteration=event.step,
        )

and I found that it runs very slowly(it takes about 30 minutes to report the 25k steps of scalars). Are there any reasons or solution? Thanks for reply!
EDIT:
The program keeps reporting

Retrying (Retry(total=237, connect=240, read=237, redirect=240, status=240)) after connection broken by 'ReadTimeoutError("HTTPConnectionPool(host='192.168.104.2', port=8010): Read timed out. (read timeout=300.0)")': /v2.13/events.add_batch

and the scalars are displayed much slower in the webUI than the program reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants