lincc-frameworks / lincc-frameworks/hyrax

`_log_params()` in `train.py` is not necessarily logging the correct optimizer/criterion and parameters

Open
#685 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
41
Forks
7
Avg merge
5d 1h
Merged PRs (30d)
8

Description

The `_log_params()` function in `train.py` currently logs the optimizer and criterion as follows:
```
# Log the criterion and optimizer params
criterion_name = config["criterion"]["name"]
mlflow.log_param("criterion", criterion_name)
if criterion_name in config:
mlflow.log_params(config[criterion_name])

optimizer_name = config["optimizer"]["name"]
mlflow.log_param("optimizer", optimizer_name)
if optimizer_name in config:
mlflow.log_params(config[optimizer_name])
```
The issue is that the user may have overriden the config by directly defining these attributes and/or their parameters in the model, so the config is not necessarily correct. We should try recovering the correct names and parameters from the model instead of just copying what is in the config,

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in train.py at _log_params() and trace how the model exposes its optimizer, criterion, and their parameters. Compare those values with the current config-based logging, then exercise the training and logging path to confirm MLflow records the model-selected names and parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.