Skip to content

Commit

Permalink
fix logging test
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerflex committed May 24, 2024
1 parent 6debd21 commit 97298a5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/test_components/test_autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,6 @@ def postprocess(data: td.SimulationData) -> float:
def test_autograd_objective(use_emulated_run, structure_key, monitor_key):
"""Test an objective function through tidy3d autograd."""

# for logging output
td.config.logging_level = "INFO"

fn_dict = get_functions(structure_key, monitor_key)
make_sim = fn_dict["sim"]
postprocess = fn_dict["postprocess"]
Expand Down Expand Up @@ -407,17 +404,11 @@ def objective(*args):

assert np.allclose(grad, grad_num), "gradients dont match"

# for logging output
td.config.logging_level = "WARNING"


@pytest.mark.parametrize("structure_key, monitor_key", args)
def test_autograd_async(use_emulated_run_async, structure_key, monitor_key):
"""Test an objective function through tidy3d autograd."""

# for logging output
td.config.logging_level = "INFO"

fn_dict = get_functions(structure_key, monitor_key)
make_sim = fn_dict["sim"]
postprocess = fn_dict["postprocess"]
Expand Down Expand Up @@ -446,9 +437,6 @@ def test_autograd_speed_num_structures(use_emulated_run):

import time

# for logging output
td.config.logging_level = "ERROR"

fn_dict = get_functions(ALL_KEY, ALL_KEY)
make_sim = fn_dict["sim"]

Expand Down

0 comments on commit 97298a5

Please sign in to comment.