From e62e2f2d351d706869abe3b1bdad6716db279883 Mon Sep 17 00:00:00 2001 From: Yusuf Olokoba Date: Thu, 11 Jan 2024 20:13:54 -0500 Subject: [PATCH] Colab Pydantic fix --- Changelog.md | 2 +- conftest.py | 2 +- fxn/__init__.py | 2 +- fxn/cli/__init__.py | 2 +- fxn/cli/auth.py | 2 +- fxn/cli/env.py | 2 +- fxn/cli/misc.py | 2 +- fxn/cli/predict.py | 2 +- fxn/cli/predictors.py | 2 +- fxn/function.py | 2 +- fxn/graph/__init__.py | 2 +- fxn/graph/client.py | 2 +- fxn/magic.py | 2 +- fxn/services/__init__.py | 2 +- fxn/services/environment.py | 2 +- fxn/services/prediction.py | 2 +- fxn/services/predictor.py | 2 +- fxn/services/storage.py | 2 +- fxn/services/user.py | 2 +- fxn/types/__init__.py | 2 +- fxn/types/dtype.py | 2 +- fxn/types/environment.py | 2 +- fxn/types/prediction.py | 2 +- fxn/types/predictor.py | 2 +- fxn/types/profile.py | 2 +- fxn/types/storage.py | 2 +- fxn/types/tag.py | 2 +- fxn/types/user.py | 2 +- fxn/types/value.py | 2 +- fxn/version.py | 2 +- setup.py | 4 ++-- test/prediction_test.py | 2 +- test/storage_test.py | 2 +- test/value_test.py | 2 +- 34 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Changelog.md b/Changelog.md index a61978c..1a0b6bd 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,5 @@ ## 0.0.27 -*INCOMPLETE* ++ Fixed `model_dump` error when making predictions in Google Colab due to outdated `pydantic` dependency. ## 0.0.26 + Added support for serializing `BytesIO` instances in `fxn.predictions.to_value` method. diff --git a/conftest.py b/conftest.py index 56f09f0..172aec6 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,4 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # \ No newline at end of file diff --git a/fxn/__init__.py b/fxn/__init__.py index e5b942a..45dd5a6 100644 --- a/fxn/__init__.py +++ b/fxn/__init__.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from .function import Function diff --git a/fxn/cli/__init__.py b/fxn/cli/__init__.py index 984d941..5b2598d 100644 --- a/fxn/cli/__init__.py +++ b/fxn/cli/__init__.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from typer import Typer diff --git a/fxn/cli/auth.py b/fxn/cli/auth.py index 102bef5..d5ad878 100644 --- a/fxn/cli/auth.py +++ b/fxn/cli/auth.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from pathlib import Path diff --git a/fxn/cli/env.py b/fxn/cli/env.py index 1faedf7..5beab26 100644 --- a/fxn/cli/env.py +++ b/fxn/cli/env.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from rich import print_json diff --git a/fxn/cli/misc.py b/fxn/cli/misc.py index 3973fea..fcb7030 100644 --- a/fxn/cli/misc.py +++ b/fxn/cli/misc.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from rich import print diff --git a/fxn/cli/predict.py b/fxn/cli/predict.py index 8fbb296..14c18cb 100644 --- a/fxn/cli/predict.py +++ b/fxn/cli/predict.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from io import BytesIO diff --git a/fxn/cli/predictors.py b/fxn/cli/predictors.py index 3cc1d62..8783802 100644 --- a/fxn/cli/predictors.py +++ b/fxn/cli/predictors.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from rich import print_json diff --git a/fxn/function.py b/fxn/function.py index 4e894f8..3a7e0e0 100644 --- a/fxn/function.py +++ b/fxn/function.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from os import environ diff --git a/fxn/graph/__init__.py b/fxn/graph/__init__.py index b35af1d..451671d 100644 --- a/fxn/graph/__init__.py +++ b/fxn/graph/__init__.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from .client import GraphClient \ No newline at end of file diff --git a/fxn/graph/client.py b/fxn/graph/client.py index 7c61090..ad2f9dd 100644 --- a/fxn/graph/client.py +++ b/fxn/graph/client.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from requests import post diff --git a/fxn/magic.py b/fxn/magic.py index 1d7700c..62addc0 100644 --- a/fxn/magic.py +++ b/fxn/magic.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from IPython.core.interactiveshell import InteractiveShell diff --git a/fxn/services/__init__.py b/fxn/services/__init__.py index 704af90..941d305 100644 --- a/fxn/services/__init__.py +++ b/fxn/services/__init__.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from .user import UserService, PROFILE_FIELDS, USER_FIELDS diff --git a/fxn/services/environment.py b/fxn/services/environment.py index 9770c96..4a5371d 100644 --- a/fxn/services/environment.py +++ b/fxn/services/environment.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from typing import List diff --git a/fxn/services/prediction.py b/fxn/services/prediction.py index 433236d..5c42760 100644 --- a/fxn/services/prediction.py +++ b/fxn/services/prediction.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from aiohttp import ClientSession diff --git a/fxn/services/predictor.py b/fxn/services/predictor.py index bba4f42..601f8f4 100644 --- a/fxn/services/predictor.py +++ b/fxn/services/predictor.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from pathlib import Path diff --git a/fxn/services/storage.py b/fxn/services/storage.py index f5081ac..55f8efa 100644 --- a/fxn/services/storage.py +++ b/fxn/services/storage.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from base64 import b64encode diff --git a/fxn/services/user.py b/fxn/services/user.py index 3e4da96..dbee9e0 100644 --- a/fxn/services/user.py +++ b/fxn/services/user.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from ..graph import GraphClient diff --git a/fxn/types/__init__.py b/fxn/types/__init__.py index 7e8e50d..53203dc 100644 --- a/fxn/types/__init__.py +++ b/fxn/types/__init__.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from .dtype import Dtype diff --git a/fxn/types/dtype.py b/fxn/types/dtype.py index de7601b..ca4be99 100644 --- a/fxn/types/dtype.py +++ b/fxn/types/dtype.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from enum import Enum diff --git a/fxn/types/environment.py b/fxn/types/environment.py index fc3c931..38186d6 100644 --- a/fxn/types/environment.py +++ b/fxn/types/environment.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from __future__ import annotations diff --git a/fxn/types/prediction.py b/fxn/types/prediction.py index 63e7bec..afa36a4 100644 --- a/fxn/types/prediction.py +++ b/fxn/types/prediction.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from __future__ import annotations diff --git a/fxn/types/predictor.py b/fxn/types/predictor.py index 5acdcac..9183f5c 100644 --- a/fxn/types/predictor.py +++ b/fxn/types/predictor.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from __future__ import annotations diff --git a/fxn/types/profile.py b/fxn/types/profile.py index e983488..35d3366 100644 --- a/fxn/types/profile.py +++ b/fxn/types/profile.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from pydantic import BaseModel diff --git a/fxn/types/storage.py b/fxn/types/storage.py index 0c84ba3..eb90b06 100644 --- a/fxn/types/storage.py +++ b/fxn/types/storage.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from enum import Enum diff --git a/fxn/types/tag.py b/fxn/types/tag.py index 35c2aeb..4a8edf7 100644 --- a/fxn/types/tag.py +++ b/fxn/types/tag.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # class Tag: diff --git a/fxn/types/user.py b/fxn/types/user.py index 0ee0f78..7f75391 100644 --- a/fxn/types/user.py +++ b/fxn/types/user.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from .profile import Profile diff --git a/fxn/types/value.py b/fxn/types/value.py index 4a9069c..9725413 100644 --- a/fxn/types/value.py +++ b/fxn/types/value.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from __future__ import annotations diff --git a/fxn/version.py b/fxn/version.py index ec11502..e6578b7 100644 --- a/fxn/version.py +++ b/fxn/version.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # __version__ = "0.0.27" \ No newline at end of file diff --git a/setup.py b/setup.py index 4f5e49c..03fa407 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from setuptools import find_packages, setup @@ -31,7 +31,7 @@ "filetype", "numpy", "pillow", - "pydantic", + "pydantic>=2.0", "requests", "rich", "typer" diff --git a/test/prediction_test.py b/test/prediction_test.py index a888509..c953580 100644 --- a/test/prediction_test.py +++ b/test/prediction_test.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from fxn import Function diff --git a/test/storage_test.py b/test/storage_test.py index a29ae95..f047b6e 100644 --- a/test/storage_test.py +++ b/test/storage_test.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from fxn import Function, UploadType diff --git a/test/value_test.py b/test/value_test.py index 3fe3ad4..7bbb99d 100644 --- a/test/value_test.py +++ b/test/value_test.py @@ -1,6 +1,6 @@ # # Function -# Copyright © 2023 NatML Inc. All Rights Reserved. +# Copyright © 2024 NatML Inc. All Rights Reserved. # from dataclasses import dataclass