hallowed-psychiatrist-75613
01/29/2024, 4:24 PMArgoEvent(name='event', url='<http://localhost:12000/metaflow-event>', payload = { 'config': p }).Publish()
I’ve tried sending p as
• a local file path (argo fails with file not found)
• the actual content (could not open file)
• a cloud based path - not supported
any advice is greatly appreciatedfresh-laptop-72652
01/29/2024, 6:06 PMIncludeFile is for including/versioning data from a local file alongside a flow when it's run or deployed, not changed dynamically as an input parameter – e.g. if you use IncludeFile and then run argo-workflows create the local file will be persisted by metaflow into the backend datastore, and later made available to the flows as a binary blob
https://docs.metaflow.org/scaling/data#data-in-local-files
where is the file you're trying to load located?hallowed-psychiatrist-75613
01/29/2024, 6:16 PMpython flow.py --environment=pypi argo-workflows trigger --config ../config.ymlfresh-laptop-72652
01/29/2024, 6:25 PMconfig.yml should be included/frozen at the time of deployment, e.g. when you run argo-workflows create? If so, then I think it should work no problem
If the goal is to dynamically load a file, e.g. from S3, then I don't believe IncludeFile supports that. In that case, you should likely just pass in a str parameter and load the file in the start stephallowed-psychiatrist-75613
01/29/2024, 6:31 PMfresh-laptop-72652
01/29/2024, 6:35 PMhallowed-psychiatrist-75613
01/29/2024, 7:01 PMfresh-laptop-72652
01/29/2024, 7:10 PMfast-vr-44972
01/29/2024, 9:28 PMhallowed-psychiatrist-75613
01/29/2024, 9:42 PMIncludeFile using a direct reference to a file in cloud storage is no longer supported. Contact the Metaflow team if you need this supportedfast-vr-44972
01/29/2024, 9:42 PMhallowed-psychiatrist-75613
01/29/2024, 9:43 PMfast-vr-44972
01/29/2024, 9:44 PMhallowed-psychiatrist-75613
01/29/2024, 10:19 PMimport sys, os, json
from metaflow.integrations import ArgoEvent
import metaflow.includefile as includefile
def trigger(config_file_path):
if not os.path.exists(config_file_path):
print(f"path: {config_file_path} does not exist")
sys.exit(1)
flow_name = 'SpecFlow'
uploaded = includefile.CURRENT_UPLOADER.store(flow_name, config_file_path, True, 'utf-8', includefile.DATACLIENTS['gs'], print)
config_file = includefile.IncludedFile(uploaded)
config_desc = json.dumps(config_file.descriptor)
e = ArgoEvent(name='event', url='<http://localhost:12000/metaflow-event>', payload = { 'config': config_desc })
e.publish()fresh-laptop-72652
01/29/2024, 10:24 PMhallowed-psychiatrist-75613
01/29/2024, 10:26 PMfresh-laptop-72652
01/29/2024, 10:31 PMgs:// and then loading from your cloud, otherwise loading the yaml locally