<@ULVA73B9P> I use prefect 3. what type of paramet...
# ask-marvin
s
@Marvin I use prefect 3. what type of parameters supported in Prefect UI? e.g. Datetime, List, pydantic BaseModel
m
I couldn't find specific Prefect 3.x documentation details about the types of parameters supported in the Prefect UI from the search results. However, I can provide some general understanding. In Prefect 3, the UI and API generally support following parameter types: - Primitive Types: Such as strings, integers, floats, and booleans. - Datetime Objects: For handling specific date and time data. - Lists and Dictionaries: For collections of items, similar to native Python lists and dicts. - Complex Objects: Such as JSON-serializable objects. This might include objects that can be represented as common data interchange formats. For custom data models, Prefect 3.x is compatible with Pydantic V2 as its standard for object validation and settings management. You can use Pydantic models as parameters, but you need to ensure that these models are JSON-serializable because Prefect UI inputs and outputs often work with JSON. If you are looking for a specific type of parameter that might include a certain library or data format, please let me know and I can look more into it! You can also explore more by visiting the Prefect's documentation and community pages here.
s
Thank you @Marvin, Could you tell me some source code on Gitlab that implements Parameters in Prefect UI ?
m
Here are some Prefect GitHub issues that implement parameters in the Prefect UI: 1. Flow Run Parameters: Display Fields of Pydantic Model in well-defined order (Issue #8596): - This issue describes using Pydantic models for defining flow input parameters. It highlights how the order of fields in the Prefect UI might not reflect the order defined in the Pydantic model. - The issue includes a Python code snippet demonstrating the use of Pydantic models as flow input parameters. - Link: GitHub Issue #8596 2. Parameter Freezing or Hiding for Deployment Flow Configuration (Issue #11073): - This issue discusses the need to freeze or hide specific flow parameters in the UI for deployment. - It explains a feature proposal to lock specific flow parameters, making them immutable in the UI for certain deployments. - Link: GitHub Issue #11073 These issues should provide you with insights into how parameters are handled in the Prefect UI and might contain code samples relevant to your interests.