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

Auto3dSeg integration test failed #8352

Open
KumoLiu opened this issue Feb 19, 2025 · 4 comments
Open

Auto3dSeg integration test failed #8352

KumoLiu opened this issue Feb 19, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Feb 19, 2025


[2025-02-18T14:51:32.598Z] ======================================================================

[2025-02-18T14:51:32.598Z] ERROR: test_ensemble (__main__.TestEnsembleBuilder)

[2025-02-18T14:51:32.598Z] ----------------------------------------------------------------------

[2025-02-18T14:51:32.598Z] Traceback (most recent call last):

[2025-02-18T14:51:32.598Z]   File "/home/jenkins/agent/workspace/Monai-notebooks/MONAI/tests/integration/test_auto3dseg_ensemble.py", line 174, in test_ensemble

[2025-02-18T14:51:32.598Z]     algo.train(_train_param)

[2025-02-18T14:51:32.598Z]   File "/tmp/tmpjr4iivmw/workdir/algorithm_templates/dints/scripts/algo.py", line 496, in train

[2025-02-18T14:51:32.598Z]   File "/home/jenkins/agent/workspace/Monai-notebooks/MONAI/monai/apps/auto3dseg/bundle_gen.py", line 277, in _run_cmd

[2025-02-18T14:51:32.598Z]     return run_cmd(cmd.split(), run_cmd_verbose=True, env=ps_environ, check=True)

[2025-02-18T14:51:32.598Z]   File "/home/jenkins/agent/workspace/Monai-notebooks/MONAI/monai/utils/misc.py", line 892, in run_cmd

[2025-02-18T14:51:32.598Z]     return subprocess.run(cmd_list, **kwargs)

[2025-02-18T14:51:32.598Z]   File "/usr/lib/python3.10/subprocess.py", line 526, in run

[2025-02-18T14:51:32.598Z]     raise CalledProcessError(retcode, process.args,

[2025-02-18T14:51:32.598Z] subprocess.CalledProcessError: Command '['python', '/tmp/tmpjr4iivmw/workdir/dints_0/scripts/train.py', 'run', "--config_file='/tmp/tmpjr4iivmw/workdir/dints_0/configs/hyper_parameters.yaml,/tmp/tmpjr4iivmw/workdir/dints_0/configs/hyper_parameters_search.yaml,/tmp/tmpjr4iivmw/workdir/dints_0/configs/network.yaml,/tmp/tmpjr4iivmw/workdir/dints_0/configs/network_search.yaml,/tmp/tmpjr4iivmw/workdir/dints_0/configs/transforms_infer.yaml,/tmp/tmpjr4iivmw/workdir/dints_0/configs/transforms_train.yaml,/tmp/tmpjr4iivmw/workdir/dints_0/configs/transforms_validate.yaml'", '--training#num_images_per_batch=2', '--training#num_epochs=2', '--training#num_epochs_per_validation=1']' returned non-zero exit status 1.

[2025-02-18T14:51:32.598Z] 

[2025-02-18T14:51:32.598Z] ----------------------------------------------------------------------

python -m tests.integration.test_auto3dseg_ensemble

cc @mingxin-zheng

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Feb 19, 2025

@KumoLiu KumoLiu added the bug Something isn't working label Feb 19, 2025
@KumoLiu
Copy link
Contributor Author

KumoLiu commented Feb 28, 2025

cc @garciadias

@garciadias
Copy link
Contributor

Hi @KumoLiu, I found the issue, but I am not sure how to solve it.

It is a file that gets generated during the test:

Exception has occurred: ImportError
cannot import name 'pytorch_after' from 'monai.networks.utils' (/home/rd24/kcl/MONAI/monai/networks/utils.py)
  File "/tmp/tmp7tok8tri/workdir/dints_0/scripts/train.py", line 48, in <module>
    from monai.networks.utils import pytorch_after
ImportError: cannot import name 'pytorch_after' from 'monai.networks.utils' (/home/rd24/kcl/MONAI/monai/networks/utils.py)

I see that a lot of what was changed in this PR has to do with pytorch_after, so it was probably something that was missed while eliminating it from this workflow.

I will keep investigating. Let me know if you know anything about this off the top of your head.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Feb 28, 2025

Hi @garciadias, thanks for investigation!

From the error log, it seems related to the auto3dseg template.
Could you please help create a PR in the research-contributions repo https://github.com/Project-MONAI/research-contributions/tree/main to fix the import issue?
https://github.com/Project-MONAI/research-contributions/blob/main/auto3dseg/algorithm_templates/dints/scripts/train.py#L48

BTW, if you could search whether there is any other wrong import under https://github.com/Project-MONAI/research-contributions/tree/main/auto3dseg/algorithm_templates would be great!

Thanks!

ericspod pushed a commit to Project-MONAI/research-contributions that referenced this issue Mar 2, 2025
Solving issue from MONAI repository:
[#8352](Project-MONAI/MONAI#8352)

Signed-off-by: R. Garcia-Dias <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants