test_trainer: use model_copy instead of copy

The `copy` method has been deprecated.
This commit is contained in:
Cédric Deltheil 2024-02-08 18:35:08 +00:00 committed by Cédric Deltheil
parent f4aa0271b8
commit 9aefc9896c

View file

@ -82,7 +82,7 @@ def mock_trainer(mock_config: MockConfig) -> MockTrainer:
@pytest.fixture
def mock_trainer_short(mock_config: MockConfig) -> MockTrainer:
mock_config_short = mock_config.copy()
mock_config_short = mock_config.model_copy(deep=True)
mock_config_short.training.duration = {"number": 3, "unit": TimeUnit.STEP}
return MockTrainer(config=mock_config_short)