Skip to content

Commit

Permalink
skip testing big models
Browse files Browse the repository at this point in the history
  • Loading branch information
hvgazula committed Mar 19, 2024
1 parent 91f74e4 commit 4d67696
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nobrainer/models/attention_unet.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Model definition for Attention U-Net.
Adapted from https://github.com/nikhilroxtomar/Semantic-Segmentation-Architecture/blob/main/TensorFlow/attention-unet.py
"""
""" # noqa: E501

from tensorflow.keras import layers
import tensorflow.keras.layers as L
Expand Down
6 changes: 6 additions & 0 deletions nobrainer/models/tests/models_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import numpy as np
import pytest
import tensorflow as tf
Expand All @@ -21,6 +23,8 @@
from ..vnet import vnet
from ..vox2vox import Vox_ensembler, vox_gan

IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"


def model_test(model_cls, n_classes, input_shape, kwds={}):
"""Tests for models."""
Expand Down Expand Up @@ -257,9 +261,11 @@ def test_attention_unet_with_inception():
)


@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Cannot test in GitHub Actions")
def test_unetr():
model_test(unetr, n_classes=1, input_shape=(1, 96, 96, 96, 1))


@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Cannot test in GitHub Actions")
def test_variational_meshnet():
model_test(variational_meshnet, n_classes=1, input_shape=(1, 128, 128, 128, 1))

0 comments on commit 4d67696

Please sign in to comment.