Spaces:
Sleeping
Sleeping
Adding trace to Mgr Biases
Browse files- mgr_biases.py +9 -1
mgr_biases.py
CHANGED
@@ -113,6 +113,12 @@ CUSTOM_BIAS_SPECS = { "male_female__care_expertise":
|
|
113 |
}
|
114 |
}
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
#################
|
117 |
## BIAS SAVING ##
|
118 |
#################
|
@@ -210,7 +216,9 @@ def get_bias_json(filepath: str):
|
|
210 |
)
|
211 |
except Exception as e:
|
212 |
# file not found
|
213 |
-
print(f"file not found, probably: {e}")
|
|
|
|
|
214 |
|
215 |
ds_local_path = os.path.join(LOCAL_DATA_DIRNAME,
|
216 |
"datasets--AnimaLab--bias-test-gpt-biases",
|
|
|
113 |
}
|
114 |
}
|
115 |
|
116 |
+
def list_files(directory):
|
117 |
+
"""List all files in a given directory and its subdirectories."""
|
118 |
+
for root, _, files in os.walk(directory):
|
119 |
+
for file in files:
|
120 |
+
print(os.path.join(root, file))
|
121 |
+
|
122 |
#################
|
123 |
## BIAS SAVING ##
|
124 |
#################
|
|
|
216 |
)
|
217 |
except Exception as e:
|
218 |
# file not found
|
219 |
+
print(f"Bias Mgr, file not found, probably: {e}")
|
220 |
+
directory_path = LOCAL_DATA_DIRNAME
|
221 |
+
list_files(directory_path)
|
222 |
|
223 |
ds_local_path = os.path.join(LOCAL_DATA_DIRNAME,
|
224 |
"datasets--AnimaLab--bias-test-gpt-biases",
|