|
121 | 121 | "start_time": "2025-11-11T03:49:36.477856Z" |
122 | 122 | }, |
123 | 123 | "execution": { |
124 | | - "iopub.execute_input": "2025-11-19T02:04:58.148100Z", |
125 | | - "iopub.status.busy": "2025-11-19T02:04:58.148100Z", |
126 | | - "iopub.status.idle": "2025-11-19T02:04:58.159755Z", |
127 | | - "shell.execute_reply": "2025-11-19T02:04:58.159755Z" |
| 124 | + "iopub.execute_input": "2025-11-19T09:29:28.778980Z", |
| 125 | + "iopub.status.busy": "2025-11-19T09:29:28.778980Z", |
| 126 | + "iopub.status.idle": "2025-11-19T09:29:28.788590Z", |
| 127 | + "shell.execute_reply": "2025-11-19T09:29:28.788590Z" |
128 | 128 | } |
129 | 129 | }, |
130 | 130 | "outputs": [ |
|
133 | 133 | "output_type": "stream", |
134 | 134 | "text": [ |
135 | 135 | "\"\"\"\n", |
136 | | - "This is an example minimal Synthorus spec file.\n", |
| 136 | + "This is an example simple Synthorus spec file.\n", |
137 | 137 | "\"\"\"\n", |
138 | 138 | "from synthorus.spec_file.keys import *\n", |
139 | 139 | "\n", |
140 | 140 | "spec = {\n", |
141 | | - " # default for all random variables\n", |
142 | | - " states: infer_distinct,\n", |
| 141 | + " sensitivity: 0, # no data is sensitive data\n", |
| 142 | + " min_cell_size: 0, # no data will be redacted\n", |
| 143 | + "\n", |
| 144 | + " states: infer_distinct, # default for all random variables\n", |
143 | 145 | "\n", |
144 | 146 | " datasources: {\n", |
145 | 147 | " 'xyz': {\n", |
146 | 148 | " data_format: csv,\n", |
147 | | - " sensitivity: 0,\n", |
148 | 149 | " inline: \"\"\"\n", |
149 | 150 | " X,Y,Z\n", |
150 | 151 | " y,y,y\n", |
|
189 | 190 | "start_time": "2025-11-11T03:49:36.499060Z" |
190 | 191 | }, |
191 | 192 | "execution": { |
192 | | - "iopub.execute_input": "2025-11-19T02:04:58.161814Z", |
193 | | - "iopub.status.busy": "2025-11-19T02:04:58.161814Z", |
194 | | - "iopub.status.idle": "2025-11-19T02:04:58.383525Z", |
195 | | - "shell.execute_reply": "2025-11-19T02:04:58.383525Z" |
| 193 | + "iopub.execute_input": "2025-11-19T09:29:28.790595Z", |
| 194 | + "iopub.status.busy": "2025-11-19T09:29:28.790595Z", |
| 195 | + "iopub.status.idle": "2025-11-19T09:29:29.013056Z", |
| 196 | + "shell.execute_reply": "2025-11-19T09:29:29.013056Z" |
196 | 197 | } |
197 | 198 | }, |
198 | 199 | "outputs": [ |
|
203 | 204 | "{\n", |
204 | 205 | " \"name\": \"spec_tiny\",\n", |
205 | 206 | " \"author\": \"_unknown_\",\n", |
206 | | - " \"comment\": \"This is an example minimal Synthorus spec file.\",\n", |
| 207 | + " \"comment\": \"This is an example simple Synthorus spec file.\",\n", |
207 | 208 | " \"roots\": [],\n", |
208 | 209 | " \"rng_n\": 4,\n", |
209 | 210 | " \"datasources\": {\n", |
|
232 | 233 | " }\n", |
233 | 234 | " },\n", |
234 | 235 | " \"rvs\": {\n", |
235 | | - " \"Y\": {\n", |
| 236 | + " \"X\": {\n", |
236 | 237 | " \"states\": \"infer_distinct\",\n", |
237 | 238 | " \"ensure_none\": false\n", |
238 | 239 | " },\n", |
239 | | - " \"X\": {\n", |
| 240 | + " \"Y\": {\n", |
240 | 241 | " \"states\": \"infer_distinct\",\n", |
241 | 242 | " \"ensure_none\": false\n", |
242 | 243 | " },\n", |
|
246 | 247 | " }\n", |
247 | 248 | " },\n", |
248 | 249 | " \"crosstabs\": {\n", |
249 | | - " \"_Y\": {\n", |
| 250 | + " \"_X\": {\n", |
250 | 251 | " \"rvs\": [\n", |
251 | | - " \"Y\"\n", |
| 252 | + " \"X\"\n", |
252 | 253 | " ],\n", |
253 | 254 | " \"datasource\": \"xyz\",\n", |
254 | 255 | " \"epsilon\": 0.1,\n", |
255 | | - " \"min_cell_size\": 5.0,\n", |
| 256 | + " \"min_cell_size\": 0.0,\n", |
256 | 257 | " \"max_add_rows\": 1000000\n", |
257 | 258 | " },\n", |
258 | | - " \"_X\": {\n", |
| 259 | + " \"_Y\": {\n", |
259 | 260 | " \"rvs\": [\n", |
260 | | - " \"X\"\n", |
| 261 | + " \"Y\"\n", |
261 | 262 | " ],\n", |
262 | 263 | " \"datasource\": \"xyz\",\n", |
263 | 264 | " \"epsilon\": 0.1,\n", |
264 | | - " \"min_cell_size\": 5.0,\n", |
| 265 | + " \"min_cell_size\": 0.0,\n", |
265 | 266 | " \"max_add_rows\": 1000000\n", |
266 | 267 | " },\n", |
267 | 268 | " \"_Z\": {\n", |
|
270 | 271 | " ],\n", |
271 | 272 | " \"datasource\": \"xyz\",\n", |
272 | 273 | " \"epsilon\": 0.1,\n", |
273 | | - " \"min_cell_size\": 5.0,\n", |
| 274 | + " \"min_cell_size\": 0.0,\n", |
274 | 275 | " \"max_add_rows\": 1000000\n", |
275 | 276 | " }\n", |
276 | 277 | " },\n", |
|
280 | 281 | " \"count_field_name\": \"_count_\",\n", |
281 | 282 | " \"foreign_field_name\": null,\n", |
282 | 283 | " \"fields\": {\n", |
283 | | - " \"Y\": {\n", |
284 | | - " \"type\": \"sample\",\n", |
285 | | - " \"rv_name\": \"Y\"\n", |
286 | | - " },\n", |
287 | 284 | " \"X\": {\n", |
288 | 285 | " \"type\": \"sample\",\n", |
289 | 286 | " \"rv_name\": \"X\"\n", |
290 | 287 | " },\n", |
| 288 | + " \"Y\": {\n", |
| 289 | + " \"type\": \"sample\",\n", |
| 290 | + " \"rv_name\": \"Y\"\n", |
| 291 | + " },\n", |
291 | 292 | " \"Z\": {\n", |
292 | 293 | " \"type\": \"sample\",\n", |
293 | 294 | " \"rv_name\": \"Z\"\n", |
|
353 | 354 | "start_time": "2025-11-11T03:49:37.115213Z" |
354 | 355 | }, |
355 | 356 | "execution": { |
356 | | - "iopub.execute_input": "2025-11-19T02:04:58.385530Z", |
357 | | - "iopub.status.busy": "2025-11-19T02:04:58.385530Z", |
358 | | - "iopub.status.idle": "2025-11-19T02:04:58.389623Z", |
359 | | - "shell.execute_reply": "2025-11-19T02:04:58.389623Z" |
| 357 | + "iopub.execute_input": "2025-11-19T09:29:29.015061Z", |
| 358 | + "iopub.status.busy": "2025-11-19T09:29:29.015061Z", |
| 359 | + "iopub.status.idle": "2025-11-19T09:29:29.019192Z", |
| 360 | + "shell.execute_reply": "2025-11-19T09:29:29.019192Z" |
360 | 361 | } |
361 | 362 | }, |
362 | 363 | "outputs": [ |
|
393 | 394 | "start_time": "2025-11-11T03:49:37.127892Z" |
394 | 395 | }, |
395 | 396 | "execution": { |
396 | | - "iopub.execute_input": "2025-11-19T02:04:58.391628Z", |
397 | | - "iopub.status.busy": "2025-11-19T02:04:58.391628Z", |
398 | | - "iopub.status.idle": "2025-11-19T02:04:59.073992Z", |
399 | | - "shell.execute_reply": "2025-11-19T02:04:59.073992Z" |
| 397 | + "iopub.execute_input": "2025-11-19T09:29:29.021198Z", |
| 398 | + "iopub.status.busy": "2025-11-19T09:29:29.021198Z", |
| 399 | + "iopub.status.idle": "2025-11-19T09:29:29.686709Z", |
| 400 | + "shell.execute_reply": "2025-11-19T09:29:29.686709Z" |
400 | 401 | } |
401 | 402 | }, |
402 | 403 | "outputs": [ |
|
432 | 433 | "from synthorus_demos.utils.file_helper import print_file_tree\n", |
433 | 434 | "from synthorus.workflows.make_model_definition_files import make_model_definition_files\n", |
434 | 435 | "\n", |
435 | | - "with output_directory('my_model_definition_files') as model_definition_dir:\n", |
| 436 | + "with output_directory('my_model_definition_files', overwrite=True) as model_definition_dir:\n", |
436 | 437 | "\n", |
437 | | - " make_model_definition_files(model_spec, model_definition_dir, overwrite=True, log=NO_LOG)\n", |
| 438 | + " make_model_definition_files(model_spec, model_definition_dir, log=NO_LOG)\n", |
438 | 439 | "\n", |
439 | 440 | " # Show what files got created\n", |
440 | 441 | " print('-------------------------------------------')\n", |
|
0 commit comments