All Projects → Quansight → pytest-pytorch

Quansight / pytest-pytorch

Licence: BSD-3-Clause license
pytest plugin for a better developer experience when working with the PyTorch test suite

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pytest-pytorch

torch-pitch-shift
Pitch-shift audio clips quickly with PyTorch (CUDA supported)! Additional utilities for searching efficient transformations are included.
Stars: ✭ 70 (+94.44%)
Mutual labels:  torch
pytest-spark
pytest plugin to run the tests with support of pyspark
Stars: ✭ 65 (+80.56%)
Mutual labels:  pytest
torchlib
Data structures, algorithms, and ML/NLP tools in Lua.
Stars: ✭ 22 (-38.89%)
Mutual labels:  torch
cloudrun-fastapi
FastAPI on Google Cloud Run
Stars: ✭ 112 (+211.11%)
Mutual labels:  pytest
WassersteinGAN.torch
Torch implementation of Wasserstein GAN https://arxiv.org/abs/1701.07875
Stars: ✭ 48 (+33.33%)
Mutual labels:  torch
pytest-mock-server
Mock server plugin for pytest
Stars: ✭ 19 (-47.22%)
Mutual labels:  pytest
pytest-serverless
Automatically mocks resources from serverless.yml in pytest using moto.
Stars: ✭ 26 (-27.78%)
Mutual labels:  pytest
python-page-object
📔 Page object design pattern implementation (python, pom, selenium, pytest, travisCI)
Stars: ✭ 41 (+13.89%)
Mutual labels:  pytest
neural-vqa-attention
❓ Attention-based Visual Question Answering in Torch
Stars: ✭ 96 (+166.67%)
Mutual labels:  torch
DeepCD
[ICCV17] DeepCD: Learning Deep Complementary Descriptors for Patch Representations
Stars: ✭ 39 (+8.33%)
Mutual labels:  torch
pytest-github-actions-annotate-failures
Pytest plugin to annotate failed tests with a workflow command for GitHub Actions
Stars: ✭ 58 (+61.11%)
Mutual labels:  pytest
prodigyqa
Unified Test Automation Framework in Python
Stars: ✭ 35 (-2.78%)
Mutual labels:  pytest
pytest-watcher
Rerun pytest when your code changes
Stars: ✭ 60 (+66.67%)
Mutual labels:  pytest
pytest-flask-sqlalchemy
No description or website provided.
Stars: ✭ 14 (-61.11%)
Mutual labels:  pytest
bittensor
Internet-scale Neural Networks
Stars: ✭ 97 (+169.44%)
Mutual labels:  torch
gtbot
구글 번역 API를 이용한 슬랙 번역 봇입니다.
Stars: ✭ 34 (-5.56%)
Mutual labels:  pytest
python-ood
💠 Essential object oriented design (python, pytest, travisCI)
Stars: ✭ 38 (+5.56%)
Mutual labels:  pytest
FlowNetTorch
Torch implementation of Fischer et al. FlowNet training code
Stars: ✭ 27 (-25%)
Mutual labels:  torch
pytest-eth
PyTest plugin for testing smart contracts for Ethereum blockchain.
Stars: ✭ 23 (-36.11%)
Mutual labels:  pytest
Cross-View-Gait-Based-Human-Identification-with-Deep-CNNs
Code for 2016 TPAMI(IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE) A Comprehensive Study on Cross-View Gait Based Human Identification with Deep CNNs
Stars: ✭ 21 (-41.67%)
Mutual labels:  torch

pytest-pytorch

license repo status isort black tests status

What is it?

pytest-pytorch is a lightweight pytest-plugin that enhances the developer experience when working with the PyTorch test suite if you come from a pytest background.

Why do I need it?

Some testcases in the PyTorch test suite are only used as templates and will be instantiated at runtime. Unfortunately, PyTorch's naming scheme for parametrizations differs from pytest's. As a consequence, these tests cannot be selected by their names as written and one has to remember PyTorch's naming scheme. This can be especially disrupting to your workflow if your IDE (PyCharm, VSCode) relies on pytest's default selection syntax.

If this has ever been a source of frustration for you, worry no longer. pytest-pytorch was made for you.

How do I install it?

You can install pytest-pytorch with pip

$ pip install pytest-pytorch

or with conda:

$ conda install -c conda-forge pytest-pytorch

How do I use it?

With pytest-pytorch installed you can select test cases and tests by their names as written:

Use case Command
Run a test case against all devices pytest test_foo.py::TestBar
Run a test against all devices pytest test_foo.py::TestBar::test_baz

Similar to a parametrization by @pytest.mark.parametrize you can use the -k flag to select a specific set of parameters:

Use case Command
Run a test case against one device pytest test_foo.py::TestBar -k "$DEVICE"
Run a test against one device pytest test_foo.py::TestBar::test_baz -k "$DEVICE"

Can I have a little more background?

Sure, we have written a blog post about pytest-pytorch that goes into details.

How do I contribute?

First and foremost: Thank you for your interest in development of pytest-pytorch's! We appreciate all contributions be it code or something else. Check out our contribution guide lines for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].