<@ULVA73B9P> I flow-a that runs flow-b using the `...
# ask-marvin
n
@Marvin I flow-a that runs flow-b using the
run_deployment
function.
Copy code
run_deployment(name=categorical_model_predict_deployment_name,
                       parameters=categorical_model_predict_prams)
According to the docs, the parameters will be merged with the existing deployment parameters. But at the UI Parameters of flow-b didn't get the values and gets null:
Copy code
"job_name": null,
    "job_image": null,
m
According to the Prefect documentation, when you use the
run_deployment
function and provide parameters, these parameters should override the default parameter values specified in the
deployment.yaml
configuration for that particular deployment when invoking the flow run. Parameters are to be added as JSON key-value pairs in the
parameters
field and they must match the parameters expected by the entrypoint flow function. If you're experiencing an issue where parameters are not being passed correctly and are received as
null
in the UI, it could be due to several reasons, such as a mismatch between the expected and provided parameters, an issue with the deployment configuration, or a potential bug. To troubleshoot and solve the issue, you could follow these steps: 1. Double-check the
deployment.yaml
to ensure it has the correct parameter definitions. 2. Verify that you're passing the correct keys and values for the parameters when calling
run_deployment
. 3. If the problem persists, consider checking for existing issues on Prefect's GitHub repository or file a new issue with your findings. Unfortunately, it seems there isn't a straightforward answer in the documentation we've retrieved so far. If you need further assistance, I suggest looking deeper into the deployment's configuration and verifying that the parameters you are passing are correctly structured. If the problem continues, you might need to consult with Prefect's support or community for a more targeted resolution.
n
@Marvin I am using the
prefect.yaml
config file:
Copy code
- name: categorical_model_predict
    tags:
      - categorical_model
      - ds
    entrypoint: flows/job_flow.py:job_flow
    parameters:
      job_params:
        job_name: categorical_model_predict
        job_image: upstream-ds-categorical_model-rc
        job_resources:
          limits:
            cpu: 500m
            memory: 1Gi
          requests:
            cpu: 500m
            memory: 1Gi
...
m
Based on the search results from GitHub issues and Prefect documentation, it seems there have been some reports of configuration references not being resolved as expected in
prefect.yaml
, as well as requests for additional features relating to
prefect.yaml
deployment properties (GitHub Issue #10388, GitHub Issue #11042). As for general usage and issues with
prefect.yaml
, the Prefect documentation does mention the use of
prefect deployment apply
to apply the deployment from a
prefect.yaml
file to the Prefect API, and the documentation also notes that you can customize default parameters from the UI after the deployment is created. It also details how parameters can be provided in a
deployment.yaml
configuration which is probably similar to
prefect.yaml
configurations. Given that you're experiencing an issue where the parameters appear as
null
in the UI, here are the steps you can take: 1. Check if the parameters passed in the
prefect.yaml
are correctly structured and are the ones expected by the entrypoint flow function. 2. Look through the GitHub issues to see if others are experiencing similar problems, and if so, check to see if there are noted solutions or workarounds. 3. If the problem is not due to a common mistake or known issue, consider reporting this behavior to Prefect's GitHub repository by creating an issue with detailed reproduction steps, your
prefect.yaml
contents, and the versions of Prefect you're using. 4. As a temporary workaround, try manually setting the parameters through the UI if that is an option. Additionally, if you have a deployment that already specifies the parameters, and you are running
prefect deployment apply
without including the parameters in the deployment definition in the
prefect.yaml
, ensure that you're not inadvertently setting them to null, as noted in GitHub Issue #11042. This issue mentions that if a property is omitted during deployment, it might override existing properties with null values on the server. If you have followed the steps and documentation correctly but still face issues, it seems like a more detailed investigation would be necessary, possibly with the help of the Prefect support or community forums.