Skip to content

Commit

Permalink
Performance: Add defer_build to PrefectBaseModel (#15046)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaazzam authored Aug 22, 2024
1 parent 92e16d6 commit 737f536
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/prefect/_internal/schemas/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class PrefectBaseModel(BaseModel):

model_config = ConfigDict(
ser_json_timedelta="float",
defer_build=True,
extra=(
"ignore"
if os.getenv("PREFECT_TEST_MODE", "0").lower() not in ["true", "1"]
Expand Down
1 change: 1 addition & 0 deletions src/prefect/server/utilities/schemas/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class PrefectBaseModel(BaseModel):
_reset_fields: ClassVar[Set[str]] = set()
model_config = ConfigDict(
ser_json_timedelta="float",
defer_build=True,
extra=(
"ignore"
if os.getenv("PREFECT_TEST_MODE", "0").lower() not in ["true", "1"]
Expand Down

0 comments on commit 737f536

Please sign in to comment.