Merge runtime provenance script execution fix
This commit is contained in:
@@ -10,13 +10,20 @@ import sys
|
||||
import tempfile
|
||||
from typing import Any
|
||||
|
||||
from app.db.session import SessionLocal
|
||||
from app.services.data_contract_validation import (
|
||||
# Direct execution from /app/scripts sets sys.path[0] to that directory rather
|
||||
# than the container application root. Keep the operator command self-contained
|
||||
# without requiring an undocumented PYTHONPATH override.
|
||||
APP_ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(APP_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(APP_ROOT))
|
||||
|
||||
from app.db.session import SessionLocal # noqa: E402
|
||||
from app.services.data_contract_validation import ( # noqa: E402
|
||||
PYTORCH_MODEL_CONTRACT_KEY,
|
||||
PYTORCH_MODEL_CONTRACT_VERSION,
|
||||
)
|
||||
from app.services.runtime_model_provenance_service import RuntimeModelProvenanceService
|
||||
from app.services.source_registry_service import SourceRegistryService
|
||||
from app.services.runtime_model_provenance_service import RuntimeModelProvenanceService # noqa: E402
|
||||
from app.services.source_registry_service import SourceRegistryService # noqa: E402
|
||||
|
||||
|
||||
CLAIM_BOUNDARY = (
|
||||
|
||||
Reference in New Issue
Block a user