Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradient inversion: fix cross-validation path #2869

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def validate(self, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal
elif validate_type == ValidateType.MODEL_VALIDATE:
if self.test_loader is None:
self.log_warning(fl_ctx, "No test data available. Skipping validation.")
val_results = {}
val_results = {"info": "Not validating on this client!"}
else:
# perform valid
train_acc, train_auc = self.local_valid(self.train_loader, abort_signal)
Expand Down Expand Up @@ -639,7 +639,6 @@ def validate(self, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal
"val_auc": val_auc,
"test_auc": test_auc,
}

metric_dxo = DXO(data_kind=DataKind.METRICS, data=val_results)
return metric_dxo.to_shareable()

Expand Down
2 changes: 1 addition & 1 deletion research/quantifying-data-leakage/start_fl_sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ echo "==========================================================================

# Show cross-site validation results
echo "Cross-site validation results:"
cat "${workspace}/simulate_job/cross_site_val/cross_val_results.json"
cat "${workspace}/server/simulate_job/cross_site_val/cross_val_results.json"
echo
echo "================================================================================================================="
Loading