arthur-common 2.1.53__py3-none-any.whl → 2.1.54__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/functions/agentic_aggregations.py +875 -0
- arthur_common/aggregations/functions/categorical_count.py +2 -2
- arthur_common/aggregations/functions/confusion_matrix.py +1 -1
- arthur_common/aggregations/functions/inference_count.py +2 -2
- arthur_common/aggregations/functions/inference_count_by_class.py +3 -3
- arthur_common/aggregations/functions/inference_null_count.py +2 -2
- arthur_common/aggregations/functions/mean_absolute_error.py +3 -2
- arthur_common/aggregations/functions/mean_squared_error.py +3 -2
- arthur_common/aggregations/functions/multiclass_confusion_matrix.py +1 -1
- arthur_common/aggregations/functions/multiclass_inference_count_by_class.py +2 -2
- arthur_common/aggregations/functions/numeric_stats.py +2 -2
- arthur_common/aggregations/functions/numeric_sum.py +2 -2
- arthur_common/aggregations/functions/shield_aggregations.py +14 -13
- arthur_common/models/datasets.py +1 -0
- arthur_common/models/metrics.py +7 -6
- arthur_common/models/schema_definitions.py +58 -0
- arthur_common/models/shield.py +158 -0
- arthur_common/models/task_job_specs.py +26 -2
- {arthur_common-2.1.53.dist-info → arthur_common-2.1.54.dist-info}/METADATA +1 -1
- {arthur_common-2.1.53.dist-info → arthur_common-2.1.54.dist-info}/RECORD +21 -20
- {arthur_common-2.1.53.dist-info → arthur_common-2.1.54.dist-info}/WHEEL +0 -0
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
from
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import Literal, Optional, Self
|
|
2
3
|
from uuid import UUID
|
|
3
4
|
|
|
4
5
|
from pydantic import BaseModel, Field
|
|
5
6
|
|
|
6
|
-
from arthur_common.models.shield import
|
|
7
|
+
from arthur_common.models.shield import (
|
|
8
|
+
NewMetricRequest,
|
|
9
|
+
NewRuleRequest,
|
|
10
|
+
model_validator,
|
|
11
|
+
)
|
|
7
12
|
|
|
8
13
|
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."
|
|
9
14
|
|
|
10
15
|
|
|
16
|
+
class TaskType(str, Enum):
|
|
17
|
+
TRADITIONAL = "traditional"
|
|
18
|
+
AGENTIC = "agentic"
|
|
19
|
+
|
|
20
|
+
|
|
11
21
|
class CreateModelTaskJobSpec(BaseModel):
|
|
12
22
|
job_type: Literal["create_model_task"] = "create_model_task"
|
|
13
23
|
connector_id: UUID = Field(
|
|
@@ -21,6 +31,20 @@ class CreateModelTaskJobSpec(BaseModel):
|
|
|
21
31
|
initial_rules: list[NewRuleRequest] = Field(
|
|
22
32
|
description="The initial rules to apply to the created model.",
|
|
23
33
|
)
|
|
34
|
+
task_type: TaskType = Field(
|
|
35
|
+
default=TaskType.TRADITIONAL,
|
|
36
|
+
description="The type of task to create.",
|
|
37
|
+
)
|
|
38
|
+
initial_metrics: list[NewMetricRequest] = Field(
|
|
39
|
+
description="The initial metrics to apply to agentic tasks.",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
@model_validator(mode="after")
|
|
43
|
+
def initial_metric_required(self) -> Self:
|
|
44
|
+
if self.task_type == TaskType.TRADITIONAL:
|
|
45
|
+
if not len(self.initial_metrics) == 0:
|
|
46
|
+
raise ValueError("No initial_metrics when task_type is TRADITIONAL")
|
|
47
|
+
return self
|
|
24
48
|
|
|
25
49
|
|
|
26
50
|
class CreateModelLinkTaskJobSpec(BaseModel):
|
|
@@ -3,31 +3,32 @@ arthur_common/aggregations/__init__.py,sha256=vISWyciQAtksa71OKeHNP-QyFGd1NzBKq_
|
|
|
3
3
|
arthur_common/aggregations/aggregator.py,sha256=kS9Qru0AhZzZz4Ym20NT7aNrbcQaqg2zgBVYFogFbbg,7936
|
|
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/
|
|
7
|
-
arthur_common/aggregations/functions/
|
|
8
|
-
arthur_common/aggregations/functions/
|
|
9
|
-
arthur_common/aggregations/functions/
|
|
10
|
-
arthur_common/aggregations/functions/
|
|
11
|
-
arthur_common/aggregations/functions/
|
|
12
|
-
arthur_common/aggregations/functions/
|
|
13
|
-
arthur_common/aggregations/functions/
|
|
14
|
-
arthur_common/aggregations/functions/
|
|
15
|
-
arthur_common/aggregations/functions/
|
|
16
|
-
arthur_common/aggregations/functions/
|
|
6
|
+
arthur_common/aggregations/functions/agentic_aggregations.py,sha256=35jHA2hI-NGmiFJCMON0Vo4sV9om8Acp3YEKSIVDLA8,32851
|
|
7
|
+
arthur_common/aggregations/functions/categorical_count.py,sha256=wc1ovL8JoiSeoSTk9h1fgrLj1QuQeYYZmEqgffGc2cw,5328
|
|
8
|
+
arthur_common/aggregations/functions/confusion_matrix.py,sha256=Zac-biMeIVyLRcMXWmENgYq8X4I7Trm8gOE5NRLGKU0,22108
|
|
9
|
+
arthur_common/aggregations/functions/inference_count.py,sha256=SrRfxQVnX-wRTZ1zbqUKupPdACvfKeUpZDidZs45ZUY,4079
|
|
10
|
+
arthur_common/aggregations/functions/inference_count_by_class.py,sha256=aRSimiiK4F6PxLgq_njTrVCmvjljw4sNst0Qzq4oSV0,11554
|
|
11
|
+
arthur_common/aggregations/functions/inference_null_count.py,sha256=w9sfu1QDlVBJwMW5EEkgda65nyMAABzd-FBKtj8amw4,4825
|
|
12
|
+
arthur_common/aggregations/functions/mean_absolute_error.py,sha256=T8HfXhs9V6enP1U3dmy7zXtJjnvsV0IVe3VfKzlENMM,6834
|
|
13
|
+
arthur_common/aggregations/functions/mean_squared_error.py,sha256=Zs_6z_agA4sTNllZTn7fLfiDH62Vynmrf44kn6vyceA,6855
|
|
14
|
+
arthur_common/aggregations/functions/multiclass_confusion_matrix.py,sha256=YPtR1Jtrdnf50qL5-c7lDFruTDu7KyZZg2V-Us7Cd2Y,12615
|
|
15
|
+
arthur_common/aggregations/functions/multiclass_inference_count_by_class.py,sha256=r6MMDbtJA03R38mzvMhwW-h6IkNC8VFvWg45MRGkfHM,4264
|
|
16
|
+
arthur_common/aggregations/functions/numeric_stats.py,sha256=uHTyOAHW6xF6D-TeFLtY16iVR-Ju_6lmXSSY77mH0Qs,4921
|
|
17
|
+
arthur_common/aggregations/functions/numeric_sum.py,sha256=kGE6Jjnjwf2E4TKE3NwPyrlEKgygfCxv1z_YGDCOcCQ,5028
|
|
17
18
|
arthur_common/aggregations/functions/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
arthur_common/aggregations/functions/shield_aggregations.py,sha256=
|
|
19
|
+
arthur_common/aggregations/functions/shield_aggregations.py,sha256=1dAx8s2_xgEsKeQcpCOE35UIaTah8zuWH-hoLFztaoA,35662
|
|
19
20
|
arthur_common/aggregations/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
21
|
arthur_common/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
22
|
arthur_common/config/config.py,sha256=fcpjOYjPKu4Duk63CuTHrOWKQKAlAhVUR60kF_2_Xog,1247
|
|
22
23
|
arthur_common/config/settings.yaml,sha256=0CrygUwJzC5mGcO5Xnvv2ttp-P7LIsx682jllYA96NQ,161
|
|
23
24
|
arthur_common/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
25
|
arthur_common/models/connectors.py,sha256=5f5DUgOQ16P3lBPZ0zpUv9kTAqw45Agrl526F-iFJes,1862
|
|
25
|
-
arthur_common/models/datasets.py,sha256=
|
|
26
|
-
arthur_common/models/metrics.py,sha256=
|
|
26
|
+
arthur_common/models/datasets.py,sha256=oO-HgZ_OZW-E9DlQYwxkw2T31jwZEqYaB3NvkbYAiYI,527
|
|
27
|
+
arthur_common/models/metrics.py,sha256=vNgXaKNIgkLS2sjmUSsWIRLdbaP8zZUn8dLNWefrvho,11353
|
|
27
28
|
arthur_common/models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
arthur_common/models/schema_definitions.py,sha256=
|
|
29
|
-
arthur_common/models/shield.py,sha256=
|
|
30
|
-
arthur_common/models/task_job_specs.py,sha256=
|
|
29
|
+
arthur_common/models/schema_definitions.py,sha256=4FSbL51RvOgeikNnVfCVSXmYDNzkyqtEKC2a6FjwRqI,16879
|
|
30
|
+
arthur_common/models/shield.py,sha256=EWsJxb-RqBzqSJTCBX6KX5Y-2nNHh8QgixFQmyzBXJE,24356
|
|
31
|
+
arthur_common/models/task_job_specs.py,sha256=xYej0vtHE5zvBQ-ka9Rn4N1lQtR1XXgbGVzhzemiL64,3509
|
|
31
32
|
arthur_common/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
33
|
arthur_common/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
34
|
arthur_common/tools/aggregation_analyzer.py,sha256=UfMtvFWXV2Dqly8S6nneGgomuvEGN-1tBz81tfkMcAE,11206
|
|
@@ -38,6 +39,6 @@ arthur_common/tools/functions.py,sha256=FWL4eWO5-vLp86WudT-MGUKvf2B8f02IdoXQFKd6
|
|
|
38
39
|
arthur_common/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
40
|
arthur_common/tools/schema_inferer.py,sha256=Ur4CXGAkd6ZMSU0nMNrkOEElsBopHXq0lctTV8X92W8,5188
|
|
40
41
|
arthur_common/tools/time_utils.py,sha256=4gfiu9NXfvPZltiVNLSIQGylX6h2W0viNi9Kv4bKyfw,1410
|
|
41
|
-
arthur_common-2.1.
|
|
42
|
-
arthur_common-2.1.
|
|
43
|
-
arthur_common-2.1.
|
|
42
|
+
arthur_common-2.1.54.dist-info/METADATA,sha256=FXWDqepML0hCT_oYSs1Svg8bTu8hElA7LcCUrL_Sii8,1609
|
|
43
|
+
arthur_common-2.1.54.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
44
|
+
arthur_common-2.1.54.dist-info/RECORD,,
|
|
File without changes
|