behaviorgpt 0.2.0__tar.gz → 0.2.1__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.
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/PKG-INFO +1 -1
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/pyproject.toml +1 -1
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/pyproject.toml.orig +1 -1
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/resources/catalogs.py +23 -2
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/LICENSE +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/README.md +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/__init__.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/_client.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/_exceptions.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/resources/__init__.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/resources/_shared.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/resources/recommendations.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/resources/requests.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/resources/search.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/types/__init__.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/types/domains.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/types/events.py +0 -0
- {behaviorgpt-0.2.0 → behaviorgpt-0.2.1}/src/behaviorgpt/types/http.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: behaviorgpt
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Python client for BehaviorGPT, UnboxAI's Large Behavioral Model for search, recommendations and personalization
|
|
5
5
|
Keywords: recommendations,personalization,search,behavioral model,unboxai
|
|
6
6
|
Author: Unbox AI
|
|
@@ -49,10 +49,31 @@ CATALOG_SCHEMA = {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
def _plain_type(t: pa.DataType) -> pa.DataType:
|
|
53
|
+
"""The embedder casts large, view and dictionary layouts to their plain
|
|
54
|
+
forms before it checks a type, so the check here does the same."""
|
|
55
|
+
if pa.types.is_dictionary(t):
|
|
56
|
+
return _plain_type(t.value_type)
|
|
57
|
+
if pa.types.is_large_string(t) or pa.types.is_string_view(t):
|
|
58
|
+
return pa.string()
|
|
59
|
+
if pa.types.is_large_binary(t) or pa.types.is_binary_view(t):
|
|
60
|
+
return pa.binary()
|
|
61
|
+
if (
|
|
62
|
+
pa.types.is_list(t)
|
|
63
|
+
or pa.types.is_large_list(t)
|
|
64
|
+
or pa.types.is_list_view(t)
|
|
65
|
+
or pa.types.is_large_list_view(t)
|
|
66
|
+
):
|
|
67
|
+
return pa.list_(_plain_type(t.value_type))
|
|
68
|
+
return t
|
|
69
|
+
|
|
70
|
+
|
|
52
71
|
def check_catalog_schema(path: Path) -> None:
|
|
53
72
|
"""Raise `UnboxAIError` if the parquet's columns do not match `CATALOG_SCHEMA`.
|
|
54
73
|
|
|
55
|
-
An entirely null column has Arrow type `null` and is accepted
|
|
74
|
+
An entirely null column has Arrow type `null` and is accepted, and so are
|
|
75
|
+
the large, view and dictionary layouts of a type, which pandas 3 and polars
|
|
76
|
+
write by default.
|
|
56
77
|
"""
|
|
57
78
|
try:
|
|
58
79
|
schema = pq.read_schema(path)
|
|
@@ -64,7 +85,7 @@ def check_catalog_schema(path: Path) -> None:
|
|
|
64
85
|
problems.append(f"{column}: missing")
|
|
65
86
|
continue
|
|
66
87
|
actual = schema.field(column).type
|
|
67
|
-
if actual != expected and not pa.types.is_null(actual):
|
|
88
|
+
if _plain_type(actual) != expected and not pa.types.is_null(actual):
|
|
68
89
|
problems.append(f"{column}: expected {expected}, got {actual}")
|
|
69
90
|
if problems:
|
|
70
91
|
raise UnboxAIError(
|
|
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
|