Skip to content

Commit

Permalink
hopefully fix all futurewarnings now in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
dpanici committed Aug 1, 2023
1 parent a720e7a commit a16fe90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions tests/benchmarks/benchmark_cpu_large.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def test_perturb_1(SOLOVEV, benchmark):
def setup():
eq = EquilibriaFamily.load(load_from=str(SOLOVEV["desc_h5_path"]))[-1]
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)

constraints = get_fixed_boundary_constraints(eq)
tr_ratio = [0.01, 0.25, 0.25]
Expand Down Expand Up @@ -285,7 +285,7 @@ def test_perturb_2(SOLOVEV, benchmark):
def setup():
eq = EquilibriaFamily.load(load_from=str(SOLOVEV["desc_h5_path"]))[-1]
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)

constraints = get_fixed_boundary_constraints(eq)
tr_ratio = [0.01, 0.25, 0.25]
Expand Down
4 changes: 2 additions & 2 deletions tests/benchmarks/benchmark_gpu_large.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def test_perturb_1(SOLOVEV, benchmark):
def setup():
eq = EquilibriaFamily.load(load_from=str(SOLOVEV["desc_h5_path"]))[-1]
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)

constraints = get_fixed_boundary_constraints(eq)
tr_ratio = [0.01, 0.25, 0.25]
Expand Down Expand Up @@ -286,7 +286,7 @@ def test_perturb_2(SOLOVEV, benchmark):
def setup():
eq = EquilibriaFamily.load(load_from=str(SOLOVEV["desc_h5_path"]))[-1]
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)

constraints = get_fixed_boundary_constraints(eq)
tr_ratio = [0.01, 0.25, 0.25]
Expand Down
22 changes: 11 additions & 11 deletions tests/benchmarks/benchmark_gpu_small.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_objective_compile_heliotron(benchmark):
def setup():
eq = desc.examples.get("HELIOTRON")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
args = (
objective,
eq,
Expand All @@ -142,7 +142,7 @@ def test_objective_compile_dshape_current(benchmark):
def setup():
eq = desc.examples.get("DSHAPE_current")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
args = (
objective,
eq,
Expand All @@ -165,7 +165,7 @@ def test_objective_compile_atf(benchmark):
def setup():
eq = desc.examples.get("ATF")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
args = (
objective,
eq,
Expand All @@ -186,7 +186,7 @@ def test_objective_compute_heliotron(benchmark):
"""Benchmark computing objective."""
eq = desc.examples.get("HELIOTRON")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
objective.compile()
x = objective.x(eq)

Expand All @@ -203,7 +203,7 @@ def test_objective_compute_dshape_current(benchmark):
"""Benchmark computing objective."""
eq = desc.examples.get("DSHAPE_current")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
objective.compile()
x = objective.x(eq)

Expand All @@ -220,7 +220,7 @@ def test_objective_compute_atf(benchmark):
"""Benchmark computing objective."""
eq = desc.examples.get("ATF")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
objective.compile()
x = objective.x(eq)

Expand All @@ -237,7 +237,7 @@ def test_objective_jac_heliotron(benchmark):
"""Benchmark computing jacobian."""
eq = desc.examples.get("HELIOTRON")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
objective.compile()
x = objective.x(eq)

Expand All @@ -254,7 +254,7 @@ def test_objective_jac_dshape_current(benchmark):
"""Benchmark computing jacobian."""
eq = desc.examples.get("DSHAPE_current")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
objective.compile()
x = objective.x(eq)

Expand All @@ -271,7 +271,7 @@ def test_objective_jac_atf(benchmark):
"""Benchmark computing jacobian."""
eq = desc.examples.get("ATF")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
objective.compile()
x = objective.x(eq)

Expand All @@ -290,7 +290,7 @@ def test_perturb_1(benchmark):
def setup():
eq = desc.examples.get("SOLOVEV")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
constraints = get_fixed_boundary_constraints(eq)
tr_ratio = [0.01, 0.25, 0.25]
dp = np.zeros_like(eq.p_l)
Expand Down Expand Up @@ -323,7 +323,7 @@ def test_perturb_2(benchmark):
def setup():
eq = desc.examples.get("SOLOVEV")
objective = get_equilibrium_objective(eq)
objective.build()
objective.build(eq)
constraints = get_fixed_boundary_constraints(eq)
tr_ratio = [0.01, 0.25, 0.25]
dp = np.zeros_like(eq.p_l)
Expand Down

0 comments on commit a16fe90

Please sign in to comment.