scripts/setfit/run_fewshot_multilingual.py [215:235]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            print(f"\n\n======== {os.path.dirname(results_path)} =======")
            os.makedirs(os.path.dirname(results_path), exist_ok=True)
            if os.path.exists(results_path):
                continue

            model.load_state_dict(copy.deepcopy(model_original_state))
            metrics = eval_setfit(
                fewshot_ds[name],
                test_dataset,
                model,
                loss_class,
                args.num_epochs,
                metric,
            )

            with open(results_path, "w") as f_out:
                json.dump(
                    {"score": metrics[metric] * 100, "measure": metric},
                    f_out,
                    sort_keys=True,
                )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



