Skip to content

Commit

Permalink
Add some generated tests for the Jax algo example
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed Jun 13, 2024
1 parent 542d086 commit 00cbd4f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions project/algorithms/jax_algo_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from typing import ClassVar

import flax
import flax.linen
import torch

from project.algorithms.jax_algo import JaxAlgorithm

from .bases.algorithm_test import AlgorithmTests


class TestJaxAlgorithm(AlgorithmTests[JaxAlgorithm]):
"""This algorithm only works with Jax modules."""

algorithm_name: ClassVar[str] = "jax_algo"
unsupported_network_types: ClassVar[list[type]] = [torch.nn.Module]
_supported_network_types: ClassVar[list[type]] = [flax.linen.Module]

0 comments on commit 00cbd4f

Please sign in to comment.