diff --git a/laborious/workflows/simple_metrics.py b/laborious/workflows/simple_metrics.py index 38b47c4..e8cd9fb 100644 --- a/laborious/workflows/simple_metrics.py +++ b/laborious/workflows/simple_metrics.py @@ -31,6 +31,7 @@ class SimpleMetrics: model_config = input_data['model_config'] target_name = model_config['target'] + model_type = model_config.get('model_type') query = f""" select p."timestamp", p.prediction, ld.value as "target" @@ -70,6 +71,7 @@ class SimpleMetrics: 'target_data': target_data, 'metrics': input_data.get('metrics', ['rmse', 'mse', 'mae', 'r2']), 'interval_minutes': interval_minutes, + 'model_type': model_type, }, retry_policy=retry_policy, start_to_close_timeout=timedelta(seconds=300), diff --git a/tests/laborious/workflows/test_simple_metrics.py b/tests/laborious/workflows/test_simple_metrics.py index dbda735..2423cc5 100644 --- a/tests/laborious/workflows/test_simple_metrics.py +++ b/tests/laborious/workflows/test_simple_metrics.py @@ -103,6 +103,7 @@ async def test_run(workflow_mock: AsyncMock, simple_metrics: SimpleMetrics): 'target_data': target_data, 'metrics': input_data['metrics'], 'interval_minutes': input_data['interval_minutes'], + 'model_type': None, }, retry_policy=ANY, start_to_close_timeout=ANY, @@ -209,6 +210,7 @@ async def test_run_default_metrics(workflow_mock: AsyncMock, simple_metrics: Sim 'target_data': target_data, 'metrics': ['rmse', 'mse', 'mae', 'r2'], # Default value 'interval_minutes': input_data['interval_minutes'], + 'model_type': None, }, retry_policy=ANY, start_to_close_timeout=ANY,