SIENTIAPDE-1171
SIENTIAPDE-1171 feat: add minimal retrain schedule configuration to samples.json and update formatters.py - Added a new schedule configuration for the minimal retrain pipeline in samples.json. - Updated the Formatters class in formatters.py to handle the new minimal retrain workflow type, integrating the minimal_retrain function for streamlined processing.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
|
||||
from temporalio import activity, workflow
|
||||
|
||||
from orchestrator.utils.orchestrator_functions import minimal_retrain
|
||||
|
||||
|
||||
with workflow.unsafe.imports_passed_through():
|
||||
import json
|
||||
@@ -67,6 +69,13 @@ class Formatters(BaseActivity):
|
||||
"updated_at": pipeline.get(
|
||||
"updated_at", datetime.now().strftime(DEFAULT_DATE_FORMAT))
|
||||
}
|
||||
elif pipeline['workflow_type'] == 'minimal_retrain':
|
||||
schedule_config[self.laborious_namespace][pipeline['schedule_name']
|
||||
] = {
|
||||
**minimal_retrain(pipeline),
|
||||
"updated_at": pipeline.get(
|
||||
"updated_at", datetime.now().strftime(DEFAULT_DATE_FORMAT))
|
||||
}
|
||||
|
||||
self.info("Processed schedules", metadata=metadata)
|
||||
self.debug(json.dumps(
|
||||
|
||||
10
samples.json
10
samples.json
@@ -120,6 +120,16 @@
|
||||
],
|
||||
"active": true,
|
||||
"updated_at": "2025-07-14 10:00:00.000000"
|
||||
},
|
||||
"3": {
|
||||
"schedule_name": "minimal-retrain-pipeline",
|
||||
"model_id": "1",
|
||||
"workflow_type": "minimal_retrain",
|
||||
"frequency": "5m",
|
||||
"max_retry_policy": 1,
|
||||
"query": "select * from sientia_data.laborious_data order by \"timestamp\" desc limit 30;",
|
||||
"active": true,
|
||||
"updated_at": "2025-07-23 10:00:00.000000"
|
||||
}
|
||||
},
|
||||
"opc-servers": {
|
||||
|
||||
Reference in New Issue
Block a user