diff --git a/workshop/antora-playbook.yml b/workshop/antora-playbook.yml index 9f8b74a..f72fb3a 100644 --- a/workshop/antora-playbook.yml +++ b/workshop/antora-playbook.yml @@ -9,6 +9,9 @@ asciidoc: attributes: release-version: master page-pagination: true + deliverable: workshop + productname-long: Red Hat OpenShift Data Science + productname-short: RHODS extensions: - ./lib/tab-block.js - ./lib/remote-include-processor.js diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/deploy-model-form.png b/workshop/docs/modules/ROOT/assets/images/model-serving/deploy-model-form.png index 3e5f7f8..ec42c47 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/model-serving/deploy-model-form.png and b/workshop/docs/modules/ROOT/assets/images/model-serving/deploy-model-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-add.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-add.png index 6977622..715a7c1 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-add.png and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-add.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-url.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-url.png index d8bfbb5..6754500 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-url.png and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-url.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-deploy.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-deploy.png index 5ce7268..c3d5515 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-deploy.png and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-deploy.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/jupyter-notebook-2.png b/workshop/docs/modules/ROOT/assets/images/model-serving/jupyter-notebook-2.png index 192904b..90fd6e4 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/model-serving/jupyter-notebook-2.png and b/workshop/docs/modules/ROOT/assets/images/model-serving/jupyter-notebook-2.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/wb-notebook-requests.png b/workshop/docs/modules/ROOT/assets/images/model-serving/wb-notebook-requests.png index 13d49a7..cc6ca5c 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/model-serving/wb-notebook-requests.png and b/workshop/docs/modules/ROOT/assets/images/model-serving/wb-notebook-requests.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/notebook-nav-folder.png b/workshop/docs/modules/ROOT/assets/images/notebook-nav-folder.png deleted file mode 100644 index 3adcd00..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/notebook-nav-folder.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/notebook-nav-select.png b/workshop/docs/modules/ROOT/assets/images/notebook-nav-select.png deleted file mode 100644 index 447b4e4..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/notebook-nav-select.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-create-run.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-create-run.png deleted file mode 100644 index d4467b3..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-create-run.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-import.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-import.png index 7bb07ea..76c56e0 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-import.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-import.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-button.png deleted file mode 100644 index 32497cc..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-button.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-upload.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-upload.png index 1d12ad1..c225667 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-upload.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-upload.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-create-run-form.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-create-run-form.png index ca8d5d1..cca14a0 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-create-run-form.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-create-run-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-complete.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-complete.png index d588c81..03db480 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-complete.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-complete.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-create-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-create-button.png deleted file mode 100644 index 6c1c9d0..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-create-button.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-in-progress.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-in-progress.png index 0c1d4ea..78a8bd4 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-in-progress.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-in-progress.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-launcher-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-launcher-button.png deleted file mode 100644 index 60ed22a..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-launcher-button.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-add-kube-secret.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-add-kube-secret.png index a66f783..571ee4e 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-add-kube-secret.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-add-kube-secret.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-blank.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-blank.png deleted file mode 100644 index 2c63f8c..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-blank.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-complete.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-complete.png deleted file mode 100644 index aaf0f75..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-complete.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-drag-drop.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-drag-drop.png index 890d5af..55e6352 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-drag-drop.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-drag-drop.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-launcher.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-launcher.png index 56cb62f..7834ec6 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-launcher.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-launcher.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-add-output.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-add-output.png deleted file mode 100644 index 3af2368..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-add-output.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep-form.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep-form.png index 907e6c7..635af59 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep-form.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep.png index dba6c77..afa1fb6 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-remove-env-var.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-remove-env-var.png index 3417405..aef0890 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-remove-env-var.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-remove-env-var.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-output.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-output.png deleted file mode 100644 index b7f0406..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-output.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button-loc.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button-loc.png index b8d98de..ac1788f 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button-loc.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button-loc.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button.png deleted file mode 100644 index 7da85e6..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-properties-tab.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-properties-tab.png index 12fd03a..7a8e1d5 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-properties-tab.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-properties-tab.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run.png index 1c40859..b830b3a 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime-image.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime-image.png index c97faac..800ad00 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime-image.png and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime-image.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime.png deleted file mode 100644 index 2681d5e..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-secret.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-secret.png deleted file mode 100644 index 274bcdd..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-secret.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/create-project-button.png b/workshop/docs/modules/ROOT/assets/images/projects/create-project-button.png deleted file mode 100644 index b2c0e77..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/create-project-button.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-click-projects.png b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-click-projects.png index 4defc23..74db445 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-click-projects.png and b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-click-projects.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-enabled.png b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-enabled.png index 8b719c2..1f29e12 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-enabled.png and b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-enabled.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-explore.png b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-explore.png new file mode 100644 index 0000000..b91b128 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-explore.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-projects.png b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-projects.png deleted file mode 100644 index edd779d..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-projects.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-console-ocp-tile.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-console-ocp-tile.png index b88521f..aa7e99c 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-console-ocp-tile.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-console-ocp-tile.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-add-dc.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-add-dc.png index 3ac52a0..a7e9440 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-add-dc.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-add-dc.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-form.png index cf2173c..f576091 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-form.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server.png index 80e3f0d..5dd5c65 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-list-resource-hover.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-list-resource-hover.png index e0ae15f..49d3e66 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-list-resource-hover.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-list-resource-hover.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-my-storage-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-my-storage-form.png index b670451..af0a7f8 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-my-storage-form.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-my-storage-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form-resource.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form-resource.png deleted file mode 100644 index 9211315..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form-resource.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form.png index d6d6b51..1a1c4c6 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new.png index 07a6983..d4dd0d1 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-ocp-link.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-ocp-link.png index 24035c4..2e9bbe9 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-ocp-link.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-ocp-link.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-pipeline-artifacts-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-pipeline-artifacts-form.png index 7ba16e9..3e16427 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-pipeline-artifacts-form.png and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-pipeline-artifacts-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-icon.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-icon.png index 28f03d0..0b92c2a 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-icon.png and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-icon.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-resource.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-resource.png deleted file mode 100644 index 0ac0edd..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-resource.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-ds-tile.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-ds-tile.png index d2b9208..d0b8cc5 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-ds-tile.png and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-ds-tile.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-project-selected.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-project-selected.png index e728b0d..602340a 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-project-selected.png and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-project-selected.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-select-project.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-select-project.png index 7d9de56..51bc376 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-select-project.png and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-select-project.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/project.png b/workshop/docs/modules/ROOT/assets/images/projects/project.png deleted file mode 100644 index 1a9b1a9..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/projects/project.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-env-storage.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-env-storage.png index 1fc6ecf..7bc76bc 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-env-storage.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-env-storage.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-name-desc.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-name-desc.png index c37b637..4e1b34c 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-name-desc.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-name-desc.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-size.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-size.png index f54f69f..afc0a30 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-size.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-size.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form.png deleted file mode 100644 index e77b0c3..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-create-workbench.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-create-workbench.png index 0dcf09f..32c9589 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-create-workbench.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-create-workbench.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-stop.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-stop.png deleted file mode 100644 index 4350871..0000000 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-stop.png and /dev/null differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-open.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-open.png index cd4dd4c..d4c31df 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-open.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-open.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser-2.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser-2.png index cc75409..46943b1 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser-2.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser-2.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser.png index 79f0e4e..a2ff68d 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-modal.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-modal.png index 0acfaac..18234bd 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-modal.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-modal.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-0.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-0.png index 5ea64cd..ac2b0e1 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-0.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-0.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-1.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-1.png index 4097d7f..bb26ade 100644 Binary files a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-1.png and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-1.png differ diff --git a/workshop/docs/modules/ROOT/nav.adoc b/workshop/docs/modules/ROOT/nav.adoc index 74f2bb0..3a769b9 100644 --- a/workshop/docs/modules/ROOT/nav.adoc +++ b/workshop/docs/modules/ROOT/nav.adoc @@ -1,23 +1,23 @@ * 1. Projects -** xref:1-01-dashboard.adoc[1. The Dashboard] -** xref:1-02-project-setup.adoc[2. Data Science Projects] -** xref:1-03-data-connections.adoc[3. Storage Data Connections] -*** xref:1-03-01-data-connections-manual.adoc[1. Manual] -*** xref:1-03-02-data-connections-script.adoc[2. Scripted Local] -** xref:1-04-enable-pipelines.adoc[4. Enable Pipelines] +** xref:navigating-to-the-dashboard.adoc[1. The Dashboard] +** xref:setting-up-your-data-science-project.adoc[2. Data Science Projects] +** xref:storing-data-with-data-connections.adoc[3. Storage Data Connections] +*** xref:creating-data-connections-to-storage.adoc[1. Manual] +*** xref:running-a-script-to-install-storage.adoc[2. Scripted Local] +** xref:enabling-data-science-pipelines.adoc[4. Enable Pipelines] * 2. Workbenches -** xref:2-01-create-workbench.adoc[1. Create a Workbench] -** xref:2-02-jupyter-env.adoc[2. Jupyter] -** xref:2-03-notebooks.adoc[3. Notebooks] -** xref:2-04-experiment-train.adoc[4. Training a Model] +** xref:creating-a-workbench.adoc[1. Create a Workbench] +** xref:importing-files-into-jupyter.adoc[2. Jupyter] +** xref:running-code-in-a-notebook.adoc[3. Notebooks] +** xref:training-a-data-model.adoc[4. Training a Model] * 3. Model Serving -** xref:3-01-save-model.adoc[1. Saving the Model] -** xref:3-02-deploy-model.adoc[2. Deploy the Model] -** xref:3-03-model-api.adoc[3. Using the API] -// ** xref:3-04-calling-from-application.adoc[4. Calling from an Application] +** xref:preparing-a-data-model-for-deployment.adoc[1. Saving the Model] +** xref:deploying-a-data-model.adoc[2. Deploy the Model] +** xref:testing-the-model-api.adoc[3. Using the API] * 4. Data Science Pipelines -** xref:4-01-gui-pipelines.adoc[1. Workbench Pipeline Editor] -** xref:4-02-sdk-pipelines.adoc[2. Python Pipelines] \ No newline at end of file +// ** xref:enabling-data-science-pipelines.adoc[1. Enable Pipelines] +** xref:automating-workflows-with-pipelines.adoc[1. Workbench Pipeline Editor] +** xref:running-a-pipeline-generated-from-python-code.adoc[2. Python Pipelines] diff --git a/workshop/docs/modules/ROOT/pages/1-01-dashboard.adoc b/workshop/docs/modules/ROOT/pages/1-01-dashboard.adoc deleted file mode 100644 index 416c2ad..0000000 --- a/workshop/docs/modules/ROOT/pages/1-01-dashboard.adoc +++ /dev/null @@ -1,31 +0,0 @@ -= 1.1 Navigating The Dashboard - -include::_attributes.adoc[] - -xref:index.adoc[Back to the introduction] - -== The OpenShift Data Science Dashboard - -include::_attributes.adoc[] - -NOTE: We're going to refer to _Red Hat OpenShift Data Science_ as _RHODS_ throughout this workshop. - -After logging into the OpenShift Web Console, you should see the OpenShift Data Science Dashboard as a tile in the top right-hand corner. You'll be prompted to log in to the OpenShift Data Science Dashboard using the Developer Sandbox authentication. - -image::projects/ocp-console-ds-tile.png[Data Science Dashboard link] - -If you are prompted to log in using OpenShift, please go ahead and do so. RHODS will use the same credentials as OpenShift for the dashboard, notebooks, and all other components. - -image::projects/login-with-openshift.png[OpenShift Login, 300] - -At the OpenShift Data Science Dashboard, you can see the status of any installed and enabled applications as well as *Explore* other available application integrations. - -image::projects/dashboard-enabled.png[Dashboard Enabled] - -== Navigating to the OCP console - -You can navigate back to the OpenShift console in a similar fashion. Simply click on the application switcher to access the OCP console. - -image::projects/ds-console-ocp-tile.png[OCP Console Link] - -For now, let's stay in the RHODS Dashboard. Now that you are logged into to *Red Hat OpenShift Data Science*, we can move on to creating a project. diff --git a/workshop/docs/modules/ROOT/pages/1-02-project-setup.adoc b/workshop/docs/modules/ROOT/pages/1-02-project-setup.adoc deleted file mode 100644 index b1a3b3d..0000000 --- a/workshop/docs/modules/ROOT/pages/1-02-project-setup.adoc +++ /dev/null @@ -1,42 +0,0 @@ -= 1.2 Setting up your Data Science Project - -include::_attributes.adoc[] - -xref:index.adoc[Back to the introduction] - -== The OpenShift Data Science Dashboard - -You should be logged into *Red Hat OpenShift Data Science*, and be able to see the dashboard, that looks like this: - -image::projects/dashboard-enabled.png[Dashboard Enabled] - -You could start a Jupyter notebook from here, but it would be a one-off notebook run in isolation. To do data science as part of a workflow, we need to create a data science project. Projects allow you and your team to organize and collaborate on resources within separated namespaces. From a project you can create multiple workbenches, each with their own Jupyter notebook environment, and each with their own data connections and cluster storage. In addition, they can share models and data with pipelines and model servers. - -* Navigate to *Data Science Projects* in the left menu. Here you can see the list of existing projects that you have access to. - -image::projects/dashboard-click-projects.png[Data Science Projects List] - -From here, you can select an existing project, or create a new one. If you already have an active project you'd like to use, select it now and skip ahead to the xref:1-03-data-connections.adoc[next section]. Otherwise, let's create a new project. - - -* Click *Create data science project*. - -image::projects/create-project-button.png[Create proejct button] - -* Enter a user friendly display name and description. It will automatically generate a resource name, but you can change it if you'd like. - -image::projects/ds-project-new-form.png[New DS Project Form] - -* You can now see its initial state. There are five types of Project resources: - -image::projects/ds-project-new.png[New DS Project] - -** *Workbenches* are instances of your development and experimentation environment. They typically contain IDEs such as JupyterLab, RStudio and Visual Studio Code. - -** A *Cluster storage* is a volume that persists the files and data you're working on within a workbench. A workbench has access to one or more cluster storage instances. - -** *Data connections* contain configuration parameters that are required to connect to a data source such as an S3 object bucket. - -** *Pipelines* contain the Data Science Pipelines that have been executed within the Project. - -** *Models and model servers* allow you to quickly serve a trained model for real-time inference. You can have multiple model servers per Project, and one model server can host multiple models. diff --git a/workshop/docs/modules/ROOT/pages/1-03-01-data-connections-manual.adoc b/workshop/docs/modules/ROOT/pages/1-03-01-data-connections-manual.adoc deleted file mode 100644 index 90de88d..0000000 --- a/workshop/docs/modules/ROOT/pages/1-03-01-data-connections-manual.adoc +++ /dev/null @@ -1,37 +0,0 @@ -= 1.3.1 Creating a Data Connection - -include::_attributes.adoc[] - -xref:index.adoc[Back to the introduction] - -NOTE: If you do not have your own s3 compatible storage, or wish to use a disposable local Minio instance, skip this page and use an automated script to *install object storage locally* for the purposes of this workshop: xref:1-03-02-data-connections-script.adoc[Scripted Local Installation] - -== Data Connections - -Let's create a data connection to your S3 compatible storage bucket. For this you will need all the credential info including the endpoint URL, access key, secret key, region, and bucket name. If you don't have this information, please contact your storage administrator. - -* Click *Add data connection* to open the form. - -image::projects/ds-project-add-dc.png[Add Data Connection] - -* Fill out the form and name your connection `My Storage`. This will be used to save your personal work, including data and models. - -image::projects/ds-project-my-storage-form.png[Add My Storage Form] - -* Click *Add data connection* to save and close. - -Repeat for the pipeline artifacts connection. - -NOTE: If you do not intend to complete the pipelines section of the workshop you can skip this step to add the pipeline artifacts connection. - -* Click *Add data connection* to open the form. - -* Fill out the form and name your connection `Pipeline Artifacts`. This will be where pipeline servers save artifacts. While necessary to run pipelines, we will not be exploring artifacts in this demo. - -image::projects/ds-project-pipeline-artifacts-form.png[Add Pipeline Artifacts Form] - -* Click *Add data connection* to save and close. - -Now you should see your data connections listed in the project. - -image::projects/ds-project-dc-list.png[] diff --git a/workshop/docs/modules/ROOT/pages/1-03-02-data-connections-script.adoc b/workshop/docs/modules/ROOT/pages/1-03-02-data-connections-script.adoc deleted file mode 100644 index 336abf3..0000000 --- a/workshop/docs/modules/ROOT/pages/1-03-02-data-connections-script.adoc +++ /dev/null @@ -1,95 +0,0 @@ -= 1.3.2 Scripted Data Connection Installation - -include::_attributes.adoc[] - -xref:index.adoc[Back to the introduction] - - -NOTE: This script will install two data connections and two Minio buckets as s3 compatible storage into your data science project for convenience. These are *not* meant for production usage. It is based on the instructions for installing Minio in this https://ai-on-openshift.io/tools-and-applications/minio/minio/[guide]. It will create a random user and password for security. If you wish to connect to your own storage, please refer to these instructions: xref:1-03-01-data-connections-manual.adoc[Manually Adding Data Connections] - -== Finding the OpenShift Project Name - -We're going to want to update the project we created in the previous section. To do that, we need to navigate to the project in the OpenShift Console. First, we must take note of the project resource name when we created it. - -image::projects/ds-project-new-form-resource.png[New Project Form Resource Name] - -You can also find the resource name on your list of projects by hovering over the *?* icon next to the project name. - -image::projects/ds-project-list-resource-hover.png[Project List Resource Name] - - -== Navigate to the OpenShift Project - -NOTE: This section details how to start an OpenShift job to install the s3 compatible storage and associated data connection secrets. If you are knowledgeable in OpenShift and can access the cluster from the command line, you can simply execute `oc apply -n -f https://github.com/cfchase/fraud-detection-notebooks/raw/main/setup/setup-s3.yaml`. - -Now that we have the resource name, we can navigate to the project in the OpenShift Console. Click on the *OpenShift Console* link in the application switcher top right corner of the OpenShift Web Console. - -image::projects/ds-project-ocp-link.png[OpenShift Console Link] - -* Click the *+* icon in the navbar to create new resources. - -image::projects/ocp-console-add-icon.png[Add Resources Icon] - -* Select your project from the list of projects and verify the correct project is now listed. - -image::projects/ocp-console-select-project.png[Select Project] - -image::projects/ocp-console-project-selected.png[Project Selected] - -[.lines_space] -[.console-input] -[source, yaml] ----- ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: demo-setup ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: demo-setup-edit -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: edit -subjects: - - kind: ServiceAccount - name: demo-setup ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: create-s3-storage -spec: - selector: {} - template: - spec: - containers: - - args: - - -ec - - |- - echo -n 'Setting up Minio instance and data connections' - oc apply -f https://github.com/cfchase/fraud-detection-notebooks/raw/main/setup/setup-s3-no-sa.yaml - command: - - /bin/bash - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest - imagePullPolicy: IfNotPresent - name: create-s3-storage - restartPolicy: Never - serviceAccount: demo-setup - serviceAccountName: demo-setup ----- - - -== Data Connections - -We will be using S3 compatible object storage, such as Ceph, Minio, or AWS S3, to store the data and models used in this workshop. To access the data and models, we will use a Data Connection, which is a resource that contains the configuration parameters required to connect to an object storage bucket. - -We will need 2 buckets. - -1. *My Storage* - Personal use for models and data. We can reuse that bucket and connection for notebooks and model servers. -2. *Pipelines Artifacts* - This is used as storage for your pipeline artifacts and required when creating a pipeline server. We'll keep it separate from the first bucket for clarity. - -You can choose to use your own object storage and learn how to configure it manually \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/1-03-data-connections.adoc b/workshop/docs/modules/ROOT/pages/1-03-data-connections.adoc deleted file mode 100644 index 885e138..0000000 --- a/workshop/docs/modules/ROOT/pages/1-03-data-connections.adoc +++ /dev/null @@ -1,22 +0,0 @@ -= 1.3 Object Storage with Data Connections - -include::_attributes.adoc[] - -xref:index.adoc[Back to the introduction] - -== Data Connections - -We will be using S3 compatible object storage, such as Ceph, Minio, or AWS S3, to store the data and models used in this workshop. To access the data and models, we will use a Data Connection, which is a resource that contains the configuration parameters required to connect to an object storage bucket. - -We will need 2 buckets. - -1. *My Storage* - Personal use for models and data. We can reuse that bucket and connection for notebooks and model servers. -2. *Pipelines Artifacts* - This is used as storage for your pipeline artifacts and required when creating a pipeline server. We'll keep it separate from the first bucket for clarity. - -You can choose to: - -* Create connections to your own S3 compatible object storage. Click here for instructions on how to do that: xref:1-03-01-data-connections-manual.adoc[Manually Adding Data Connections] - -OR - -* Use an automated script to install object storage locally for the purposes of this workshop: xref:1-03-02-data-connections-script.adoc[Scripted installation of local Minio instance] \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/1-04-enable-pipelines.adoc b/workshop/docs/modules/ROOT/pages/1-04-enable-pipelines.adoc deleted file mode 100644 index 797d348..0000000 --- a/workshop/docs/modules/ROOT/pages/1-04-enable-pipelines.adoc +++ /dev/null @@ -1,28 +0,0 @@ -= 1.4 Enable Data Science Pipelines - -include::_attributes.adoc[] - -xref:index.adoc[Back to the introduction] - -This section will prepare your workspace for Section $ xref:4-01-gui-pipelines.adoc[Data Science Pipelines]. You can do this now to save time later, but you can also skip and return to this section. - -NOTE: If you do not intend to complete the pipelines section of the workshop you can skip this step and move on to the next section, xref:2-01-create-workbench.adoc[Create a Workbench] - -== Create a Pipeline Server - -* Click *Create pipeline server* - -image::projects/ds-project-create-pipeline-server.png[Create pipeline server button] - -* Select the `Pipeline Artifacts` data connection. - -image::projects/ds-project-create-pipeline-server-form.png[Selecting the Pipeline Artifacts data connection] - -* Leave the database configuration as the default. - -* Click *Configure*. - -Pipelines should now be enabled for your project and the *Create pipeline server* button should disappear. - -image::projects/ds-project-create-pipeline-server-complete.png[Create pipeline server complete] - diff --git a/workshop/docs/modules/ROOT/pages/2-01-create-workbench.adoc b/workshop/docs/modules/ROOT/pages/2-01-create-workbench.adoc deleted file mode 100644 index 58aafd5..0000000 --- a/workshop/docs/modules/ROOT/pages/2-01-create-workbench.adoc +++ /dev/null @@ -1,51 +0,0 @@ -= 2.1 Starting a Jupyter environment - -include::_attributes.adoc[] - -NOTE: This section assumes you created a `My Storage` data connection xref:1-03-data-connections.adoc[as described in section 1.3]. - - -== Create a Workbench - -In section 1, we created a data science project. From the project detail page - -* Click the *Create workbench* button. - -image::workbenches/ds-project-create-workbench.png[Create workbench button] - -* Fill out the name and description. - -image::workbenches/create-workbench-form-name-desc.png[Workbench Name and Description, 600] - -Red Hat ships several notebook images that are built and supported. The *Notebook image* section will allow you to choose one of these or any custom images an administrator has set up for you. Today, we'll be using the *Tensorflow* image which has the necessary libraries for this workshop. - -* Choose the latest *Tensorflow* image. - -image::workbenches/create-workbench-form-image.png[Workbench image, 600] - -* Choose a small deployment and no GPUs. We won't need them for this workshop - -image::workbenches/create-workbench-form-size.png[Workbench size,600] - -* Leave the environment variables and storage options as the defaults. - -image::workbenches/create-workbench-form-env-storage.png[Workbench Env Storage, 600] - -* Under *Data connections*, choose to *Use existing data connection* and choose `My Storage` from the dropdown. This will allow us to access the object storage we configured previously. - -image::workbenches/create-workbench-form-data-connection.png[Data Connection, 600] - -* Click the *Create workbench* button. - -image::workbenches/create-workbench-form-button.png[Create workbench button] - -You will be returned to your project while the workbench starts. You'll see the status of the workbench change from `Starting` to `Running` next to the listed workbench. - -image::workbenches/ds-project-workbench-list.png[Workbench list] - - -NOTE: *Editing a Workbench Configuration* if you have made a mistake you can simply stop the workbench and edit it to make changes. - -image::workbenches/ds-project-workbench-list-stop.png[Workbench List Stop] - -image::workbenches/ds-project-workbench-list-edit.png[Workbench List Edit] \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/2-02-jupyter-env.adoc b/workshop/docs/modules/ROOT/pages/2-02-jupyter-env.adoc deleted file mode 100644 index b41628a..0000000 --- a/workshop/docs/modules/ROOT/pages/2-02-jupyter-env.adoc +++ /dev/null @@ -1,40 +0,0 @@ -= 2.2 The Jupyter Environment - -include::_attributes.adoc[] - -== Access your Workbench - -* Click the *Open* link next to your workbench. If prompted, log in and allow the notebook to authorize your user. - -image::workbenches/ds-project-workbench-open.png[Open Workbench] - -== Using Jupyter - -You are now inside your Jupyter environment. As you can see, it's a web-based environment, but everything you'll do here is in fact happening on the *Red Hat OpenShift Data Science*, powered underneath by the *OpenShift* cluster. This means that without having to install and maintain anything on your own computer, and without disposing of lots of local resources like CPU, GPU and RAM, you can still conduct your Data Science work in this powerful and stable managed environment. - -In the "file-browser" like window you're in right now, you'll find the files and folders that are saved inside your own personal space inside *RHODS*. - -It's pretty empty right now though... So the first thing we will do is to bring the content of the workshop inside this environment. - -* On the toolbar, click on the Git icon: - -image::workbenches/jupyter-git-icon.png[Git Icon] - -* Enter the git *https* URL, `https://github.com/cfchase/fraud-detection-notebooks.git`, then click *CLONE*: - -[.lines_space] -[.console-input] -[source,text] ----- -https://github.com/cfchase/fraud-detection-notebooks.git ----- - -image::workbenches/jupyter-git-modal.png[Git Modal] - -* Double-click and navigate to the newly-created folder, `fraud-detection-notebooks`: - -image::workbenches/jupyter-file-browser.png[Jupyter File Browser] - -You should now see the notebooks we've cloned from git in the file browser. - -image::workbenches/jupyter-file-browser-2.png[Jupyter File Browser - fraud-detection-notebooks] diff --git a/workshop/docs/modules/ROOT/pages/2-03-notebooks.adoc b/workshop/docs/modules/ROOT/pages/2-03-notebooks.adoc deleted file mode 100644 index 2fcee24..0000000 --- a/workshop/docs/modules/ROOT/pages/2-03-notebooks.adoc +++ /dev/null @@ -1,49 +0,0 @@ -= 2.3 Working with Notebooks - -include::_attributes.adoc[] - -This section provides a small introduction on how to use Jupyter Notebooks. If you're already at ease with Jupyter, you can xref:2-04-experiment-train.adoc[head to the next section]. - -== What's a notebook? - -* A notebook is an environment where you have _cells_ that can display formatted text, or code. - -This is an empty cell: - -image::workbenches/cell.png[Jupyter Cell] - -And a cell where we have entered some code: - -image::workbenches/cell_code.png[Jupyter Cell Code] - -* Code cells contain Python code that can be run interactively. Thats means you can modify the code, then run it. The code will not run on your computer or in the browser, but directly in the environment you are connected to, *Red Hat OpenShift Data Science* in our case. -* To run a code cell, just select it (click in the cell, or on the left side of it), and click the Run/Play button from the toolbar (you can also press CTRL+Enter to run a cell, or Shift+Enter to run the cell and automatically select the following one). - -The Run button on the toolbar: - -image::workbenches/run_button.png[Jupyter Run] - -Our cell after pressing Run: - -image::workbenches/cell_run.png[Jupyter Run Cell] - -As you can see, you have the result of the code that was run in that cell, as well as information on when this particular cell has been run. - -* When you save a notebook, the code as well as the results are saved! So you can always reopen it to look at the results without having to run all the program again, while still having access to the code. - -Notebooks are so named because they are just like a physical *Notebook*: it's exactly like if you were taking notes about your experiments (which you will do), along with the code itself, including any parameters you set. You see the output of the experiment inline (this is the result from a cell once it's run), along with all the notes you want to take (to do that, switch the cell type from the menu from `Code` to `Markup`). - -== Time to play - -Now that we have covered the basics, just give it a try! - -image::workbenches/jupyter-notebook-0.png[Notebook 0] - -* In your Jupyter environment (the file explorer-like interface), there is file called `0_sandbox.ipynb`. Double-click on it to launch the notebook (it will open another tab in the content section of the environment). Please feel free to experiment, run the cells, add some more and create functions. You can do what you want - it's your environment, and there is no risk of breaking anything or impacting other users. This environment isolation is also a great advantage brought by *RHODS*. -* You can also create a new notebook by selecting *File\->New\->Notebook* from the menu on the top left, then select a Python 3 kernel. This instructs Jupyter that we want to create a new notebook where the code cells will be run using a Python 3 kernel. We could have different kernels, with different languages or versions that we can run into notebooks, but that's a story for another time... -* You can also create a notebook by simply clicking on the icon in the launcher: - -image::workbenches/new_notebook.png[alt text] - -* If you want to learn more about notebooks, head to https://jupyter.org/[the Jupyter site] . - diff --git a/workshop/docs/modules/ROOT/pages/2-04-experiment-train.adoc b/workshop/docs/modules/ROOT/pages/2-04-experiment-train.adoc deleted file mode 100644 index 8094424..0000000 --- a/workshop/docs/modules/ROOT/pages/2-04-experiment-train.adoc +++ /dev/null @@ -1,9 +0,0 @@ -= 2.4 Training a Model - -include::_attributes.adoc[] - -Now that you know how the environment works, the real work can begin! - -Still in you environment, just open the file `1_experiment_train.ipynb`, and follow the instructions directly in the notebook, where you'll do some simple data exploration, experimentation, and train a model. - -image::workbenches/jupyter-notebook-1.png[Jupyter Notebook 1] diff --git a/workshop/docs/modules/ROOT/pages/3-01-save-model.adoc b/workshop/docs/modules/ROOT/pages/3-01-save-model.adoc deleted file mode 100644 index 874e558..0000000 --- a/workshop/docs/modules/ROOT/pages/3-01-save-model.adoc +++ /dev/null @@ -1,23 +0,0 @@ -= 3.4 Fraud Detection - -include::_attributes.adoc[] - - -== Using the Model as an API -Now that you've used a pretrained model for inference, let's deploy that model using the RHODS model serving capabilities. - -In order to do so, we need to move the model from your workbench to our S3 compatible object storage. We'll be using the data connection you created earlier in the section xref:1-03-data-connections.adoc[Storage Data Connections]. We'll simply upload the model from a notebook. - -NOTE: you must have created the data connection `My Storage` *AND* added that data connection to your workbench before you can use it in a notebook. If you missed it, you can edit your workbench and add the data connection now. This will *restart* your workbench with the data connection attached. You *ONLY* need to do this if you missed it the first time. - -image::model-serving/ds-project-workbench-list-edit.png[Workbench Form Edit] - -image::model-serving/create-workbench-form-data-connection.png[Workbench Form Data Connection, 600] - -If your data connection has been set up, you can continue with the next step. - -* In your Jupyter environment, open the file `2_save_model.ipynb`, and follow the instructions in the notebook. - -image::model-serving/jupyter-notebook-2.png[Jupyter Notebook 2] - -At the end of the notebook, you will have uploaded the file `models/fraud/model.onnx` to object storage, ready for your model server to use. diff --git a/workshop/docs/modules/ROOT/pages/3-02-deploy-model.adoc b/workshop/docs/modules/ROOT/pages/3-02-deploy-model.adoc deleted file mode 100644 index 45c57dd..0000000 --- a/workshop/docs/modules/ROOT/pages/3-02-deploy-model.adoc +++ /dev/null @@ -1,56 +0,0 @@ -= 2.2 Deploy the Model - -include::_attributes.adoc[] - -Now that the model is accessible in storage and saved in a portable `onnx` format, we can very easily use a RHODS model server to deploy it as an API. - -We'll complete this workflow in the *RHODS Dashboard*. - -== Create a Model Server - -RHODS multi-model servers can host several models at once. We'll create a new model server and deploy our model to it. - -* In the *Models and model servers* list, click *Add server*. - -image::model-serving/ds-project-model-list-add.png[Add Server] - -In the form: - -* Fill out the *Model server name*. We named ours `Model Server`. - -* Select `OpenVINO Model Server`. - -* Leave other fields (replicas, size, route, auth) as the defaults. - -image::model-serving/create-model-server-form.png[Add Server Form] - -== Deploy a Model - -* In the *Models and model servers* list, next to your new model server, click *Deploy model*. - -image::model-serving/ds-project-workbench-list-deploy.png[Deploy model button] - -In the form: - -* Fill out the *Model Name* with the value `fraud`. - -* Select the server you created (`Model Server`). - -* Select the *Existing data connection* `My Storage` - -* Enter the path to your uploaded model, `models/fraud/model.onnx` - -image::model-serving/deploy-model-form.png[Deploy Model Form] - -* Wait for the model to deploy and wait until the *Status* shows a green checkmark. - -image::model-serving/ds-project-model-list-status.png[Model Status] - -* Take note of the API Endpoint name and URL. We'll use this in the next section. - -image::model-serving/ds-project-model-list-name.png[Model Name] - -image::model-serving/ds-project-model-list-url.png[Model URL] - - - diff --git a/workshop/docs/modules/ROOT/pages/3-03-model-api.adoc b/workshop/docs/modules/ROOT/pages/3-03-model-api.adoc deleted file mode 100644 index a4a70bd..0000000 --- a/workshop/docs/modules/ROOT/pages/3-03-model-api.adoc +++ /dev/null @@ -1,25 +0,0 @@ -= 2.3 Testing the Model API - -include::_attributes.adoc[] - -== API Requests - -Now that we've deployed the model, we can look at the endpoints it created. - -When creating the model server, we did *not* create a route for external access to the API and we did not protect it with an auth token. This created an internal endpoint with no authentication. You found this information about the service and the model by hovering over the *Internal Service* and *?* identifiers for endpoint and model name in the previous section. In the instructions, we named this model `fraud` - -image::model-serving/ds-project-model-list-name.png[Model Name] - -image::model-serving/ds-project-model-list-url.png[Model URL] - -For this internal service, we can access it by communicating directly with the service the same way an application in your project would. One of the easiest way to do test it out, is from a notebook in the same project. - -Let's go back to the Jupyter environment and try out our new endpoint. We'll be trying out REST API calls in `4_rest_requests.ipynb` and gRPC requests in `5_grpc_requests.ipynb`. - -image::model-serving/wb-notebook-requests.png[Request Notebooks] - - - -* - - diff --git a/workshop/docs/modules/ROOT/pages/3-04-calling-from-application.adoc b/workshop/docs/modules/ROOT/pages/3-04-calling-from-application.adoc deleted file mode 100644 index e1918c8..0000000 --- a/workshop/docs/modules/ROOT/pages/3-04-calling-from-application.adoc +++ /dev/null @@ -1,2 +0,0 @@ -= 3.4 Calling the API from an Application - diff --git a/workshop/docs/modules/ROOT/pages/4-01-elyra-pipelines.adoc b/workshop/docs/modules/ROOT/pages/4-01-elyra-pipelines.adoc deleted file mode 100644 index b658d2f..0000000 --- a/workshop/docs/modules/ROOT/pages/4-01-elyra-pipelines.adoc +++ /dev/null @@ -1,2 +0,0 @@ -= 4.1 Elyra Pipeline Editor - diff --git a/workshop/docs/modules/ROOT/pages/4-01-gui-pipelines.adoc b/workshop/docs/modules/ROOT/pages/4-01-gui-pipelines.adoc deleted file mode 100644 index e6c5038..0000000 --- a/workshop/docs/modules/ROOT/pages/4-01-gui-pipelines.adoc +++ /dev/null @@ -1,204 +0,0 @@ -= 4.1 Workbench Pipeline Editor - -include::_attributes.adoc[] - -== Automating with Pipelines - -As you saw in previous sections, you can use notebooks to train and save your models. However, you can also automate these tasks using *Red Hat Data Science Pipelines*. Pipelines offer a way to automate the execution of multiple notebooks, python code, and to schedule them to run. This way, you can execute long training jobs, or retrain your models on a schedule without having to manually run them in a notebook. - -In this first section, we will create a very simple pipeline. We want to train a model and then save it to S3 storage and we'll use the exact same notebooks from the previous sections to do so. - -We will start with a GUI editor right from your workbench. The completed pipeline will look like `6 Train Save.pipeline`. - -== Creating a New Pipeline - -Let's create a new pipeline. Start from you workbench. - -image::pipelines/wb-pipeline-launcher.png[Pipeline Buttons] - -* Open the *Launcher* from the *+* button, if the launcher is not visible - -image::pipelines/wb-launcher-button.png[Launcher Button] - -* Click the *Pipeline Editor* to create a new blank pipeline - -image::pipelines/wb-pipeline-editor-button.png[Pipeline Editor Button] - - -== Setting Pipeline Properties - -Great. You've created a blank pipeline! Let's set some properties for the pipeline and any nodes that are created. We're going to set the default runtime image which will be used to run your notebooks or python code unless otherwise set. - -* Click the *Open Panel* button in the top right corner of the pipeline editor. - -image::pipelines/wb-pipeline-panel-button.png[Open Panel Button] - -image::pipelines/wb-pipeline-panel-button-loc.png[Open Panel] - -* Select the *Pipeline Properties* tab - -image::pipelines/wb-pipeline-properties-tab.png[Pipeline Properties Tab] - -* In the open pipeline properties panel, scroll down to *Generic Node Defaults* and *Runtime Image*. Set the value to `Tensorflow with Cuda and Python 3.9 (UBI 9)` - -image::pipelines/wb-pipeline-runtime-image.png[Pipeline Runtime Image0] - -== Creating Nodes - -So now that the pipeline is set up. Let's add some steps, or *nodes* in our pipeline. Our two nodes will use notebooks `1_experiment_train.ipynb` and `2_save_model.ipynb`. - -* Click in the left filebrowser, and drag the notebooks onto the pipeline canvas. - -image::pipelines/wb-pipeline-drag-drop.png[ Drag and Drop Notebooks] - -* Connect the output port of `1_experiment_train.ipynb` to the input port of `2_save_model.ipynb` by drawing a line from one to another. Click and drag from the right point on node 1 to the left point on node 2. - -image::pipelines/wb-pipeline-connect-nodes.png[Connect Nodes] - -== Setting Node Properties - -Now that our pipeline has been constructed, we need to set some properties to include and pass files between nodes. First, let's select node 1, `1_experiment_train.ipynb`. - -* Click the node, `1_experiment_train.ipynb` to select it. It will be outlined in blue. - -image::pipelines/wb-pipeline-node-1.png[Select Node 1] - -* Click on the *Node Properties* tab in the properties panel. - -Now we can add the *File Dependencies* to include the data to train our model. If we don't set this, the file won't be included in the node when it runs and the training job would fail. - -* Scroll down and click *Add*` under *File Dependencies*. - -image::pipelines/wb-pipeline-node-1-file-dep.png[Add File Dependency] - -* Set the value to `data/card_transdata.csv`. - -image::pipelines/wb-pipeline-node-1-file-dep-form.png[Set File Dependency Value] - -== Node Outputs - -In node 1, we'll be creating `models/fraud/model.onnx` and in node 2, we want to upload that file to S3. We need to set the output of node 1 so that it will be available for node 2. - -* Select node 1 - -* Select the *Node Properties* tab - -* Scroll down and click *Add*` under *Output Files*. - -image::pipelines/wb-pipeline-node-1-add-output.png[] - -* Set the value to `models/fraud/model.onnx`. - -image::pipelines/wb-pipeline-node-1-file-output-form.png[Set File Dependency Value] - -Now let's set the input of node 2. - -* Select node 2 - -* Select the *Node Properties* tab - -* Scroll down and click *Add*` under *Output Files*. - -image::pipelines/wb-pipeline-node-1-add-output.png[] - -* Set the value to `models/fraud/model.onnx`. - -image::pipelines/wb-pipeline-node-1-file-output-form.png[Set File Dependency Value] - - -== Node Properties for Data Connections - -Node 2 will be uploading the model to S3. We need to set the S3 bucket and keys for the file. We'll be using the secret created by the Data Connection `My Storage` in the project setup. The secret is called `aws-connection-my-storage` as you can see by hovering over the connection info *?* in the *Data Connections* tab. If you called your data connection something other than `My Storage`, you'll need to use look up the secret name. - -image::pipelines/dsp-dc-secret-name.png[My Storage Secret Name] - -We can use this secret in our pipeline nodes without having to save the information in our pipeline code. This is important if you would like to save these pipelines to source control without any secret keys. - -The secret `aws-connection-my-storage` has the following fields: - -``` -AWS_ACCESS_KEY_ID -AWS_DEFAULT_REGION -AWS_S3_BUCKET -AWS_S3_ENDPOINT -AWS_SECRET_ACCESS_KEY -``` - -First let's examine the node properties for node 2. - -* Select node 2 - -* Select the *Node Properties* tab - -Here', you'll see some under *Additional Properties* that *Environment Variables* that have been pre-filled out. The editor inferred you'd need them from the notebook code. - - -Since we don't want to save the value in our pipelines, we'll remove all of these environment variables. - -* Click *Remove* for each of the environment variables. - -image::pipelines/wb-pipeline-node-remove-env-var.png[Remove Env Var] - -Now that your node is pipeline is clean, let's add the S3 bucket and keys using the Kubernetes secret. - -* Click *Add* under *Kubernetes Secrets*. - -image::pipelines/wb-pipeline-add-kube-secret.png[Add Kube Secret] - -* Edit the form to set the values for the S3 bucket and keys. - -image::pipelines/wb-pipeline-add-kube-secret.png[Add Kube Secret] - -* Fill out the form with the following information -** *Environment Variable*: `AWS_ACCESS_KEY_ID` -** *Secret Name*: `aws-connection-my-storage` -** *Secret Key*: `AWS_ACCESS_KEY_ID` - -image::pipelines/wb-pipeline-kube-secret-form.png[Secret Form] - -Repeat the procedure for the other keys. - -* Add a new secret and fill out the form with the following information. -** *Environment Variable*: `AWS_SECRET_ACCESS_KEY` -** *Secret Name*: `aws-connection-my-storage` -** *Secret Key*: `AWS_SECRET_ACCESS_KEY` -* Add a new secret and fill out the form with the following information. -** *Environment Variable*: `AWS_S3_ENDPOINT` -** *Secret Name*: `aws-connection-my-storage` -** *Secret Key*: `AWS_S3_ENDPOINT` -* Add a new secret and fill out the form with the following information. -** *Environment Variable*: `AWS_DEFAULT_REGION` -** *Secret Name*: `aws-connection-my-storage` -** *Secret Key*: `AWS_DEFAULT_REGION` -* Add a new secret and fill out the form with the following information. -** *Environment Variable*: `AWS_S3_BUCKET` -** *Secret Name*: `aws-connection-my-storage` -** *Secret Key*: `AWS_S3_BUCKET` - -* At this point you can *Save* and *Rename* the `.pipeline` file to save your changes. - -== Running the Pipeline - -Now it's time to upload the pipeline on the cluster itself and run it. You can do so directly from the pipeline editor. You can use your own newly created pipeline for this or `6 Train Save.pipeline`. - -* Click the play button in the toolbar of the pipeline editor. - -image::pipelines/wb-pipeline-run-button.png[Pipeline Run Button] - -* Enter a name for your pipeline -* Verify the *Runtime Configuration:* is set to `Data Science Pipeline`. -* Click *OK* - -NOTE: If `Data Science Pipeline` is not available as a runtime configuration, you may have created your notebook before the pipeline server was available. You can restart your notebook after the pipeline server has been created in your data science project. - -image::pipelines/wb-pipeline-run.png[Pipeline Run] - -* Return to your data science project and expand the newly created pipeline. - -image::pipelines/dsp-pipeline-complete.png[] - -From here you can click on the pipeline or the pipeline run and view the pipeline run in progress. - -image::pipelines/pipeline-run-complete.png[] - -The result should be a `models/fraud/model.onnx` file in your S3 bucket which you can serve, just like we manually did in the previous section. \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/4-02-sdk-pipelines.adoc b/workshop/docs/modules/ROOT/pages/4-02-sdk-pipelines.adoc deleted file mode 100644 index 3a14b75..0000000 --- a/workshop/docs/modules/ROOT/pages/4-02-sdk-pipelines.adoc +++ /dev/null @@ -1,65 +0,0 @@ -= 4.2 Pipelines in Python - -include::_attributes.adoc[] - -== The SDK - -While we've created a simple pipeline using the GUI pipeline editor, it's often desirable to create pipelines using code that can be version controlled and shared with others. The https://github.com/kubeflow/kfp-tekton[kfp-tekton] SDK provides a Python API for creating pipelines. The SDK is available as a Python package that can be installed using `pip install kfp-tekton`. With this package, you can use Python code to create a pipeline and then compile it to Tekton YAML. Then we can import that YAML into OpenShift AI. - -If you'd like to browse the code to generate, you can find it in the `pipeline` directory in you `fraud-detection-notebooks` project you are using in your notebook. Feel free to peruse the code. - -* `7_get_data_train_upload.py` is the main pipeline code. -* `get_data.py`, `train_model.py`, and `upload.py` are the three components of the pipeline. -* `build.sh` is a script that builds the pipeline and creates `7_get_data_train_upload.yaml`, which is what we'll need to upload. - -We won't be delving into the SDK for this workshop, and have provided you with the yaml file, `7_get_data_train_upload.yaml` in the git repo with your notebooks. You can download it from - -++++ -https://github.com/cfchase/fraud-detection-notebooks/raw/main/7_get_data_train_upload.yaml -++++ - - -// link:https://github.com/cfchase/fraud-detection-notebooks/raw/main/7_get_data_train_upload.yaml[Download Pipeline YAML, window=_blank, download] - -Or, you can download it directly from your workbench: - -image::pipelines/wb-download.png[Download Pipeline YAML] - -Now you can upload `7_get_data_train_upload.yaml` to OpenShift AI. Start from the OpenShift AI dashboard. - -* Click *Import pipeline* in the *Pipelines* section. - -image::pipelines/dsp-pipeline-import.png[] - -* Fill out the *Pipeline name* and *Pipeline description* - -* Click *Upload* and select `7_get_data_train_upload.yaml` from your local files to upload the pipeline. - -image::pipelines/dsp-pipline-import-upload.png[] - -* Click *Import pipeline* to import and save the pipeline. - -image::pipelines/dsp-pipline-import-button.png[] - -As you can tell, no runs have been triggered yet. - -* Click *Create run* either under the *Actions* menu or in the expand pipeline item. - -* Fill out the *Name* on the form. You can leave other fields as default. - -image::pipelines/pipeline-create-run-form.png[Create Pipeline Run Form] - -* Click *Create* to create the run. - -image::pipelines/pipeline-run-create-button.png[Create Pipeline Run Button] - -This will kick off a new run immediately and send you to the run details page. - -image::pipelines/pipeline-run-in-progress.png[] - -There you have it. A pipeline created in Python running in OpenShift AI. - - - - - diff --git a/workshop/docs/modules/ROOT/pages/_attributes.adoc b/workshop/docs/modules/ROOT/pages/_attributes.adoc index ad2bb5a..9bcd4fc 100644 --- a/workshop/docs/modules/ROOT/pages/_attributes.adoc +++ b/workshop/docs/modules/ROOT/pages/_attributes.adoc @@ -1,2 +1,8 @@ :experimental: :source-highlighter: highlightjs +:deliverable: workshop +//:deliverable: tutorial +:productname-long: Red Hat OpenShift Data Science +:productname-short: OpenShift Data Science +//:productname-long: Red Hat OpenShift AI +//:productname-short: OpenShift AI \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/automating-workflows-with-pipelines.adoc b/workshop/docs/modules/ROOT/pages/automating-workflows-with-pipelines.adoc new file mode 100644 index 0000000..7eecbc5 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/automating-workflows-with-pipelines.adoc @@ -0,0 +1,194 @@ +[id='automating-workflows-with-pipelines_{context}'] += Automating workflows with data science pipelines + +include::_attributes.adoc[] + +In previous sections of this {deliverable}, you used a notebook to train and save your data model. Optionally, you can automate these tasks by using {productname-long} pipelines. Pipelines offer a way to automate the execution of multiple notebooks and Python code. By using pipelines, you can execute long training jobs or retrain your models on a schedule without having to manually run them in a notebook. + +In this section, you create a simple pipeline by using the GUI pipeline editor. The pipeline uses the notebook that you used in previous sections, to train a model and then save it to S3 storage. + +Note: Your completed pipeline should look like the one in the `6 Train Save.pipeline` file. + +== Create a pipeline + +. Open you workbench's JupyterLab environment. If the launcher is not visible, click *+* to open it. ++ +image::pipelines/wb-pipeline-launcher.png[Pipeline buttons] + +. Click *Pipeline Editor*. ++ +image::pipelines/wb-pipeline-editor-button.png[Pipeline Editor button, 100] ++ +You've created a blank pipeline! + +. Set the default runtime image for when you run your notebook or python code. + +.. In the pipeline editor, click *Open Panel* ++ +image::pipelines/wb-pipeline-panel-button-loc.png[Open Panel] + +.. Select the *Pipeline Properties* tab. ++ +image::pipelines/wb-pipeline-properties-tab.png[Pipeline Properties Tab] + +.. In the *Pipeline Properties* panel, scroll down to *Generic Node Defaults* and *Runtime Image*. Set the value to `Tensorflow with Cuda and Python 3.9 (UBI 9)` ++ +image::pipelines/wb-pipeline-runtime-image.png[Pipeline Runtime Image0, 400] + +. Save the pipeline. + +== Add nodes to your pipeline + +Add some steps, or *nodes* in your pipeline. Your two nodes will use the `1_experiment_train.ipynb` and `2_save_model.ipynb` notebooks. + +. From the file-browser panel, drag the `1_experiment_train.ipynb` and `2_save_model.ipynb` notebooks onto the pipeline canvas. ++ +image::pipelines/wb-pipeline-drag-drop.png[ Drag and Drop Notebooks] + +. Click the output port of `1_experiment_train.ipynb` and drag a connecting line to the input port of `2_save_model.ipynb`. ++ +image::pipelines/wb-pipeline-connect-nodes.png[Connect Nodes, 400] + +. Save the pipeline. + +== Specify the training file as a dependency + +Set node properties to specify the training file as a dependency. + +Note: If you don't set this file dependency, the file won't be included in the node when it runs and the training job would fail. + +. Click the `1_experiment_train.ipynb` node. ++ +image::pipelines/wb-pipeline-node-1.png[Select Node 1, 200] + +. In the Properties panel, click the *Node Properties* tab. + +. Scroll down to the *File Dependencies* section and then click *Add*. ++ +image::pipelines/wb-pipeline-node-1-file-dep.png[Add File Dependency, 400] + +. Set the value to `data/card_transdata.csv` which contains the data to train your model. + +. Select the *Include Subdirectories* option and then click *Add*. ++ +image::pipelines/wb-pipeline-node-1-file-dep-form.png[Set File Dependency Value, 300] + +. Save the pipeline. + +== Create and store the ONNX-formatted output file + +In node 1, the notebook creates the `models/fraud/model.onnx` file. In node 2, the notebook uploads that file to the S3 storage bucket. You must set `models/fraud/model.onnx` file as the output file for both nodes. + +. Select node 1 and then select the *Node Properties* tab. + +. Scroll down to the *Output Files* section, and then click *Add*. + +. Set the value to `models/fraud/model.onnx` and then click *Add*. ++ +image::pipelines/wb-pipeline-node-1-file-output-form.png[Set file dependency value, 400] + +. Repeat 1-3 for node 2. + +== Configure the data connection to the S3 storage bucket + +In node 2, the notebook uploads the model to the S3 storage bucket. + +You must set the S3 storage bucket keys by using the secret created by the `My Storage` data connection that you set up in the xref:storing-data-with-data-connections.adoc[Storing data with data connections] section of this {deliverable}. + +You can use this secret in your pipeline nodes without having to save the information in your pipeline code. This is important, for example, if you want to save your pipelines - without any secret keys - to source control. + +The secret is named `aws-connection-my-storage`. + +[NOTE] +==== +If you called your data connection something other than `My Storage`, you can obtain the secret name in the Data Science dashboard by hovering over the resource informantion icon *?* in the *Data Connections* tab. + +image::pipelines/dsp-dc-secret-name.png[My Storage Secret Name, 400] +==== + +The `aws-connection-my-storage` secret includes the following fields: + +* `AWS_ACCESS_KEY_ID` +* `AWS_DEFAULT_REGION` +* `AWS_S3_BUCKET` +* `AWS_S3_ENDPOINT` +* `AWS_SECRET_ACCESS_KEY` + +You must set the secret name and key for each of these fields. + +. Remove any pre-filled environment variables. + +.. Select node 2, and then select the *Node Properties* tab. ++ +Under *Additional Properties*, note that some environment variables have been pre-filled. The pipeline editor inferred that you'd need them from the notebook code. ++ +Since you don't want to save the value in your pipelines, remove all of these environment variables. + +.. Click *Remove* for each of the pre-filled environment variables. ++ +image::pipelines/wb-pipeline-node-remove-env-var.png[Remove Env Var] + +. Add the S3 bucket and keys by using the Kubernetes secret. + +.. Under *Kubernetes Secrets*, click *Add*. ++ +image::pipelines/wb-pipeline-add-kube-secret.png[Add Kube Secret] + +.. Enter the following values and then click *Add*. +** *Environment Variable*: `AWS_ACCESS_KEY_ID` +** *Secret Name*: `aws-connection-my-storage` +** *Secret Key*: `AWS_ACCESS_KEY_ID` ++ +image::pipelines/wb-pipeline-kube-secret-form.png[Secret Form, 400] + +.. Repeat Steps 3a and 3b for each set of these Kubernetes secrets: + +* *Environment Variable*: `AWS_SECRET_ACCESS_KEY` +** *Secret Name*: `aws-connection-my-storage` +** *Secret Key*: `AWS_SECRET_ACCESS_KEY`` + +* *Environment Variable*: `AWS_S3_ENDPOINT` +** *Secret Name*: `aws-connection-my-storage` +** *Secret Key*: `AWS_S3_ENDPOINT` + +* *Environment Variable*: `AWS_DEFAULT_REGION` +** *Secret Name*: `aws-connection-my-storage` +** *Secret Key*: `AWS_DEFAULT_REGION` + +* *Environment Variable*: `AWS_S3_BUCKET` +** *Secret Name*: `aws-connection-my-storage` +** *Secret Key*: `AWS_S3_BUCKET` + +. *Save* and *Rename* the `.pipeline` file. + +== Run the Pipeline + +Upload the pipeline on the cluster itself and run it. You can do so directly from the pipeline editor. You can use your own newly created pipeline for this or `6 Train Save.pipeline`. + +. Click the play button in the toolbar of the pipeline editor. ++ +image::pipelines/wb-pipeline-run-button.png[Pipeline Run Button] + +. Enter a name for your pipeline. +. Verify the *Runtime Configuration:* is set to `Data Science Pipeline`. +. Click *OK*. ++ +NOTE: If `Data Science Pipeline` is not available as a runtime configuration, you may have created your notebook before the pipeline server was available. You can restart your notebook after the pipeline server has been created in your data science project. ++ +image::pipelines/wb-pipeline-run.png[Pipeline Run] + +. Return to your data science project and expand the newly created pipeline. ++ +image::pipelines/dsp-pipeline-complete.png[] + +. Click the pipeline or the pipeline run and then view the pipeline run in progress. ++ +image::pipelines/pipeline-run-complete.png[] + +The result should be a `models/fraud/model.onnx` file in your S3 bucket which you can serve, just like you did manually in the xref:preparing-a-data-model-for-deployment.adoc[Preparing a data model for deployment] section. + +//is there a straight-forward way to verify that the pipeline worked? + +.Next steps + +(optional) xref:running-a-pipeline-generated-from-python-code.adoc[Automating workflows with data science pipelines] \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/conclusion.adoc b/workshop/docs/modules/ROOT/pages/conclusion.adoc index 4a3af41..ecdfb4d 100644 --- a/workshop/docs/modules/ROOT/pages/conclusion.adoc +++ b/workshop/docs/modules/ROOT/pages/conclusion.adoc @@ -1,6 +1,17 @@ -= Fraud Detection Workshop with Red Hat OpenShift Data Science += Fraud Detection Workshop with {productname-long} :page-layout: home :!sectids: [.text-center.strong] == Conclusion + +Congratulations! + +In this {deliverable}, you learned how to incorporate data science and artificial intelligence (AI) and machine learning (ML) into an OpenShift development workflow. + +You used an example fraud detection model and completed the following tasks: + +* Explored a pre-trained fraud detection model by using Jupyter Notebooks. +* Deployed the model by using {productname-short} model serving. +* Integrated the model into a real-time fraud detection application. +* Refined and trained the model by using automated pipelines. diff --git a/workshop/docs/modules/ROOT/pages/creating-a-workbench.adoc b/workshop/docs/modules/ROOT/pages/creating-a-workbench.adoc new file mode 100644 index 0000000..f1dc27a --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/creating-a-workbench.adoc @@ -0,0 +1,59 @@ +[id='creating-a-workbench_{context}'] += Creating a workbench and selecting a Notebook image + +include::_attributes.adoc[] + +A workbench is an instance of your development and experimentation environment. Within the workbench you can select a notebook image for your data science work. + +.Prerequisite + +* You created a `My Storage` data connection as described in xref:storing-data-with-data-connections.adoc[Storing data with data connections]. + +.Procedure + +. Navigate to the project detail page for the data science project that you created in Section 1. + +. Click the *Create workbench* button. ++ +image::workbenches/ds-project-create-workbench.png[Create workbench button] + +. Fill out the name and description. ++ +image::workbenches/create-workbench-form-name-desc.png[Workbench name and description, 600] ++ +Red Hat provides several supported notebook images. In the *Notebook image* section, you can choose one of these images or any custom images that an administrator has set up for you. The *Tensorflow* image has the libraries needed for this {deliverable}. + +. Choose the latest *Tensorflow* image. ++ +image::workbenches/create-workbench-form-image.png[Workbench image, 600] + +. Choose a small deployment and no GPUs. This {deliverable} does not require any GPUs. ++ +image::workbenches/create-workbench-form-size.png[Workbench size,600] + +. Leave the default environment variables and storage options. ++ +image::workbenches/create-workbench-form-env-storage.png[Workbench storage, 600] + +. Under *Data connections*, choose *Use existing data connection* and select `My Storage` (the object storage that you configured previously) from the dropdown list. ++ +image::workbenches/create-workbench-form-data-connection.png[Data connection, 600] + +. Click the *Create workbench* button. ++ +image::workbenches/create-workbench-form-button.png[Create workbench button] + +.Verification + +In the project details page, the status of the workbench changes from `Starting` to `Running`. + +image::workbenches/ds-project-workbench-list.png[Workbench list] + +NOTE: If you made a mistake, you can edit ithe workbench to make changes. + +image::workbenches/ds-project-workbench-list-edit.png[Workbench list edit] + + +.Next step + +xref:importing-files-into-jupyter.adoc[Importing the {deliverable} files into the Jupyter environment] diff --git a/workshop/docs/modules/ROOT/pages/creating-data-connections-to-storage.adoc b/workshop/docs/modules/ROOT/pages/creating-data-connections-to-storage.adoc new file mode 100644 index 0000000..6287fa2 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/creating-data-connections-to-storage.adoc @@ -0,0 +1,62 @@ +[id='creating-data-connections-to-storage_{context}'] +== Creating data connections to your own S3-compatible object storage + +include::_attributes.adoc[] + +NOTE: If you do not have your own s3-compatible storage, or if you want to use a disposable local Minio instance instead, skip this section and follow the steps in xref:running-a-script-to-install-storage.adoc[Running a script to install local object storage buckets and create data connections]. + +.Prerequisite + +To create data connections to your existing S3-compatible storage buckets, you need the following credential information for the storage buckets: + +* Endpoint URL +* Access key +* Secret key +* Region +* Bucket name + +If you don't have this information, contact your storage administrator. + +.Procedures + +Create data connections to your two storage buckets. + +*Create a data connection for saving your data and models* + +. In the {productname-short} dashboard, navigate to the page for your Data science project. + +. Under *Components*, click *Data connections*. + +. Click *Add data connection*. ++ +image::projects/ds-project-add-dc.png[Add data connection] + +. Fill out the *Add data connection* form and name your connection *My Storage*. This connection is for saving your personal work, including data and models. ++ +image::projects/ds-project-my-storage-form.png[Add my storage form] + +. Click *Add data connection*. + +*Create a data connection for saving pipeline artifacts* + +NOTE: If you do not intend to complete the pipelines section of the {deliverable}, you can skip this step. + +. Click *Add data connection*. + +. Fill out the form and name your connection *Pipeline Artifacts*. ++ +image::projects/ds-project-pipeline-artifacts-form.png[Add pipeline artifacts form] + +. Click *Add data connection*. + + +.Verification + +Check to see that your data connections are listed in the project. + +image::projects/ds-project-dc-list.png[List of project data connections] + + +.Next step + +xref:creating-a-workbench.adoc[Creating a workbench] diff --git a/workshop/docs/modules/ROOT/pages/deploying-a-data-model.adoc b/workshop/docs/modules/ROOT/pages/deploying-a-data-model.adoc new file mode 100644 index 0000000..0f66ee1 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/deploying-a-data-model.adoc @@ -0,0 +1,46 @@ +[id='deploying-a-data-model_{context}'] += Deploying a data model + +include::_attributes.adoc[] + +Now that the data model is accessible in storage and saved in the portable ONNX format, you can use an {productname-short} model server to deploy it as an API. + +{productname-short} multi-model servers can host several models at once. You create a new model server and deploy your model to it. + +.Procedure + +. In the {productname-short} dashboard, navigate to *Models and model servers*. +. Click *Add server*. ++ +image::model-serving/ds-project-model-list-add.png[Add Server] + +. In the form: + +.. Fill out the *Model server name*, for example `Model Server`. +.. Select `OpenVINO Model Server`. +.. Leave the other fields with their default settings. ++ +image::model-serving/create-model-server-form.png[Add Server Form] + +. Click *Add*. + +. In the *Models and model servers* list, next to the new model server, click *Deploy model*. ++ +image::model-serving/ds-project-workbench-list-deploy.png[Deploy model button] + +. In the form: + +.. Fill out the *Model Name* with the value `fraud`. +.. Select the server that you created (for example, `Model Server`). +.. Select the *Existing data connection*: `My Storage` +.. Enter the path to your uploaded model: `models/fraud/model.onnx` ++ +image::model-serving/deploy-model-form.png[Deploy model form] + +. Wait for the model to deploy and for the *Status* to show a green checkmark. ++ +image::model-serving/ds-project-model-list-status.png[Model status] + +.Next step + +xref:testing-the-model-api.adoc[Testing the model API] diff --git a/workshop/docs/modules/ROOT/pages/enabling-data-science-pipelines.adoc b/workshop/docs/modules/ROOT/pages/enabling-data-science-pipelines.adoc new file mode 100644 index 0000000..3cf44f5 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/enabling-data-science-pipelines.adoc @@ -0,0 +1,42 @@ +[id='enabling-data-science-pipelines_{context}'] += Enabling data science pipelines + +include::_attributes.adoc[] + +NOTE: If you do not intend to complete the pipelines section of the workshop you can skip this step and move on to the next section, xref:creating-a-workbench.adoc[Create a Workbench] + + +In this section, you prepare your {deliverable} environment so that you can use data science pipelines. + +.Procedure + +. In the Data Science dashboard, navigate to *Data Science Pipelines* -> *Pipelines*. + +. Click *Create pipeline server*. ++ +image::projects/ds-project-create-pipeline-server.png[Create pipeline server button] + +. In the *Configure pipeline server* form, select *Existing data connection*. + +. For *Name*, select *Pipeline Artifacts*. ++ +image::projects/ds-project-create-pipeline-server-form.png[Selecting the Pipeline Artifacts data connection] + +. Leave the database configuration as the default. + +. Click *Configure*. + +.Verification + +Check the *Pipelines* page. Pipelines are enabled when the *Pipeline server actions* option appears and the *Create pipeline server* button no longer appears. + +image::projects/ds-project-create-pipeline-server-complete.png[Create pipeline server complete] + +.Next step + +xref:automating-workflows-with-pipelines.adoc[Automating workflows with data science pipelines] + +xref:running-a-pipeline-generated-from-python-code.adoc[Running a data science pipeline generated from Python code] + + + diff --git a/workshop/docs/modules/ROOT/pages/importing-files-into-jupyter.adoc b/workshop/docs/modules/ROOT/pages/importing-files-into-jupyter.adoc new file mode 100644 index 0000000..d63e5a5 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/importing-files-into-jupyter.adoc @@ -0,0 +1,60 @@ +[id='importing-files-into-jupyter_{context}'] += Importing the {deliverable} files into the Jupyter environment + +include::_attributes.adoc[] + +The Jupyter environment is a web-based environment, but everything you do inside it happens on *{productname-long}* and powered by the *OpenShift* cluster. This means that, without having to install and maintain anything on your own computer, and without disposing of lots of local resources like CPU, GPU and RAM, you can conduct your Data Science work in this powerful and stable managed environment. + +.Prerequisite + +*You created a workbench, as described in xref:creating-a-workbench.adoc[Creating a workbench and selecting a Notebook image]. + +.Procedure + +. Click the *Open* link next to your workbench. If prompted, log in and allow the Notebook to authorize your user. ++ +image::workbenches/ds-project-workbench-open.png[Open workbench] ++ +Your Jupyter environment window opens. ++ +This file-browser window shows the files and folders that are saved inside your own personal space in {productname-short}. + +. Bring the content of this {deliverable} inside your Jupyter environment: + +.. On the toolbar, click the *Git Clone* icon: ++ +image::workbenches/jupyter-git-icon.png[Git Clone icon, 200] + +.. Enter the following {deliverable} Git *https* URL: ++ +[.lines_space] +[.console-input] +[source,text] +---- +https://github.com/rh-aiservices-bu/fraud-detection.git +---- ++ +image::workbenches/jupyter-git-modal.png[Git Modal] + +.. Check the *Include submodules* option. + +.. Click *CLONE*. + +.Verification + +. Double-click the newly-created folder, `fraud-detection`: ++ +image::workbenches/jupyter-file-browser.png[Jupyter file browser] + +In the file browser, you should see the notebooks that you cloned from Git. + +image::workbenches/jupyter-file-browser-2.png[Jupyter file browser - fraud-detection] + + +.Next step + +xref:running-code-in-a-notebook.adoc[Running code in a notebook] + +or + +xref:training-a-data-model.adoc[Training a data model] diff --git a/workshop/docs/modules/ROOT/pages/index.adoc b/workshop/docs/modules/ROOT/pages/index.adoc index 907e739..c7519df 100644 --- a/workshop/docs/modules/ROOT/pages/index.adoc +++ b/workshop/docs/modules/ROOT/pages/index.adoc @@ -1,4 +1,4 @@ -= Fraud Detection Workshop with Red Hat OpenShift Data Science += Fraud Detection {deliverable} with {productname-long} :page-layout: home :!sectids: @@ -7,24 +7,31 @@ Welcome! -In this workshop, you'll learn an easy way to incorporate data science and AI/ML into an OpenShift development workflow. -As an example, you'll use an fraud detection model in several different ways. +In this {deliverable}, you'll learn how to incorporate data science and artificial intelligence and machine learning (AI/ML) into an OpenShift development workflow. -You will: +You'll use an example fraud detection model to complete the following tasks: -* use Jupyter Notebooks to explore a pre-trained fraud detection model -* deploy the model using OpenShift Data Science model serving -* integrate the model into a real-time fraud detection app -* refine and train the model using automated pipelines +* Explore a pre-trained fraud detection model by using Jupyter Notebooks. +* Deploy the model by using {productname-short} model serving. +* Integrate the model into a real-time fraud detection application. +* Refine and train the model by using automated pipelines. -And all of this without having to install anything on your own computer, thanks to https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-data-science[Red Hat OpenShift Data Science]. +And you'll do all of this without having to install anything on your own computer, thanks to https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-data-science[{productname-long}]. +== About the example fraud detection model -=== Environment +The example fraud detection model mentors credit card transactions for potential fraudulent activity. It analyzes the following credit card transaction details: -https://developers.redhat.com/products/red-hat-openshift-data-science/download[Set up your Red Hat OpenShift Data Science environment] +* The geographical distance from the previous credit card transaction. +* The price of the current transaction, compared to the median price of all the user’s transactions. +* Whether the user completed the transaction by using the hardware chip in the credit card, entered a PIN number, or for an online purchase. -If you haven't already got an instance of Red Hat OpenShift Data Science, find out more on the https://developers.redhat.com/products/red-hat-openshift-data-science/download[developer page]. There, you can spin up your own account on the *free OpenShift Data Science Sandbox* or learn about installing on *your own OpenShift cluster*. +Based on this data, the model outputs the likelihood of the transaction being fraudulent. +== Before you begin -If you're ready, xref:1-01-dashboard.adoc[let's start!] +https://developers.redhat.com/products/red-hat-openshift-data-science/download[Set up your {productname-long} environment] + +If you don't already have an instance of {productname-long}, find out more on the https://developers.redhat.com/products/red-hat-openshift-data-science/download[developer page]. There, you can spin up your own account on the *free {productname-short} Sandbox* or learn about installing on *your own OpenShift cluster*. + +If you're ready, xref:navigating-to-the-dashboard.adoc[start the {deliverable}!] diff --git a/workshop/docs/modules/ROOT/pages/navigating-to-the-dashboard.adoc b/workshop/docs/modules/ROOT/pages/navigating-to-the-dashboard.adoc new file mode 100644 index 0000000..092b853 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/navigating-to-the-dashboard.adoc @@ -0,0 +1,31 @@ +[id='navigating-to-the-dashboard_{context}'] += Navigating to the {productname-short} dashboard + +include::_attributes.adoc[] + +.Procedure + +. After you log in to the OpenShift console, access the {productname-short} dashboard by clicking the application launcher icon on the header. ++ +image::projects/ocp-console-ds-tile.png[Data Science dashboard link] + +. When prompted, log in to the {productname-short} dashboard by using your OpenShift credentials. {productname-short} uses the same credentials as OpenShift for the dashboard, notebooks, and all other components. ++ +image::projects/login-with-openshift.png[OpenShift login, 300] ++ +The {productname-short} dashboard shows the status of any installed and enabled applications. + +. Optionally, click *Explore* to view other available application integrations. ++ +image::projects/dashboard-explore.png[Dashboard enabled] ++ +Note: You can navigate back to the OpenShift console in a similar fashion. Click on the application launcher to access the OpenShift console. ++ +image::projects/ds-console-ocp-tile.png[OCP console link] + +For now, stay in the {productname-short} dashboard. + +.Next step + +xref:setting-up-your-data-science-project.adoc[Setting up your data science project] + diff --git a/workshop/docs/modules/ROOT/pages/preparing-a-data-model-for-deployment.adoc b/workshop/docs/modules/ROOT/pages/preparing-a-data-model-for-deployment.adoc new file mode 100644 index 0000000..80e46b3 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/preparing-a-data-model-for-deployment.adoc @@ -0,0 +1,34 @@ +[id='preparing-a-data-model-for-deployment_{context}'] += Preparing a data model for deployment +include::_attributes.adoc[] + +After you train a model, you can deploy it by using the {productname-short} model serving capabilities. + +To prepare it for deployment, you must move the model from your workbench to your S3-compatible object storage. You use the data connection that you created in the xref:storing-data-with-data-connections.adoc[Storing data with data connections] section and upload the model from a notebook. You also convert the model to the portable ONNX format. ONNX allows you to transfer models between frameworks with minimal preparation and without the need for rewriting the models. + +.Prerequisites + +* You created the data connection `My Storage`. ++ +image::model-serving/create-workbench-form-data-connection.png[Workbench data connection form, 600] + +* You added the `My Storage` data connection to your workbench. ++ +image::model-serving/ds-project-workbench-list-edit.png[Workbench edit form] + + +.Procedure + +. In your Jupyter environment, open the `2_save_model.ipynb` file. + +. Follow the instructions in the notebook to make the data model accessible in storage and save it in the portable ONNX format. + +image::model-serving/jupyter-notebook-2.png[Jupyter Notebook 2] + +.Verification + +When you have completed the notebook isntructions, the `models/fraud/model.onnx` file is in your object storage and it is ready for your model server to use. + +.Next step + +xref:deploying-a-data-model.adoc[Deploying a data model] diff --git a/workshop/docs/modules/ROOT/pages/running-a-pipeline-generated-from-python-code.adoc b/workshop/docs/modules/ROOT/pages/running-a-pipeline-generated-from-python-code.adoc new file mode 100644 index 0000000..6a01f23 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/running-a-pipeline-generated-from-python-code.adoc @@ -0,0 +1,55 @@ +[id='running-a-pipeline-generated-from-python-code_{context}'] += Running a data science pipeline generated from Python code + +include::_attributes.adoc[] + +In the previous scetion, you created a simple pipeline by using the GUI pipeline editor, it's often desirable to create pipelines by using code that can be version-controlled and shared with others. The https://github.com/kubeflow/kfp-tekton[kfp-tekton] SDK provides a Python API for creating pipelines. The SDK is available as a Python package that you can install by using the `pip install kfp-tekton` command. With this package, you can use Python code to create a pipeline and then compile it to Tekton YAML. Then you can import the YAML code into {productname-short}. + +This {deliverable} does not delve into the details of how to use the SDK. Instead, it provides the files for you to view and upload. + +. Optionally, view the provided Python code in your Jupyter environment by navigating to the `fraud-detection-notebooks` project's `pipeline` directory. It contains the following files: ++ +* `7_get_data_train_upload.py` is the main pipeline code. +* `get_data.py`, `train_model.py`, and `upload.py` are the three components of the pipeline. +* `build.sh` is a script that builds the pipeline and creates the YAML file.` ++ +The generated `7_get_data_train_upload.yaml` file is located in the `fraud-detection-notebooks` directory. + +. Right-click the `7_get_data_train_upload.yaml` file and then click *Download*. ++ +image::pipelines/wb-download.png[Download Pipeline YAML] + +. Upload the `7_get_data_train_upload.yaml` file to {productname-short}. + +.. In the Data Science dashboard, navigate to your data science project page and then click *Import pipeline*. ++ +image::pipelines/dsp-pipeline-import.png[] + +.. Provide values for *Pipeline name* and *Pipeline description*. + +.. Click *Upload* and then select `7_get_data_train_upload.yaml` from your local files to upload the pipeline. ++ +image::pipelines/dsp-pipline-import-upload.png[] + +.. Click *Import pipeline* to import and save the pipeline. ++ +The pipeline shows in the list of pipelines. + +. Expand the pipeline item and then click *Create run*. + +. On the *Create run* page, enter a *Name*. You can leave the other fields with their default values. ++ +image::pipelines/pipeline-create-run-form.png[Create Pipeline Run form] + +. Click *Create* to create the run. ++ +A new run starts immediately and opens the run details page. ++ +image::pipelines/pipeline-run-in-progress.png[] + +There you have it. A pipeline created in Python running in {productname-short}. + + + + + diff --git a/workshop/docs/modules/ROOT/pages/running-a-script-to-install-storage.adoc b/workshop/docs/modules/ROOT/pages/running-a-script-to-install-storage.adoc new file mode 100644 index 0000000..0c2fc20 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/running-a-script-to-install-storage.adoc @@ -0,0 +1,109 @@ +[id='running-a-script-to-install-storage_{context}'] += Running a script to install local object storage buckets and create data connections + +include::_attributes.adoc[] + +For convenience, the provided script installs two data connections (and associated secrets) and two Minio buckets as s3-compatible storage The script creates a random user and password for security. This script is based on the instructions for installing Minio in this https://ai-on-openshift.io/tools-and-applications/minio/minio/[guide]. + +IMPORTANT: The storage buckets that this script creates are *not* meant for production usage. + +NOTE: If you want to connect to your own storage, see xref:creating-data-connections-to-storage.adoc[Creating data connections to your own S3-compatible object storage]. + +.Prerequisite + +You must know the OpenShift resource name for your data science project so that you run the provided script in the correct project. To get the project's resource name: + +In the {productname-short} dashboard, select *Data Science Projects* and then hover your cursor over the *?* icon next to the project name. A text box appears with information about the project, including it's resource name: + +image::projects/ds-project-list-resource-hover.png[Project list resource name] + +.Procedure + +. You can run the script from the command line or from the OpenShift console. ++ +If you want to run the script from the OpenShift console, skip to the next step. ++ +If you are knowledgeable in OpenShift and can access the cluster from the command line, run the following command: ++ +---- +oc apply -n -f https://github.com/rh-aiservices-bu/fraud-detection/raw/main/setup/setup-s3.yaml +---- + +. In the {productname-short} dashboard, click the application launcher icon and then select the *OpenShift Console* option. ++ +image::projects/ds-project-ocp-link.png[OpenShift Console Link] + +. In the OpenShift console, click *+* in the top navigation bar. ++ +image::projects/ocp-console-add-icon.png[Add resources Icon] + +. Select your project from the list of projects. ++ +image::projects/ocp-console-select-project.png[Select a project] + +. Verify that you selected the correct project. ++ +image::projects/ocp-console-project-selected.png[Selected project] + +. Copy the following code and paste it into the *Import YAML* editor. ++ +[.lines_space] +[.console-input] +[source, yaml] +---- +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: demo-setup +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: demo-setup-edit +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: edit +subjects: + - kind: ServiceAccount + name: demo-setup +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: create-s3-storage +spec: + selector: {} + template: + spec: + containers: + - args: + - -ec + - |- + echo -n 'Setting up Minio instance and data connections' + oc apply -f https://github.com/rh-aiservices-bu/fraud-detection/raw/main/setup/setup-s3-no-sa.yaml + command: + - /bin/bash + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + imagePullPolicy: IfNotPresent + name: create-s3-storage + restartPolicy: Never + serviceAccount: demo-setup + serviceAccountName: demo-setup +---- + +. Click *Create*. + +.Verification + +You should see a "Resources successfully created" message and the following resources listed: + +* `demo-setup` +* `demo-setup-edit` +* `create s3-storage` + + +.Next step + +xref:creating-a-workbench.adoc[Creating a workbench] diff --git a/workshop/docs/modules/ROOT/pages/running-code-in-a-notebook.adoc b/workshop/docs/modules/ROOT/pages/running-code-in-a-notebook.adoc new file mode 100644 index 0000000..043d03b --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/running-code-in-a-notebook.adoc @@ -0,0 +1,68 @@ +[id='running-code-in-a-notebook_{context}'] += Running code in a notebook + +include::_attributes.adoc[] + +NOTE: If you're already at ease with Jupyter, you can xref:training-a-data-model.adoc[skip to the next section]. + +A notebook is an environment where you have _cells_ that can display formatted text or code. + +This is an empty cell: + +image::workbenches/cell.png[Jupyter Cell] + +This is a cell with some code: + +image::workbenches/cell_code.png[Jupyter Cell Code] + +Code cells contain Python code that you can run interactively. You can modify the code and then run it. The code does not run on your computer or in the browser, but directly in the environment that you are connected to, *{productname-long}* in our case. + +You can run a code cell from the notebook interface or from the keyboard: + +* *From the user interface:* Select the cell (by clicking inside the cell or to the left side of the cell) and then click *Run* from the toolbar. ++ +image::workbenches/run_button.png[Jupyter Run] + +* *From the keyboard:* Press `CTRL`+`ENTER` to run a cell or press `SHIFT`+`ENTER` to run the cell and automatically select the next one. + +After you run a cell, you can see the result of its code as well as information about when the cell was run, as shown in this example: + +image::workbenches/cell_run.png[Jupyter run cell] + +When you save a notebook, the code and the results are saved. You can reopen the notebook to look at the results without having to run the program again, while still having access to the code. + +Notebooks are so named because they are like a physical _notebook_: you can take notes about your experiments (which you will do), along with the code itself, including any parameters that you set. You can see the output of the experiment inline (this is the result from a cell after it's run), along with all the notes that you want to take (to do that, from the menu switch the cell type from `Code` to `Markup`). + +== Try It + +Now that you know the basics, give it a try! + +.Prerequisite + +* You have imported the {deliverable} files into your Jupyter environment as described in +xref:importing-files-into-jupyter.adoc[Importing the {deliverable} files into the Jupyter environment]. + +.Procedure + +. In your Jupyter environment, locate the `0_sandbox.ipynb` file. +. Double-click it to launch the notebook. It opens in a new tab in the content section of the environment. ++ +image::workbenches/jupyter-notebook-0.png[Notebook 0] + +. Experiment by, for example, running the existing cells, adding more cells and creating functions. ++ +You can do what you want - it's your environment and there is no risk of breaking anything or impacting other users. This environment isolation is also a great advantage brought by {productname-short}. +. Optionally, create a new notebook in which the code cells are run by using a Python 3 kernel: +.. Create a new notebook by either selecting *File ->New ->Notebook* or by clicking the Python 3 tile in the Notebook section of the launcher window: ++ +image::workbenches/new_notebook.png[alt text] + +You can use different kernels, with different languages or versions, to run in your notebook. + +.Additonal resource + +* If you want to learn more about notebooks, go to https://jupyter.org/[the Jupyter site]. + +.Next step + +xref:training-a-data-model.adoc[Running code in a notebook] diff --git a/workshop/docs/modules/ROOT/pages/setting-up-your-data-science-project.adoc b/workshop/docs/modules/ROOT/pages/setting-up-your-data-science-project.adoc new file mode 100644 index 0000000..692863a --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/setting-up-your-data-science-project.adoc @@ -0,0 +1,43 @@ +[id='setting-up-your-data-science-project_{context}'] += Setting up your data science project + +include::_attributes.adoc[] + +Before you begin, make sure that you are logged in to *{productname-long}* and that you can see the dashboard: + +image::projects/dashboard-enabled.png[Dashboard Enabled] + +Note that you can start a Jupyter notebook from here, but it would be a one-off notebook run in isolation. To do data science as part of a workflow, you must create a data science project. Projects allow you and your team to organize and collaborate on resources within separated namespaces. From a project you can create multiple workbenches, each with their own Jupyter notebook environment, and each with their own data connections and cluster storage. In addition, the workbenches can share models and data with pipelines and model servers. + +.Procedure + +. On the navigation menu, select *Data Science Projects*. This page shows a list of any existing projects that you have access to. From this page, you can select an existing project (if any) or create a new one. ++ +image::projects/dashboard-click-projects.png[Data Science Projects List] ++ +If you already have an active project that you'd like to use, select it now and skip ahead to the next section, xref:storing-data-with-data-connections.adoc[Storing data with data connections]. Otherwise, continue to the next step. + +. Click *Create data science project*. + +. Enter a display name and description. Based on the display name, a resource name is automatically generated, but you can change it if you'd like. ++ +image::projects/ds-project-new-form.png[New data science project form] + +. You can now see its initial state. There are five types of project components: ++ +image::projects/ds-project-new.png[New data science project] + +** *Workbenches* are instances of your development and experimentation environment. They typically contain IDEs, such as JupyterLab, RStudio, and Visual Studio Code. + +** A *Cluster storage* is a volume that persists the files and data you're working on within a workbench. A workbench has access to one or more cluster storage instances. + +** *Data connections* contain configuration parameters that are required to connect to a data source, such as an S3 object bucket. + +** *Pipelines* contain the Data Science pipelines that are executed within the project. + +** *Models and model servers* allow you to quickly serve a trained model for real-time inference. You can have multiple model servers per data science project. One model server can host multiple models. + +.Next step + +xref:storing-data-with-data-connections.adoc[Storing data with data connections] + diff --git a/workshop/docs/modules/ROOT/pages/storing-data-with-data-connections.adoc b/workshop/docs/modules/ROOT/pages/storing-data-with-data-connections.adoc new file mode 100644 index 0000000..6f283c8 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/storing-data-with-data-connections.adoc @@ -0,0 +1,19 @@ +[id='storing-data-with-data-connections_{context}'] += Storing data with data connections + +include::_attributes.adoc[] + +For this {deliverable}, you need two S3-compatible object storage buckets, such as Ceph, Minio, or AWS S3: + +* *My Storage* - Use this bucket for storing your models and data. You can reuse this bucket and its connection for your notebooks and model servers. +* *Pipelines Artifacts* - Use this bucket as storage for your pipeline artifacts. A pipeline artifacts bucket is required when you create a pipeline server. For this {deliverable}, create this bucket to separate it from the first storage bucket for clarity. + +You can use your own storage buckets or run a provided script that creates local Minio storage buckets for you. + +Also, you must create a data connection to each storage bucket. A data connection is a resource that contains the configuration parameters needed to connect to an object storage bucket. + +You have two options for this {deliverable}, depending on whether you want to use your own storage buckets or use a script to create local Minio storage buckets: + +* If you want to use your own S3-compatible object storage buckets, create data connections to them as described in xref:creating-data-connections-to-storage.adoc[Creating data connections to your own S3-compatible object storage]. + +* If you want to run a script that installs local Minio storage buckets and creates data connections to them, for the purposes of this {deliverable}, follow the steps in xref:running-a-script-to-install-storage.adoc[Running a script to install local object storage buckets and create data connections]. diff --git a/workshop/docs/modules/ROOT/pages/testing-the-model-api.adoc b/workshop/docs/modules/ROOT/pages/testing-the-model-api.adoc new file mode 100644 index 0000000..32fbaf7 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/testing-the-model-api.adoc @@ -0,0 +1,31 @@ +[id='testing-the-model-api_{context}'] += Testing the model API + +include::_attributes.adoc[] + +Now that you've deployed the model, you can test its API endpoints. + +When you created the model server, you did *not* create a route for external access to the API and you did not protect it with an authentication token. By default, if you do not specify external access, the model server provides an internal endpoint with no authentication. + +You can communicate directly with this internal service in the same way that an application in your project would. One of the easiest way to test it, is from a notebook in the same project. + +.Procedure + +. In the Data Science dashboard, navigate to the project details page and scroll down to the *Models and model servers* section. + +. Take note of the model's resource name (API endpoint name) and the internal service's grpcURL and restURL. You need this information when you test the model API. ++ +image::model-serving/ds-project-model-list-name.png[Model name] ++ +image::model-serving/ds-project-model-list-url.png[Model URL] + +. Return to the Jupyter environment and try out your new endpoint. You'll try REST API calls in `4_rest_requests.ipynb` and gRPC requests in `5_grpc_requests.ipynb`. + +image::model-serving/wb-notebook-requests.png[Request Notebooks] + +.Next step + +xref:automating-workflows-with-pipelines.adoc[Automating workflows with data science pipelines] + +xref:running-a-pipeline-generated-from-python-code.adoc[Running a data science pipeline generated from Python code] + diff --git a/workshop/docs/modules/ROOT/pages/training-a-data-model.adoc b/workshop/docs/modules/ROOT/pages/training-a-data-model.adoc new file mode 100644 index 0000000..bd4fb32 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/training-a-data-model.adoc @@ -0,0 +1,16 @@ +[id='training-a-data-model_{context}'] += Training a data model + +include::_attributes.adoc[] + +Now that you know how the Jupyter notebook environment works, the real work can begin! + +//need to describe the provided data model? train a model for inference, fraud detection? + +In your notebook environment, open the file `1_experiment_train.ipynb`, and follow the instructions directly in the notebook. The instructions guide you through some simple data exploration, experimentation, and data model training tasks. + +image::workbenches/jupyter-notebook-1.png[Jupyter Notebook 1] + +.Next step + +xref:preparing-a-data-model-for-deployment.adoc[Preparing a data model for deployment] diff --git a/workshop/package.json b/workshop/package.json index e807bfd..a388bde 100644 --- a/workshop/package.json +++ b/workshop/package.json @@ -1,12 +1,7 @@ { "name": "rhods-fd-workshop", "description": "Red Hat OpenShift Data Science Fraud Detection", - "homepage": "https://rh-aiservices-bu.github.io/fraud-detection-notebooks", - "author": { - "email": "cchase@redhat.com", - "name": "Chris Chase", - "url": "https://github.com/rh-aiservices-bu/fraud-detection-notebooks" - }, + "homepage": "https://rh-aiservices-bu.github.io/fraud-detection", "dependencies": { "@antora/cli": "^3.1.4", "@antora/site-generator-default": "^3.1.4",