How can I get the value of the "--extra-files" option in the handler?
See original GitHub issueFor example, the value of the “–serializedFile” option can be obtained with the following code
#Initialization functions in the handler class
def initialize(self, context):
self.manifest = context.manifest
serialized_file = self.manifest['model']['serializedFile']
How can I get the value of the “–extra-files” option?
Best regards.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
serve/README.md at master · pytorch/serve - GitHub
We have copied the files from above example and made small changes to save the model's state dict and added default values. Training...
Read more >Bootstrap your own Handler: How and why to create custom ...
What we need to add is the --extra-files option when creating your model archive. This is a comma-separated list of file paths that...
Read more >ASP.NET Web Deployment using Visual Studio - Microsoft Learn
If you wanted to copy the ExtraFiles folder itself, the DestinationRelativePath value would be ExtraFiles%(RecursiveDir)%(Filename)%(Extension).
Read more >Can parameters be used within extra files? - Stack Overflow
1 Answer 1 ... Read the contents of the file into a buffer. Be sure to allow the size of your buffer to...
Read more >plugin - mkdocstrings
The value is the name of the handler module. Default is "python". handlers : Global configuration of handlers. You can set global configuration...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Shin-ichi-Takayama model-archiver manifest file format should be transparent to users. In other words, Torchseve can implement it in whatever format. Users don’t care as long as TorchServe provide API to allow users handler to be able to access the input items from model archiver command line.
existing model archiver only includes extra-files input from cmd-line, does not add sth like “extraFiles” in manifest model item. Wait for @chauhang to confirm the existing behavior is expected or not.
So there is no way for you to write code such as
Let’s assume you are mar file creator. You know the input extra files. Then you can directly access the extra files in handler via model_dir/extra-fileXXX.
@lxning Thank you very much. I understand now. My question has been answered and I will close this issue.