Skip to content

Commit 90685a2

Browse files
authored
Fix issues with @Environment (#452)
* Fix issues with @Environment context https://gitter.im/metaflow_org/community?at=604a2bfb44f5a454a46cc7f8 * add more comments * roll back to previous commit
1 parent 116ec32 commit 90685a2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

metaflow/metadata/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,5 +495,5 @@ def __init__(self, environment, flow, event_logger, monitor):
495495
self._monitor = monitor
496496
self._environment = environment
497497
self._runtime = os.environ.get(
498-
'METAFLOW_MLI_RUNTIME_NAME', 'dev')
498+
'METAFLOW_RUNTIME_NAME', 'dev')
499499
self.add_sticky_tags(sys_tags=self._tags())

metaflow/plugins/environment_decorator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class EnvironmentDecorator(StepDecorator):
99
Step decorator to add or update environment variables prior to the execution of your step.
1010
1111
The environment variables set with this decorator will be present during the execution of the
12-
step both locally or on Batch.
12+
step.
1313
1414
To use, annotate your step as follows:
1515
```
@@ -27,5 +27,5 @@ def myStep(self):
2727
name = 'environment'
2828
defaults = {'vars': {}}
2929

30-
def step_init(self, flow, graph, step, decos, environment, datastore, logger):
31-
os.environ.update(self.attributes['vars'].items())
30+
def runtime_step_cli(self, cli_args, retry_count, max_user_code_retries):
31+
cli_args.env.update(self.attributes['vars'].items())

0 commit comments

Comments
 (0)