-
Couldn't load subscription status.
- Fork 931
Open
Labels
enhancementNew feature or requestNew feature or request
Description
currently, Metaflow client loads configuration based on the METAFLOW_PROFILE env var. It is not straightforward to switch between different profiles e.g. in a notebook, as it requires a hard kernel restart to reload a config with a new profile
one can work around the issue with a snippet like this
import os
from multiprocessing import Pool
def latest_run(flow_name):
from metaflow import Flow
return Flow(flow_name).latest_run.pathspec
def call(op, args, profile=None):
os.environ['METAFLOW_PROFILE'] = profile
with Pool(processes=1) as pool:
return pool.apply(op, args)
if __name__ == '__main__':
print(call(latest_run, ('HelloFlow',), profile='local'))
print(call(latest_run, ('HelloFlow',), profile='mozart'))but it'd be useful to have support for multiple profiles natively
dpoznik, dennismoe and martinhausio
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request