File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def get_detector(detector_name: str) -> Detector:
5151 return OriginalityAI ()
5252 elif detector_name == "binoculars" :
5353 return Binoculars ()
54- if detector_name == "conda" :
54+ elif detector_name == "conda" :
5555 return Conda ()
5656 else :
5757 raise ValueError ("Invalid detector name" )
Original file line number Diff line number Diff line change 3636 print (f"Running detection..." )
3737 results = run_detection (detector .inference , df )
3838
39- print (f"Done! Writing predictions to output path: { args .output_path } " )
39+ print (f"Done! Writing predictions to output path: { args .output_preds_path } " )
4040 with open (args .output_preds_path , "w" ) as f :
4141 json .dump (results , f )
4242
43- if "label" not in df .columns :
44- print ("No labels found in dataframe; evaluation will not be run." )
45- exit (0 )
43+ # if "label" not in df.columns:
44+ # print("No labels found in dataframe; evaluation will not be run.")
45+ # exit(0)
4646
4747 print ("Running evaluation on the predictions..." )
4848 evaluation_result = run_evaluation (results , df )
Original file line number Diff line number Diff line change 2323 print (f"{ d } -- { accuracy .item ()} " )
2424 except Exception :
2525 pass
26+
27+ # for m in df.model.unique():
28+ # accuracy = df[(df['model'] == m) & (df['domain'] == 'all') & (df['attack'] == 'none') & (df['decoding'] == 'all') & (df['repetition_penalty'] == 'all')]['auroc']
29+ # try:
30+ # print(f"{m} -- {accuracy.item()}")
31+ # except Exception:
32+ # pass
2633#print(df)
2734
2835# # Conditions
You can’t perform that action at this time.
0 commit comments