Skip to content
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

7994-enhance-mlpblock #7995

Merged
merged 8 commits into from
Aug 7, 2024

Conversation

yiheng-wang-nv
Copy link
Contributor

Fixes #7994 .

Description

The current implementation does not support tuple input of "GEGLU" since it only change the out features of the first linear layer when the input is a string of "GEGLU".

This PR enhances it, and also enable "vista3d" mode to support #7987
Tests are added to cover the changes.

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.

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
tests/test_mlp.py Outdated Show resolved Hide resolved
@KumoLiu
Copy link
Contributor

KumoLiu commented Aug 6, 2024

@yiheng-wang-nv, thanks for the pr, overall looks good to me.
please help fix the mypy issue: https://github.com/Project-MONAI/MONAI/actions/runs/10261750234/job/28390075552?pr=7995
Thanks.

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@yiheng-wang-nv
Copy link
Contributor Author

/build

2 similar comments
@KumoLiu
Copy link
Contributor

KumoLiu commented Aug 6, 2024

/build

@KumoLiu
Copy link
Contributor

KumoLiu commented Aug 6, 2024

/build

@KumoLiu
Copy link
Contributor

KumoLiu commented Aug 6, 2024

[2024-08-06T12:00:46.957Z] ======================================================================
[2024-08-06T12:00:46.957Z] ERROR: test_act_2 (tests.test_mlp.TestMLPBlock)
[2024-08-06T12:00:46.957Z] ----------------------------------------------------------------------
[2024-08-06T12:00:46.957Z] Traceback (most recent call last):
[2024-08-06T12:00:46.957Z]   File "/usr/local/lib/python3.9/dist-packages/parameterized/parameterized.py", line 620, in standalone_func
[2024-08-06T12:00:46.957Z]     return func(*(a + p.args), **p.kwargs, **kw)
[2024-08-06T12:00:46.957Z]   File "/home/jenkins/agent/workspace/MONAI-premerge/monai/tests/test_mlp.py", line 60, in test_act
[2024-08-06T12:00:46.957Z]     net = MLPBlock(**input_param)
[2024-08-06T12:00:46.957Z]   File "/home/jenkins/agent/workspace/MONAI-premerge/monai/monai/networks/blocks/mlp.py", line 57, in __init__
[2024-08-06T12:00:46.957Z]     self.fn = get_act_layer(act)
[2024-08-06T12:00:46.957Z]   File "/home/jenkins/agent/workspace/MONAI-premerge/monai/monai/networks/layers/utils.py", line 75, in get_act_layer
[2024-08-06T12:00:46.957Z]     return act_type(**act_args)
[2024-08-06T12:00:46.957Z] TypeError: __init__() got an unexpected keyword argument 'approximate'
[2024-08-06T12:00:46.957Z] 
[2024-08-06T12:00:46.957Z] ----------------------------------------------------------------------
[2024-08-06T12:00:46.957Z] Ran 14447 tests in 904.177s

@yiheng-wang-nv please help take a look at the ci error.

yiheng-wang-nv and others added 2 commits August 7, 2024 11:52
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@KumoLiu
Copy link
Contributor

KumoLiu commented Aug 7, 2024

/build

@KumoLiu
Copy link
Contributor

KumoLiu commented Aug 7, 2024

KumoLiu and others added 4 commits August 7, 2024 13:15
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
@yiheng-wang-nv
Copy link
Contributor Author

/build

@yiheng-wang-nv yiheng-wang-nv enabled auto-merge (squash) August 7, 2024 06:21
@KumoLiu
Copy link
Contributor

KumoLiu commented Aug 7, 2024

/build

@yiheng-wang-nv yiheng-wang-nv merged commit 49a1e34 into Project-MONAI:dev Aug 7, 2024
28 checks passed
@yiheng-wang-nv yiheng-wang-nv deleted the enhance-mlpblock branch August 7, 2024 09:32
KumoLiu pushed a commit to Project-MONAI/tutorials that referenced this pull request Aug 12, 2024
Fixes # .

### Description
This PR is used to update the path of morphological path according to
MONAI core changes: Project-MONAI/MONAI#7995.

### Checks
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [ ] Avoid including large-size files in the PR.
- [ ] Clean up long text outputs from code cells in the notebook.
- [ ] For security purposes, please check the contents and remove any
sensitive info such as user names and private key.
- [ ] Ensure (1) hyperlinks and markdown anchors are working (2) use
relative paths for tutorial repo files (3) put figure and graphs in the
`./figure` folder
- [ ] Notebook runs automatically `./runner.sh -t <path to .ipynb file>`

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@KumoLiu KumoLiu added this to the VISTA 3D [P0 v1.4] milestone Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

MLPBlock cannot support tuple input of GEGLU
2 participants