QTZPOC-20
QTZPOC-20: Implement model import workflow for .sientia bundles Introduces the import_model workflow and its associated activities to enable importing .sientia bundles into MLflow and MongoDB. This includes: * New core workflow and activity logic for handling bundle download, decryption, validation, MLflow provisioning (experiments, runs, registered versions), and MongoDB model document creation. * Comprehensive E2E and unit test suites, including a dedicated test harness and a manual run script for development. * Updated .env.example and README.md with new configurations and usage instructions. * Ensures correct MLflow model source resolution for legacy loader compatibility and robust MongoDB document management. * Refactors existing utility scripts into a scripts/ directory.
This commit is contained in:
@@ -356,7 +356,9 @@ class ImportModel:
|
||||
start_to_close_timeout=STATUS_WRITE_TIMEOUT,
|
||||
schedule_to_close_timeout=STATUS_WRITE_ENVELOPE,
|
||||
)
|
||||
except BaseException as error: # NOSONAR - the outcome stands even when it cannot be written
|
||||
except (
|
||||
BaseException
|
||||
) as error: # NOSONAR - the outcome stands even when it cannot be written
|
||||
await self._report_status_write_failure(
|
||||
base,
|
||||
error,
|
||||
@@ -377,7 +379,9 @@ class ImportModel:
|
||||
retry_policy=retry_policy,
|
||||
start_to_close_timeout=STATUS_WRITE_TIMEOUT,
|
||||
)
|
||||
except BaseException: # NOSONAR - reporting the report is where this stops
|
||||
except BaseException: # noqa: S110 # NOSONAR - the report of a report is where this stops
|
||||
# Deliberately silent: the channel this was trying to reach is the thing that logs, so
|
||||
# there is nowhere left to say it, and an import that worked must not fail over it.
|
||||
pass
|
||||
|
||||
# ----------------------------------------------------------- side-effect steps
|
||||
@@ -389,8 +393,8 @@ class ImportModel:
|
||||
The rule is applied by the importer rather than assumed from a Helm value, so the acceptance
|
||||
criterion is verifiable from the code that depends on it. But a bucket policy the importer
|
||||
cannot set is an operational problem, not a bad import: failing a valid model import because
|
||||
a lifecycle API refused would be the wrong trade, so this is reported and dropped like a
|
||||
lost status hint.
|
||||
a lifecycle API refused would be the wrong trade, so the failure is dropped here and left
|
||||
where Temporal already records it — the activity's own failure in the event history.
|
||||
"""
|
||||
try:
|
||||
await workflow.execute_activity_method(
|
||||
@@ -399,7 +403,11 @@ class ImportModel:
|
||||
retry_policy=retry_policy,
|
||||
start_to_close_timeout=RETENTION_TIMEOUT,
|
||||
)
|
||||
except BaseException: # NOSONAR - retention is not a precondition of a correct import
|
||||
except BaseException: # noqa: S110 # NOSONAR - retention is not a precondition of an import
|
||||
# Dropped, not reported: the activity's own failure is already in the event history,
|
||||
# and a bucket policy the importer cannot set is an operational problem rather than a
|
||||
# bad import. Failing a valid model import over a lifecycle API would be the wrong
|
||||
# trade.
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user