Thread
#prefect-ui
    Marc-Antoine Bélanger

    Marc-Antoine Bélanger

    2 weeks ago
    I have some issues specifying the parameters on a deployment run. I have defined the following properties:
    {"data": {
                            "title": "data",
                            "default": {},
                            "type": "object",
     },
    "train": {
                            "title": "train",
                            "default": {},
                            "type": "object",
     }
    }
    This is what it is showing in the UI: But the run fails:
    Validation of flow parameters failed with error: ParameterTypeError('Flow run received invalid parameters:\n - data: value is not a valid dict\n - train: value is not a valid dict')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 284, in retrieve_flow_then_begin_flow_run
        parameters = flow.validate_parameters(flow_run.parameters)
      File "/usr/local/lib/python3.10/site-packages/prefect/flows.py", line 269, in validate_parameters
        raise ParameterTypeError.from_validation_error(exc) from None
    prefect.exceptions.ParameterTypeError: Flow run received invalid parameters:
     - data: value is not a valid dict
     - train: value is not a valid dict
    They seem to be interpreted as strings in the Parameters tab:
    {
      "data": "{}",
      "train": "{}"
    }
    Any idea what I am doing wrong?
    Rob Freedy

    Rob Freedy

    2 weeks ago
    have you tried using something like this to set the dict as a parameter?
    dict({"data": {
                            "title": "data",
                            "default": {},
                            "type": "object",
     },
    "train": {
                            "title": "train",
                            "default": {},
                            "type": "object",
     }
    })