package_release_tool
Scan a dataset or model directory, redact it, and generate publication-ready Hugging Face cards and EU AI Act training-data summaries in one call.
Instructions
Scan a dataset/model directory, redact it, and generate the paperwork needed to publish it, in one call.
This is the end-to-end tool: use it when the goal is "make this
directory publishable" rather than just inspecting or redacting it.
It chains a Presidio scan, an optional redaction pass, and
generation of a Hugging Face dataset/model card plus an EU AI Act
Art. 53(1)(d) training-data-summary template, all populated from
the same scan results so the documents and the redacted copy can
never disagree. Prefer scan_directory_tool alone for a
read-only report, or redact_directory_tool alone when you don't
need the generated cards. This tool does not detect PII itself --
detection is entirely Presidio's, unmodified.
path must exist and be readable. This tool is mutating: it writes
the bundle to output (dataset/model card, EU AI Act summary) and,
when redact_first=True (the default), also writes a redacted copy
to <output>-redacted-source, overwriting that directory if it
already exists. Nothing under path itself is ever modified. No
network calls are made -- scanning, redaction, and document
generation all run locally. The EU AI Act summary is a draft
template with scan-derived counts filled in and everything else
left as an explicit placeholder for a human to complete; it is not
a compliance guarantee.
kind is "dataset" (default), "model", or "both", and picks
which card template(s) get generated. redact_first toggles the
redaction step (default True); strategy is "mask", "hash",
or "remove" and only applies when redact_first=True. Example
calls: package_release_tool(path="./data", output="./release"),
package_release_tool(path="./model", output="./release", kind="model"),
package_release_tool(path="./data", output="./release", redact_first=False).
Returns a JSON object with bundle_dir, dataset_card_path
(or null if kind="model"), model_card_path (or null if
kind="dataset"), eu_ai_act_summary_path, and source_kind. On a
missing path or any internal failure it returns
{"error": ..., "error_type": ...} instead of raising. See
releaseguard package --help for the CLI-equivalent flag reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | dataset | |
| path | Yes | ||
| output | Yes | ||
| strategy | No | mask | |
| redact_first | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||