Make runtime provenance operator script directly executable
This commit is contained in:
@@ -10,6 +10,13 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
# 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
|
from app.db.session import SessionLocal
|
||||||
from app.services.data_contract_validation import (
|
from app.services.data_contract_validation import (
|
||||||
PYTORCH_MODEL_CONTRACT_KEY,
|
PYTORCH_MODEL_CONTRACT_KEY,
|
||||||
|
|||||||
Reference in New Issue
Block a user