Is there a flag that indicates if a task is runnin...
# ask-metaflow
g
Is there a flag that indicates if a task is running locally vs. remotely?
1
c
METAFLOW_RUNTIME_ENVIRONMENT
env var does this
Copy code
if os.environ.get("METAFLOW_RUNTIME_ENVIRONMENT", "local") == "local" --> local

elif os.environ.get("METAFLOW_RUNTIME_ENVIRONMENT") == "aws-batch" --> not local

elif os.environ.get("METAFLOW_RUNTIME_ENVIRONMENT") == "kubernetes" --> not local
g
Perfect. Thank you! 💯