Skip to content

Commit 5b28338

Browse files
committed
change name of metadata_pathspec_file to runner_attribute_file
1 parent 38d8a63 commit 5b28338

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

metaflow/cli.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,11 @@ def common_run_options(func):
559559
help="Write the ID of this run to the file specified.",
560560
)
561561
@click.option(
562-
"--metadata-pathspec-file",
562+
"--runner-attribute-file",
563563
default=None,
564564
show_default=True,
565565
type=str,
566-
help="Write the metadata and pathspec of this run to the file specified.",
566+
help="Write the metadata and pathspec of this run to the file specified. Used internally for Metaflow's Runner API.",
567567
)
568568
@wraps(func)
569569
def wrapper(*args, **kwargs):
@@ -623,7 +623,7 @@ def resume(
623623
decospecs=None,
624624
run_id_file=None,
625625
resume_identifier=None,
626-
metadata_pathspec_file=None,
626+
runner_attribute_file=None,
627627
):
628628
before_run(obj, tags, decospecs + obj.environment.decospecs())
629629

@@ -684,7 +684,7 @@ def resume(
684684

685685
runtime.persist_constants()
686686
write_file(
687-
metadata_pathspec_file,
687+
runner_attribute_file,
688688
"%s:%s" % (get_metadata(), "/".join((obj.flow.name, runtime.run_id))),
689689
)
690690
if clone_only:
@@ -717,7 +717,7 @@ def run(
717717
max_log_size=None,
718718
decospecs=None,
719719
run_id_file=None,
720-
metadata_pathspec_file=None,
720+
runner_attribute_file=None,
721721
user_namespace=None,
722722
**kwargs
723723
):
@@ -747,7 +747,7 @@ def run(
747747
runtime.print_workflow_info()
748748
runtime.persist_constants()
749749
write_file(
750-
metadata_pathspec_file,
750+
runner_attribute_file,
751751
"%s:%s" % (get_metadata(), "/".join((obj.flow.name, runtime.run_id))),
752752
)
753753
runtime.execute()

metaflow/runner/metaflow_runner.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -290,19 +290,19 @@ def run(self, show_output: bool = False, **kwargs) -> ExecutingRun:
290290
ExecutingRun object for this run.
291291
"""
292292
with tempfile.TemporaryDirectory() as temp_dir:
293-
tfp_metadata_pathspec = tempfile.NamedTemporaryFile(
293+
tfp_runner_attribute = tempfile.NamedTemporaryFile(
294294
dir=temp_dir, delete=False
295295
)
296296
command = self.api(**self.top_level_kwargs).run(
297-
metadata_pathspec_file=tfp_metadata_pathspec.name, **kwargs
297+
runner_attribute_file=tfp_runner_attribute.name, **kwargs
298298
)
299299

300300
pid = self.spm.run_command(
301301
[sys.executable, *command], env=self.env_vars, show_output=show_output
302302
)
303303
command_obj = self.spm.get(pid)
304304

305-
return self.__get_executing_run(tfp_metadata_pathspec, command_obj)
305+
return self.__get_executing_run(tfp_runner_attribute, command_obj)
306306

307307
def resume(self, show_output: bool = False, **kwargs):
308308
"""
@@ -327,19 +327,19 @@ def resume(self, show_output: bool = False, **kwargs):
327327
ExecutingRun object for this resumed run.
328328
"""
329329
with tempfile.TemporaryDirectory() as temp_dir:
330-
tfp_metadata_pathspec = tempfile.NamedTemporaryFile(
330+
tfp_runner_attribute = tempfile.NamedTemporaryFile(
331331
dir=temp_dir, delete=False
332332
)
333333
command = self.api(**self.top_level_kwargs).resume(
334-
metadata_pathspec_file=tfp_metadata_pathspec.name, **kwargs
334+
runner_attribute_file=tfp_runner_attribute.name, **kwargs
335335
)
336336

337337
pid = self.spm.run_command(
338338
[sys.executable, *command], env=self.env_vars, show_output=show_output
339339
)
340340
command_obj = self.spm.get(pid)
341341

342-
return self.__get_executing_run(tfp_metadata_pathspec, command_obj)
342+
return self.__get_executing_run(tfp_runner_attribute, command_obj)
343343

344344
async def async_run(self, **kwargs) -> ExecutingRun:
345345
"""
@@ -358,11 +358,11 @@ async def async_run(self, **kwargs) -> ExecutingRun:
358358
ExecutingRun object for this run.
359359
"""
360360
with tempfile.TemporaryDirectory() as temp_dir:
361-
tfp_metadata_pathspec = tempfile.NamedTemporaryFile(
361+
tfp_runner_attribute = tempfile.NamedTemporaryFile(
362362
dir=temp_dir, delete=False
363363
)
364364
command = self.api(**self.top_level_kwargs).run(
365-
metadata_pathspec_file=tfp_metadata_pathspec.name, **kwargs
365+
runner_attribute_file=tfp_runner_attribute.name, **kwargs
366366
)
367367

368368
pid = await self.spm.async_run_command(
@@ -371,7 +371,7 @@ async def async_run(self, **kwargs) -> ExecutingRun:
371371
)
372372
command_obj = self.spm.get(pid)
373373

374-
return self.__get_executing_run(tfp_metadata_pathspec, command_obj)
374+
return self.__get_executing_run(tfp_runner_attribute, command_obj)
375375

376376
async def async_resume(self, **kwargs):
377377
"""
@@ -390,11 +390,11 @@ async def async_resume(self, **kwargs):
390390
ExecutingRun object for this resumed run.
391391
"""
392392
with tempfile.TemporaryDirectory() as temp_dir:
393-
tfp_metadata_pathspec = tempfile.NamedTemporaryFile(
393+
tfp_runner_attribute = tempfile.NamedTemporaryFile(
394394
dir=temp_dir, delete=False
395395
)
396396
command = self.api(**self.top_level_kwargs).resume(
397-
metadata_pathspec_file=tfp_metadata_pathspec.name, **kwargs
397+
runner_attribute_file=tfp_runner_attribute.name, **kwargs
398398
)
399399

400400
pid = await self.spm.async_run_command(
@@ -403,7 +403,7 @@ async def async_resume(self, **kwargs):
403403
)
404404
command_obj = self.spm.get(pid)
405405

406-
return self.__get_executing_run(tfp_metadata_pathspec, command_obj)
406+
return self.__get_executing_run(tfp_runner_attribute, command_obj)
407407

408408
def __exit__(self, exc_type, exc_value, traceback):
409409
self.spm.cleanup()

0 commit comments

Comments
 (0)