<@ULVA73B9P> when deploying an flow with a yaml fi...
# ask-marvin
a
@Marvin when deploying an flow with a yaml file, i have the deployments, in the parameters how do i set a boolean value?
Copy code
deployments:
  - name: my-pipe
    description: description here
    entrypoint: folder/code.py:func_name
    parameters: { "boolean_value": True }
    work_pool:
      name: serverless-push-work-pool
I tried your suggestion:
Copy code
yaml
deployments:
  - name: my-pipe
    description: description here
    entrypoint: folder/code.py:func_name
    parameters:
      boolean_value: true
    work_pool:
      name: serverless-push-work-pool
but i get error : pydantic.errors.ConfigError: unable to infer type for attribute
m
To set a boolean value in a YAML file for deploying a Prefect flow, your second approach should be correct:
Copy code
yaml
deployments:
  - name: my-pipe
    description: description here
    entrypoint: folder/code.py:func_name
    parameters:
      boolean_value: true
    work_pool:
      name: serverless-push-work-pool
The error
pydantic.errors.ConfigError: unable to infer type for attribute
suggests that there might be another issue in the YAML structure or how it's being parsed. Here are a few things to double-check: 1. Ensure that the indentation in the YAML file is correct. 2. Verify that no additional, incorrect fields or parameters are present. 3. Validate that the YAML file is formatted correctly. YAML is sensitive to spaces, so use a linter or validator. Here is a minimal working example:
Copy code
yaml
deployments:
  - name: my-pipe
    description: description here
    entrypoint: folder/code.py:func_name
    parameters:
      boolean_value: true
    work_pool:
      name: serverless-push-work-pool
Make sure you apply the deployment again with
prefect deployment apply
after making changes to the YAML file. For further assistance, you can also refer to the Prefect documentation on Deployments. If the issue persists, feel free to reach out to the Prefect community for more tailored support.
n
hi @Adam - im mostly behind marvin here except for
Make sure you apply the deployment again with
prefect deployment apply
after making changes to the YAML file.
which is 🙅 thatd be
prefect deploy
if you have the whole stack trace id be interested to see it
a
@Nate I had an issue elsewhere in my code 🤦‍♂️, in the end it wasnt the boolean value in the deployment yaml. Thanks for your time though!
n
catjam