Fix(ExpManager): Resolve MLflow run_name duplicate argument error#15261
Open
chaosido wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
Open
Fix(ExpManager): Resolve MLflow run_name duplicate argument error#15261chaosido wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
chaosido wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
Conversation
Removes run_name from mlflow_kwargs before unpacking into MLFlowLogger. Also ensures DictConfig is converted to container first. Signed-off-by: chaosido <wonnink.jesse@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do ?
This PR resolves a TypeError in
exp_manager
when initializing the MLFlowLogger. The error occurs because MLFlowLogger is called with an explicit run_name=version argument while **mlflow_kwargs (serialized from a DictConfig schema) also contains a default run_name: None field, leading to a "multiple values for keyword argument" conflict.
Collection: Core / Utils
Changelog
Modified
nemo/utils/exp_manager.py
to convert mlflow_kwargs to a native dictionary and pop('run_name') before passing it to the MLFlowLogger constructor.
Usage
no changes
exp_manager:
create_mlflow_logger: true
mlflow_logger_kwargs:
experiment_name: my_experiment
tracking_uri: file://./mlruns
GitHub Actions CI
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
Before your PR is "Ready for review"
Pre checks:
Make sure you read and followed Contributor guidelines
Did you write any new necessary tests? (Benign fix to logging initialization)
Did you add or update any necessary documentation?
Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
Reviewer: Does the PR have correct import guards for all optional libraries? (MLflow is optional but already handled by existing imports)
PR Type:
New Feature
Bugfix
Documentation
Who can review?
@titu1994, @ericharper
Additional Information
Related to reported issues with MLflow integration in NeMo 2.x where Hydra schemas serialize default None values into keyword arguments.