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

Run Torchvision problems with Benchmark[Problem/Runner/Metric]; consolidate PyTorchCNN problems #2688

Closed
wants to merge 1 commit into from

Commits on Aug 26, 2024

  1. Run Torchvision problems with Benchmark[Problem/Runner/Metric]; conso…

    …lidate PyTorchCNN problems (facebook#2688)
    
    Summary:
    Pull Request resolved: facebook#2688
    
    Context: Consolidating on common abstractions will make it easier to add functionality to all classes. Also, this will make the code smaller and easier to navigate. This diff is substantially LOC-negative outside of tests.
    
    This PR:
    * Updates functionality in torchvision.py that replaces MNIST datasets with fakes when run in a test environment; the data sets are now realistic enough to be usable.
    * Merge the functionality in `pytorch_cnn.py` into `torchvision.py`; it was only ever used in order to support `torchvision.py`.
    * Remove `PyTorchCNNTorchvisionBenchmarkProblem` and its special serialization logic; it is replaced with `BenchmarkProblem`
    * Remove `PyTorchCNNTorchvisionRunner`, `PyTorchCNNBenchmarkProblem`, `PyTorchCNNMetric`, and `PyTorchCNNRunner`
    * Introduce `PyTorchCNNTorchvisionParamBasedProblem`. It does not need special serialization logic because it is a dataclass with datasets constructed in the `__post_init__`. When an instance is serialized, the data sets are not serialized; they are reconstructed when the instance is decoded. Using a dataclass here also allows for an automatic and more rigorous equality check.
    * Use `BenchmarkRunner`; as per D61483962, this means that this problem now has a ground truth, which won't change its behavior since it doesn't have noise added.
    
    Reviewed By: Balandat
    
    Differential Revision: D61414680
    esantorella authored and facebook-github-bot committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    1c042f8 View commit details
    Browse the repository at this point in the history