feat: enhance configuration and error handling in project setup
- Added new ignore rule for Ruff to allow temporary paths in tests. - Introduced MyPy overrides for specific modules to ignore errors. - Refactored `Cleanup` and `ExperimentTracking` classes to remove async keywords from methods, improving consistency in method signatures. - Updated `Training` class methods to handle synchronous operations, enhancing performance and clarity. - Adjusted `requirements.txt` to remove unnecessary Git dependency, streamlining project setup.
This commit is contained in:
@@ -243,7 +243,9 @@ async def test_run_validation_error(mock_wf, sample_input_data):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@patch('model_manager.workflows.train_model.workflow')
|
||||
async def test_run_cleanup_failure_does_not_fail_workflow(mock_wf, sample_input_data, mock_train_params):
|
||||
async def test_run_cleanup_failure_does_not_fail_workflow(
|
||||
mock_wf, sample_input_data, mock_train_params
|
||||
):
|
||||
"""After successful training, cleanup failure is logged, workflow still returns result."""
|
||||
from model_manager.workflows.train_model import TrainModel
|
||||
|
||||
@@ -267,7 +269,9 @@ async def test_run_cleanup_failure_does_not_fail_workflow(mock_wf, sample_input_
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@patch('model_manager.workflows.train_model.workflow')
|
||||
async def test_run_training_failure_skips_cleanup_activity(mock_wf, sample_input_data, mock_train_params):
|
||||
async def test_run_training_failure_skips_cleanup_activity(
|
||||
mock_wf, sample_input_data, mock_train_params
|
||||
):
|
||||
"""When train_model raises, train_result stays None and cleanup activity is not scheduled."""
|
||||
from model_manager.workflows.train_model import TrainModel
|
||||
|
||||
@@ -297,7 +301,6 @@ def test_module_constants():
|
||||
from model_manager.workflows.train_model import (
|
||||
TIMEOUT_DELETE_FILE,
|
||||
TIMEOUT_TRAIN_MODEL,
|
||||
TIMEOUT_UPDATE_DATABASE,
|
||||
TIMEOUT_VALIDATE_PARAMS,
|
||||
database_retry_policy,
|
||||
network_retry_policy,
|
||||
|
||||
Reference in New Issue
Block a user