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

torch-model-archiver #131

Open
yeomko22 opened this issue Oct 1, 2021 · 0 comments
Open

torch-model-archiver #131

yeomko22 opened this issue Oct 1, 2021 · 0 comments

Comments

@yeomko22
Copy link
Owner

yeomko22 commented Oct 1, 2021

  • torchserve를 통해서 모델을 배포하기 위한 .mar 파일 생성을 위한 CLI 도구
  • torch-model-archiver는 torchscript를 통해 생성된 직렬화 된 파일을 입력으로 받을 수도 있고, eager mode인 python 파일을 입력으로도 받을 수 있다.
  • eager mode의 경우에는 model.py 파일을 --model-file 아규먼트에 추가해준다.
# for torchscript
$ torch-model-archiver --model-name densenet_161 --version 1.0 --serialized-file model.pt --handler image_classifier

# for eagermode
$ torch-model-archiver --model-name densenet_161 --version 1.0 --model-file model.py --serialized-file model.pt --handler image_classifier
  • torch-model-archiver를 실행하면 모든 model artifacts들을 패키징 해서 하나의 .mar 파일을 생성한다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant