qqubb commited on
Commit
d5428ff
·
1 Parent(s): 7269140

minor fixes

Browse files
Files changed (2) hide show
  1. compliance_analysis.py +8 -7
  2. project_cc.yaml +2 -2
compliance_analysis.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  import yaml
3
  from enum import Enum
4
 
@@ -8,7 +9,7 @@ from enum import Enum
8
  ai_system = False
9
  gpai_model = False
10
  high_risk_ai_system = False
11
- gpai_model_systematic_risk == False
12
 
13
  # Role and location of AI project operator
14
  provider = False
@@ -61,7 +62,7 @@ def run_compliance_analysis(folder_path):
61
 
62
  # Determine project type (AI system vs. GPAI model) as well as operator type. We will use these for different things.
63
  set_type(project_cc_yaml)
64
- set_operator_role_and_location(projec_cc_yaml)
65
  set_eu_market_status(project_cc_yaml)
66
 
67
  # Check if the project is within scope of the Act. If it's not, the analysis is over.
@@ -208,7 +209,7 @@ def run_compliance_analysis(folder_path):
208
 
209
  # Do this by examining any and all Model CCs too
210
 
211
- for filename in os.listdir(folder_path):
212
  # Check if the search word is in the filename
213
  if "model_cc.md" in filename.lower():
214
 
@@ -274,7 +275,7 @@ def check_within_scope(project_cc):
274
  return True
275
  if product_manufacturer and ai_system and (placed_on_market or put_into_service): # Article 2.1(e)
276
  return True
277
- else
278
  return False
279
 
280
  def check_excepted(project_cc):
@@ -304,10 +305,10 @@ def check_prohibited (project_cc):
304
 
305
 
306
  def check_all_true(file_path):
307
- # Load the YAML file
308
- with open(project_cc, 'r') as file:
309
  data = yaml.safe_load(file)
310
-
311
  # Iterate through top-level keys
312
  for top_key, top_value in data.items():
313
  if isinstance(top_value, dict):
 
1
  import os
2
+ import sys
3
  import yaml
4
  from enum import Enum
5
 
 
9
  ai_system = False
10
  gpai_model = False
11
  high_risk_ai_system = False
12
+ gpai_model_systematic_risk = False
13
 
14
  # Role and location of AI project operator
15
  provider = False
 
62
 
63
  # Determine project type (AI system vs. GPAI model) as well as operator type. We will use these for different things.
64
  set_type(project_cc_yaml)
65
+ set_operator_role_and_location(project_cc_yaml)
66
  set_eu_market_status(project_cc_yaml)
67
 
68
  # Check if the project is within scope of the Act. If it's not, the analysis is over.
 
209
 
210
  # Do this by examining any and all Model CCs too
211
 
212
+ for filename in os.listdir(folder_path):
213
  # Check if the search word is in the filename
214
  if "model_cc.md" in filename.lower():
215
 
 
275
  return True
276
  if product_manufacturer and ai_system and (placed_on_market or put_into_service): # Article 2.1(e)
277
  return True
278
+ else:
279
  return False
280
 
281
  def check_excepted(project_cc):
 
305
 
306
 
307
  def check_all_true(file_path):
308
+ # Load the YAML file
309
+ with open("./project_cc.yaml", 'r') as file:
310
  data = yaml.safe_load(file)
311
+
312
  # Iterate through top-level keys
313
  for top_key, top_value in data.items():
314
  if isinstance(top_value, dict):
project_cc.yaml CHANGED
@@ -163,7 +163,7 @@ risk_management_system:
163
  verbose: 'Risk management system for AI system includes the identification and analysis of any known or reasonably foreseeable risks that the AI system might pose to health, safety or fundamental rights when used in accordance with its intended purpose'
164
  value: !!bool false
165
  risk_estimation_foreseeable: # Art. 9(2)(b)
166
- verbose: 'Risk management system for AI system includes the estimation and evaluation of the risks that may emerge when the high-risk AI system is used in accordance with its intended purpose, and under conditions of reasonably foreseeable misuse;
167
  value: !!bool false
168
  risk_post_market: # Art. 9(2)(c)
169
  verbose: 'Risk management system for AI system includes the evaluation of other risks possibly arising, based on the analysis of data gathered from the post-market monitoring system'
@@ -190,7 +190,7 @@ technical_documentation:
190
  value: !!bool false
191
  interaction: # Art. 11(1); Annex IV(1)(b)
192
  verbose: 'The Technical Documentation includes a general description of the AI system that covers how the AI system interacts with, or can be used to interact with, hardware or software, including with other AI systems, that are not part of the AI system itself, where applicable'
193
- value: !!bool false
194
  versions: # Art. 11(1); Annex IV(1)(c)
195
  verbose: 'Technical Documentation includes a general description of the AI system that covers the versions of relevant software or firmware, and any requirements related to version updates'
196
  value: !!bool false
 
163
  verbose: 'Risk management system for AI system includes the identification and analysis of any known or reasonably foreseeable risks that the AI system might pose to health, safety or fundamental rights when used in accordance with its intended purpose'
164
  value: !!bool false
165
  risk_estimation_foreseeable: # Art. 9(2)(b)
166
+ verbose: 'Risk management system for AI system includes the estimation and evaluation of the risks that may emerge when the high-risk AI system is used in accordance with its intended purpose, and under conditions of reasonably foreseeable misuse'
167
  value: !!bool false
168
  risk_post_market: # Art. 9(2)(c)
169
  verbose: 'Risk management system for AI system includes the evaluation of other risks possibly arising, based on the analysis of data gathered from the post-market monitoring system'
 
190
  value: !!bool false
191
  interaction: # Art. 11(1); Annex IV(1)(b)
192
  verbose: 'The Technical Documentation includes a general description of the AI system that covers how the AI system interacts with, or can be used to interact with, hardware or software, including with other AI systems, that are not part of the AI system itself, where applicable'
193
+ value: !!bool false
194
  versions: # Art. 11(1); Annex IV(1)(c)
195
  verbose: 'Technical Documentation includes a general description of the AI system that covers the versions of relevant software or firmware, and any requirements related to version updates'
196
  value: !!bool false