Skip to content

fix: move nss jobs into plugin, update docs#195

Open
mckornfield wants to merge 5 commits into
mainfrom
nss-docs/mck
Open

fix: move nss jobs into plugin, update docs#195
mckornfield wants to merge 5 commits into
mainfrom
nss-docs/mck

Conversation

@mckornfield
Copy link
Copy Markdown
Contributor

@mckornfield mckornfield commented Jun 4, 2026

Summary by CodeRabbit

  • New Features
    • Added Safe Synthesizer SDK: resources (sync/async jobs), SafeSynthesizerJob wrapper (polling/status/logs/data/summary/report/Notebook display), ReportHtml, and a fluent SafeSynthesizerJobBuilder for building/submitting jobs and reusing pretrained jobs.
  • Bug Fixes
    • Fixed pretrained-model config handling at runtime and tightened local-run env isolation to avoid leaking parent context.
  • Documentation
    • Revised tutorials, CLI/README, workflows, and site nav to clarify local vs platform flows and document SDK.
  • Tests / Chores
    • Added unit tests, packaging entry points, and third‑party license entries.

@mckornfield mckornfield requested review from a team as code owners June 4, 2026 22:07
Signed-off-by: mkornfield <mkornfield@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18720/24769 75.6% 62.1%
Integration Tests 11999/23533 51.0% 26.2%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Documentation preview is ready

Preview: https://nvidia-nemo.github.io/nemo-platform/pr-preview/pr-195/pr-195/

Built from 19fa74d in workflow run.

This preview is deployed from this PR branch, updates when docs changes are pushed, and will be removed when the PR closes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges.

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Safe Synthesizer plugin SDK (resources, job builder, job wrapper), job-config validators for pretrained-adapter reuse, tests, packaging/entry-point and manifest updates, and documentation clarifying local execution and Jobs API/SDK workflows.

Changes

Safe Synthesizer SDK rollout

