Skip to content

Commit

Permalink
fix test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
quintenroets committed Apr 14, 2024
1 parent 5285fce commit 9d0ad14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/revnets/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ class Config(SerializationMixin):
console_metrics_refresh_interval: float = 0.5
max_difficult_inputs_epochs: int = 100

limit_batches: int | None = None

@property
def number_of_validation_sanity_steps(self) -> int | None:
return 0 if self.debug else 0

@property
def limit_batches(self) -> int | None:
return self.debug_batch_limit if self.debug else None

def __post_init__(self) -> None:
if self.evaluation.run_analysis:
self.always_train = False
if self.debug:
self.limit_batches = self.debug_batch_limit # pragma: nocover
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_context(context: Context, mocked_assets_path: None) -> Iterator[Context
reconstruction_training=hyperparameters,
max_difficult_inputs_epochs=1,
evaluation=evaluation,
limit_batches=5,
)
mock = patch("matplotlib.pyplot.show")
with mock:
Expand Down
3 changes: 2 additions & 1 deletion tests/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
*pipeline_modules,
pipelines.mininet.mininet_40,
pipelines.mininet.mininet_100,
pipelines.mediumnet.mediumnet_40,
pipelines.images.mininet_100,
pipelines.images.mininet_128,
pipelines.images.mininet_200,
pipelines.mediumnet.mediumnet_40,
pipelines.images.mediumnet,
)


Expand Down

0 comments on commit 9d0ad14

Please sign in to comment.