Skip to content

Commit 2bbe2b0

Browse files
authored
Merge pull request #96 from STRIDES/update_tutorials_rs
Update tutorials rs
2 parents 213d892 + a41d24a commit 2bbe2b0

23 files changed

+92
-107
lines changed

docs/KubeFlow_Azure.md

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,60 @@
1313
# Azure Setup
1414

1515
To log into Azure from the command line interface, run the following commands
16-
-az login
17-
-az account set --subscription <NAME OR ID OF SUBSCRIPTION>
18-
16+
```
17+
az login
18+
az account set --subscription <NAME OR ID OF SUBSCRIPTION>
19+
```
1920
Create a resource group (if neccessary)
20-
-az group create -n <RESOURCE_GROUP_NAME> -l <LOCATION>
21-
21+
```
22+
az group create -n <RESOURCE_GROUP_NAME> -l <LOCATION>
23+
```
2224

2325
Create a specifically defined cluster:
24-
-az aks create -g <RESOURCE_GROUP_NAME> -n <NAME> -s <AGENT_SIZE> -c <AGENT_COUNT> -l <LOCATION> --generate-ssh-keys
25-
26+
```
27+
az aks create -g <RESOURCE_GROUP_NAME> -n <NAME> -s <AGENT_SIZE> -c <AGENT_COUNT> -l <LOCATION> --generate-ssh-keys
28+
```
2629

2730

2831
# KubeFlow installation
2932

