-
Notifications
You must be signed in to change notification settings - Fork 38
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
logger: extend with log_param
#100
Comments
Hyperparameters can be tracked in
Do you think this is enough? Is there some additional benefit to adding a |
I see your points and totally agree with encouraging the separation between
As far as I know,
I think that current users of However in the "train stage" we use a ML Framework + ML Logger integration that If we replace our current ML Logger with
In the context of using In addition, I see a specific use case where class MyTuner(kt.Tuner):
def run_trial(self, trial, ...):
for k, v in trial.hyperparameters.items():
dvclive.log_param(k, v)
...
metrics = ...
for k, v in metrics.items():
dvclive.log(k, v)
# create checkpoint with params and metrics for this "trial"
dvclive.next_step()
I think that would be quite helpful, although it'd probably be better discussed in a separated Regardless of reducing boilerplate, there are scenarios where I don't see how replacing |
Okay, so it's about extracting metadata from the model object, right? If the model is saved, this is usually going to be available I think, but extracting that metadata to a human-readable file makes sense. We might need to think through whether this is the best way to capture that info so that it integrates well with dvc. It seems pretty different from
Support for hyperparameter searches is a great point, and I like the proposal, although that might be a bit off-topic, and might need to start with dvc before worrying about dvclive support. I was just thinking about this earlier in iterative/dvc#6194 (comment). |
Reporting model object meta data is a good motivation for What are the examples of model object metadata that will need params files, not metrics? |
I'd be interested to hear what @daavoo thinks. In the past, I have logged whatever I can about the model object, which mostly included implicit parameters like default values that I didn't specify. These mostly weren't that useful in my case since they didn't change between experiments, but it was still occasionally nice to be able to know what those parameter values were without having to load the model to extract them. |
For reference, review existing ML Logger integrations with It looks like |
In may occasions I have found the params automatically logged by other ML Loggers quite useful, specially when collaborating with other people to train the same model, or even I have found myself not caring about a param until i read a paper that showcases how critical it could be. For example (toy example to get the point), the In the context of |
I wonder how we could integrate this functionality whit DVC. In our designated workflow, the training code reads the params, so that DVC can take control over params files. When we implement this, we will also have params, but they will be more of "run information", rather than control parameter, so in a way, they will resemble metrics. |
Motivation
Other popular ML Loggers have methods for logging and tracking hyperparameters:
The existence of these methods are useful when building integrations with ML Frameworks, as they are commonly used to automatically log and track internal configuration:
When using
dvclive
as an alternative to those ML Loggers, that information is being lost.Proposal
It could be useful to extend
dvclive
with a newlog_param
method in order to cover these needs.I think that
dvclive.log_param
could just write the values to an output file in yaml format (i.e. defaultdvclive.yml
). This way, there could be a good similarity with existing outputs ofdvclive
and how they integrate withdvc
features:dvclive/*.tsv
->dvc plots
dvclive.json
->dvc metrics
dvclive.yml
->dvc params
In addition to that, existing and future integrations of
dvclive
with ML Frameworks will have a closer feature parity when compared to other ML Logger alternatives.The text was updated successfully, but these errors were encountered: