Snapshot branch: Starting model server fails
Now that the model server installs, it's failing to start. This command:
torchserve --start --model-store modelstore
...gets this result:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/ts/bin/torchserve", line 11, in <module>
sys.exit(start())
File "/home/ubuntu/anaconda3/envs/ts/lib/python3.6/site-packages/ts/model_server.py", line 30, in start
if args.version or args.v:
AttributeError: 'Namespace' object has no attribute 'v'
Attempting to work around by adding -v or --version responds with the usage info and a different error message:
torchserve: error: argument -v/--version: not allowed with argument --start
I'm going to see if I can code around this so I can actually test.
@harshbafna , please explain how you're testing your changes prior to checking in. Being unable to install the server yesterday or start it today, as well as previous events (e.g. #35), has me thinking we need to put a process in place if we're going to release on time.
As an addendum, torchserve -v also gives an error message:
torchserve: error: the following arguments are required: --model-store
So the server can neither be started nor return version info.
@fbbradheintz : Yesterday only code changes were available as part of the snapshot feature implementation and UT were not updated, hence the failure in installation. Currently, we updated the existing UTs to work as per the new changes and still working on adding new TestCases to verify all scenarios related to snapshot feature.
Error related to -v/--version flag and --model-store flag
This got introduced due to the changes related to version flag in the stage_release branch and merging the parent branch (stage_release) to snapshot branch. I have updated the code and merged the changes in both the branches.
With snapshot feature, the --model-store flag is not mandatory as the dynamically loaded models from public URLs will be saved in the model-store. We have already updated the documentation for the same.
@harshbafna To help further can we please share the output of results from UTs and startup scripts with the latest commits on this branch here? Clearly stating what was tested?
Installation and UT logs files :
Frontend build suite.log Model Archive Installation.log Model Archiver IT.log Model archiver UT.log Python backend UT.log TorchServe Installation.log
Setup steps
-
Setup Java/Python environment using steps provided in README guide.
-
install TorchServe with
snapshotbranch using following command
git clone https://github.com/pytorch/serve.git
cd serve
git checkout snapshot
pip install .
Start torchserve
torchserve --start --model-store <path_to_model_store_directory>
model-store is now a mandatory property and all models registered from public URLs will be stored in model-store directory.
Note
- CI build is currently failing for the one of the new UTs related to snapshot verification. However the UT is passing on local dev setup and on fresh Ubuntu 18.0.4 EC2 instance. We will look into the root cause of the CI build failure.
- We are still working on adding more UT coverage for various use cases related to snapshot feature.
- For asynchronous register/model scale API calls, the snapshot is saved only when the execution is successfully completed at the server and not when the response is sent back to the client.
Removed traiged_wait because we want to test the snapshot feature more thoroughly by AWS first before asking FB to start testing this feature.
Server starts without trouble in the latest snapshot. Please close after merging.
PR #171 merged to master