Skip to content

Commit

Permalink
fix(test_tuining): sometimes tuning reports no best trial found
Browse files Browse the repository at this point in the history
  • Loading branch information
mathysgrapotte committed Feb 4, 2025
1 parent 503048a commit daf30f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/cli/test_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ def test_tuning_main(data_path: str, data_config: str, model_path: str, model_co
debug_mode=True,
)

except RuntimeError as e:
if "zero_division" in str(e).lower():
pytest.skip("Skipping due to known metric edge case")
except RuntimeError as error:
error_msg: str = str(error).lower()
if "zero_division" in error_msg or "no best trial found" in error_msg:
pytest.skip(f"Skipping test due to known metric issue: {error}")
raise
finally:
# Ensure Ray is shut down properly
Expand Down

0 comments on commit daf30f2

Please sign in to comment.