SIENTIAPDE-1312
Update sientia-dataops-library dependency to version 1.4.7 and enhance TemporalManager to support offset configuration for scheduling. Added offset handling in common configuration and updated related tests to validate new functionality.
This commit is contained in:
@@ -148,6 +148,7 @@ async def test_create_schedule(
|
||||
'model_name': 'test-model-name',
|
||||
'workflow_type': 'test-workflow',
|
||||
'frequency': '10y',
|
||||
'offset': '5m',
|
||||
'data': {'test': 'test'},
|
||||
'execution_timeout_seconds': 400,
|
||||
'task_timeout_seconds': 400,
|
||||
@@ -159,6 +160,7 @@ async def test_create_schedule(
|
||||
'model_name': 'test-model-name',
|
||||
'workflow_type': 'test-workflow',
|
||||
'frequency': '2m',
|
||||
'offset': '1h',
|
||||
'data': {'test': 'test'},
|
||||
'execution_timeout_seconds': 500,
|
||||
'task_timeout_seconds': 500,
|
||||
@@ -239,10 +241,15 @@ async def test_create_schedule(
|
||||
)
|
||||
|
||||
mock_schedule_interval_spec.assert_has_calls(
|
||||
[call(every=timedelta(seconds=60)), call(every=timedelta(seconds=120))]
|
||||
[
|
||||
call(every=timedelta(seconds=60), offset=timedelta(seconds=0)),
|
||||
call(every=timedelta(seconds=120), offset=timedelta(seconds=3600)),
|
||||
]
|
||||
)
|
||||
|
||||
mock_parse_frequency.assert_has_calls([call('1m'), call('10y'), call('2m')])
|
||||
mock_parse_frequency.assert_has_calls(
|
||||
[call('1m'), call('0m'), call('10y'), call('2m'), call('1h')]
|
||||
)
|
||||
|
||||
mock_typed_search_attributes.assert_has_calls(
|
||||
[
|
||||
|
||||
@@ -24,6 +24,7 @@ def test_common_config():
|
||||
'workflow_type': 'scouter',
|
||||
'schedule_name': 'test_schedule',
|
||||
'frequency': '1m',
|
||||
'offset': '0m',
|
||||
'max_retry_policy': 1,
|
||||
'model_id': 'test_model_id',
|
||||
'model_name': 'test_model_name',
|
||||
@@ -48,6 +49,7 @@ def test_minimal_retrain():
|
||||
'workflow_type': 'minimal_retrain',
|
||||
'schedule_name': 'test_schedule',
|
||||
'frequency': '1m',
|
||||
'offset': '0m',
|
||||
'max_retry_policy': 1,
|
||||
'model_id': 'test_model_id',
|
||||
'model_name': 'test_model_name',
|
||||
@@ -81,6 +83,7 @@ def test_scouter():
|
||||
'workflow_type': 'scouter',
|
||||
'schedule_name': 'test_schedule',
|
||||
'frequency': '1m',
|
||||
'offset': '0m',
|
||||
'max_retry_policy': 1,
|
||||
'model_id': 'test_model_id',
|
||||
'model_name': 'test_model_name',
|
||||
@@ -163,6 +166,7 @@ def test_predictions_batch(mock_process_path_priority, mock_overlap_filter_confi
|
||||
'workflow_type': 'predictions_batch',
|
||||
'schedule_name': 'test_schedule',
|
||||
'frequency': '1m',
|
||||
'offset': '0m',
|
||||
'max_retry_policy': 1,
|
||||
'model_id': 'test_model_id',
|
||||
'model_name': 'test_model_name',
|
||||
@@ -275,7 +279,7 @@ def test_build_tag_config():
|
||||
|
||||
def test_build_tag_config_no_server_id():
|
||||
tag = {'server_id': '1', 'tag_address': 'test_tag_address'}
|
||||
opc_servers = {}
|
||||
opc_servers: dict = {}
|
||||
|
||||
try:
|
||||
build_tag_config(tag, {}, opc_servers, 1)
|
||||
|
||||
Reference in New Issue
Block a user