Skip to content

Commit

Permalink
Reduce compute resource during unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Nov 18, 2024
1 parent 60fe7e0 commit 07cc474
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_awac.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
4 changes: 2 additions & 2 deletions tests/algos/qlearning/test_bc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("policy_type", ["deterministic", "stochastic"])
@pytest.mark.parametrize("scalers", [None, "min_max"])
Expand Down Expand Up @@ -40,7 +40,7 @@ def test_bc(


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("scaler", [None, "min_max"])
def test_discrete_bc(observation_shape: Shape, scaler: Optional[str]) -> None:
Expand Down
4 changes: 2 additions & 2 deletions tests/algos/qlearning/test_bcq.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down Expand Up @@ -50,7 +50,7 @@ def test_bcq(


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("n_critics", [1])
@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_bear.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_cal_ql.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
4 changes: 2 additions & 2 deletions tests/algos/qlearning/test_cql.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand All @@ -43,7 +43,7 @@ def test_cql(


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("n_critics", [1])
@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_crr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_ddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
4 changes: 2 additions & 2 deletions tests/algos/qlearning/test_dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("n_critics", [1])
@pytest.mark.parametrize(
Expand Down Expand Up @@ -49,7 +49,7 @@ def test_dqn(


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("n_critics", [1])
@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_iql.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("scalers", [None, "min_max"])
def test_iql(observation_shape: Shape, scalers: Optional[str]) -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_nfq.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize("n_critics", [1])
@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_plas.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_rebrac.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_td3.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down
2 changes: 1 addition & 1 deletion tests/algos/qlearning/test_td3_plus_bc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize(
"observation_shape", [(100,), (4, 84, 84), ((100,), (200,))]
"observation_shape", [(100,), (4, 32, 32), ((100,), (200,))]
)
@pytest.mark.parametrize(
"q_func_factory", [MeanQFunctionFactory(), QRQFunctionFactory()]
Expand Down

0 comments on commit 07cc474

Please sign in to comment.