Skip to content

Commit d5a48e2

Browse files
committed
readme updated
1 parent 43dd1f4 commit d5a48e2

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

README.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,19 @@ Change back to the root of scaffold
6969
cd scaffold
7070
```
7171

72-
Update the `.env.local` file and change `path/to/knowledge-base` to point to the local knowledge base that you just checked out. (Don't remove the `file://` for preferences and manifest.)
72+
Update the `.env.local` file and change `path/to/knowledge-base` to point to the local knowledge base that you just checked out. (Don't remove the `file://` for default_preferences and manifest.)
7373

7474
```properties
7575
# .env.local
76-
preferences=file:///Users/bob/knowledge-base/preferences.json
76+
default_preferences=file:///Users/bob/knowledge-base/preferences.json
7777
mpm=/Users/bob/knowledge-base/prioritization_algorithms/motivational_potential_model.csv
7878
manifest=file:///Users/bob/knowledge-base/mpog_local_manifest.yaml
7979
...
8080
```
8181

82-
Run SCAFFOLD API
83-
82+
##### Run SCAFFOLD API
83+
There are two different ways to run SCAFFOLD API:
84+
1. Run SCAFFOLD API using uvicorn
8485
```zsh
8586
ENV_PATH=.env.local uvicorn scaffold.api:app
8687
# Expect to see a server start message like this "INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)"
@@ -91,8 +92,12 @@ You can use Postman or your favorite tool to send a message and check the result
9192
```zsh
9293
curl --data "@tests/test_cases/input_message.json" http://localhost:8000/createprecisionfeedback/
9394
```
95+
2. Run SCAFFOLD API using CLI (`pipeline web` command )
9496

95-
Run SCAFFOLD CLI
97+
```zsh
98+
ENV_PATH=/user/.../dev.env pipeline web
99+
```
100+
##### Run SCAFFOLD CLI with JSON inputs
96101
First install the python app. Then use the following command to run the pipeline on one json input file
97102

98103
```zsh
@@ -106,18 +111,25 @@ ENV_PATH=/user/.../dev.env pipeline batch '/path/to/input/folder/' --max-files 5
106111
```
107112
Use --max-files if you need to limit the number of files to process.
108113

109-
Use the following command to run the pipeline passing preformance_data, history and preferences as separate CSV files
114+
##### Run SCAFFOLD CLI with CSV inputs
115+
First install the python app. Then update the `.env.local` file and add links to history and preferences csv files along with other parameters mentioned earlier (manifest, default_preferences and mpm).
110116

111-
```zsh
112-
ENV_PATH=/user/.../dev.env pipeline batch_csv '/path/to/performance/data/file.csv' '/path/to/preferences/file.csv' '/path/to/history/file.csv' --performance-month {performance month i.e. 2024-05-01} --max-files 500
117+
```properties
118+
# .env.local
119+
default_preferences=file:///Users/bob/knowledge-base/preferences.json
120+
mpm=/Users/bob/knowledge-base/prioritization_algorithms/motivational_potential_model.csv
121+
manifest=file:///Users/bob/knowledge-base/mpog_local_manifest.yaml
122+
preferences=/Users/bob/data/preferences.csv
123+
history=/Users/bob/data/history.csv
124+
...
113125
```
114-
Use --performance-month to set the performance month for batch_csv command.
115-
116-
Use the following command to run the pipeline api
126+
Then use the following command to run the pipeline passing performance data csv file
117127

118128
```zsh
119-
ENV_PATH=/user/.../dev.env pipeline web
129+
ENV_PATH=/user/.../dev.env pipeline batch_csv '/path/to/performance/data/file.csv' --performance-month {performance month i.e. 2024-05-01} --max-files 500
120130
```
131+
Use --performance-month to set the performance month for batch_csv command and optional --max-files to limit the cases to process for development .
132+
121133

122134
## Environment variables
123135

0 commit comments

Comments
 (0)