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

bug: Pulling latest version from Remote Yatai Store does not work on Windows - Path Error #4440

Closed
holzweber opened this issue Jan 22, 2024 · 2 comments · Fixed by #4456
Closed
Labels
bug Something isn't working

Comments

@holzweber
Copy link
Contributor

holzweber commented Jan 22, 2024

Describe the bug

I pushed a working model to our local Yatai server. However, I can not pull it again, as the latest model is not found on remote Bento store.
If I add the version code manually the Bento is found but, I get a BentoMLException.

Error with latest in the tag:
File "C:\edge_bento\main.py", line 11, in
main()
File "C:\edge_bento\edge_bento\main.py", line 7, in main
bentoml.pull("pytorch_mnist_demo:latest")
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\simple_di_init_.py", line 139, in _
return func(_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\bentoml\bentos.py", line 267, in pull
_cloud_client.pull_bento(tag, force=force, bento_store=bento_store)
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\simple_di_init
.py", line 139, in _
return func(
_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\bentoml_internal\cloud\bentocloud.py", line 416, in pull_bento
return self.do_pull_bento(
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\simple_di_init
.py", line 139, in _
return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\bentoml_internal\cloud\bentocloud.py", line 458, in _do_pull_bento
raise BentoMLException(f'Bento "{_tag}" not found on remote Bento store')
bentoml.exceptions.BentoMLException: Bento "pytorch_mnist_demo:latest" not found on remote Bento store

Error with specific version in the tag:
┌─────────────────────────────────────────────────────────────────────────────┐
│ Finished downloading model "pytorch_mnist:nr7glwfsc226qaav" files │
│ Successfully pulled model "pytorch_mnist:nr7glwfsc226qaav" │
│ Finished downloading all bento "pytorch_mnist_demo:eiijhwvsdsnssaav" files │
└─────────────────────────────────────────────────────────────────────────────┘
Pulling bento "pytorch_mnist_demo:eiijhwvsdsnssaav" --- 0.0% • 71… • ? • 0:0…
by…
Downloading model "pytorch_mnist:nr7glwfsc226qaav" --- 0.0% • 8,… • 11… • 0:0…
by… MB… Traceback (most recent call last):
File "C:\edge_bento\main.py", line 11, in
main()
File "C:\edge_bento\main.py", line 7, in main
bentoml.pull("pytorch_mnist_demo:eiijhwvsdsnssaav")
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\simple_di_init_.py", line 139, in _
return func(_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\bentoml\bentos.py", line 267, in pull
_cloud_client.pull_bento(tag, force=force, bento_store=bento_store)
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\simple_di_init
.py", line 139, in _
return func(
_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\bentoml_internal\cloud\bentocloud.py", line 416, in pull_bento
return self.do_pull_bento(
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\simple_di_init
.py", line 139, in _
return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\bentoml_internal\cloud\bentocloud.py", line 547, in _do_pull_bento
temp_fs.makedirs(str(p.parent), recreate=True)
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\fs\base.py", line 1124, in makedirs
dir_paths = tools.get_intermediate_dirs(self, path)
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\fs\tools.py", line 77, in get_intermediate_dirs
resource = fs.getinfo(path)
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\fs\osfs.py", line 283, in getinfo
_path = self.validatepath(path)
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\fs\osfs.py", line 686, in validatepath
return super(OSFS, self).validatepath(path)
File "C:\Users---\AppData\Local\miniconda3\envs\edge\lib\site-packages\fs\base.py", line 1581, in validatepath
raise errors.InvalidCharsInPath(path)
fs.errors.InvalidCharsInPath: path '/env\conda' contains invalid characters

To reproduce

import bentoml
def main() -> None:
    bentoml.pull("pytorch_mnist_demo:latest")
    _ = bentoml.load("pytorch_mnist_demo:latest")

if __name__ == "__main__":
    main()

Expected behavior

I would like to download the latest Bento from our Yatai Server.

Environment

bentoml, version 1.1.11
Python 3.10.13
platform: windows

@holzweber holzweber added the bug Something isn't working label Jan 22, 2024
@holzweber
Copy link
Contributor Author

temp_fs.makedirs(str(p.parent), recreate=True)

If I change the line to:

temp_fs.makedirs(str(p.parent).replace('\\', '/'), recreate=True)

it works on my windows system. Is there any problem encountered so far using bentoml with windows?

@holzweber holzweber changed the title bug: Pulling latest version from Remote Yatai Store does not work bug: Pulling latest version from Remote Yatai Store does not work on Windows - Path Error Jan 23, 2024
@AlexRaschl
Copy link

Hello, I have the same problem and your solution fixes it for me. Thanks!
Would be cool if you could include this in the next release.

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.

2 participants