Jack P
01/13/2024, 9:32 PMMarvin
01/13/2024, 9:32 PMdeployment.yamldeployment.yamlprefect deployment applyKevin Grismore
01/13/2024, 9:34 PMJack P
01/13/2024, 9:34 PMKevin Grismore
01/13/2024, 9:34 PMLiteralKevin Grismore
01/13/2024, 9:35 PMNate
01/13/2024, 9:35 PMfrom enum import Enum
from prefect import flow
class CardinalDirection(Enum):
    NORTH = "north"
    SOUTH = "south"
    EAST = "east"
    WEST = "west"
@flow
def where_to_go(direction: CardinalDirection):
    print(f"Going {direction.name}!")
if __name__ == "__main__":
    where_to_go.serve("enums")Kevin Grismore
01/13/2024, 9:35 PMJack P
01/13/2024, 9:37 PMNate
01/13/2024, 9:41 PMNate
01/13/2024, 9:41 PMJack P
01/13/2024, 9:42 PMNate
01/13/2024, 9:43 PMKrystal
02/14/2024, 9:34 AMconfigclass TestConfig(BaseModel):
    environment: Environment = (
        Field(..., description="The environment to send the API requests to"),
    )
    df_uri: str | S3URI = Field(
        default=DEFAULT_URI,
        description="S3 URI of the csv. Must contain one of these columns ['content_id', 'video_id', 'image_id']",
    )
    garm_model: str = Field(
        default="xxx", description="Name of the garm model"
    )
    decimals: int = Field(
        default=3, description="Decimal places when comparing results"
    )Nate
02/14/2024, 1:48 PMenvironment: Environment = (
        Field(..., description="The environment to send the API requests to"),
    )environmentEnvironmenttupleFieldclass TestConfig(BaseModel):
    environment: Environment = Field(..., description="The environment to send the API requests to")Krystal
02/14/2024, 2:00 PMKrystal
02/14/2024, 2:00 PMKrystal
02/14/2024, 2:00 PMNate
02/14/2024, 2:00 PMNate
02/14/2024, 2:00 PMKrystal
02/14/2024, 2:01 PMprefect.yamlNate
02/14/2024, 2:14 PMIn [1]: from pydantic import BaseModel
In [2]: class Foo(BaseModel):
   ...:     x: str
   ...:     y: int
   ...:
In [3]: from prefect import flow
In [4]: @flow
   ...: def accepts_foo(foo: Foo):
   ...:     print(foo, type(foo))
   ...:
In [5]: accepts_foo({"x": "marvin", "y": 42})
08:03:37.178 | INFO    | prefect.engine - Created flow run 'icy-trout' for flow 'accepts-foo'
x='marvin' y=42 <class '__main__.Foo'>
08:03:38.747 | INFO    | Flow run 'icy-trout' - Finished in state Completed()parameters:
  foo:
    x: marvin
    y: 42Krystal
02/14/2024, 2:18 PMKrystal
02/14/2024, 2:18 PMJack P
02/28/2024, 4:48 PM