arthur-common 2.1.54__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.

@@ -602,12 +602,11 @@ class NewMetricRequest(BaseModel):
602
602
  # Default config when none is provided
603
603
  config_values = {"use_llm_judge": True}
604
604
  elif isinstance(config_values, dict):
605
+ relevance_threshold = config_values.get("relevance_threshold")
606
+ use_llm_judge = config_values.get("use_llm_judge")
607
+
605
608
  # Handle mutually exclusive parameters
606
- if (
607
- "relevance_threshold" in config_values
608
- and "use_llm_judge" in config_values
609
- and config_values["use_llm_judge"]
610
- ):
609
+ if relevance_threshold is not None and use_llm_judge:
611
610
  raise HTTPException(
612
611
  status_code=400,
613
612
  detail="relevance_threshold and use_llm_judge=true are mutually exclusive. Set use_llm_judge=false when using relevance_threshold.",
@@ -615,16 +614,12 @@ class NewMetricRequest(BaseModel):
615
614
  )
616
615
 
617
616
  # If relevance_threshold is set but use_llm_judge isn't, set use_llm_judge to false
618
- if (
619
- "relevance_threshold" in config_values
620
- and "use_llm_judge" not in config_values
621
- ):
617
+ if relevance_threshold is not None and use_llm_judge is None:
622
618
  config_values["use_llm_judge"] = False
623
619
 
624
620
  # If neither is set, default to use_llm_judge=True
625
- if (
626
- "relevance_threshold" not in config_values
627
- and "use_llm_judge" not in config_values
621
+ if relevance_threshold is None and (
622
+ use_llm_judge is None or use_llm_judge == False
628
623
  ):
629
624
  config_values["use_llm_judge"] = True
630
625
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arthur-common
3
- Version: 2.1.54
3
+ Version: 2.1.55
4
4
  Summary: Utility code common to Arthur platform components.
5
5
  License: MIT
6
6
  Author: Arthur
@@ -27,7 +27,7 @@ arthur_common/models/datasets.py,sha256=oO-HgZ_OZW-E9DlQYwxkw2T31jwZEqYaB3NvkbYA
27
27
  arthur_common/models/metrics.py,sha256=vNgXaKNIgkLS2sjmUSsWIRLdbaP8zZUn8dLNWefrvho,11353
28
28
  arthur_common/models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  arthur_common/models/schema_definitions.py,sha256=4FSbL51RvOgeikNnVfCVSXmYDNzkyqtEKC2a6FjwRqI,16879
30
- arthur_common/models/shield.py,sha256=EWsJxb-RqBzqSJTCBX6KX5Y-2nNHh8QgixFQmyzBXJE,24356
30
+ arthur_common/models/shield.py,sha256=QypIiJxwjv8ZAG_zscE4bv95NZ_5uMBFTfyLrTevkYg,24260
31
31
  arthur_common/models/task_job_specs.py,sha256=xYej0vtHE5zvBQ-ka9Rn4N1lQtR1XXgbGVzhzemiL64,3509
32
32
  arthur_common/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  arthur_common/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -39,6 +39,6 @@ arthur_common/tools/functions.py,sha256=FWL4eWO5-vLp86WudT-MGUKvf2B8f02IdoXQFKd6
39
39
  arthur_common/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  arthur_common/tools/schema_inferer.py,sha256=Ur4CXGAkd6ZMSU0nMNrkOEElsBopHXq0lctTV8X92W8,5188
41
41
  arthur_common/tools/time_utils.py,sha256=4gfiu9NXfvPZltiVNLSIQGylX6h2W0viNi9Kv4bKyfw,1410
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,,
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,,