|
33 | 33 | SpdxDocument, |
34 | 34 | Tool, |
35 | 35 | ) |
| 36 | +from spdx_tools.spdx3.model.ai.ai_package import AIPackage, SafetyRiskAssessmentType |
36 | 37 | from spdx_tools.spdx3.model.dataset.dataset import ConfidentialityLevelType, Dataset, DatasetAvailabilityType |
37 | 38 | from spdx_tools.spdx3.model.licensing import ( |
38 | 39 | CustomLicense, |
@@ -316,6 +317,24 @@ def namespace_map_fixture( |
316 | 317 | "relationship_type": RelationshipType.FIXED_IN, |
317 | 318 | } |
318 | 319 |
|
| 320 | +AIPACKAGE_DICT = { |
| 321 | + "energy_consumption": "energyConsumption", |
| 322 | + "standard_compliance": ["standardCompliance"], |
| 323 | + "limitation": "aIPackageLimitation", |
| 324 | + "type_of_model": ["typeOfModel"], |
| 325 | + "information_about_training": "informationAboutTraining", |
| 326 | + "information_about_application": "informationAboutApplication", |
| 327 | + "hyperparameter": {"aIPackageHypParaKey": "aIPackageHypParaValue"}, |
| 328 | + "model_data_preprocessing": ["aImodelDataPreprocessing"], |
| 329 | + "model_explainability": ["aImodelExplainability"], |
| 330 | + "sensitive_personal_information": True, |
| 331 | + "metric_decision_threshold": {"metricDecisionThresholdKey": "metricDecisionThresholdValue"}, |
| 332 | + "metric": {"aIMetricKey": "aIMetricValue"}, |
| 333 | + "domain": ["aIDomain"], |
| 334 | + "autonomy_type": True, |
| 335 | + "safety_risk_assessment": SafetyRiskAssessmentType.LOW, |
| 336 | +} |
| 337 | + |
319 | 338 | ARTIFACT_DICT = { |
320 | 339 | "originated_by": ["https://spdx.test/tools-python/originatedBy"], |
321 | 340 | "supplied_by": ["https://spdx.test/tools-python/suppliedBy"], |
@@ -443,6 +462,7 @@ def namespace_map_fixture( |
443 | 462 | VEX_UNDER_INVESTIGATION_VULN_ASSESSMENT_RELATIONSHIP_DICT, |
444 | 463 | ], |
445 | 464 | Vulnerability: [ELEMENT_DICT, VULNERABILITY_DICT], |
| 465 | + AIPackage: [AIPACKAGE_DICT, PACKAGE_DICT, ELEMENT_DICT, ARTIFACT_DICT, SOFTWARE_ARTIFACT_DICT], |
446 | 466 | File: [ELEMENT_DICT, ARTIFACT_DICT, SOFTWARE_ARTIFACT_DICT, FILE_DICT], |
447 | 467 | Package: [ELEMENT_DICT, ARTIFACT_DICT, SOFTWARE_ARTIFACT_DICT, PACKAGE_DICT], |
448 | 468 | Snippet: [ELEMENT_DICT, ARTIFACT_DICT, SOFTWARE_ARTIFACT_DICT, SNIPPET_DICT], |
|
0 commit comments