You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. fairness_evaluation.py and score_calculation_script.py have over 100 lines of mostly identical code. However, score_calculation_script.py calculates numbers differently from fairness_evaluation.py. An ordinary user might find this confusing. The two branches from if args.dry_run: are also repetitive.
Describe the solution you'd like
Refactor the score calculation part in fairness_evaluation.py into score_calculation_script.py.
get_path function is also weird. Can os.path.dirname do its job?
Merge the two branches from if args.dry_run: are also repetitive. Since fairness needs a special do_classification. I added a monkey patch (Line 173). Whether to activate the monkey patch or not can be determined based on whether we are running dry runs. This should be much cleaner once we fully adopt the return object, so we don't need to return a bunch of tuples...
The text was updated successfully, but these errors were encountered:
Rearranged the codes and removed the duplication. Now, we can compute the scores of existing scenarios without running any scenarios: dt-run +fairness=score_computation +model_config=hf
Replaced get_path function with os.path.dirname
Now we can run dry_run via dt-run +fairness=crime_br_0.0 ++dry_run=True ++model=openai/gpt-3.5-turbo-0301
Is your feature request related to a problem? Please describe.
fairness_evaluation.py
andscore_calculation_script.py
have over 100 lines of mostly identical code. However,score_calculation_script.py
calculates numbers differently fromfairness_evaluation.py
. An ordinary user might find this confusing. The two branches fromif args.dry_run:
are also repetitive.Describe the solution you'd like
fairness_evaluation.py
intoscore_calculation_script.py
.get_path
function is also weird. Canos.path.dirname
do its job?if args.dry_run:
are also repetitive. Since fairness needs a specialdo_classification
. I added a monkey patch (Line 173). Whether to activate the monkey patch or not can be determined based on whether we are running dry runs. This should be much cleaner once we fully adopt the return object, so we don't need to return a bunch of tuples...The text was updated successfully, but these errors were encountered: