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

enable running a model script directly #138

Closed
wconstab opened this issue Oct 2, 2020 · 2 comments
Closed

enable running a model script directly #138

wconstab opened this issue Oct 2, 2020 · 2 comments
Assignees

Comments

@wconstab
Copy link
Contributor

wconstab commented Oct 2, 2020

right now, you can't python torchbenchmark/models/dlrm/__init__.py becuase "ImportError: attempted relative import with no known parent package".

how can the main block in init.py be executed? If it's possible we should write up the workaround in README, or else it would be nice to enable.

@Krovatkin
Copy link
Contributor

I think this python -m torchbenchmark.models.BERT_pytorch.__init__ works pretty well now, but we should add it to README.md

@xuzhao9
Copy link
Contributor

xuzhao9 commented Apr 7, 2021

I think this python -m torchbenchmark.models.BERT_pytorch.__init__ works pretty well now, but we should add it to README.md

The command works for the BERT_pytorch model, but when I am running it on other models, say "Background_Matting", the command returns nothing because there is no main function in the module: https://github.com/pytorch/benchmark/blob/master/torchbenchmark/models/Background_Matting/__init__.py

@xuzhao9 xuzhao9 closed this as completed Jun 17, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants