Skip to content

Commit b74ad0f

Browse files
committed
Remove checking for specific pytorch warnings that don't seem to appear anymore during DAgger tests.
1 parent a55ff9e commit b74ad0f

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

tests/scripts/test_scripts.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -266,22 +266,14 @@ def test_train_preference_comparisons_reward_named_config(tmpdir, named_configs)
266266

267267

268268
def test_train_dagger_main(tmpdir):
269-
with pytest.warns(None) as record:
270-
run = train_imitation.train_imitation_ex.run(
271-
command_name="dagger",
272-
named_configs=["seals_cartpole"] + ALGO_FAST_CONFIGS["imitation"],
273-
config_updates=dict(
274-
logging=dict(log_root=tmpdir),
275-
demonstrations=dict(path=CARTPOLE_TEST_ROLLOUT_PATH),
276-
),
277-
)
278-
for warning in record:
279-
# PyTorch wants writeable arrays.
280-
# See https://github.com/HumanCompatibleAI/imitation/issues/219
281-
assert not (
282-
warning.category == UserWarning
283-
and "NumPy array is not writeable" in warning.message.args[0]
284-
)
269+
run = train_imitation.train_imitation_ex.run(
270+
command_name="dagger",
271+
named_configs=["seals_cartpole"] + ALGO_FAST_CONFIGS["imitation"],
272+
config_updates=dict(
273+
logging=dict(log_root=tmpdir),
274+
demonstrations=dict(path=CARTPOLE_TEST_ROLLOUT_PATH),
275+
),
276+
)
285277
assert run.status == "COMPLETED"
286278
assert isinstance(run.result, dict)
287279

0 commit comments

Comments
 (0)