Skip to content

5385-enhance-mlflow-handler#5388

Merged
wyli merged 63 commits into
Project-MONAI:devfrom
binliunls:5385-enhance-mlflow-handler
Dec 2, 2022
Merged

5385-enhance-mlflow-handler#5388
wyli merged 63 commits into
Project-MONAI:devfrom
binliunls:5385-enhance-mlflow-handler

Conversation

@binliunls

@binliunls binliunls commented Oct 24, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: binliu binliu@nvidia.com

Fixes #5385 .

Description

This PR is about to enhance the mlflow handler in monai to track more details in the experiment. Here are a few enhancements
that needs to be added through this PR.

  • API for users to add experiment/run name in MLFlow
  • API for users to log customized params for each run
  • Methods to log result images
  • Methods to log optimizer params
  • (optional) additional metric_names as a user argument to override the default engine.state.metrics to instruct MLFlow about metrics to log

After adding these enhancements, some tests listed below should be excuted.

  • Make sure this handler works in multi-gpu environment
  • Make sure this handler works in all existed bundles

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.
  • API for users to add experiment/run name in MLFlow
  • API for users to log customized params for each run
  • Methods to log result images
  • Methods to log optimizer params
  • Make sure this handler works in multi-gpu environment
  • Make sure this handler works in all existed bundles

Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Comment thread monai/handlers/mlflow_handler.py Outdated
Comment thread monai/handlers/mlflow_handler.py Outdated
Comment thread monai/handlers/mlflow_handler.py
binliunls and others added 4 commits October 27, 2022 07:08
Comment thread monai/handlers/mlflow_handler.py Outdated
binliunls and others added 3 commits November 2, 2022 15:29

@Nic-Ma Nic-Ma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, put some comments inline.
Need @wyli @ericspod @vfdev-5 for more design discussion.

Thanks in advance.

Comment thread monai/handlers/mlflow_handler.py Outdated
Comment thread monai/handlers/mlflow_handler.py Outdated
Comment thread monai/handlers/mlflow_handler.py
Comment thread monai/handlers/mlflow_handler.py Outdated
@Nic-Ma

Nic-Ma commented Nov 11, 2022

Copy link
Copy Markdown
Contributor

Please ensure we can call these get_config_values() and get_optional_config_values() functions to track the system env info in MLFlow:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/config/deviceconfig.py#L48-L81

CC @wyli

Thanks.

binliunls and others added 12 commits November 15, 2022 14:34
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Comment thread monai/handlers/mlflow_handler.py Outdated
Comment thread monai/handlers/mlflow_handler.py Outdated
binliunls and others added 7 commits December 1, 2022 07:35
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
…ould set iteration_log=False to avoid this

Signed-off-by: binliu <binliu@nvidia.com>

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I put some minor comments inline

Comment thread monai/bundle/utils.py Outdated
Comment thread monai/bundle/utils.py Outdated
Comment thread monai/handlers/mlflow_handler.py Outdated
binliunls and others added 4 commits December 1, 2022 12:44
… bundle/utils

Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, @Nic-Ma pls let me know if you still have comments otherwise I'll merge this later today

@wyli

wyli commented Dec 1, 2022

Copy link
Copy Markdown
Contributor

/build

Comment thread monai/bundle/utils.py Outdated
Comment thread monai/handlers/mlflow_handler.py Outdated
Comment thread monai/handlers/mlflow_handler.py
@Nic-Ma

Nic-Ma commented Dec 1, 2022

Copy link
Copy Markdown
Contributor

Could you please help also add the experiment_name and run_name in this doc-string example:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/bundle/scripts.py#L549

Thanks.

Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Comment thread monai/bundle/scripts.py
…usion

Signed-off-by: binliu <binliu@nvidia.com>
@Nic-Ma Nic-Ma requested a review from wyli December 2, 2022 15:47
@Nic-Ma

Nic-Ma commented Dec 2, 2022

Copy link
Copy Markdown
Contributor

/build

@wyli wyli enabled auto-merge (squash) December 2, 2022 16:07
@wyli wyli merged commit 7b41e2e into Project-MONAI:dev Dec 2, 2022
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

Successfully merging this pull request may close these issues.

Enhance MLFlowHandler

4 participants