swift-continent-14856
03/24/2025, 4:55 PMJSONType
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):
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:
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?ancient-application-36103
03/24/2025, 5:50 PMswift-continent-14856
03/25/2025, 2:06 PM