0

I am having an issue with AWS Sagamaker YOLOv7 inference code. inside the inference.py's model_fn line

detector = torch.hub.load(local_repo, 'custom', *args, source='local', trust_repo=True, force_reload=True,verbose=True).to(device)

returns exception

Command 'pip install 'scipy<1.9.2,>=1.8; python_version <= "3.9"'' returned non-zero exit status 1

I tried to install requirements.txt manually inside my PC it and it worked without any error.
Sagemaker framework version is 1.12.1
python version is py38

akalanka
  • 37
  • 8
  • Does this answer your question? [Trouble installing scipy in virtualenv on a amazon ec2 linux micro instance](https://stackoverflow.com/questions/19595944/trouble-installing-scipy-in-virtualenv-on-a-amazon-ec2-linux-micro-instance) – allexiusw Mar 20 '23 at 17:29

1 Answers1

0

Couldn't be able to find a solution. Therefore, we converted YOLOv7 model to a torch script and deployed it in the sagemaker endpoint.

akalanka
  • 37
  • 8
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 20 '23 at 23:46