Skip to content

Commit

Permalink
Added missing batch.pt file for functorch_maml_omniglot (#2145)
Browse files Browse the repository at this point in the history
Summary:
`functorch_maml_omniglot` [tries to load some inputs ](https://github.com/pytorch/benchmark/blob/main/torchbenchmark/models/functorch_maml_omniglot/__init__.py#L73) from a file that it has not downloaded in its `install.py`. This should be done similarly to [how it's done for maml_omniglot](https://github.com/pytorch/benchmark/blob/main/torchbenchmark/models/maml_omniglot/install.py).

Testing before:

```
FileNotFoundError: [Errno 2] No such file or directory: 'benchmark/torchbenchmark/models/maml_omniglot/batch.pt'

(...)

benchmark/components/_impl/workers/subprocess_rpc.py:458: FileNotFoundError
========================================================================= short test summary info ==========================================================================
FAILED benchmark/test.py::TestBenchmark::test_functorch_maml_omniglot_check_device_cpu - FileNotFoundError: [Errno 2] No such file or directory
FAILED benchmark/test.py::TestBenchmark::test_functorch_maml_omniglot_eval_cpu - FileNotFoundError: [Errno 2] No such file or directory
FAILED benchmark/test.py::TestBenchmark::test_functorch_maml_omniglot_example_cpu - FileNotFoundError: [Errno 2] No such file or directory
FAILED benchmark/test.py::TestBenchmark::test_functorch_maml_omniglot_train_cpu - FileNotFoundError: [Errno 2] No such file or directory
```

and afterwards:

```
==================================================================== 4 passed, 384 deselected in 12.55s ====================================================================
```

Pull Request resolved: #2145

Reviewed By: aaronenyeshi

Differential Revision: D53316976

Pulled By: xuzhao9

fbshipit-source-id: c695054723a902280823d66e2e6a727f9cc934ca
  • Loading branch information
JasonMts authored and facebook-github-bot committed Feb 1, 2024
1 parent f93279b commit a005ea8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torchbenchmark/models/functorch_maml_omniglot/install.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import subprocess
import sys
from utils import s3_utils


def pip_install_requirements():
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-q', '-r', 'requirements.txt'])

if __name__ == '__main__':
pip_install_requirements()
s3_utils.checkout_s3_data("MODEL_PKLS", "maml_omniglot/batch.pt", decompress=False)

0 comments on commit a005ea8

Please sign in to comment.