Repository navigation
docs: describe policies in plain words + add a policies step to the DO tutorial - #9577
Merged
Merged
Conversation
…orial
Deny with sys.exit("<message>") in the policy examples so the DS sees
just the message, start every policy with a plain-words docstring, add an
input-policy subsection to the DO tutorial's api step, fix its config.yaml
and step-number text, and tell the DS where a policy's reason shows up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
koenvanderveen
approved these changes
Oct 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Found while testing #9566 end to end in Colab: nothing tells a DO to describe a policy in plain words, although evaluators read its source, and the DO tutorial doesn't cover policies yet. Docs only.
Changes
docs/jobs.md: start every policy with a plain-words docstring; all examples have one. "Denying a call" says where the DS reads the reason (job.policy_error) and what it looks like for an uncaught exception, e.g.ValueError: Rate limit reached: 10 calls per 24 hours.syft_job/policies/env.py: the Deny and Reason conventions match, plus a Describe convention. Docstring only.config.yamlisn't matched by name (the DO writes it for each call), step numbers match the overview, and a new "Add an input policy" subsection writes, tests (run_policy) and attaches (set_policies) an allowed-dataset plus rate-limit policy.job.policy_error.Testing
set_policieson a throwaway api; the full DO notebook wasn't run end to end, because it needs Google sign-in.Asana task
🤖 Generated with Claude Code