3033
Create user credentials. You only need to run this command once.
31-
-az aks get-credentials -n <NAME> -g <RESOURCE_GROUP_NAME>
32-
34+
```
35+
az aks get-credentials -n <NAME> -g <RESOURCE_GROUP_NAME>
36+
```
3337
Download the kfctl v1.2.0 release from the [Kubeflow releases page](https://github.com/kubeflow/kfctl/releases/tag/v1.2.0)
3438

35-
Unpack the tar ball
36-
-tar -xvf kfctl_v1.2.0_<platform>.tar.gz
37-
39+
Unpack the tar ball.
40+
```
41+
tar -xvf kfctl_v1.2.0_<platform>.tar.gz
42+
```
3843
Run the following commands to set up and deploy Kubeflow in order. The code below includes an optional command to add the binary kfctl to your path. If you don’t add the binary to your path, you must use the full path to the kfctl binary each time you run it.
3944

45+
```
46+
export PATH=$PATH:"<path-to-kfctl>
4047
41-
- export PATH=$PATH:"<path-to-kfctl>
42-
43-
- export KF_NAME=<your choice of name for the Kubeflow deployment>
48+
export KF_NAME=<your choice of name for the Kubeflow deployment>
4449
45-
- export BASE_DIR=<path to a base directory>
50+
export BASE_DIR=<path to a base directory>
4651
47-
- export KF_DIR=${BASE_DIR}/${KF_NAME}
52+
export KF_DIR=${BASE_DIR}/${KF_NAME}
4853
49-
- export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml"
54+
export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml"
5055
51-
- mkdir -p ${KF_DIR}
52-
- cd ${KF_DIR}
53-
- kfctl apply -V -f ${CONFIG_URI}
56+
mkdir -p ${KF_DIR}
57+
cd ${KF_DIR}
58+
kfctl apply -V -f ${CONFIG_URI}
59+
```
5460

61+
Run this command to check that the resources have been deployed correctly in namespace kubeflow:
62+
63+
```
64+
kubectl get all -n kubeflow
65+
```
5566

56-
Run this command to check that the resources have been deployed correctly in namespace kubeflow
57-
58-
- kubectl get all -n kubeflow
59-
60-
Open the KubeFlow Dashboard , the default installation does not create an external endpoint but you can use port-forwarding to visit your cluster. Run the following command
61-
62-
- kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80
63-
64-
Next, open http://localhost:8080 in your browser.
67+
Open the KubeFlow Dashboard , the default installation does not create an external endpoint but you can use port-forwarding to visit your cluster. Run the following command:
68+
69+
```
70+
kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80
71+
```
72+
Next, open http://localhost:8080 in your browser.

docs/create_index_from_csv.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
### Create an Azure search index from a csv file
22
:sparkles: Here we outline how to create an Azure search index from a CSV file summarizing funded award data exported from Reporter.nih.gov
33

4-
### 1) Generate input CSV
4+
### 1) Download input CSV
55
:ear: If you already have your csv ready, skip to section (2)
66

7-
Our input data comes from the csv export option for [Reporter.nih.gov](https://reporter.nih.gov/). Navigate to reporter.nih.gov and select `Advanced Search`. Input your search parameters. In this case we filtered for awards made by NIGMS in FY 23. In the top right, select `Export`.
7+
Download this public [csv file](https://www.kaggle.com/datasets/henryshan/2023-data-scientists-salary?resource=download) from kaggle to use as our input.
88

9-
Select your export columns and make sure you export as a csv. In the example input data file we only selected 'Title', 'Project_ID', and 'Total_Cost', although a few other columns were also exported.
10-
11-
![Export from Reporter](/docs/images/1_export_reporter_csv.png)
12-
13-
If using the UI to upload, you need to make two small edits to the csv that gets exported. First, remove the extra comma at the end of each line. Second, replace the spaces in column names in the header row. You can do this using something like Python, or just do a find/replace in a text editor.
9+
![Kaggle-csv](/docs/images/kaggle-input.jpeg)
1410

1511
### 2) Import data into Azure blob storage
1612
:ear: If you already added your data to blob storage skip to section (3)
@@ -35,13 +31,13 @@ Navigate to AI Search and [create a new search](https://learn.microsoft.com/en-u
3531

3632
![Create new search](/docs/images/5_create_new_db.png)
3733

38-
Click `Import data`
34+
Click `Import data`.
3935

4036
![Import Data](/docs/images/6_import_data.png)
4137

4238
Now fill out all the necessary parameters.
4339
+ Data Source: Select `Azure Blob Storage`. New options will drop down.
44-
+ Data source name: This can be anything, but go with something like `grant-data`.
40+
+ Data source name: This can be anything, but go with something like `ds-salaries-data`.
4541
+ Data to extract: Select `Content and metadata`.
4642
+ Parsing mode: Select `Delimited text`. Check the `First Line Contains Header` box and leave `Delimiter Character` as `,`.
4743
+ Connection string: Click `Choose an existing connection` and navigate to your storage account and container.
@@ -51,24 +47,21 @@ Now fill out all the necessary parameters.
5147
+ Description: *Optional*.
5248
+ If you get errors when trying to go to the next screen, make sure you don't have trailing commas in your csv, and there are not spaces in the header names. If this happens, fix those errors, re-upload to blob storage, and then try again!
5349

54-
![Connect to blog](/docs/images/7_connect_to_blob.png)
50+
![Connect to blog](/docs/images/import-data.jpeg)
5551

5652
Skip ahead to `Customize target index`.
5753
+ Give your index a name.
5854
+ Make `Project_Number` your key.
5955
+ Make sure the expected column names are present under fields. For the columns you expect to use, select `Retrievable` and `Searchable`. If you select all the columns you will just pay for indexing you are not using.
6056

61-
![Customize index](/docs/images/8_target_index.png)
57+
![Customize index](/docs/images/index-csv.jpeg)
6258

6359
Advance to `Create an indexer`, name your indexer, then click `Submit`.
6460

65-
![Create indexer](/docs/images/9_create_indexer.png)
61+
![Create indexer](/docs/images/create-indexer.jpeg)
6662

6763
Navigate to `Indexes` on the left panel and wait until your index shows as many documents as you have lines in your file. It will read 0 documents until it is finished indexing. The example 500 line csv takes about one minute.
6864

69-
![Check index](/docs/images/10_check_index.png)
70-
71-
7265
And that is it! Now return to [the tutorial notebook to run queries against this csv using GPT-4]( /notebooks/GenAI/notebooks/AzureAIStudio_index_structured_with_console.ipynb).
7366

7467

337 KB
Loading

docs/images/RM-hello.jpeg

188 KB
Loading

docs/images/RM-parameters.jpeg

148 KB
Loading

docs/images/RM_chat-button.jpeg

246 KB
Loading
335 KB
Loading
178 KB
Loading

docs/images/RM_gpt-4o-deploy.jpeg

331 KB
Loading
460 KB
Loading

0 commit comments

Comments
 (0)