|
106 | 106 | { |
107 | 107 | "metadata": {}, |
108 | 108 | "cell_type": "markdown", |
109 | | - "source": "**User variables**: should be checked and supplied at each execution. This cell will create a user_config.py file, please modify the values of the file created and not those here", |
| 109 | + "source": [ |
| 110 | + "**User variables**: should be checked and supplied at each execution. This cell will create a user_config.py file. Please modify the variable values by editing the user_config.py file after it is created.\n", |
| 111 | + "\n", |
| 112 | + "⚠️ We strongly advise you not to modify the values directly in this cell in order to avoid conflicts when updating the notebook." |
| 113 | + ], |
110 | 114 | "id": "dd7f54bce66f9e9f" |
111 | 115 | }, |
112 | 116 | { |
|
134 | 138 | "LICENSE_PATH = Path('~/PATH/LICENSE_NAME.txt').expanduser() # Your pipeline license path, will be copied into VIP input_dirs automatically\n", |
135 | 139 | "\"\"\"\n", |
136 | 140 | "\n", |
137 | | - "CONFIG_PATH.write_text(user_config)" |
| 141 | + "if CONFIG_PATH.exists():\n", |
| 142 | + " answer = input(\"The user_config.py file already exists. Overwrite config ? (y/N): \")\n", |
| 143 | + " if answer != \"y\":\n", |
| 144 | + " print(\"File not created, as user_config.py already exists.\")\n", |
| 145 | + " else:\n", |
| 146 | + " CONFIG_PATH.write_text(user_config)\n", |
| 147 | + " print(\"User_config.py overwritten with default values.\")\n", |
| 148 | + "else:\n", |
| 149 | + " CONFIG_PATH.write_text(user_config)\n", |
| 150 | + " print(\"User_config.py created with default values.\")\n" |
138 | 151 | ], |
139 | 152 | "id": "c7f8787950ccc948", |
140 | 153 | "outputs": [], |
|
316 | 329 | "}\n", |
317 | 330 | "\n", |
318 | 331 | "session = VipSession.init(\n", |
319 | | - " api_key=VIP_KEY,\n", |
| 332 | + " api_key=cfg.VIP_KEY,\n", |
320 | 333 | " input_dir=str(cfg.LOCAL_DATASET_PATH),\n", |
321 | 334 | " output_dir= str(FS_CROSS_OUTPUT_DIR),\n", |
322 | 335 | " pipeline_id=PIPELINE_ALL_ID,\n", |
|
343 | 356 | "cell_type": "code", |
344 | 357 | "source": [ |
345 | 358 | "# Connect back to session if needed\n", |
346 | | - "VipSession.init(api_key=VIP_KEY)\n", |
| 359 | + "VipSession.init(api_key=cfg.VIP_KEY)\n", |
347 | 360 | "session = VipSession(output_dir=str(FS_CROSS_OUTPUT_DIR))\n", |
348 | 361 | "\n", |
349 | 362 | "# Download outputs to the output_dir\n", |
|
483 | 496 | "}\n", |
484 | 497 | "\n", |
485 | 498 | "session = VipSession.init(\n", |
486 | | - " api_key=VIP_KEY,\n", |
| 499 | + " api_key=cfg.VIP_KEY,\n", |
487 | 500 | " input_dir=str(FS_BASE_INPUT_DIR),\n", |
488 | 501 | " output_dir= str(FS_BASE_OUTPUT_DIR),\n", |
489 | 502 | " pipeline_id=PIPELINE_BASE_ID,\n", |
|
510 | 523 | "cell_type": "code", |
511 | 524 | "source": [ |
512 | 525 | "# Connect back to session if needed\n", |
513 | | - "VipSession.init(api_key=VIP_KEY)\n", |
| 526 | + "VipSession.init(api_key=cfg.VIP_KEY)\n", |
514 | 527 | "session = VipSession(output_dir=str(FS_BASE_OUTPUT_DIR))\n", |
515 | 528 | "\n", |
516 | 529 | "# Download outputs to the output_dir\n", |
|
596 | 609 | "print(f\"Submitting {len(subjects)} LONG jobs for subjects: {', '.join(subjects)}\")\n", |
597 | 610 | "\n", |
598 | 611 | "session = VipSession.init(\n", |
599 | | - " api_key=VIP_KEY,\n", |
| 612 | + " api_key=cfg.VIP_KEY,\n", |
600 | 613 | " input_dir=str(FS_BASE_OUTPUT_DIR.parent), # LONG pipeline uses data from BASE inputs and outputs\n", |
601 | 614 | " output_dir=str(FS_LONG_OUTPUT_DIR),\n", |
602 | 615 | " pipeline_id=PIPELINE_LONG_ID,\n", |
|
623 | 636 | "cell_type": "code", |
624 | 637 | "source": [ |
625 | 638 | "# Connect back to session if needed\n", |
626 | | - "VipSession.init(api_key=VIP_KEY)\n", |
| 639 | + "VipSession.init(api_key=cfg.VIP_KEY)\n", |
627 | 640 | "session = VipSession(output_dir=str(FS_LONG_OUTPUT_DIR))\n", |
628 | 641 | "\n", |
629 | 642 | "# Download outputs to the output_dir\n", |
|
0 commit comments