allegroai / clearml

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution
https://clear.ml/docs
Apache License 2.0
5.42k stars 643 forks source link

Use a function of iterations (e.g. epochs) as the time scale for scalars and plots #1271

Open gabmis opened 1 month ago

gabmis commented 1 month ago

First off, thanks for this great tool!!

Proposal Summary

Be it the x-axis or the time index of plots, I would love to use derivatives of the iteration count, e.g. epoch count.

Motivation

Say I have experiments where ROC curves are logged every epoch but epoch length may vary in number of iterations. In that case I can't put my epoch ROCs on the same plot in a comparison view between those two experiments (with varying number of iterations per epoch). Making the time axis customizable would solve that! The same applies for scalars if you want to compare scalars at equal number of samples seen (i.e per epoch) then you want to plot with x-axis = epoch count and not iterations. That would be very useful! I'm expecting this might be several features on your side but the logic is the same and sounds very appealing to me :)

ainoam commented 1 month ago

@gabmis Makes perfect sense. Do note, however, that ClearML has no way of knowing in advance what granularity a metric/plot is planned to be reported at, so the way to go would be to still have the user report their metric/plot using the iteration variable (perhaps it should have been called index...) same as today, and also specify the intended x-axis (be it epoch or other) so that it would then be able to sync in comparison.

WDYT?

gabmis commented 1 month ago

@ainoam Thank you for your answer!

You're right, the user can choose to log with epochs instead of number of iterations. Yet, both are useful! What i then suggest is to allow user to swap the x-axis (change variables, if you will) using another reported quantity with the same x-axis. In my case I would have two scalars: loss against number of iterations epoch agains number of iterations and after swapping i would get loss against epoch Note that, the change of variable is valid if and only if the two plots have the same x-axis to begin with.