Skip to content

4563 Enhance the stats information of workflows#4888

Merged
Nic-Ma merged 24 commits intoProject-MONAI:devfrom
Nic-Ma:4563-enhance-get-stats
Aug 15, 2022
Merged

4563 Enhance the stats information of workflows#4888
Nic-Ma merged 24 commits intoProject-MONAI:devfrom
Nic-Ma:4563-enhance-get-stats

Conversation

@Nic-Ma
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma commented Aug 10, 2022

Fixes #4563 .

Description

This PR enhanced the stats information of trainer and evaluator workflows.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • 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.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 10, 2022

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 10, 2022

/build

@Nic-Ma Nic-Ma changed the title [WIP] 4563 Enhance the stats information of workflows 4563 Enhance the stats information of workflows Aug 10, 2022
@Nic-Ma Nic-Ma marked this pull request as ready for review August 10, 2022 09:54
@Nic-Ma Nic-Ma mentioned this pull request Aug 10, 2022
7 tasks
@Nic-Ma Nic-Ma force-pushed the 4563-enhance-get-stats branch from 647c309 to ba8b6ea Compare August 11, 2022 03:29
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 11, 2022

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 11, 2022

/build

1 similar comment
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 11, 2022

/build

@Nic-Ma Nic-Ma requested a review from ericspod August 11, 2022 10:58
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 11, 2022

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 11, 2022

/build

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 11, 2022

/build

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 12, 2022

/build

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 12, 2022

/build

@Nic-Ma Nic-Ma enabled auto-merge (squash) August 12, 2022 15:53
holgerroth
holgerroth previously approved these changes Aug 12, 2022
Copy link
Copy Markdown
Collaborator

@holgerroth holgerroth left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@holgerroth holgerroth left a comment

Choose a reason for hiding this comment

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

It looks good but I'm getting an error with the nvflare integration now:

Traceback (most recent call last):
  File "/home/hroth/Code2/nvflare/sim-project/yhwen-simulator/nvflare/app_common/pt/pt_file_model_persistor.py", line 199, in load_model
    data = self.model.state_dict() if self.model is not None else OrderedDict()
AttributeError: 'dict' object has no attribute 'state_dict'

@holgerroth holgerroth dismissed their stale review August 12, 2022 20:44

found error while testing

@holgerroth holgerroth mentioned this pull request Aug 12, 2022
7 tasks
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Aug 13, 2022

Hi @holgerroth ,

Thanks for your review and test.
I see the error message is in NVFlare, could you please help provide more information on MONAI side?

Thanks.

@holgerroth
Copy link
Copy Markdown
Collaborator

The issue came from using an old UNet style config in the NVFlare configuration.

>>> net = UNet(
...     dimensions=2,
...     in_channels=1,
...     out_channels=2,
...     channels=(16, 32, 64, 128, 256),
...     strides=(2, 2, 2, 2),
...     num_res_units=2,
...     norm="batch"
... )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() missing 1 required positional argument: 'spatial_dims'

Changing dimensions to spatial_dims solves the issue.

@wyli
Copy link
Copy Markdown
Contributor

wyli commented Aug 15, 2022

/build

@Nic-Ma Nic-Ma merged commit 4deb765 into Project-MONAI:dev Aug 15, 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.

Consider enhancing get_train_stats()

4 participants