Skip to content

Commit

Permalink
fix custom policy nb
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-milea committed Mar 29, 2024
1 parent 64c5866 commit 03c0ce9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions notebooks/api/0.8/05-custom-policy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,12 @@
" self.state[\"counts\"] += 1\n",
"\n",
" def apply_output(self, context, outputs, update_policy=True):\n",
" print(self.state)\n",
" if hasattr(outputs, \"syft_action_data\"):\n",
" outputs = outputs.syft_action_data\n",
" output_dict = {}\n",
" if self.state[\"counts\"] < self.n_calls:\n",
" for output_arg in self.downloadable_output_args:\n",
" output_dict[output_arg] = outputs[output_arg] + 1\n",
" output_dict[output_arg] = outputs[output_arg]\n",
" if update_policy:\n",
" self.update_policy(context, outputs)\n",
" else:\n",
Expand Down

0 comments on commit 03c0ce9

Please sign in to comment.