question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Relative path for s3 storage

See original GitHub issue

Description I have the following model repository structure:

model_repository
├── model1
│   ├── 1
│   │   ├── model.py
│   │   └── ...
│   └── config.pbtxt
├── model2
│   ├── 1
│   │   ├── model.py
│   │   └── ...
│   └── config.pbtxt
└── my_environment.tar.gz

to use my_environment.tar.gz in every config.pbtxt I have:

parameters: {
  key: "EXECUTION_ENV_PATH",
  value: {string_value: "$$TRITON_MODEL_DIRECTORY/../my_environment.tar.gz"}
}

This works when I have model_repository locally, however on s3 I get the error:

failed to load 'model' version 1: Internal: Failed to get the canonical path for /tmp/folderWE2Op7/../my_environment.tar.gz.

Triton Information What version of Triton are you using?

I use 22.03 docker image.

Is there an easy way to give relative paths on s3?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jbkyang-nvicommented, Nov 7, 2022

We twisted the code a bit so the above scenario will work. Please refer to the Python backend documentation for up-to-date limitation when using the “EXECUTION_ENV_PATH”, as we progressively improve its handling.

Any update? I face the same issue. How can I share python package on s3 storage between different python models? @kthui

@zhaozhiming37 this should be fixed in 22.11 release of Triton container

0reactions
achboggacommented, Dec 16, 2022

Cannot load relative pytorch weights file as well because of the path issue as shown below

1216 05:34:41.189214 1 pb_stub.cc:313] Failed to initialize Python stub: FileNotFoundError: [Errno 2] No such file or directory: '/models/iunuml3_loftr/loftr-384-pgf-v0.pt'
At:
  /tmp/python_env_X9Kpwj/0/lib/python3.8/site-packages/torch/serialization.py(251): __init__
  /tmp/python_env_X9Kpwj/0/lib/python3.8/site-packages/torch/serialization.py(270): _open_file_like
  /tmp/python_env_X9Kpwj/0/lib/python3.8/site-packages/torch/serialization.py(771): load
  /tmp/python_env_X9Kpwj/0/lib/python3.8/site-packages/iunuml3-0.0.1-py3.8-linux-x86_64.egg/iunuml3/utils/utils.py(35): load_model
  /tmp/folderPvjM0i/1/model.py(63): __init__
  /tmp/folderPvjM0i/1/model.py(128): initialize
I1216 05:34:42.444039 1 python_be.cc:1856] TRITONBACKEND_ModelInstanceInitialize: iunuml3_line_0 (GPU device 0)
E1216 05:34:42.558818 1 model_lifecycle.cc:597] failed to load 'iunuml3_loftr' version 1: Internal: FileNotFoundError: [Errno 2] No such file or directory: '/models/iunuml3_loftr/loftr-384-pgf-v0.pt'

Read more comments on GitHub >

github_iconTop Results From Across the Web

S3 not reading relative paths? - Stack Overflow
S3 objects live in buckets, not directories. · yes, that is true, but you can give a logical directory structure by creating folders...
Read more >
File paths in Amazon S3 - Media2Cloud - AWS Documentation
Table 1: File types and Amazon S3 file paths ; Uploaded file, S3:// <ingest-bucket> / <file-basename> / <filename> ; Technical metadata such as...
Read more >
S3 keys are not file paths - alexwlchan
S3 keys are not file paths ... But S3 isn't a filesystem; it's an object store. Each object is associated with a key,...
Read more >
Pure S3 Path Manipulation - s3pathlib 1.2.1 documentation
Relative Path : for example, the relative path from s3://bucket/folder/file.txt to s3://bucket/ IS folder/file.txt . A relative path can be joined with other ......
Read more >
Syntax for specifying the "relative path" to file Amazon S3
Syntax for specifying the "relative path" to file Amazon S3 ... I have for months been trying to make it possible to deliver...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found