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

Unsuitable default value to bundle_root in ckpt_export #7123

Closed
KumoLiu opened this issue Oct 12, 2023 · 0 comments · Fixed by #7124
Closed

Unsuitable default value to bundle_root in ckpt_export #7123

KumoLiu opened this issue Oct 12, 2023 · 0 comments · Fixed by #7124
Assignees
Labels
bug Something isn't working

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Oct 12, 2023

Introduced by #6965 which fixed the bundle_root to os.getcwd() without updating.

[2023-10-12T08:17:01.366Z] Traceback (most recent call last):
[2023-10-12T08:17:01.366Z]   File "/root/.local/share/virtualenvs/MONAI-zoo-premerge-CHR6GQKS/lib/python3.8/site-packages/monai/bundle/config_item.py", line 377, in evaluate
[2023-10-12T08:17:01.366Z]     return eval(value[len(self.prefix) :], globals_, locals)
[2023-10-12T08:17:01.366Z]   File "<string>", line 1, in <module>
[2023-10-12T08:17:01.366Z]   File "/root/.local/share/virtualenvs/MONAI-zoo-premerge-CHR6GQKS/lib/python3.8/site-packages/torch/serialization.py", line 771, in load
[2023-10-12T08:17:01.366Z]     with _open_file_like(f, 'rb') as opened_file:
[2023-10-12T08:17:01.366Z]   File "/root/.local/share/virtualenvs/MONAI-zoo-premerge-CHR6GQKS/lib/python3.8/site-packages/torch/serialization.py", line 270, in _open_file_like
[2023-10-12T08:17:01.366Z]     return _open_file(name_or_buffer, mode)
[2023-10-12T08:17:01.366Z]   File "/root/.local/share/virtualenvs/MONAI-zoo-premerge-CHR6GQKS/lib/python3.8/site-packages/torch/serialization.py", line 251, in __init__
[2023-10-12T08:17:01.366Z]     super(_open_file, self).__init__(open(name, mode))
[2023-10-12T08:17:01.366Z] FileNotFoundError: [Errno 2] No such file or directory: './models/search_code_18590.pt'
@KumoLiu KumoLiu self-assigned this Oct 12, 2023
@KumoLiu KumoLiu added the bug Something isn't working label Oct 12, 2023
KumoLiu added a commit to KumoLiu/MONAI that referenced this issue Oct 12, 2023
Signed-off-by: KumoLiu <[email protected]>
wyli pushed a commit that referenced this issue Oct 12, 2023
Fixes #7123

### 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: KumoLiu <[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

Successfully merging a pull request may close this issue.

1 participant