I have a Flow which takes in a `JSONType` paramete...
# ask-metaflow
s
I have a Flow which takes in a
JSONType
parameter (named
input_kwargs
) and I am trying to run it programmatically using the
Runner
class. I have no idea how to pass a value to it. When I pass in a dictionary as shown below (simplified example):
Copy code
with Runner(
    "preprocessing.py"
).run(input_kwargs={"dataset_path": "train.csv"}) as running:
    print(f"{running.run} finished")
Then it throws the following error:
TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
If I convert the dict to string using json dumps as shown below:
Copy code
with Runner(
    "preprocessing.py"
).run(input_kwargs=json.dumps({"dataset_path": "train.csv"})) as running:
    print(f"{running.run} finished")
Then the code works but then
input_kwargs
has a string value of
{"dataset_path": "train.csv"}'
. How do I pass a dict as an argument to a JSONType parameter?
2
a
hi! can you try with metaflow 2.15.6 which had a bug fix for this issue
🙌 1
s
That worked! Thanks a lot!