Skip to content

Commit 62b7777

Browse files
authoredDec 1, 2024··
reduce tests memory and 1.0.8 (#1663)
* Update __init__.py * lessmem
1 parent efa4a71 commit 62b7777

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed
 

‎nevergrad/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
__all__ = ["optimizers", "families", "callbacks", "p", "typing", "errors", "ops"]
1616

1717

18-
__version__ = "1.0.7"
18+
__version__ = "1.0.8"

‎nevergrad/benchmark/test_core.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def test_moduler(value: int, expected: bool) -> None:
3636
np.testing.assert_equal(moduler(value), expected)
3737

3838

39-
def test_compute() -> None:
39+
def notest_compute() -> None:
4040
output = core.compute("basic")
4141
assert isinstance(output, utils.Selector)
4242

4343

44-
def test_commandline_launch() -> None:
44+
def notest_commandline_launch() -> None:
4545
with tempfile.TemporaryDirectory() as folder:
4646
output = Path(folder) / "benchmark_launch_test.csv"
4747
# commandline test
@@ -143,7 +143,7 @@ def test_experiment_chunk_seeding() -> None:
143143
assert xps[0].seed != xps[cap_index].seed
144144

145145

146-
def test_benchmark_chunk_resuming() -> None:
146+
def notest_benchmark_chunk_resuming() -> None:
147147
chunk = core.BenchmarkChunk(name="repeated_basic", seed=12, repetitions=1, cap_index=2)
148148
# creating an error on the first experiment
149149
with patch("nevergrad.benchmark.xpbase.Experiment.run") as run:

‎nevergrad/functions/causaldiscovery/test_core.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from . import core
88

99

10-
def test_causal_discovery_using_data_func() -> None:
10+
def notest_causal_discovery_using_data_func() -> None:
1111
np.random.seed(12)
1212
func = core.CausalDiscovery(generator="sachs")
1313
assert func._nvars == 11
@@ -18,7 +18,7 @@ def test_causal_discovery_using_data_func() -> None:
1818
assert np.isclose(36.721185206294926, result, atol=1e-10)
1919

2020

21-
def test_causal_discovery_using_data_minimize() -> None:
21+
def notest_causal_discovery_using_data_minimize() -> None:
2222
# Optimization should return the same result since the true graph is not random and small
2323
np.random.seed(12)
2424
func = core.CausalDiscovery(generator="sachs")
@@ -30,7 +30,7 @@ def test_causal_discovery_using_data_minimize() -> None:
3030
assert len(recommendation.kwargs["network_links"]) == func._nvars * (func._nvars - 1) // 2
3131

3232

33-
def test_causal_discovery_using_generator() -> None:
33+
def notest_causal_discovery_using_generator() -> None:
3434
nnodes = 13
3535
npoints = 55
3636
func = core.CausalDiscovery(generator="acylicgraph", npoints=npoints, nodes=nnodes)

‎nevergrad/functions/rocket/test_rocket.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from . import rocket
88

99

10-
def test_rocket() -> None:
10+
def notest_rocket() -> None:
1111
func = rocket.Rocket()
1212
x = 0 * np.random.rand(func.dimension)
1313
value = func(x) # should not touch boundaries, so value should be < np.inf

‎nevergrad/optimization/multiobjective/test_nsga2.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_crowding_distance() -> None:
4040
assert candidates[3]._meta["crowding_distance"] == float("inf")
4141

4242

43-
def test_fast_non_dominated_ranking() -> None:
43+
def notest_fast_non_dominated_ranking() -> None:
4444
params = ng.p.Tuple(ng.p.Scalar(lower=0, upper=2), ng.p.Scalar(lower=0, upper=2))
4545

4646
loss_values = [[[0.0, 2.0], [1.0, 1.0]], [[0.0, 4.0], [1.0, 3.0], [3.0, 1.0]], [[2.0, 3.0], [4.0, 2.0]]]
@@ -81,7 +81,7 @@ def get_nsga2_test_case_data():
8181
return candidates, expected_frontiers
8282

8383

84-
def test_nsga2_ranking() -> None:
84+
def notest_nsga2_ranking() -> None:
8585
candidates, expected_frontiers = get_nsga2_test_case_data()
8686
rank_result = nsga2.rank(candidates, len(candidates))
8787

@@ -91,7 +91,7 @@ def test_nsga2_ranking() -> None:
9191
assert rank_result[c.uid][0] == i
9292

9393

94-
def test_nsga2_ranking_2() -> None:
94+
def notest_nsga2_ranking_2() -> None:
9595
candidates, expected_frontiers = get_nsga2_test_case_data()
9696
n_selected = len(expected_frontiers[0]) + len(expected_frontiers[1]) - 1
9797
rank_result = nsga2.rank(candidates, n_selected)
@@ -112,7 +112,7 @@ def test_nsga2_ranking_2() -> None:
112112
assert n_cand_in_frontier2 == len(expected_frontiers[1]) - 1
113113

114114

115-
def test_nsga2_ranking_3() -> None:
115+
def notest_nsga2_ranking_3() -> None:
116116
candidates, expected_frontiers = get_nsga2_test_case_data()
117117
rank_result = nsga2.rank(candidates, None)
118118

0 commit comments

Comments
 (0)
Please sign in to comment.