arthur-common 2.1.59__py3-none-any.whl → 2.1.61__py3-none-any.whl
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 arthur-common might be problematic. Click here for more details.
- arthur_common/aggregations/aggregator.py +3 -1
- arthur_common/aggregations/functions/agentic_aggregations.py +1 -1
- arthur_common/aggregations/functions/confusion_matrix.py +1 -1
- arthur_common/aggregations/functions/inference_count_by_class.py +1 -1
- arthur_common/aggregations/functions/mean_absolute_error.py +1 -1
- arthur_common/aggregations/functions/mean_squared_error.py +1 -1
- arthur_common/aggregations/functions/multiclass_confusion_matrix.py +1 -1
- arthur_common/aggregations/functions/multiclass_inference_count_by_class.py +1 -1
- arthur_common/aggregations/functions/shield_aggregations.py +1 -1
- arthur_common/models/common_schemas.py +208 -0
- arthur_common/models/connectors.py +3 -3
- arthur_common/models/constants.py +24 -0
- arthur_common/models/datasets.py +0 -9
- arthur_common/models/enums.py +144 -0
- arthur_common/models/metric_schemas.py +63 -0
- arthur_common/models/metrics.py +1 -1
- arthur_common/models/{shield.py → request_schemas.py} +204 -295
- arthur_common/models/response_schemas.py +682 -0
- arthur_common/models/schema_definitions.py +1 -1
- arthur_common/models/task_job_specs.py +3 -12
- arthur_common/tools/duckdb_data_loader.py +4 -2
- {arthur_common-2.1.59.dist-info → arthur_common-2.1.61.dist-info}/METADATA +4 -3
- {arthur_common-2.1.59.dist-info → arthur_common-2.1.61.dist-info}/RECORD +24 -19
- {arthur_common-2.1.59.dist-info → arthur_common-2.1.61.dist-info}/WHEEL +0 -0
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
from enum import Enum
|
|
2
1
|
from typing import Literal, Optional, Self
|
|
3
2
|
from uuid import UUID
|
|
4
3
|
|
|
5
|
-
from pydantic import BaseModel, Field
|
|
4
|
+
from pydantic import BaseModel, Field, model_validator
|
|
6
5
|
|
|
7
|
-
from arthur_common.models.
|
|
8
|
-
|
|
9
|
-
NewRuleRequest,
|
|
10
|
-
model_validator,
|
|
11
|
-
)
|
|
6
|
+
from arthur_common.models.enums import TaskType
|
|
7
|
+
from arthur_common.models.request_schemas import NewMetricRequest, NewRuleRequest
|
|
12
8
|
|
|
13
9
|
onboarding_id_desc = "An identifier to assign to the created model to make it easy to retrieve. Used by the UI during the GenAI model creation flow."
|
|
14
10
|
|
|
15
11
|
|
|
16
|
-
class TaskType(str, Enum):
|
|
17
|
-
TRADITIONAL = "traditional"
|
|
18
|
-
AGENTIC = "agentic"
|
|
19
|
-
|
|
20
|
-
|
|
21
12
|
class CreateModelTaskJobSpec(BaseModel):
|
|
22
13
|
job_type: Literal["create_model_task"] = "create_model_task"
|
|
23
14
|
connector_id: UUID = Field(
|
|
@@ -16,6 +16,8 @@ from arthur_common.models.schema_definitions import (
|
|
|
16
16
|
DType,
|
|
17
17
|
)
|
|
18
18
|
|
|
19
|
+
MAX_JSON_OBJECT_SIZE = 1024 * 1024 * 1024 # 1GB
|
|
20
|
+
|
|
19
21
|
|
|
20
22
|
class ColumnFormat(BaseModel):
|
|
21
23
|
source_name: str
|
|
@@ -104,9 +106,9 @@ class DuckDBOperator:
|
|
|
104
106
|
stringified_schema = ", ".join([f"{kv}" for kv in key_value_pairs])
|
|
105
107
|
stringified_schema = f"{{ {stringified_schema} }}"
|
|
106
108
|
|
|
107
|
-
read_stmt = f"read_json('memory://inferences.json', format='array', columns={stringified_schema})"
|
|
109
|
+
read_stmt = f"read_json('memory://inferences.json', format='array', columns={stringified_schema}, maximum_object_size={MAX_JSON_OBJECT_SIZE})"
|
|
108
110
|
else:
|
|
109
|
-
read_stmt = "read_json_auto('memory://inferences.json')"
|
|
111
|
+
read_stmt = f"read_json_auto('memory://inferences.json', maximum_object_size={MAX_JSON_OBJECT_SIZE})"
|
|
110
112
|
|
|
111
113
|
conn.sql(
|
|
112
114
|
f"CREATE OR REPLACE TEMP TABLE {table_name} AS SELECT * FROM {read_stmt}",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: arthur-common
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.61
|
|
4
4
|
Summary: Utility code common to Arthur platform components.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Arthur
|
|
@@ -14,6 +14,7 @@ Requires-Dist: datasketches (>=5.1.0)
|
|
|
14
14
|
Requires-Dist: duckdb (>=1.1.3)
|
|
15
15
|
Requires-Dist: fastapi (>=0.115.8)
|
|
16
16
|
Requires-Dist: fsspec (>=2024.10.0)
|
|
17
|
+
Requires-Dist: openinference-semantic-conventions (>=0.1.12,<0.2.0)
|
|
17
18
|
Requires-Dist: pandas (>=2.2.2)
|
|
18
19
|
Requires-Dist: pydantic (>=2)
|
|
19
20
|
Requires-Dist: simple-settings (>=1.2.0)
|
|
@@ -43,14 +44,14 @@ pip install arthur-common
|
|
|
43
44
|
|
|
44
45
|
## Requirements
|
|
45
46
|
|
|
46
|
-
- Python 3.
|
|
47
|
+
- Python 3.13
|
|
47
48
|
|
|
48
49
|
## Development
|
|
49
50
|
|
|
50
51
|
To set up the development environment, ensure you have [Poetry](https://python-poetry.org/) installed, then run:
|
|
51
52
|
|
|
52
53
|
```bash
|
|
53
|
-
poetry env use 3.
|
|
54
|
+
poetry env use 3.13
|
|
54
55
|
poetry install
|
|
55
56
|
```
|
|
56
57
|
|
|
@@ -1,44 +1,49 @@
|
|
|
1
1
|
arthur_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
arthur_common/aggregations/__init__.py,sha256=vISWyciQAtksa71OKeHNP-QyFGd1NzBKq_LBsG0QSG8,67
|
|
3
|
-
arthur_common/aggregations/aggregator.py,sha256=
|
|
3
|
+
arthur_common/aggregations/aggregator.py,sha256=AhyNqBDEbKtS3ZrnSIT9iZ1SK_TAuiUNg9s9loDvek0,8007
|
|
4
4
|
arthur_common/aggregations/functions/README.md,sha256=MkZoTAJ94My96R5Z8GAxud7S6vyR0vgVi9gqdt9a4XY,5460
|
|
5
5
|
arthur_common/aggregations/functions/__init__.py,sha256=HqC3UNRURX7ZQHgamTrQvfA8u_FiZGZ4I4eQW7Ooe5o,1299
|
|
6
|
-
arthur_common/aggregations/functions/agentic_aggregations.py,sha256=
|
|
6
|
+
arthur_common/aggregations/functions/agentic_aggregations.py,sha256=09th4RPRf-ogtVWpbcqqmITN2UFtfqXhQ7Rr6IBqQHo,33995
|
|
7
7
|
arthur_common/aggregations/functions/categorical_count.py,sha256=wc1ovL8JoiSeoSTk9h1fgrLj1QuQeYYZmEqgffGc2cw,5328
|
|
8
|
-
arthur_common/aggregations/functions/confusion_matrix.py,sha256=
|
|
8
|
+
arthur_common/aggregations/functions/confusion_matrix.py,sha256=aPL8DaXpflt0z1u1KIeFw9geZLJ6qTuTosCNFV54y8M,22105
|
|
9
9
|
arthur_common/aggregations/functions/inference_count.py,sha256=SrRfxQVnX-wRTZ1zbqUKupPdACvfKeUpZDidZs45ZUY,4079
|
|
10
|
-
arthur_common/aggregations/functions/inference_count_by_class.py,sha256=
|
|
10
|
+
arthur_common/aggregations/functions/inference_count_by_class.py,sha256=H64-pZIU1bJ2BPNJl64_H97BASAjGact10AjW_gkvaY,11551
|
|
11
11
|
arthur_common/aggregations/functions/inference_null_count.py,sha256=w9sfu1QDlVBJwMW5EEkgda65nyMAABzd-FBKtj8amw4,4825
|
|
12
|
-
arthur_common/aggregations/functions/mean_absolute_error.py,sha256=
|
|
13
|
-
arthur_common/aggregations/functions/mean_squared_error.py,sha256=
|
|
14
|
-
arthur_common/aggregations/functions/multiclass_confusion_matrix.py,sha256=
|
|
15
|
-
arthur_common/aggregations/functions/multiclass_inference_count_by_class.py,sha256=
|
|
12
|
+
arthur_common/aggregations/functions/mean_absolute_error.py,sha256=mOqE7XO2h7JtTLEKG5gTXu-pQJJIMYKWbUyqWA2dcxk,6831
|
|
13
|
+
arthur_common/aggregations/functions/mean_squared_error.py,sha256=9WFBIhmAg1FZ7tdQYFWsS3yp3kyCYMJVAk-uLSb41Ck,6852
|
|
14
|
+
arthur_common/aggregations/functions/multiclass_confusion_matrix.py,sha256=rXXvXCIb30j_ofsMfp2yjLEdf8LmfKTqOLM3NQowzaU,12612
|
|
15
|
+
arthur_common/aggregations/functions/multiclass_inference_count_by_class.py,sha256=yiMpdz4VuX1ELprXYupFu4B9aDLIhgfEi3ma8jZsT_M,4261
|
|
16
16
|
arthur_common/aggregations/functions/numeric_stats.py,sha256=uHTyOAHW6xF6D-TeFLtY16iVR-Ju_6lmXSSY77mH0Qs,4921
|
|
17
17
|
arthur_common/aggregations/functions/numeric_sum.py,sha256=kGE6Jjnjwf2E4TKE3NwPyrlEKgygfCxv1z_YGDCOcCQ,5028
|
|
18
18
|
arthur_common/aggregations/functions/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
arthur_common/aggregations/functions/shield_aggregations.py,sha256=
|
|
19
|
+
arthur_common/aggregations/functions/shield_aggregations.py,sha256=BzPkpbhZRy16iFOobuusGKHfov5DxnXS2v_WThpw2fk,35659
|
|
20
20
|
arthur_common/aggregations/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
arthur_common/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
arthur_common/config/config.py,sha256=fcpjOYjPKu4Duk63CuTHrOWKQKAlAhVUR60kF_2_Xog,1247
|
|
23
23
|
arthur_common/config/settings.yaml,sha256=0CrygUwJzC5mGcO5Xnvv2ttp-P7LIsx682jllYA96NQ,161
|
|
24
24
|
arthur_common/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
-
arthur_common/models/
|
|
26
|
-
arthur_common/models/
|
|
27
|
-
arthur_common/models/
|
|
25
|
+
arthur_common/models/common_schemas.py,sha256=31Br7DbIgrwHwzgiyMXrgPYrANhqSqle7kmismcy4TY,6770
|
|
26
|
+
arthur_common/models/connectors.py,sha256=Yx0wzLKJDVp-Y_bT5sz9AR92MV8U9YG8wt2s6BvOceY,2293
|
|
27
|
+
arthur_common/models/constants.py,sha256=munkU0LrLsDs9BtAfozzw30FCguIowmAUKg_9vqwX24,1049
|
|
28
|
+
arthur_common/models/datasets.py,sha256=7p1tyJEPwXjBs2ZRoai8hTzNl6MK9jU1DluzASApE_4,254
|
|
29
|
+
arthur_common/models/enums.py,sha256=qOdzjRUMXEveADeXco4t5jG_55agcbu9wDjVGjvwXww,3589
|
|
30
|
+
arthur_common/models/metric_schemas.py,sha256=Xf-1RTzg7iYtnBMLkUUUuMPzAujzzNvQx_pe-CksEdU,2484
|
|
31
|
+
arthur_common/models/metrics.py,sha256=87LUU7-8duoKCzaffw9GHMyjsKMNoxKa5n5Hyg_ZK1s,11931
|
|
28
32
|
arthur_common/models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
arthur_common/models/
|
|
30
|
-
arthur_common/models/
|
|
31
|
-
arthur_common/models/
|
|
33
|
+
arthur_common/models/request_schemas.py,sha256=9X3ESlCEqSASZ-vcRkIyruNi130uMb5Ww4wa4DZ3feA,21408
|
|
34
|
+
arthur_common/models/response_schemas.py,sha256=eZCgxnfOht8isUunAA4rosLFA-tgXRZIcj2CYa5XqOE,24362
|
|
35
|
+
arthur_common/models/schema_definitions.py,sha256=dcUSLjBmvyloStcBFmT_rHdXbKdvA8Yxi_avYUbps3E,16876
|
|
36
|
+
arthur_common/models/task_job_specs.py,sha256=p7jsSb97ylHYNkwoHXNOJvx2zcnh2kxLeh3m0pddo4M,3442
|
|
32
37
|
arthur_common/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
38
|
arthur_common/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
39
|
arthur_common/tools/aggregation_analyzer.py,sha256=UfMtvFWXV2Dqly8S6nneGgomuvEGN-1tBz81tfkMcAE,11206
|
|
35
40
|
arthur_common/tools/aggregation_loader.py,sha256=3CF46bNi-GdJBNOXkjYfCQ1Aung8lf65L532sdWmR_s,2351
|
|
36
|
-
arthur_common/tools/duckdb_data_loader.py,sha256=
|
|
41
|
+
arthur_common/tools/duckdb_data_loader.py,sha256=OwuvppwcBB9qQxyWr86mH7Gz2FBIuyDl0UpQ7TulhlU,11220
|
|
37
42
|
arthur_common/tools/duckdb_utils.py,sha256=1i-kRXu95gh4Sf9Osl2LFUpdb0yZifOjLDtIgSfSmfs,1197
|
|
38
43
|
arthur_common/tools/functions.py,sha256=FWL4eWO5-vLp86WudT-MGUKvf2B8f02IdoXQFKd6d8k,1093
|
|
39
44
|
arthur_common/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
45
|
arthur_common/tools/schema_inferer.py,sha256=Ur4CXGAkd6ZMSU0nMNrkOEElsBopHXq0lctTV8X92W8,5188
|
|
41
46
|
arthur_common/tools/time_utils.py,sha256=4gfiu9NXfvPZltiVNLSIQGylX6h2W0viNi9Kv4bKyfw,1410
|
|
42
|
-
arthur_common-2.1.
|
|
43
|
-
arthur_common-2.1.
|
|
44
|
-
arthur_common-2.1.
|
|
47
|
+
arthur_common-2.1.61.dist-info/METADATA,sha256=nhmjfLCX2dU-SbYVQayNLz5AfO0nyIgRMAqU47AhkYk,2106
|
|
48
|
+
arthur_common-2.1.61.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
49
|
+
arthur_common-2.1.61.dist-info/RECORD,,
|
|
File without changes
|