inferencesh 0.4.11__tar.gz → 0.4.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of inferencesh might be problematic. Click here for more details.
- {inferencesh-0.4.11/src/inferencesh.egg-info → inferencesh-0.4.12}/PKG-INFO +1 -1
- {inferencesh-0.4.11 → inferencesh-0.4.12}/pyproject.toml +1 -1
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/models/file.py +22 -18
- {inferencesh-0.4.11 → inferencesh-0.4.12/src/inferencesh.egg-info}/PKG-INFO +1 -1
- {inferencesh-0.4.11 → inferencesh-0.4.12}/LICENSE +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/README.md +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/setup.cfg +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/__init__.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/client.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/models/__init__.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/models/base.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/models/llm.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/utils/__init__.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/utils/download.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh/utils/storage.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh.egg-info/SOURCES.txt +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh.egg-info/dependency_links.txt +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh.egg-info/entry_points.txt +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh.egg-info/requires.txt +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/src/inferencesh.egg-info/top_level.txt +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/tests/test_client.py +0 -0
- {inferencesh-0.4.11 → inferencesh-0.4.12}/tests/test_sdk.py +0 -0
|
@@ -9,9 +9,6 @@ import hashlib
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from tqdm import tqdm
|
|
11
11
|
|
|
12
|
-
from pydantic import GetCoreSchemaHandler, GetJsonSchemaHandler
|
|
13
|
-
from pydantic_core import CoreSchema, core_schema
|
|
14
|
-
|
|
15
12
|
class File(BaseModel):
|
|
16
13
|
"""A class representing a file in the inference.sh ecosystem."""
|
|
17
14
|
|
|
@@ -239,22 +236,29 @@ class File(BaseModel):
|
|
|
239
236
|
self.size = self._get_file_size() # Always update size
|
|
240
237
|
self.filename = self._get_filename()
|
|
241
238
|
|
|
242
|
-
@classmethod
|
|
243
|
-
def __get_pydantic_core_schema__(
|
|
244
|
-
|
|
245
|
-
) -> CoreSchema:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
239
|
+
# @classmethod
|
|
240
|
+
# def __get_pydantic_core_schema__(
|
|
241
|
+
# cls, source: Type[Any], handler: GetCoreSchemaHandler
|
|
242
|
+
# ) -> CoreSchema:
|
|
243
|
+
# """Generates a Pydantic Core schema for validation of this File class"""
|
|
244
|
+
# # Get the default schema for our class
|
|
245
|
+
# schema = handler(source)
|
|
246
|
+
|
|
247
|
+
# # Create a proper serialization schema that includes the type
|
|
248
|
+
# serialization = core_schema.plain_serializer_function_ser_schema(
|
|
249
|
+
# lambda x: x.uri if x.uri else x.path,
|
|
250
|
+
# return_schema=core_schema.str_schema(),
|
|
251
|
+
# when_used="json",
|
|
252
|
+
# )
|
|
249
253
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
# return core_schema.json_or_python_schema(
|
|
255
|
+
# json_schema=core_schema.union_schema([
|
|
256
|
+
# core_schema.str_schema(), # Accept string input
|
|
257
|
+
# schema, # Accept full object input
|
|
258
|
+
# ]),
|
|
259
|
+
# python_schema=schema,
|
|
260
|
+
# serialization=serialization,
|
|
261
|
+
# )
|
|
258
262
|
|
|
259
263
|
@classmethod
|
|
260
264
|
def __get_pydantic_json_schema__(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|