Layer / File(s) Summary
SDK foundation utilities
plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/http_utils.py, plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/config.py
Adds HTTP URL/helpers (base_url, resolve_workspace, url, job-route builders) and re-exports config types with guarded imports.
Sync and async SDK resources
plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/resources.py, plugins/nemo-safe-synthesizer/pyproject.toml, packages/nemo_platform/pyproject.toml
Implements SafeSynthesizerJobsResource and AsyncSafeSynthesizerJobsResource (create/list/retrieve/status/logs), error-detail enrichment, JSON->object wrappers, and registers nemo.sdk entry points.
Job wrapper and report helpers
plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job.py
Adds ReportHtml and SafeSynthesizerJob helpers for status polling, incremental log streaming, and downloading/parsing summary/report/synthetic-data.
Fluent job builder and dataset upload
plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job_builder.py
Implements SafeSynthesizerJobBuilder: DataFrame/file inputs, temp CSV upload to fileset, spec assembly (data/train/generate/evaluate/DP/time-series/PII), HF token secret, pretrained adapter reuse, and create_job submission.
Runtime job-config and pretrained reuse
plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/job_config.py, plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/api/v2/jobs/endpoints.py, plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/tasks/safe_synthesizer/__main__.py
Adds SafeSynthesizerParameters/JobConfig with validators, parse_pretrained_model_job_ref, and _runtime_job_config to strip nested training.pretrained_model when pretrained_model_job is supplied.
SDK and builder unit tests
plugins/nemo-safe-synthesizer/tests/unit/test_sdk.py, plugins/nemo-safe-synthesizer/tests/unit/test_jobs.py
Adds tests covering resource routing/payloads, error detail propagation, async logs, builder upload/spec behavior, pretrained-adapter reuse, job polling terminal states, data/summary/report downloads, and log pagination.
Local execution docs and README
docs/safe-synthesizer/about/host-local-development.md, plugins/nemo-safe-synthesizer/README.md, docs/safe-synthesizer/getting-started.md
Reframes host-local docs as “Local and Subprocess Execution”, documents managed subprocess vs direct task invocation, runtime-Python discovery, and clarifies --data-source behavior.
Docs: SDK import updates & tutorials
docs/safe-synthesizer/about/jobs.md, docs/safe-synthesizer/about/reference.md, docs/safe-synthesizer/tutorials/*, docs/safe-synthesizer/sdk-resources.md
Updates examples to import from nemo_safe_synthesizer_plugin.sdk.*, revises tutorials for provider/token handling and adapter-reuse workflows, and adds SDK resources page.
Docs: Workflows use Jobs API/SDK
plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/skills/safe-synthesizer/workflows/*.md
Replaces CLI-first job submission/status examples with Jobs API/SDK guidance and adds CLI resolution steps.
Documentation site config & navigation
mkdocs.yml, docs/_snippets/nvidia-build-model-provider.md, docs/safe-synthesizer/.gitignore
Adjusts nav/hiding rules, updates NVIDIA provider snippet to default/nvidia-build, and ignores generated tutorials/evaluation_report.html.
Packaging / plugin enablement / manifests
plugins/nemo-safe-synthesizer/pyproject.toml, packages/nemo_platform/pyproject.toml, pyproject.toml, third_party/*, packages/nemo_platform/BUNDLING.md
Registers plugin SDK entry points, enables plugin in enabled-plugins, adds nemo-safe-synthesizer requirement and license/OSV entries, and removes safe_synthesizer_sdk from BUNDLING doc.

Possibly related PRs

Suggested reviewers

  • tylersbray
  • ironcommit
  • SandyChapman
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 53.19% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: moving Safe Synthesizer jobs into the plugin while updating related documentation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nss-docs/mck

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/safe-synthesizer/about/host-local-development.md`:
- Line 4: Add a blank line before the heading text "# Local and Subprocess
Execution" in the file to satisfy MD022; locate the heading string and insert
one empty line immediately above it so the heading is separated from prior
content.

In `@docs/safe-synthesizer/tutorials/safe-synthesizer-101.md`:
- Around line 77-79: The error message hardcodes product and plugin names;
replace the literal strings "Safe Synthesizer" and "safe-synthesizer" in the
quoted message with the appropriate Sphinx substitutions (e.g. |product| or the
project-specific substitution such as |safe_synthesizer_plugin|) so docs use
configured substitutions consistently; update the three concatenated string
pieces to use the substitution tokens (keeping the same wording and path
structure but substituting the product/plugin tokens) so Sphinx renders the
correct product name across builds.
- Around line 123-124: The current code assumes provider_name contains "/",
causing split("/", 1) to crash for unqualified names; update the logic around
provider_name, provider_workspace, and provider_id so both "provider" and
"workspace/provider" work: if "/" in provider_name then split into
provider_workspace and provider_id, otherwise set provider_id = provider_name
and provider_workspace = None (or an empty value), and call
client.inference.providers.retrieve(provider_id, workspace=provider_workspace)
only when provider_workspace is present (or pass None/omit the workspace
argument as appropriate).

In `@mkdocs.yml`:
- Around line 222-229: Remove the two hidden_docs.paths entries that reference
host-local-development.md and safe-synthesizer-101.md so those files are no
longer included in hidden_docs.paths; specifically edit the mkdocs.yml
hidden_docs.paths list to delete the items
"safe-synthesizer/tutorials/host-local-development.md" and
"safe-synthesizer/tutorials/safe-synthesizer-101.md" (or the exact matching path
strings present) so the hide_unready_docs.py hook no longer filters them out and
the nav entries for host-local-development.md and safe-synthesizer-101.md remain
usable.

In
`@plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job_builder.py`:
- Around line 159-163: The path branch currently forces all file-path sources
through pd.read_csv which will break parquet/json/jsonl inputs; update the
loader in the method using self._data_source (in job_builder.py / JobBuilder or
the method containing that if-block) to detect the file type via
Path(self._data_source).suffix.lower() and call the appropriate pandas reader:
pd.read_parquet for .parquet, pd.read_json(..., lines=True) for .jsonl,
pd.read_json for .json, and pd.read_csv for .csv (fall back to pd.read_csv for
unknown extensions or raise a clear error). Apply the same change to the other
identical branch around the later occurrence (the block at the 235-240 region).

In `@plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job.py`:
- Around line 98-103: The status-change prints execute unconditionally (using
current_status_info and previous_status_info), ignoring the verbose flag; wrap
the print block so it only executes when the function/class-level verbose is
True (e.g., if verbose: or if self.verbose:) and ensure the surrounding function
(where current_status_info/previous_status_info are compared) accepts or
references that verbose flag so behavior is unchanged when verbose is False.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a2f01659-19de-4e38-b14a-6be48c8f8b2b

📥 Commits

Reviewing files that changed from the base of the PR and between 9a7c377 and 2baf8e4.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (28)
  • docs/_snippets/nvidia-build-model-provider.md
  • docs/safe-synthesizer/.gitignore
  • docs/safe-synthesizer/about/host-local-development.md
  • docs/safe-synthesizer/about/jobs.md
  • docs/safe-synthesizer/about/reference.md
  • docs/safe-synthesizer/getting-started.md
  • docs/safe-synthesizer/llms.txt
  • docs/safe-synthesizer/tutorials/differential-privacy.md
  • docs/safe-synthesizer/tutorials/safe-synthesizer-101.md
  • mkdocs.yml
  • packages/nemo_platform/pyproject.toml
  • plugins/nemo-safe-synthesizer/README.md
  • plugins/nemo-safe-synthesizer/pyproject.toml
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/api/v2/jobs/endpoints.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/config.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/http_utils.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job_builder.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/resources.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/skills/safe-synthesizer/workflows/diagnose.md
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/skills/safe-synthesizer/workflows/results.md
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/skills/safe-synthesizer/workflows/run.md
  • plugins/nemo-safe-synthesizer/tests/unit/test_jobs.py
  • plugins/nemo-safe-synthesizer/tests/unit/test_sdk.py
  • pyproject.toml
  • third_party/licenses.jsonl
  • third_party/osv-licenses.json
  • third_party/requirements-main.txt

Comment thread docs/safe-synthesizer/about/host-local-development.md
Comment thread docs/safe-synthesizer/tutorials/safe-synthesizer-101.md Outdated
Comment thread docs/safe-synthesizer/tutorials/safe-synthesizer-101.md Outdated
Comment thread mkdocs.yml Outdated
Comment thread plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job.py Outdated
Signed-off-by: mkornfield <mkornfield@nvidia.com>
Comment thread plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job_builder.py Dismissed
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these SDK files are just a port of something I deleted in the old place

Copy link
Copy Markdown
Contributor

@anastasia-nesterenko anastasia-nesterenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some nit-picks

SafeSynthesizerJobBuilder(client)
.with_data_source(df)
.with_classify_model_provider(provider_name) # Enable column classification
.with_replace_pii() # Enable PII replacement
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: with with_replace_pii() deleted, should the section **What happens next:** be modified?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah... I'll put this back (removed it to speed up testing)

Comment thread docs/safe-synthesizer/about/jobs.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: old name usage

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nooooo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: same old name usage

Copy link
Copy Markdown
Contributor

@tylersbray tylersbray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Full review summary

Solid PR overall — plugin SDK relocation, _runtime_job_config, and scheduler workspace fix are the right moves. Inline comments below are ordered roughly by severity.

Merge blockers / high priority

  1. safe-synthesizer-101.md — classify provider configured but never submitted (missing .with_replace_pii())
  2. nvidia-build-model-provider.mddefault/ vs system/ workspace mismatch with platform-seed

Should fix in this PR
3. Stale "Host-Local Development and Testing" link titles in jobs.md, reference.md, about/index.md
4. Add docs/safe-synthesizer/sdk-resources.md (parity with anonymizer/evaluator/data-designer)
5. AsyncSafeSynthesizerJobsResource.get_logs should be async def
6. Expand tests for SafeSynthesizerJob and _runtime_job_config edge cases

Confirm intent / lower priority
7. mkdocs.yml nav pruning — jobs/reference/DP tutorial removed from published nav
8. job_builder.pywith_classify_model_provider() only applies when PII replacement enabled
9. job.py — broad except Exception in wait_for_completion
10. config.py — silent ImportError leaves empty __all__
11. packages/nemo_platform/BUNDLING.md still references removed safe_synthesizer_sdk vendoring (file not in this PR)

Looks good

  • enabled-plugins addition, SDK entry points, test_sdk.py resource/builder coverage, scheduler workspace test

@@ -164,7 +175,6 @@ builder = (
SafeSynthesizerJobBuilder(client)
.with_data_source(df)
.with_classify_model_provider(provider_name) # Enable column classification
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Tutorial regression — classify provider never reaches job spec

Human spot-check: Step 6 verifies a classify model provider and Step 7 calls .with_classify_model_provider(), but .with_replace_pii() was removed from this builder chain. Users follow classification setup that the submitted job ignores.

Root cause: SafeSynthesizerJobBuilder._build_job_spec() only injects classify_model_provider when enable_replace_pii is true (job_builder.py L198–203). The API compiler reads it only from config.replace_pii.globals.classify.

Agent task — pick one:

  • Option A (restore prior behavior): Add .with_replace_pii() before .synthesize() on this chain.
  • Option B (synthesis-only tutorial): Remove/reword Step 6 and drop .with_classify_model_provider() here.

Acceptance criteria:

# Option A: spec must include
config["enable_replace_pii"] is True
config["replace_pii"]["globals"]["classify"]["classify_model_provider"] == provider_name
# Option B: spec must NOT reference classify_model_provider in the main job

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I'll put it back

self._enable_replace_pii = True
return self

def with_classify_model_provider(self, provider_name: str) -> Self:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): with_classify_model_provider() is a no-op without PII replacement

Human spot-check: Callers can chain .with_classify_model_provider("default/nvidia-build") on a synthesis-only job and believe classification is enabled. It is silently ignored unless .with_replace_pii() was also called.

Related: Same issue drives the safe-synthesizer-101.md tutorial regression.

Agent task — pick one:

  1. Doc-only: Add a docstring/note on with_classify_model_provider() stating it requires .with_replace_pii().
  2. API fix: If classification should work independently of PII replacement, inject classify_model_provider into a synthesis-accessible config path (and update endpoints.py compiler). Confirm product intent first.

Acceptance criteria: Either explicit docs warning OR spec contains classify config without enable_replace_pii.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with_replace_pii coming in hot

@@ -1,8 +1,8 @@
!!! note
The platform pre-configures a `system/nvidia-build` model provider during startup.
The platform pre-configures a `default/nvidia-build` model provider during startup.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): default/nvidia-build may be wrong for platform-seed deployments

Human spot-check: This shared snippet now says default/nvidia-build. That matches nemo setup (_auto_setup(client, "default")), but platform-seed still creates the provider in the system workspace (services/platform-seed/src/nmp/platform_seed/tasks/seed/run.py). Helm/K8s users may not find default/nvidia-build.

Agent task — pick one:

  1. Document both paths: nemo setupdefault/nvidia-build; platform-seed → system/nvidia-build.
  2. Align platform-seed to default workspace (bigger change, out of scope?).
  3. De-emphasize hard-coded workspace: tell users to run nemo inference providers list and use whatever workspace/name exists.

Acceptance criteria: Snippet is accurate for both local setup and seeded deployments, or explicitly scopes itself to nemo setup users only.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this confuses the frick out of me lol. I think I want to just do the nemo setup version lol


from nemo_platform import NeMoPlatform
from nemo_platform.beta.safe_synthesizer.job_builder import SafeSynthesizerJobBuilder
from nemo_safe_synthesizer_plugin.sdk.job_builder import SafeSynthesizerJobBuilder
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Stale link titles in this file

Human spot-check: Import path update here is correct. Same file still uses the old page title in two places:

  • L112: [Host-Local Development and Testing](host-local-development.md)
  • L312: same label in Related topics

Nav/getting-started renamed this page to "Local and Subprocess Execution".

Agent task:

# Replace both occurrences:
[Local and Subprocess Execution](host-local-development.md)

Also update docs/safe-synthesizer/about/reference.md L20 and docs/safe-synthesizer/about/index.md L109 (not touched in this PR).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah I need to sweep these


from nemo_platform import NeMoPlatform
from nemo_platform.beta.safe_synthesizer.job_builder import SafeSynthesizerJobBuilder
from nemo_safe_synthesizer_plugin.sdk.job_builder import SafeSynthesizerJobBuilder
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Stale link title on L20

Human spot-check: Import path update (this hunk) is correct. L20 still says:
[Host-Local Development and Testing](host-local-development.md)

Agent task:

[Local and Subprocess Execution](host-local-development.md)

Mirror the same fix in jobs.md L112/L312 and about/index.md L109.

return workspace, job_name


def _runtime_job_config(job_config: SafeSynthesizerJobConfig) -> dict[str, Any]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Add edge-case tests for _runtime_job_config

Human spot-check: _runtime_job_config correctly strips training.pretrained_model when pretrained_model_job is set — good fix. test_plugin_job_config_allows_pretrained_model_job_runtime_config covers the happy path.

Agent task — add unit tests in test_jobs.py:

  1. pretrained_model_job set but config.training missing → no error, config passes through.
  2. pretrained_model_job set but config.training is not a dict → no error.
  3. pretrained_model_job unset → training.pretrained_model preserved.

Acceptance criteria: _runtime_job_config behavior is locked for non-dict/missing training shapes.

Comment thread mkdocs.yml
@@ -320,19 +326,9 @@ nav:
- SDK Resources: data-designer/sdk-resources.md
- Migrating from Standalone Library: data-designer/migration.md
- Synthesize Safe Data:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Confirm intentional nav pruning

Human spot-check: Published Synthesize Safe Data nav shrinks from full About + tutorials to only:

  • Getting Started
  • Local and Subprocess Execution
  • Safe Synthesizer 101

Removed from nav (moved to hidden_docs): jobs.md, reference.md, differential-privacy.md, about/index.md, evaluation, PII replacement, etc.

Question for author: Is this deliberate scope reduction for the public docs site?

Agent task if intentional:

  • Add cross-links from Getting Started / 101 to hidden pages for readers using make live-with-unready.
  • Consider keeping Differential Privacy or Jobs in nav if still user-facing.

Agent task if unintentional: Restore About subsection and DP tutorial to nav.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I'll put MOAR in

if log_key not in seen_log_keys:
print(new_log.message.strip())
seen_log_keys.add(log_key)
except Exception:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Narrow exception handling in wait_for_completion

Human spot-check: Log polling uses except Exception: which swallows all failures during status wait (network blips OK, but also programming errors).

Agent task — pick one:

  1. Catch httpx.HTTPError (and maybe TimeoutException) only; re-raise others.
  2. Keep broad catch but log at warning without logger.exception (full traceback) unless verbose and repeated failures.

Acceptance criteria: Transient log-fetch failures don't abort wait; unexpected exceptions still surface.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh I remember this could hit weird timeouts and make the logs look garbage, but might be worth cleaning up

"TimeSeriesParameters",
"TrainingHyperparams",
]
except ImportError:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Silent ImportError hides missing dependency

Human spot-check: If nemo_safe_synthesizer is not installed, config.py sets __all__ = [] with no warning. Users get confusing ImportError from deeper imports.

Agent task — pick one:

  1. Re-raise ImportError with message: "Install nemo-safe-synthesizer to use SDK config types."
  2. Emit logger.warning(...) once in the except block.

Acceptance criteria: Missing optional dep produces actionable error, not empty module.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I don't know how useful this guard is personally

Comment thread pyproject.toml
"nemo-evaluator-plugin",
"nemo-guardrails-plugin",
"nemo-auditor-plugin",
"nemo-safe-synthesizer-plugin",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent (pr-review): Good — required for SDK mount

Human spot-check: Adding nemo-safe-synthesizer-plugin to enabled-plugins is necessary so discover_sdk() exposes client.safe_synthesizer after a normal uv sync / bootstrap. Without this, tutorial/SDK examples fail unless users manually enable the plugin.

No change needed — flagging as intentional and correct.

Copy link
Copy Markdown
Contributor

@tylersbray tylersbray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments...

Signed-off-by: mkornfield <mkornfield@nvidia.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/safe-synthesizer/sdk-resources.md (1)

10-57: ⚖️ Poor tradeoff

Add CLI examples alongside Python SDK examples.

Coding guidelines require both Python SDK and CLI examples in tab-sets. Document CLI equivalents for job creation and monitoring where available.

As per coding guidelines, provide both Python SDK and CLI examples in tab-sets for consistency and to support multiple user workflows.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/safe-synthesizer/sdk-resources.md` around lines 10 - 57, Add CLI
examples next to the Python SDK examples using tab-sets: keep the existing
Python block (NeMoPlatform and SafeSynthesizerJobBuilder usage) and add a
parallel CLI tab that shows equivalent commands for client.safe_synthesizer
operations (create/list/retrieve/get_status/get_logs) and for the
SafeSynthesizerJobBuilder flow (upload/data-source, synthesize, create-job),
naming commands and flags that map to the SDK method signatures (create with
--spec/--name/--workspace/--project/--timeout, list with --workspace,
retrieve/get_status/get_logs with <name> and --workspace, plus CLI flags for
classify model provider and replace-pii used in the builder). Ensure the docs
mention the async namespace only for SDK and keep CLI examples in their own tab,
matching the same examples/parameters and brief usage notes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/safe-synthesizer/about/index.md`:
- Line 109: The Markdown list item "-   **[Local and Subprocess
Execution](host-local-development.md)**" has three spaces after the list marker;
change it so there is exactly one space after the dash (i.e., "- **[Local and
Subprocess Execution](host-local-development.md)**") to conform to Markdown list
spacing conventions.

---

Nitpick comments:
In `@docs/safe-synthesizer/sdk-resources.md`:
- Around line 10-57: Add CLI examples next to the Python SDK examples using
tab-sets: keep the existing Python block (NeMoPlatform and
SafeSynthesizerJobBuilder usage) and add a parallel CLI tab that shows
equivalent commands for client.safe_synthesizer operations
(create/list/retrieve/get_status/get_logs) and for the SafeSynthesizerJobBuilder
flow (upload/data-source, synthesize, create-job), naming commands and flags
that map to the SDK method signatures (create with
--spec/--name/--workspace/--project/--timeout, list with --workspace,
retrieve/get_status/get_logs with <name> and --workspace, plus CLI flags for
classify model provider and replace-pii used in the builder). Ensure the docs
mention the async namespace only for SDK and keep CLI examples in their own tab,
matching the same examples/parameters and brief usage notes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8218c7dd-ef80-45a0-b5bd-e48ef1360886

📥 Commits

Reviewing files that changed from the base of the PR and between 4ebd512 and 1bda39a.

📒 Files selected for processing (18)
  • docs/_snippets/nvidia-build-model-provider.md
  • docs/safe-synthesizer/about/index.md
  • docs/safe-synthesizer/about/jobs.md
  • docs/safe-synthesizer/about/reference.md
  • docs/safe-synthesizer/getting-started.md
  • docs/safe-synthesizer/sdk-resources.md
  • docs/safe-synthesizer/tutorials/safe-synthesizer-101.md
  • mkdocs.yml
  • packages/nemo_platform/BUNDLING.md
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/api/v2/jobs/endpoints.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/job_config.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/config.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job_builder.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/resources.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/tasks/safe_synthesizer/__main__.py
  • plugins/nemo-safe-synthesizer/tests/unit/test_jobs.py
  • plugins/nemo-safe-synthesizer/tests/unit/test_sdk.py
✅ Files skipped from review due to trivial changes (6)
  • docs/safe-synthesizer/about/jobs.md
  • packages/nemo_platform/BUNDLING.md
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/tasks/safe_synthesizer/main.py
  • docs/_snippets/nvidia-build-model-provider.md
  • docs/safe-synthesizer/getting-started.md
  • docs/safe-synthesizer/tutorials/safe-synthesizer-101.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • docs/safe-synthesizer/about/reference.md
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/api/v2/jobs/endpoints.py
  • mkdocs.yml
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/resources.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/sdk/job.py

Comment thread docs/safe-synthesizer/about/index.md
Signed-off-by: mkornfield <mkornfield@nvidia.com>
Signed-off-by: mkornfield <mkornfield@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants