qqubb commited on
Commit
e81b9bf
·
1 Parent(s): 192e221

several corrections

Browse files
__pycache__/compliance_analysis.cpython-310.pyc CHANGED
Binary files a/__pycache__/compliance_analysis.cpython-310.pyc and b/__pycache__/compliance_analysis.cpython-310.pyc differ
 
__pycache__/utils.cpython-310.pyc CHANGED
Binary files a/__pycache__/utils.cpython-310.pyc and b/__pycache__/utils.cpython-310.pyc differ
 
compliance_analysis.py CHANGED
@@ -59,7 +59,7 @@ def check_overall_compliance(cards):
59
  return dispositive_variables
60
 
61
  def run_compliance_analysis_on_project(dispositive_variables, project_cc_yaml):
62
-
63
  # Project Type
64
  if project_cc_yaml['ai_system']['ai_system']['value']:
65
  dispositive_variables['ai_project_type']['ai_system'] = True
@@ -84,7 +84,7 @@ def run_compliance_analysis_on_project(dispositive_variables, project_cc_yaml):
84
  dispositive_variables['ai_project_type']["high_risk_ai_system"] = False
85
 
86
  if dispositive_variables['ai_project_type']['gpai_model'] == True:
87
- if project_cc_yaml['gpai_model_systemic_risk']['evaluation'] or project_cc_yaml['gpai_model_systemic_risk']['flops']:
88
  dispositive_variables['ai_project_type']["gpai_model_systemic_risk"] = True
89
 
90
  # Operator Type
 
59
  return dispositive_variables
60
 
61
  def run_compliance_analysis_on_project(dispositive_variables, project_cc_yaml):
62
+
63
  # Project Type
64
  if project_cc_yaml['ai_system']['ai_system']['value']:
65
  dispositive_variables['ai_project_type']['ai_system'] = True
 
84
  dispositive_variables['ai_project_type']["high_risk_ai_system"] = False
85
 
86
  if dispositive_variables['ai_project_type']['gpai_model'] == True:
87
+ if project_cc_yaml['gpai_model_systemic_risk']['evaluation']['value'] or project_cc_yaml['gpai_model_systemic_risk']['flops']['value']:
88
  dispositive_variables['ai_project_type']["gpai_model_systemic_risk"] = True
89
 
90
  # Operator Type
project_cc.yaml CHANGED
@@ -122,7 +122,7 @@ high_risk_ai_system_exceptions:
122
  verbose: 'the AI project is intended to perform a preparatory task to an assessment relevant for the purposes of the use cases listed in Annex III.'
123
  value: !!bool false
124
 
125
- gpai_model_systematic_risk:
126
  evaluation:
127
  article: 'Art. 51 (1)(a)'
128
  verbose: 'The AI project has high impact capabilities based on an evaluation using appropriate technical tools and methodologies, including indicators and benchmarks'
 
122
  verbose: 'the AI project is intended to perform a preparatory task to an assessment relevant for the purposes of the use cases listed in Annex III.'
123
  value: !!bool false
124
 
125
+ gpai_model_systemic_risk:
126
  evaluation:
127
  article: 'Art. 51 (1)(a)'
128
  verbose: 'The AI project has high impact capabilities based on an evaluation using appropriate technical tools and methodologies, including indicators and benchmarks'
utils.py CHANGED
@@ -47,15 +47,14 @@ def check_within_scope_act(dispositive_variables, project_cc_yaml):
47
 
48
  ai_system = project_cc_yaml['ai_system']['ai_system']
49
  gpai_model = project_cc_yaml['gpai_model']['gpai_model']
50
-
51
  placed_on_market = project_cc_yaml['eu_market_status']['placed_on_market']
52
  put_into_service = project_cc_yaml['eu_market_status']['put_into_service']
53
 
54
  eu_located = project_cc_yaml['operator_details']['eu_located']
55
  output_used = project_cc_yaml['operator_details']['output_used']
56
 
57
- if not check_excepted(project_cc_yaml):
58
- if ((ai_system and (placed_on_market or put_into_service)) or (gpai_model and placed_on_market)): # Article 2.1(a)
59
  return True
60
  if (ai_system and eu_located and output_used): # Article 2.1(c)
61
  return True
@@ -65,12 +64,13 @@ def check_within_scope_act(dispositive_variables, project_cc_yaml):
65
 
66
  def check_excepted(dispositive_variables, project_cc_yaml):
67
 
68
- if (project_cc_yaml['excepted']['scientific'] or
69
- project_cc_yaml['excepted']['pre_market'] or
70
- (project_cc_yaml['ai_system']['ai_system']['value'] == True and project_cc_yaml['excepted']['open_source_ai_system']) or
 
71
  (project_cc_yaml['gpai_model']['gpai_model']['value'] == True and
72
- project_cc_yaml['excepted']['open_source_gpai_system'] and
73
- dispositive_variables['ai_project_type']['gpai_model_systemic_risk'] == False)
74
  ):
75
  dispositive_variables['msg'].append("Your project falls into one of the exemptions from the Act.")
76
  return True
@@ -79,7 +79,7 @@ def check_excepted(dispositive_variables, project_cc_yaml):
79
 
80
  def check_prohibited(project_cc_yaml):
81
 
82
- ai_system = project_cc_yaml['ai_system']['ai_system']
83
 
84
  if ai_system:
85
  for key in project_cc_yaml['prohibited_practice']['ai_system']:
 
47
 
48
  ai_system = project_cc_yaml['ai_system']['ai_system']
49
  gpai_model = project_cc_yaml['gpai_model']['gpai_model']
 
50
  placed_on_market = project_cc_yaml['eu_market_status']['placed_on_market']
51
  put_into_service = project_cc_yaml['eu_market_status']['put_into_service']
52
 
53
  eu_located = project_cc_yaml['operator_details']['eu_located']
54
  output_used = project_cc_yaml['operator_details']['output_used']
55
 
56
+ if not check_excepted(dispositive_variables, project_cc_yaml):
57
+ if ((ai_system and (placed_on_market or put_into_service)) or (gpai_model and placed_on_market)): # Article 2.1(a)
58
  return True
59
  if (ai_system and eu_located and output_used): # Article 2.1(c)
60
  return True
 
64
 
65
  def check_excepted(dispositive_variables, project_cc_yaml):
66
 
67
+ if (project_cc_yaml['excepted']['scientific']['value'] or
68
+ project_cc_yaml['excepted']['pre_market']['value'] or
69
+ (project_cc_yaml['ai_system']['ai_system']['value'] == True and
70
+ project_cc_yaml['excepted']['open_source_ai_system']['value'] == True) or
71
  (project_cc_yaml['gpai_model']['gpai_model']['value'] == True and
72
+ project_cc_yaml['excepted']['open_source_gpai_system']['value'] == True and
73
+ dispositive_variables['ai_project_type']['gpai_model_systemic_risk'] == False)
74
  ):
75
  dispositive_variables['msg'].append("Your project falls into one of the exemptions from the Act.")
76
  return True
 
79
 
80
  def check_prohibited(project_cc_yaml):
81
 
82
+ ai_system = project_cc_yaml['ai_system']['ai_system']['value']
83
 
84
  if ai_system:
85
  for key in project_cc_yaml['prohibited_practice']['ai_system']: