Core API Reference
Complete API documentation for DeepFix Core models and types.
Models
APIRequest
Bases: BaseModel
Request model for the DeepFix analysis API.
Attributes:
| Name | Type | Description |
|---|---|---|
dataset_artifacts |
Optional[DatasetArtifacts]
|
Optional dataset statistics and metadata. |
training_artifacts |
Optional[TrainingArtifacts]
|
Optional training metrics and parameters. |
deepchecks_artifacts |
Optional[DeepchecksArtifacts]
|
Optional Deepchecks validation results. |
model_checkpoint_artifacts |
Optional[ModelCheckpointArtifacts]
|
Optional model checkpoint information. |
dataset_name |
Optional[str]
|
Optional name of the dataset being analyzed. |
model_name |
Optional[str]
|
Optional name of the model being analyzed. |
language |
str
|
Language for the analysis output. Defaults to "english". |
Source code in deepfix-core\src\deepfix_core\models\api.py
APIResponse
Bases: BaseModel
Response from the DeepFix analysis API.
Attributes:
| Name | Type | Description |
|---|---|---|
agent_results |
Dict[str, AgentResult]
|
Dictionary mapping agent names to their analysis results. |
summary |
Optional[str]
|
Optional overall summary of the analysis. |
additional_outputs |
Dict[str, Any]
|
Dictionary of additional outputs from agents. |
error_messages |
Optional[Dict[str, Optional[str]]]
|
Optional dictionary mapping agent names to error messages if they failed. |
Source code in deepfix-core\src\deepfix_core\models\api.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
get_results_as_dataframe()
Convert all agent results to a single pandas DataFrame.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame containing all findings and recommendations from all agents. |
Source code in deepfix-core\src\deepfix_core\models\api.py
get_results_as_text()
Convert all agent results to a formatted text string.
Returns:
| Type | Description |
|---|---|
str
|
Formatted text report with summary statistics, findings by severity, |
str
|
and agent-specific analysis. |
Source code in deepfix-core\src\deepfix_core\models\api.py
to_text(verbose=False)
Generate a beautifully formatted analysis report using Rich.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verbose
|
bool
|
If False, only show results from CrossArtifactReasoningAgent. If True, show results from all agents. |
False
|
Returns:
| Type | Description |
|---|---|
str
|
Formatted text report with Rich formatting for terminal display. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If verbose=False and no CrossArtifactReasoningAgent results are found. |
Source code in deepfix-core\src\deepfix_core\models\api.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
AgentResult
Bases: BaseModel
Result from an analysis agent.
Attributes:
| Name | Type | Description |
|---|---|---|
agent_name |
str
|
Name of the agent that performed the analysis. |
analysis |
List[Analysis]
|
List of analysis results (findings and recommendations). |
analyzed_artifacts |
Optional[List[str]]
|
Optional list of artifact types that were analyzed. |
retrieved_knowledge |
Optional[List[str]]
|
Optional list of external knowledge sources used. |
additional_outputs |
Dict[str, Any]
|
Dictionary of additional outputs from the agent. |
error_message |
Optional[str]
|
Optional error message if the agent failed. |
Source code in deepfix-core\src\deepfix_core\models\analysis.py
to_dataframe()
Convert agent results to a pandas DataFrame.
Each row represents one analysis (finding + recommendation) with all associated metadata.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: agent_name, analyzed_artifacts, |
DataFrame
|
retrieved_knowledge, summary, finding_description, finding_evidence, |
DataFrame
|
error_message, finding_severity, finding_confidence, |
DataFrame
|
recommendation_action, recommendation_rationale, |
DataFrame
|
recommendation_confidence. |
Source code in deepfix-core\src\deepfix_core\models\analysis.py
DatasetArtifacts
Bases: Artifacts
Artifacts containing dataset statistics and metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
dataset_name |
str
|
Name of the dataset. |
train_statistics |
Union[BaseDatasetStatistics, Dict[str, Any]]
|
Training dataset statistics (can be any BaseDatasetStatistics subclass or a dictionary). |
task_type |
TaskType
|
Type of ML task (classification, regression, etc.). |
test_statistics |
Optional[Union[BaseDatasetStatistics, Dict[str, Any]]]
|
Optional test/validation dataset statistics. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
from_file(path)
classmethod
Load dataset artifacts from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to the YAML file containing artifact data. |
required |
Returns:
| Type | Description |
|---|---|
'DatasetArtifacts'
|
DatasetArtifacts instance loaded from the file. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the file does not exist. |
YAMLError
|
If the file contains invalid YAML. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
to_dict()
Convert dataset artifacts to a dictionary.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary representation with statistics serialized and task_type |
Dict[str, Any]
|
converted to its string value. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
DeepchecksArtifacts
Bases: Artifacts
Artifacts containing Deepchecks validation results.
Attributes:
| Name | Type | Description |
|---|---|---|
dataset_name |
str
|
Name of the dataset that was validated. |
model_name |
Optional[str]
|
Optional name of the model used in validation. |
results |
Dict[str, List[DeepchecksParsedResult]]
|
Dictionary mapping check categories to lists of parsed results. |
config |
Optional[DeepchecksConfig]
|
Optional Deepchecks configuration used for validation. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
from_dict(d)
classmethod
Create DeepchecksArtifacts from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
d
|
Union[Dict[str, Any], DictConfig]
|
Dictionary or DictConfig containing artifact data. |
required |
Returns:
| Type | Description |
|---|---|
'DeepchecksArtifacts'
|
DeepchecksArtifacts instance with parsed results and config. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
from_file(file_path)
classmethod
Load Deepchecks artifacts from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
Path to the YAML file containing artifact data. |
required |
Returns:
| Type | Description |
|---|---|
'DeepchecksArtifacts'
|
DeepchecksArtifacts instance loaded from the file. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the file does not exist. |
YAMLError
|
If the file contains invalid YAML. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
to_dict()
Convert Deepchecks artifacts to a dictionary.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary representation with nested results and config serialized. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
ModelCheckpointArtifacts
Bases: Artifacts
Artifacts containing model checkpoint information.
Attributes:
| Name | Type | Description |
|---|---|---|
path |
Optional[str]
|
Path to the model checkpoint file. |
config |
Optional[Dict[str, Any]]
|
Optional model configuration dictionary. |
model_type |
Optional[str]
|
Optional type or class name of the model. |
hyperparameters |
Optional[Dict[str, Any]]
|
Optional dictionary of model hyperparameters. |
context |
Optional[Dict[str, Any]]
|
Optional context information about the checkpoint. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
TrainingArtifacts
Bases: Artifacts
Artifacts containing training metrics and parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
metrics_path |
Optional[str]
|
Optional path to a CSV file containing metrics. |
metrics_values |
Optional[Any]
|
Optional pandas DataFrame or dictionary containing metrics. |
params |
Optional[Dict[str, Any]]
|
Optional dictionary of training parameters. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
from_dict(d)
classmethod
Create TrainingArtifacts from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
d
|
dict
|
Dictionary containing artifact data. If metrics_values is present, it's converted to a DataFrame. If metrics_path is present, the CSV is loaded. |
required |
Returns:
| Type | Description |
|---|---|
'TrainingArtifacts'
|
TrainingArtifacts instance with loaded metrics and parameters. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
from_file(metrics_path)
classmethod
Load training artifacts from a metrics CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
metrics_path
|
str
|
Path to the CSV file containing training metrics. |
required |
Returns:
| Type | Description |
|---|---|
'TrainingArtifacts'
|
TrainingArtifacts instance with metrics loaded from the file. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the file does not exist. |
EmptyDataError
|
If the CSV file is empty. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
to_dict()
Convert training artifacts to a dictionary.
Converts pandas DataFrame metrics to dictionary format for serialization.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary representation with metrics as lists. |
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
Types
DataType
ArtifactPath
Bases: StrEnum
Enumeration of artifact path identifiers.
Defines standard paths for different types of artifacts used in the system, including training artifacts, deepchecks results, and dataset metadata.
Source code in deepfix-core\src\deepfix_core\models\artifacts.py
Examples
See the Quickstart Guide for usage examples.