dataeval-flow 0.1.0__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.
Files changed (94) hide show
  1. dataeval_flow/__init__.py +93 -0
  2. dataeval_flow/__main__.py +149 -0
  3. dataeval_flow/_app/__init__.py +5 -0
  4. dataeval_flow/_app/_model/__init__.py +5 -0
  5. dataeval_flow/_app/_model/_coerce.py +126 -0
  6. dataeval_flow/_app/_model/_discover.py +171 -0
  7. dataeval_flow/_app/_model/_execution.py +108 -0
  8. dataeval_flow/_app/_model/_introspect.py +280 -0
  9. dataeval_flow/_app/_model/_item.py +213 -0
  10. dataeval_flow/_app/_model/_registry.py +255 -0
  11. dataeval_flow/_app/_model/_state.py +322 -0
  12. dataeval_flow/_app/_model/_undo.py +61 -0
  13. dataeval_flow/_app/_panes/__init__.py +35 -0
  14. dataeval_flow/_app/_panes/_config_pane.py +173 -0
  15. dataeval_flow/_app/_panes/_result_pane.py +125 -0
  16. dataeval_flow/_app/_panes/_task_pane.py +91 -0
  17. dataeval_flow/_app/_panes/_widgets.py +111 -0
  18. dataeval_flow/_app/_screens/__init__.py +25 -0
  19. dataeval_flow/_app/_screens/_base.py +242 -0
  20. dataeval_flow/_app/_screens/_detail.py +333 -0
  21. dataeval_flow/_app/_screens/_model.py +102 -0
  22. dataeval_flow/_app/_screens/_params.py +80 -0
  23. dataeval_flow/_app/_screens/_pathpicker.py +68 -0
  24. dataeval_flow/_app/_screens/_section.py +621 -0
  25. dataeval_flow/_app/_screens/_settings.py +183 -0
  26. dataeval_flow/_app/_viewmodel/__init__.py +15 -0
  27. dataeval_flow/_app/_viewmodel/_builder_vm.py +272 -0
  28. dataeval_flow/_app/_viewmodel/_model_vm.py +70 -0
  29. dataeval_flow/_app/_viewmodel/_rendering.py +189 -0
  30. dataeval_flow/_app/_viewmodel/_result_vm.py +210 -0
  31. dataeval_flow/_app/_viewmodel/_section_vm.py +224 -0
  32. dataeval_flow/_app/app.py +742 -0
  33. dataeval_flow/_app/cli.py +592 -0
  34. dataeval_flow/_logging.py +102 -0
  35. dataeval_flow/cache.py +1355 -0
  36. dataeval_flow/config/__init__.py +80 -0
  37. dataeval_flow/config/_loader.py +79 -0
  38. dataeval_flow/config/_merge.py +92 -0
  39. dataeval_flow/config/_models.py +115 -0
  40. dataeval_flow/config/_paths.py +85 -0
  41. dataeval_flow/config/schemas/__init__.py +112 -0
  42. dataeval_flow/config/schemas/_dataset.py +111 -0
  43. dataeval_flow/config/schemas/_extractor.py +119 -0
  44. dataeval_flow/config/schemas/_metadata.py +28 -0
  45. dataeval_flow/config/schemas/_preprocessor.py +18 -0
  46. dataeval_flow/config/schemas/_selection.py +100 -0
  47. dataeval_flow/config/schemas/_task.py +89 -0
  48. dataeval_flow/config/schemas/_workflow.py +135 -0
  49. dataeval_flow/dataset.py +635 -0
  50. dataeval_flow/embeddings.py +135 -0
  51. dataeval_flow/metadata.py +48 -0
  52. dataeval_flow/preprocessing.py +141 -0
  53. dataeval_flow/py.typed +0 -0
  54. dataeval_flow/runner.py +118 -0
  55. dataeval_flow/selection.py +50 -0
  56. dataeval_flow/workflow/__init__.py +328 -0
  57. dataeval_flow/workflow/_text_report.py +511 -0
  58. dataeval_flow/workflow/base.py +69 -0
  59. dataeval_flow/workflow/orchestrator.py +454 -0
  60. dataeval_flow/workflows/__init__.py +1 -0
  61. dataeval_flow/workflows/analysis/__init__.py +38 -0
  62. dataeval_flow/workflows/analysis/outputs.py +202 -0
  63. dataeval_flow/workflows/analysis/params.py +114 -0
  64. dataeval_flow/workflows/analysis/workflow.py +1313 -0
  65. dataeval_flow/workflows/cleaning/__init__.py +23 -0
  66. dataeval_flow/workflows/cleaning/outputs.py +200 -0
  67. dataeval_flow/workflows/cleaning/params.py +160 -0
  68. dataeval_flow/workflows/cleaning/report.py +304 -0
  69. dataeval_flow/workflows/cleaning/workflow.py +794 -0
  70. dataeval_flow/workflows/drift/__init__.py +1 -0
  71. dataeval_flow/workflows/drift/outputs.py +144 -0
  72. dataeval_flow/workflows/drift/params.py +332 -0
  73. dataeval_flow/workflows/drift/report.py +201 -0
  74. dataeval_flow/workflows/drift/workflow.py +647 -0
  75. dataeval_flow/workflows/ood/__init__.py +1 -0
  76. dataeval_flow/workflows/ood/outputs.py +134 -0
  77. dataeval_flow/workflows/ood/params.py +161 -0
  78. dataeval_flow/workflows/ood/report.py +311 -0
  79. dataeval_flow/workflows/ood/workflow.py +728 -0
  80. dataeval_flow/workflows/prioritization/__init__.py +1 -0
  81. dataeval_flow/workflows/prioritization/outputs.py +122 -0
  82. dataeval_flow/workflows/prioritization/params.py +124 -0
  83. dataeval_flow/workflows/prioritization/report.py +117 -0
  84. dataeval_flow/workflows/prioritization/workflow.py +587 -0
  85. dataeval_flow/workflows/splitting/__init__.py +25 -0
  86. dataeval_flow/workflows/splitting/outputs.py +101 -0
  87. dataeval_flow/workflows/splitting/params.py +61 -0
  88. dataeval_flow/workflows/splitting/report.py +485 -0
  89. dataeval_flow/workflows/splitting/workflow.py +371 -0
  90. dataeval_flow-0.1.0.dist-info/METADATA +305 -0
  91. dataeval_flow-0.1.0.dist-info/RECORD +94 -0
  92. dataeval_flow-0.1.0.dist-info/WHEEL +4 -0
  93. dataeval_flow-0.1.0.dist-info/entry_points.txt +2 -0
  94. dataeval_flow-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,114 @@
