Skip to content

Commit

Permalink
Use temp dir for logs in test of demo
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed Nov 18, 2024
1 parent 2429cb8 commit 4012858
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions project/algorithms/jax_image_classifier_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

import flax
import flax.linen
import pytest
Expand Down Expand Up @@ -29,8 +31,8 @@ class TestJaxImageClassifier(LightningModuleTests[JaxImageClassifier]):


@pytest.mark.slow
def test_demo():
def test_demo(tmp_path: Path):
"""Test the demo at the bottom of the module."""
from .jax_image_classifier import demo

demo(devices=1, overfit_batches=0.1, max_epochs=1)
demo(devices=1, overfit_batches=0.1, max_epochs=1, default_log_dir=tmp_path / "logs")

0 comments on commit 4012858

Please sign in to comment.