Skip to content

Commit c12486a

Browse files
authored
Merge pull request #87 from wprichard/MLSummit-edits
Updates for OU DS cert
2 parents f1da6c2 + 37ebaed commit c12486a

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed
-46.9 KB
Loading
-24.5 KB
Loading

labs/MLSummit21/lab-2-install-conda.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ In this lab you will:
2929
* Leanr how to run a notebook in a conda environment kernel
3030

3131
### Prerequisites
32-
* You have successfully completed labs 0 and 1.
32+
* You have successfully completed labs 0 and 1.
3333

3434
## **STEP 1:** Open a Notebook Session
3535

36-
1. Click on the notebook session you created during Lab 1 or Lab 0.
36+
1. Click on the notebook session you created during Lab 1 or Lab 0.
3737

3838
1. CLick on **Open**. It will open in a separate browser tab. If prompted to sign-in, provide your Oracle Cloud credentials.
3939
![](./images/ns-open.png)
@@ -47,36 +47,36 @@ There is a menu across the top of the screen. For this lab, the most interesting
4747

4848
## **STEP 2:** Installing Your First Conda Environment
4949

50-
The Environment Explorer is an extension in JupyterLab that provides an interface to manage the lifecycle of conda environments. A Conda Environment is a collection of libraries, programs, components and metadata. Think of them as halfway between a Python virtual environment and a Docker image. In the notebook session you can install a series of [pre-built conda environments (Data Science Environments)](https://docs.oracle.com/en-us/iaas/data-science/using/conda_environ_list.htm) or [create](https://docs.oracle.com/en-us/iaas/data-science/using/conda_create_conda_env.htm) and [publish your own conda environments](https://docs.oracle.com/en-us/iaas/data-science/using/conda_publishs_object.htm) from a notebook session. Published conda environments are the ones that you create or modify and want to share among team members or reuse in Jobs or Model Deployments. In addition to the Environment Explorer, the notebook session also comes with the `odsc conda` CLI. The `odsc` CLI lets you manage the lifecycle of conda environments.
50+
The Environment Explorer is an extension in JupyterLab that provides an interface to manage the lifecycle of conda environments. A Conda Environment is a collection of libraries, programs, components and metadata. Think of them as halfway between a Python virtual environment and a Docker image. In the notebook session you can install a series of [pre-built conda environments (Data Science Environments)](https://docs.oracle.com/en-us/iaas/data-science/using/conda_environ_list.htm) or [create](https://docs.oracle.com/en-us/iaas/data-science/using/conda_create_conda_env.htm) and [publish your own conda environments](https://docs.oracle.com/en-us/iaas/data-science/using/conda_publishs_object.htm) from a notebook session. Published conda environments are the ones that you create or modify and want to share among team members or reuse in Jobs or Model Deployments. In addition to the Environment Explorer, the notebook session also comes with the `odsc conda` CLI. The `odsc` CLI lets you manage the lifecycle of conda environments.
5151

52-
Before you can use a conda environment in your notebook session, you need to install it first. You will install a pre-built Data Science Conda Environment.
52+
Before you can use a conda environment in your notebook session, you need to install it first. You will install a pre-built Data Science Conda Environment.
5353

5454
1. In the *Launcher* tab, click **Environment Explorer**
5555
![](./images/notebook_launcher.png)
5656

5757
1. In the Environment Explorer tab, select the **Data Science Conda Environment** filter button, select **CPU** architecture filter, then scroll down until you find the **TensorFlow 2.7 for CPU on Python 3.7** conda. (If you see no results, use the refresh button on the right side of the filter bar of the Environment Explorer.)
5858
![](./images/select-tf-env.png)
5959

60-
1. Click on the caret on the right side, copy the install command
60+
1. Click on the caret on the right side, copy the install command
6161
![](./images/copy-install-tf-env-command.png)
6262

6363
1. Go back to the *Launcher* tab and select **Terminal** to open a terminal window.
6464

65-
1. **Paste the command** into the terminal window and hit **Return** to execute it.
65+
1. **Paste the command** into the terminal window and hit **Return** to execute it.
6666
The command that you previously copied is:
6767
```
68-
odsc conda install -s tensorflow27_p37_cpu_v1
68+
odsc conda install -s tensorflow27_p37_cpu_v1
6969
```
7070
7171
1. You will receive a prompt related to what version number you want. Press `Enter` to select the default.
72-
72+
7373
![](./images/install-in-progress.png)
7474
7575
It takes about 3-5 minutes for the conda package to be installed.
7676
7777
## **STEP 3** Confirm that the Conda Environment is Installed
7878
79-
You can confirm that the conda environment has been successfully installed by going back to the launcher tab and see that a new kernel has been create with the slugname of the conda environment:
79+
You can confirm that the conda environment has been successfully installed by going back to the launcher tab and see that a new kernel has been create with the slugname of the conda environment:
8080
![](./images/confirm-success-condas.png)
8181
8282
**Congratulations! You can proceed to the next lab.**
@@ -87,5 +87,3 @@ You can confirm that the conda environment has been successfully installed by go
8787
* [A YouTube Screencast on Installing and Publishing Conda Environments in OCI Data Science](https://www.youtube.com/watch?v=j6wVqpn6lqg&list=PLKCk3OyNwIzv6CWMhvqSB_8MLJIZdO80L&index=9&t=4s)
8888
* [A YouTube Screencast on Creating Your Own Conda Environment From Scratch](https://www.youtube.com/watch?v=3_qyf_GJUuM&list=PLKCk3OyNwIzv6CWMhvqSB_8MLJIZdO80L&index=13)
8989
* [Blog Post Announcing the new Conda Environments Feature in Notebook Sessions](https://blogs.oracle.com/ai-and-datascience/post/new-conda-environment-feature-available-in-oracle-cloud-infrastructure-data-science)
90-
91-

labs/MLSummit21/lab-3-python-model.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Introduction
44

5-
This lab will guide you through a practical example of how to build, train and save a machine learning model.
5+
This lab will guide you through a practical example of how to build, train and save a machine learning model.
66

7-
The dataset is a fictional data set which contains 1,470 rows. There are 36 features. 22 features are ordinal, 11 are categorical, and 3 are constant values. The features include basic demographic information, compensation level, job characteristics, job satisfaction and employee performance metrics. The data is not balanced as fewer employees leave than stay. The goal will be to predict employee retention.
7+
The dataset is a fictional data set which contains 1,470 rows. There are 36 features. 22 features are ordinal, 11 are categorical, and 3 are constant values. The features include basic demographic information, compensation level, job characteristics, job satisfaction and employee performance metrics. The data is not balanced as fewer employees leave than stay. The goal will be to predict employee retention.
88

99
While this example uses a classifier, the steps learned with this exercise are applicable to many other types of machine learning models.
1010

@@ -19,7 +19,7 @@ In this lab you will:
1919

2020
### Prerequisites
2121

22-
* Successful completion of Labs 0, 1, and 2.
22+
* Successful completion of Labs 0, 1, and 2.
2323

2424
## **STEP 1:** Open your Notebook Session
2525

@@ -31,13 +31,14 @@ In this lab you will:
3131

3232
A notebook has been prepared containing all the necessary Python code to explore the data, train the model, evaluate the model, and store it in the model catalog. This notebook has already been configured with a conda environment.
3333

34-
1. In the file browser, navigate to the directory **/home/datascience/lab/labs/MLSummit21/Notebooks/**. This directory was created in Lab 1 when you unzip this repository in your notebook session.
34+
1. In the file browser, navigate to the directory **/home/datascience/lab/labs/MLSummit21/Notebooks/**. This directory was created in Lab 1 when you unzip this repository in your notebook session.
3535

3636
1. Open the notebook **1-model-training.ipynb** (double-click on it). A new tab opens in the workspace on the right.
3737

3838
Notice in the upper right corner of the notebook tab, it displays the name of the conda environment being used by this notebook. Confirm that the name you see the slugname of the TensorFlow conda environment (`tensorflow27_p37_cpu_v1`)
39-
39+
4040
![](./images/confirm-kernel.png)
4141

42-
1. Now you will work in the notebook. Scroll through each cell and read the explanations. When you encounter a `code` cell, execute it (using **shift + enter**) and view the results. For executable cells, the ""[ ]"" changes to a "[\*]" while executing, then a number when complete "[1]". (If you run short on time, you can use the *Run* menu to run the remaining cells and the review the results.)
42+
1. Now you will work in the notebook. Scroll through each cell and read the explanations. When you encounter a `code` cell, execute it (using **shift + enter**) and view the results. For executable cells, the ""[ ]"" changes to a "[\*]" while executing, then a number when complete "[1]". (If you run short on time, you can use the *Run* menu to run the remaining cells and the review the results.)
43+
4344
**You can proceed to the next lab.**

labs/MLSummit21/lab-7-wrap.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lab 8 - Summary and Wrap Up
1+
# Lab 7 - Summary and Wrap Up
22

33
## Summary
44

@@ -11,7 +11,7 @@ In this workshop, we have gone through the simple steps of building and deployin
1111
* Deploy the model
1212
* Deactivate resources
1313

14-
The purpose of this workshop was to give you an overview of the OCI Data Science service without going into the details and more advanced scenarios. Although the workshop simulates and end-to-end story, typical machine learning use cases are more complex. We have a series of additional resources and tutorials that cover some of these more advanced use cases. Try them out in your OCI tenancy:
14+
The purpose of this workshop was to give you an overview of the OCI Data Science service without going into the details and more advanced scenarios. Although the workshop simulates and end-to-end story, typical machine learning use cases are more complex. We have a series of additional resources and tutorials that cover some of these more advanced use cases. Try them out in your OCI tenancy:
1515

1616
* [Create your own conda environment from scratch](https://blogs.oracle.com/ai-and-datascience/post/creating-a-new-conda-environment-from-scratch-in-oci-data-science)
1717

@@ -21,16 +21,16 @@ The purpose of this workshop was to give you an overview of the OCI Data Science
2121

2222
* [Calling OCI Data Flow from Data Science](https://github.com/oracle/oci-data-science-ai-samples/blob/master/conda_environment_notebooks/pyspark/dataflow.ipynb)
2323

24-
* ADS Library is now available on [PyPi](https://pypi.org/project/oracle-ads/). Try it on your laptop!
24+
* ADS Library is now available on [PyPi](https://pypi.org/project/oracle-ads/). Try it on your laptop!
2525

26-
## Stay in Touch!
26+
## Stay in Touch!
2727

28-
* Read our blog posts at [https://blogs.oracle.com/ai-and-datascience/](https://blogs.oracle.com/ai-and-datascience/)
28+
* Read our blog posts at [https://blogs.oracle.com/ai-and-datascience/](https://blogs.oracle.com/ai-and-datascience/)
2929

30-
* [Watch our tutorials on YouTube](https://www.youtube.com/playlist?list=PLKCk3OyNwIzv6CWMhvqSB_8MLJIZdO80L).
30+
* [Watch our tutorials on YouTube](https://www.youtube.com/playlist?list=PLKCk3OyNwIzv6CWMhvqSB_8MLJIZdO80L).
3131

3232
* Our service documentation is also available at [https://docs.oracle.com/en-us/iaas/data-science/using/data-science.htm](https://docs.oracle.com/en-us/iaas/data-science/using/data-science.htm)
3333

34-
* The ADS SDK Documentation is available at [https://docs.oracle.com/en-us/iaas/tools/ads-sdk/latest/index.html](https://docs.oracle.com/en-us/iaas/tools/ads-sdk/latest/index.html).
34+
* The ADS SDK Documentation is available at [https://docs.oracle.com/en-us/iaas/tools/ads-sdk/latest/index.html](https://docs.oracle.com/en-us/iaas/tools/ads-sdk/latest/index.html).
3535

3636
* ADS is now available on [PyPi](https://pypi.org/project/oracle-ads/).

labs/MLSummit21/notebooks/1-model-training.ipynb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"metadata": {},
4747
"outputs": [],
4848
"source": [
49-
"#!pip install oracle-ads==2.5.6"
49+
"!pip install oracle-ads==2.5.6"
5050
]
5151
},
5252
{
@@ -125,12 +125,17 @@
125125
"cell_type": "markdown",
126126
"metadata": {},
127127
"source": [
128-
"The code cell below will work in you are in the **Ashburn** region. \n",
128+
"The code cell below will work only if your notebook session is running in the **Ashburn** region. If not use these instructions to download it to your local computer, then upload it to the notebook session, then use it to create a dataset. \n",
129129
"\n",
130-
"The file is also available publicly at this url: \n",
130+
"1. Download the file from this public url and save it on your local computer: \n",
131131
"https://objectstorage.us-ashburn-1.oraclecloud.com/n/bigdatadatasciencelarge/b/hosted-ds-datasets/o/synthetic%2Forcl_attrition.csv\n",
132132
"\n",
133-
"You can download it and drop it in the file browser of JupyterLab."
133+
"2. Use the Upload Files button (or drag and drop) to upload the csv file to the same folder as 1-model-training.ipynb\n",
134+
"\n",
135+
"3. Run the following instruction instead of the code cell below.\n",
136+
"```\n",
137+
"employees = DatasetFactory.open(\"synthetic_orcl_attrition.csv\", format='csv', delimiter=\",\", target=\"Attrition\").set_positive_class('Yes')\n",
138+
"```"
134139
]
135140
},
136141
{

0 commit comments

Comments
 (0)