salmon-refrigerator-32115
05/30/2023, 11:08 PMfreezing-boots-56761
.sql
file copied in. then you can run pyflyte run --remote --image <CUSTOM_IMAGE>...
freezing-boots-56761
salmon-refrigerator-32115
05/31/2023, 7:26 PMfreezing-boots-56761
salmon-refrigerator-32115
05/31/2023, 11:21 PMsalmon-refrigerator-32115
05/31/2023, 11:21 PMsalmon-refrigerator-32115
05/31/2023, 11:24 PMfreezing-boots-56761
salmon-refrigerator-32115
06/01/2023, 5:18 PMfreezing-boots-56761
salmon-refrigerator-32115
06/01/2023, 5:49 PMfrom typing import Dict, List, NamedTuple, Tuple, Any, Optional
import json
from flytekit import task, workflow, current_context, Resources, LaunchPlan, Email, Slack
@task
def get_config() -> Dict[str, Any]:
# Open the JSON file
with open('parameters.json') as f:
# Load the contents of the file into a dictionary
params = json.load(f)
print(type(params))
print(params)
return params
@workflow
def wf() -> Dict[str, Any]:
return get_config()
In the parameters.json (which is in the same same folder as the workflow file):
{
"COMMON": {
"table_name": "ABC",
"threshold": 0.4
}
}
Could you try pyflyte register them and see if you can get it run in the flyte remote server?
Note: I can run it locally without issue. However remotely, it error with: ‘/root/parameters.json is not found’.
This is the command I run to fast register (I only mention the flow .py file name, not the package).
Could this be the root cause of the issue?
What is the correct pyflyte register syntax to register the whole package?
pyflyte register sample_workflow.py
freezing-boots-56761
freezing-boots-56761
freezing-boots-56761
salmon-refrigerator-32115
06/01/2023, 5:56 PMpyflyte register sample_workflow.py
freezing-boots-56761
freezing-boots-56761
freezing-boots-56761
freezing-boots-56761
salmon-refrigerator-32115
06/01/2023, 6:17 PMfreezing-boots-56761
freezing-boots-56761
salmon-refrigerator-32115
06/02/2023, 2:48 AMfreezing-boots-56761
salmon-refrigerator-32115
06/02/2023, 3:04 AMsalmon-refrigerator-32115
06/02/2023, 3:12 AMfreezing-boots-56761