|
19 | 19 | "- **Access an evaluation report** on the quality and privacy of the synthetic data" |
20 | 20 | ] |
21 | 21 | }, |
22 | | - { |
23 | | - "cell_type": "code", |
24 | | - "execution_count": null, |
25 | | - "id": "a538526a", |
26 | | - "metadata": {}, |
27 | | - "outputs": [], |
28 | | - "source": [] |
29 | | - }, |
30 | 22 | { |
31 | 23 | "cell_type": "markdown", |
32 | 24 | "id": "8be84f5d", |
|
37 | 29 | "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." |
38 | 30 | ] |
39 | 31 | }, |
| 32 | + { |
| 33 | + "cell_type": "code", |
| 34 | + "execution_count": null, |
| 35 | + "id": "a538526a", |
| 36 | + "metadata": { |
| 37 | + "tags": [ |
| 38 | + "parameters" |
| 39 | + ] |
| 40 | + }, |
| 41 | + "outputs": [], |
| 42 | + "source": [ |
| 43 | + "# Update as appropriate to your installation URLs\n", |
| 44 | + "base_url = \"http://localhost:8080\"\n", |
| 45 | + "datastore_endpoint = \"http://localhost:3000/v1/hf\"" |
| 46 | + ] |
| 47 | + }, |
40 | 48 | { |
41 | 49 | "cell_type": "code", |
42 | 50 | "execution_count": null, |
|
46 | 54 | "source": [ |
47 | 55 | "import pandas as pd\n", |
48 | 56 | "from nemo_microservices import NeMoMicroservices\n", |
49 | | - "from nemo_microservices.beta.safe_synthesizer.builder import SafeSynthesizerBuilder\n", |
| 57 | + "from nemo_microservices.beta.safe_synthesizer.sdk.job_builder import SafeSynthesizerJobBuilder\n", |
50 | 58 | "\n", |
51 | 59 | "import logging\n", |
52 | 60 | "\n", |
|
74 | 82 | "outputs": [], |
75 | 83 | "source": [ |
76 | 84 | "client = NeMoMicroservices(\n", |
77 | | - " base_url=\"http://localhost:8080\",\n", |
| 85 | + " base_url=base_url\n", |
78 | 86 | ")" |
79 | 87 | ] |
80 | 88 | }, |
|
94 | 102 | "outputs": [], |
95 | 103 | "source": [ |
96 | 104 | "datastore_config = {\n", |
97 | | - " \"endpoint\": \"http://localhost:3000/v1/hf\",\n", |
| 105 | + " \"endpoint\": datastore_endpoint\n", |
98 | 106 | "}" |
99 | 107 | ] |
100 | 108 | }, |
|
155 | 163 | "source": [ |
156 | 164 | "## 🏗️ Create a Safe Synthesizer job\n", |
157 | 165 | "\n", |
158 | | - "The `SafeSynthesizerBuilder` provides a fluent interface to configure and submit jobs.\n", |
| 166 | + "The `SafeSynthesizerJobBuilder` provides a fluent interface to configure and submit jobs.\n", |
159 | 167 | "\n", |
160 | 168 | "This job will:\n", |
161 | 169 | "- Initialize the builder with the NeMo Microservices client.\n", |
|
175 | 183 | "outputs": [], |
176 | 184 | "source": [ |
177 | 185 | "job = (\n", |
178 | | - " SafeSynthesizerBuilder(client)\n", |
179 | | - " .from_data_source(df)\n", |
| 186 | + " SafeSynthesizerJobBuilder(client)\n", |
| 187 | + " .with_data_source(df)\n", |
180 | 188 | " .with_datastore(datastore_config)\n", |
181 | 189 | " .with_replace_pii()\n", |
182 | 190 | " .with_differential_privacy(dp_enabled=True, epsilon=8.0)\n", |
|
0 commit comments