arthur-common 2.1.53__py3-none-any.whl → 2.1.55__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.

@@ -1,13 +1,23 @@
1
- from typing import Literal, Optional
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 NewRuleRequest
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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arthur-common
3
- Version: 2.1.53
3
+ Version: 2.1.55
4
4
  Summary: Utility code common to Arthur platform components.
5
5
  License: MIT
6
6
  Author: Arthur
@@ -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/categorical_count.py,sha256=na22lBhxASMMR0R9Z-3qBvToYN875tJm8u2ULVdrdYQ,5327
7
- arthur_common/aggregations/functions/confusion_matrix.py,sha256=MbtS_Nge7dgjNutdtzd0hx756qzLQlHS2MQxuwSuwxc,22108
8
- arthur_common/aggregations/functions/inference_count.py,sha256=lO-IgcmnsfRR1qmHbWjENJUSnQT-dXwZd9rVFOtKYrs,4078
9
- arthur_common/aggregations/functions/inference_count_by_class.py,sha256=sOgrMyeZh71U9uGvq8w-bYlXNPRI6jtR2jP-oV81hHo,11552
10
- arthur_common/aggregations/functions/inference_null_count.py,sha256=6dfkumX8NJjTB633Pt-shY5x99TXaqSyLcYVHk_DxHc,4824
11
- arthur_common/aggregations/functions/mean_absolute_error.py,sha256=-Nihcl_QcwZPn-LrHX6KgG9O-QSfoa6SY3LHt2xDCbg,6821
12
- arthur_common/aggregations/functions/mean_squared_error.py,sha256=kpADLvsJkg7C07nj5X1drk8ChRXvur_PjkzMB2uLazg,6842
13
- arthur_common/aggregations/functions/multiclass_confusion_matrix.py,sha256=zfKK5maUy3TXmVEkqXwtXs6NM3fjp0W0yc-zS0uXZT4,12615
14
- arthur_common/aggregations/functions/multiclass_inference_count_by_class.py,sha256=ZJU_GDMsq4XvqbhCAiH2J-DKrGVjXlz-E2nxrd7pM6c,4263
15
- arthur_common/aggregations/functions/numeric_stats.py,sha256=4auKDwtTNxqw86gA0q3AqOf0-IM9uYWZ_tMquuug_sE,4920
16
- arthur_common/aggregations/functions/numeric_sum.py,sha256=LcV2MWL-EOl0JPCozIGIoHkvohu7d2S1PHuAik-cAo4,5027
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=KQzi97ILgn6UQhpQPyerrQ3CXMxs1vpuSUAAvIWf_zg,35630
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=giG_8mv_3ilBf7cIvRV0_TDCDdb4qxRbYZvl7hRb6l8,491
26
- arthur_common/models/metrics.py,sha256=8_7ec0oFIjFGJpgRWS0Y28aaGCSd3j7dqa_QTYCNGus,11343
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=0zXZKHKr49d7ATml2Tzw1AIFfM0i0HjIblM-qOwNxk8,14878
29
- arthur_common/models/shield.py,sha256=62SKLzlsUsuP3u7EnibtI1CrRYg3TummP4Wbwg5ZPUs,18310
30
- arthur_common/models/task_job_specs.py,sha256=uZo8eiTBHWf2EZGEQrDfJGVyYg_8wd9MHWLxn-5oNUk,2797
29
+ arthur_common/models/schema_definitions.py,sha256=4FSbL51RvOgeikNnVfCVSXmYDNzkyqtEKC2a6FjwRqI,16879
30
+ arthur_common/models/shield.py,sha256=QypIiJxwjv8ZAG_zscE4bv95NZ_5uMBFTfyLrTevkYg,24260
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.53.dist-info/METADATA,sha256=ezzkiB4FHTSRLK3rzvj1mqiRxYqxedgouR0q55zsVLk,1609
42
- arthur_common-2.1.53.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
43
- arthur_common-2.1.53.dist-info/RECORD,,
42
+ arthur_common-2.1.55.dist-info/METADATA,sha256=ZUGsYc9e8IsipLKZ4Bh0RDzcC2kxKs5tbZmC2UVAxyU,1609
43
+ arthur_common-2.1.55.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
44
+ arthur_common-2.1.55.dist-info/RECORD,,