-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FileNotFoundError in test_bundle_trt_export #8354
Comments
Hi @garciadias, could you please help take a look at this issue? It should be due to refactor that the file can't be found in this test. Thanks! |
Hi @KumoLiu, I think I have solved the problem. ======================================================================
ERROR: test_ngc_private_source_download_bundle_0 (tests.bundle.test_bundle_download.TestDownload)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rd24/kcl/MONAI/tests/test_utils.py", line 827, in command_line_tests
normal_out = subprocess.run(cmd, env=test_env, check=True, capture_output=True)
File "/home/rd24/.pyenv/versions/3.9.21/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['coverage', 'run', '-m', 'monai.bundle', 'download', '--args_file', '/tmp/tmpzbelz9a1/def_args.json', '--progress', 'False', '--source', 'ngc_private']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/rd24/kcl/MONAI/.venv/lib/python3.9/site-packages/parameterized/parameterized.py", line 620, in standalone_func
return func(*(a + p.args), **p.kwargs, **kw)
File "/home/rd24/kcl/MONAI/tests/bundle/test_bundle_download.py", line 189, in test_ngc_private_source_download_bundle
command_line_tests(cmd)
File "/home/rd24/kcl/MONAI/tests/test_utils.py", line 833, in command_line_tests
raise RuntimeError(f"subprocess call error {e.returncode}: {errors}, {output}") from e
RuntimeError: subprocess call error 1: b'Traceback (most recent call last):
File "/home/rd24/kcl/MONAI/monai/bundle/__main__.py", line 31, in <module>
fire.Fire()
File "/home/rd24/kcl/MONAI/.venv/lib/python3.9/site-packages/fire/core.py", line 135, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/rd24/kcl/MONAI/.venv/lib/python3.9/site-packages/fire/core.py", line 468, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/rd24/kcl/MONAI/.venv/lib/python3.9/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/home/rd24/kcl/MONAI/monai/bundle/scripts.py", line 558, in download
raise ValueError(f"repo should be in the form of `org/org_name/team/team_name` or `org/org_name`, got {repo_}.")
ValueError: repo should be in the form of `org/org_name/team/team_name` or `org/org_name`, got Project-MONAI/model-zoo/hosting_storage_v1.
', b"2025-02-19 09:47:40,313 - INFO - --- input summary of monai.bundle.scripts.download ---
2025-02-19 09:47:40,313 - INFO - > name: 'brats_mri_segmentation'
2025-02-19 09:47:40,313 - INFO - > bundle_dir: '/tmp/tmpzbelz9a1'
2025-02-19 09:47:40,313 - INFO - > source: 'ngc_private'
2025-02-19 09:47:40,313 - INFO - > remove_prefix: 'monai_'
2025-02-19 09:47:40,313 - INFO - > progress: False
2025-02-19 09:47:40,313 - INFO - ---
"
======================================================================
ERROR: test_ensemble (tests.integration.test_auto3dseg_ensemble.TestEnsembleBuilder)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rd24/kcl/MONAI/tests/integration/test_auto3dseg_ensemble.py", line 174, in test_ensemble
algo.train(_train_param)
File "/tmp/tmpicj_8wjl/workdir/algorithm_templates/dints/scripts/algo.py", line 496, in train
File "/home/rd24/kcl/MONAI/monai/apps/auto3dseg/bundle_gen.py", line 277, in _run_cmd
return run_cmd(cmd.split(), run_cmd_verbose=True, env=ps_environ, check=True)
File "/home/rd24/kcl/MONAI/monai/utils/misc.py", line 892, in run_cmd
return subprocess.run(cmd_list, **kwargs)
File "/home/rd24/.pyenv/versions/3.9.21/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', '/tmp/tmp32lmbvhi/workdir/dints_0/scripts/train.py', 'run', "--config_file='/tmp/tmp32lmbvhi/workdir/dints_0/configs/hyper_parameters.yaml,/tmp/tmp32lmbvhi/workdir/dints_0/configs/hyper_parameters_search.yaml,/tmp/tmp32lmbvhi/workdir/dints_0/configs/network.yaml,/tmp/tmp32lmbvhi/workdir/dints_0/configs/network_search.yaml,/tmp/tmp32lmbvhi/workdir/dints_0/configs/transforms_infer.yaml,/tmp/tmp32lmbvhi/workdir/dints_0/configs/transforms_train.yaml,/tmp/tmp32lmbvhi/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. Would you like me to solve these on this PR as well? |
Hi @garciadias, thank you for the quick fix! The first error you mentioned is due to the absence of a private NGC org arg setting, which has been configured in the CI environment, so that should be fine. As for the second issue, I will leave it to @mingxin-zheng help take a look at it. In the meantime, we can go ahead and merge your PR. Thanks again! |
Fixes #8354 ### Description Fixes path on test that is only run on special conditions. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] 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`. - [x] 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: R. Garcia-Dias <[email protected]> Co-authored-by: YunLiu <[email protected]>
One missing place: MONAI/tests/bundle/test_bundle_trt_export.py Line 111 in d98f348
cc @garciadias |
Fixes #8354 ### Description A few sentences describing the changes proposed in this pull request. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] 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: R. Garcia-Dias <[email protected]>
The text was updated successfully, but these errors were encountered: