Spaces:
Sleeping
Sleeping
qqubb
commited on
Commit
·
79746f2
1
Parent(s):
1bc4f1d
update run_compliance_analysis_on_model
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
|
|
compliance_analysis.py
CHANGED
@@ -156,25 +156,14 @@ def run_compliance_analysis_on_project(dispositive_variables, project_cc_yaml):
|
|
156 |
|
157 |
def run_compliance_analysis_on_data(dispositive_variables, data_cc_yaml):
|
158 |
|
159 |
-
<<<<<<< HEAD
|
160 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
161 |
-
for key in data_cc_yaml['
|
162 |
-
if data_cc_yaml['
|
163 |
-
dispositive_variables['msg'].append(f"This high-risk AI system fails the {key} requirements under {data_cc_yaml['
|
164 |
-
=======
|
165 |
-
# If project involves a high-risk AI system, then make sure all the relevant data requirements are met (relevant attributes are positive)
|
166 |
-
|
167 |
-
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
168 |
-
for value in data_cc_yaml['high_risk_ai_system_requirements']:
|
169 |
-
if data_cc_yaml['high_risk_ai_system_requirements'][f'{value}'] == True:
|
170 |
-
dispositive_variables['msg'].append(f"")
|
171 |
-
>>>>>>> fbbf69b255ab44b93558b0d31b02a679007bc061
|
172 |
|
173 |
-
# If project involves a GPAI model, then make sure all the relevant data requirements are met (relevant attributes are positive)
|
174 |
-
|
175 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
176 |
for value in data_cc_yaml['gpai_model_requirements']:
|
177 |
-
if data_cc_yaml['gpai_model_requirements'][f'{value}'] == True:
|
178 |
dispositive_variables['msg'].append(f"")
|
179 |
|
180 |
return dispositive_variables
|
@@ -186,21 +175,21 @@ def run_compliance_analysis_on_model(dispositive_variables, model_cc_yaml):
|
|
186 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
187 |
for value in model_cc_yaml['high_risk_ai_system_requirements']:
|
188 |
if model_cc_yaml['high_risk_ai_system_requirements'][f'{value}'] == True:
|
189 |
-
dispositive_variables['msg'].append(f"")
|
190 |
|
191 |
# If project involves a GPAI model, then make sure all the relevant model requirements are met (relevant attributes are positive)
|
192 |
|
193 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
194 |
-
for
|
195 |
-
if model_cc_yaml['gpai_model_requirements'][f'{
|
196 |
-
dispositive_variables['msg'].append(f"")
|
197 |
|
198 |
# If the GPAI model additionally carries systemic risk, then make sure all the relevant model requirements are met (relevant attributes are positive)
|
199 |
|
200 |
if dispositive_variables['ai_project_type']["gpai_model_systemic_risk"] == True:
|
201 |
-
for
|
202 |
-
if model_cc_yaml['
|
203 |
-
dispositive_variables['msg'].append(f"")
|
204 |
|
205 |
return dispositive_variables
|
206 |
|
|
|
156 |
|
157 |
def run_compliance_analysis_on_data(dispositive_variables, data_cc_yaml):
|
158 |
|
|
|
159 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
160 |
+
for key in data_cc_yaml['high_risk_ai_system_requirements']:
|
161 |
+
if data_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['value'] == True:
|
162 |
+
dispositive_variables['msg'].append(f"This high-risk AI system fails the {key} requirements under {data_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['article']}.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
|
|
|
|
|
164 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
165 |
for value in data_cc_yaml['gpai_model_requirements']:
|
166 |
+
if data_cc_yaml['gpai_model_requirements'][f'{value}'] == True:
|
167 |
dispositive_variables['msg'].append(f"")
|
168 |
|
169 |
return dispositive_variables
|
|
|
175 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
176 |
for value in model_cc_yaml['high_risk_ai_system_requirements']:
|
177 |
if model_cc_yaml['high_risk_ai_system_requirements'][f'{value}'] == True:
|
178 |
+
dispositive_variables['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['article']}.")
|
179 |
|
180 |
# If project involves a GPAI model, then make sure all the relevant model requirements are met (relevant attributes are positive)
|
181 |
|
182 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
183 |
+
for key in model_cc_yaml['gpai_model_requirements']:
|
184 |
+
if model_cc_yaml['gpai_model_requirements'][f'{key}']['value'] == True:
|
185 |
+
dispositive_variables['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['gpai_model_requirements'][f'{key}']['article']}.")
|
186 |
|
187 |
# If the GPAI model additionally carries systemic risk, then make sure all the relevant model requirements are met (relevant attributes are positive)
|
188 |
|
189 |
if dispositive_variables['ai_project_type']["gpai_model_systemic_risk"] == True:
|
190 |
+
for key in model_cc_yaml['gpai_model_with_systemic_risk_requirements']:
|
191 |
+
if model_cc_yaml['gpai_model_with_systemic_risk_requirements'][f'{key}']['value'] == True:
|
192 |
+
dispositive_variables['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['gpai_model_with_systemic_risk_requirements'][f'{key}']['article']}.")
|
193 |
|
194 |
return dispositive_variables
|
195 |
|