Skip to content

Commit

Permalink
Configure missings tests in pytest collect (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashokkumarkannan1 authored Nov 13, 2024
1 parent 3e5c00a commit ec8ee2c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ jobs:
shell: bash
run: |
source env/activate
apt install -y libgl1-mesa-glx
set -o pipefail # Ensures that the exit code reflects the first command that fails
pip install pytest-split
pytest --splits 2 \
pytest -m push --splits 2 \
--group ${{ matrix.test_group_id }} \
--splitting-algorithm least_duration \
--junit-xml=${{ steps.strings.outputs.test_report_path }} \
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ compile_commands.json
\n\n# Exclude LFS files to keep the public repo small

# Test reports
reports/report.xml
**/reports/report.xml

# Python stubs
*.pyi
Expand Down
2 changes: 1 addition & 1 deletion env/core_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ networkx==2.8.5
numpy==1.23.1
onnx>=1.15.0
onnxruntime>=1.16.3
opencv-python-headless==4.6.0.66
opencv-python-headless==4.5.5.64
# This is needed to avoid issue https://yyz-gitlab.local.tenstorrent.com/devops/devops/-/issues/95
pandas==1.5.3
prettytable==3.0.0
Expand Down
1 change: 1 addition & 0 deletions forge/test/mlir/resnet/test_resnet_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# SPDX-License-Identifier: Apache-2.0

import pytest
import torch
from torchvision.models.resnet import resnet50

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_densenet_121_pytorch(variant, test_device):

# STEP 1: Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config() # load global compiler config object
if variant == densenet121_hf_xray:
if variant == "densenet121_hf_xray":
compiler_cfg.compile_depth = forge.CompileDepth.GENERATE_INITIAL_GRAPH
else:
compiler_cfg.compile_depth = forge.CompileDepth.SPLIT_GRAPH
Expand Down
10 changes: 10 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,23 @@ testpaths =
# API
forge/test/test_api.py

# Model Tests (CNN)
forge/test/model_demos/high_prio/cnn/pytorch

# Model Tests (NLP)
forge/test/model_demos/high_prio/nlp/pytorch

# MNIST Linear
forge/test/mlir/mnist/test_inference.py
forge/test/mlir/mnist/training/test_training.py
forge/test/mlir/test_training.py

# Llama
forge/test/mlir/llama/test_llama_inference.py::test_llama_inference
forge/test/mlir/llama/tests

# Resnet
forge/test/mlir/resnet/test_resnet_inference.py::test_resnet_inference

# Benchmark
# MNIST Linear
Expand Down

0 comments on commit ec8ee2c

Please sign in to comment.