From 135307dec19550d1b9a3c2e490fb1ffeef779b4c Mon Sep 17 00:00:00 2001 From: Matt Kornfield Date: Fri, 7 Nov 2025 15:57:02 -0800 Subject: [PATCH] chore(safe-synthesizer): move URLs to top for reference notebooks --- nemo/NeMo-Safe-Synthesizer/README.md | 5 +--- .../advanced/advanced_privacy.ipynb | 24 +++++++++++-------- .../advanced/replace_pii_only.ipynb | 16 +++++++++++-- .../intro/safe_synthesizer_101.ipynb | 16 +++++++++++-- 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/nemo/NeMo-Safe-Synthesizer/README.md b/nemo/NeMo-Safe-Synthesizer/README.md index 805d45b27..bc90ee66d 100644 --- a/nemo/NeMo-Safe-Synthesizer/README.md +++ b/nemo/NeMo-Safe-Synthesizer/README.md @@ -1,5 +1,4 @@ -# NeMo Safe Synthesizer Example Notebooks - +# NeMo Safe Synthesizer Example Notebooks This directory contains the tutorial notebooks for getting started with NeMo Safe Synthesizer. @@ -15,14 +14,12 @@ source .venv/bin/activate uv pip install nemo-microservices[safe-synthesizer] ``` - Be sure to select this virtual environment as your kernel when running the notebooks. ## 🚀 Deploying the NeMo Safe Synthesizer Microservice To run these notebooks, you'll need access to a deployment of the NeMo Safe Synthesizer microservice. You have two deployment options: - ### 🐳 Deploy the NeMo Safe Synthesizer Microservice Locally Follow our quickstart guide to deploy the NeMo safe synthesizer microservice locally via Docker Compose. diff --git a/nemo/NeMo-Safe-Synthesizer/advanced/advanced_privacy.ipynb b/nemo/NeMo-Safe-Synthesizer/advanced/advanced_privacy.ipynb index 1f4d824ee..52e423a57 100644 --- a/nemo/NeMo-Safe-Synthesizer/advanced/advanced_privacy.ipynb +++ b/nemo/NeMo-Safe-Synthesizer/advanced/advanced_privacy.ipynb @@ -19,14 +19,6 @@ "- **Access an evaluation report** on the quality and privacy of the synthetic data" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "a538526a", - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "id": "8be84f5d", @@ -37,6 +29,18 @@ "Ensure you have a NeMo Microservices Platform deployment available. If you're using a managed or remote deployment, have the correct base URLs and tokens ready." ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "a538526a", + "metadata": {}, + "outputs": [], + "source": [ + "# Update as appropriate to your installation URLs\n", + "base_url = \"http://localhost:8080\"\n", + "datastore_endpoint = \"http://localhost:3000/v1/hf\"" + ] + }, { "cell_type": "code", "execution_count": null, @@ -74,7 +78,7 @@ "outputs": [], "source": [ "client = NeMoMicroservices(\n", - " base_url=\"http://localhost:8080\",\n", + " base_url=base_url\n", ")" ] }, @@ -94,7 +98,7 @@ "outputs": [], "source": [ "datastore_config = {\n", - " \"endpoint\": \"http://localhost:3000/v1/hf\",\n", + " \"endpoint\": datastore_endpoint\n", "}" ] }, diff --git a/nemo/NeMo-Safe-Synthesizer/advanced/replace_pii_only.ipynb b/nemo/NeMo-Safe-Synthesizer/advanced/replace_pii_only.ipynb index 1488602b3..03b442db8 100644 --- a/nemo/NeMo-Safe-Synthesizer/advanced/replace_pii_only.ipynb +++ b/nemo/NeMo-Safe-Synthesizer/advanced/replace_pii_only.ipynb @@ -28,6 +28,18 @@ "Ensure you have a NeMo Microservices Platform deployment available. If you're using a managed or remote deployment, have the correct base URLs and tokens ready." ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "a0e23975", + "metadata": {}, + "outputs": [], + "source": [ + "# Update as appropriate to your installation URLs\n", + "base_url = \"http://localhost:8080\"\n", + "datastore_endpoint = \"http://localhost:3000/v1/hf\"" + ] + }, { "cell_type": "code", "execution_count": null, @@ -63,7 +75,7 @@ "outputs": [], "source": [ "client = NeMoMicroservices(\n", - " base_url=\"http://localhost:8080\",\n", + " base_url=base_url\n", ")" ] }, @@ -83,7 +95,7 @@ "outputs": [], "source": [ "datastore_config = {\n", - " \"endpoint\": \"http://localhost:3000/v1/hf\",\n", + " \"endpoint\": datastore_endpoint\n", "}" ] }, diff --git a/nemo/NeMo-Safe-Synthesizer/intro/safe_synthesizer_101.ipynb b/nemo/NeMo-Safe-Synthesizer/intro/safe_synthesizer_101.ipynb index d76f19733..496850ab4 100644 --- a/nemo/NeMo-Safe-Synthesizer/intro/safe_synthesizer_101.ipynb +++ b/nemo/NeMo-Safe-Synthesizer/intro/safe_synthesizer_101.ipynb @@ -29,6 +29,18 @@ "**IMPORTANT** 👉 Ensure you have a NeMo Microservices Platform deployment available. Follow the quickstart or Helm chart instructions in your environment's setup guide. You may need to restart your kernel after installing dependencies.\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "8e0327d4", + "metadata": {}, + "outputs": [], + "source": [ + "# Update as appropriate to your installation URLs\n", + "base_url = \"http://localhost:8080\"\n", + "datastore_endpoint = \"http://localhost:3000/v1/hf\"" + ] + }, { "cell_type": "code", "execution_count": null, @@ -65,7 +77,7 @@ "outputs": [], "source": [ "client = NeMoMicroservices(\n", - " base_url=\"http://localhost:8080\",\n", + " base_url=base_url,\n", ")" ] }, @@ -85,7 +97,7 @@ "outputs": [], "source": [ "datastore_config = {\n", - " \"endpoint\": \"http://localhost:3000/v1/hf\",\n", + " \"endpoint\": datastore_endpoint\n", "}" ] },