1
+ """Data analysis workflow parameters."""
2
+
3
+ from collections.abc import Sequence
4
+ from typing import Literal
5
+
6
+ from pydantic import BaseModel, Field
7
+
8
+ from dataeval_flow.workflow.base import WorkflowParametersBase
9
+
10
+ __all__ = ["DataAnalysisHealthThresholds", "DataAnalysisParameters"]
11
+
12
+
13
+ class DataAnalysisHealthThresholds(BaseModel):
14
+ """Configurable warning thresholds for data analysis health status.
15
+
16
+ Each threshold is a percentage (0–100) unless otherwise noted.
17
+ When the detected rate exceeds the threshold the corresponding
18
+ finding is elevated to ``severity="warning"``; otherwise it stays
19
+ at ``severity="info"``.
20
+
21
+ Set a threshold to ``None`` to disable the warning for that metric.
22
+ """
23
+
24
+ image_outliers: float = Field(
25
+ default=3.0,
26
+ ge=0.0,
27
+ le=100.0,
28
+ description=(
29
+ "Max allowable % of images flagged as statistical outliers. Default 3%. "
30
+ "Lower to 1% for safety-critical datasets; raise to 5–10% for diverse "
31
+ "real-world collections where high visual variance is expected."
32
+ ),
33
+ )
34
+ exact_duplicates: float = Field(
35
+ default=0.0,
36
+ ge=0.0,
37
+ le=100.0,
38
+ description=(
39
+ "Max allowable % of images in exact-duplicate groups. Default 0% — any exact duplicates trigger a warning."
40
+ ),
41
+ )
42
+ near_duplicates: float = Field(
43
+ default=5.0,
44
+ ge=0.0,
45
+ le=100.0,
46
+ description=(
47
+ "Max allowable % of images in near-duplicate groups. Default 5%. "
48
+ "Lower to 1–2% for curated benchmarks; raise to 10–15% for large-scale "
49
+ "web-scraped datasets where some redundancy is expected."
50
+ ),
51
+ )
52
+ class_label_imbalance: float = Field(
53
+ default=5.0,
54
+ ge=1.0,
55
+ description=(
56
+ "Max allowable ratio between the largest and smallest class counts "
57
+ "(max_class / min_class). Default 5:1. "
58
+ "Set to 1.0 to require perfectly balanced classes."
59
+ ),
60
+ )
61
+ distribution_shift: float = Field(
62
+ default=0.5,
63
+ ge=0.0,
64
+ description=(
65
+ "Embedding divergence above which cross-split shift is flagged as warning. "
66
+ "Default 0.5. Values above 0.2 are reported as 'moderate'."
67
+ ),
68
+ )
69
+
70
+
71
+ class DataAnalysisParameters(WorkflowParametersBase):
72
+ """Parameters for data analysis workflow.
73
+
74
+ Required parameters must be explicitly set per CR-4.14-G-1
75
+ (avoid application-specific defaults).
76
+ """
77
+
78
+ # --- Outlier detection ---
79
+ outlier_method: Literal["adaptive", "zscore", "modzscore", "iqr"] = Field(
80
+ description="Statistical method for outlier detection",
81
+ )
82
+ outlier_flags: Sequence[Literal["dimension", "pixel", "visual"]] = Field(
83
+ min_length=1,
84
+ description="Image statistics groups for outlier detection. At least one required.",
85
+ )
86
+ outlier_threshold: float | None = Field(
87
+ default=None,
88
+ ge=0.0,
89
+ description="Custom threshold (None = use DataEval default for chosen method)",
90
+ )
91
+
92
+ # --- Per-split bias analysis ---
93
+ balance: bool = Field(default=False, description="Run Balance (MI) analysis per split and combined")
94
+ diversity_method: Literal["simpson", "shannon"] | None = Field(
95
+ default=None, description="Diversity method (None = skip)"
96
+ )
97
+ include_image_stats: bool = Field(
98
+ default=False,
99
+ description="Compute ImageStats and inject as metadata factors for bias analysis",
100
+ )
101
+
102
+ # --- Cross-split divergence ---
103
+ divergence_method: Literal["mst", "fnn"] | None = Field(
104
+ default=None,
105
+ description=(
106
+ "Method for computing cross-split embedding divergence. Only used when an extractor is configured."
107
+ ),
108
+ )
109
+
110
+ # --- Health thresholds ---
111
+ health_thresholds: DataAnalysisHealthThresholds = Field(
112
+ default_factory=DataAnalysisHealthThresholds,
113
+ description="Warning thresholds for dataset health status. Findings are flagged as warnings.",
114
+ )