Skip to content

Commit cec5e8b

Browse files
committed
chore(docs): update commands to use package name
This commit updates the commands to use the `kepler-model` package name instead of `python ...` to run the model training commands. Signed-off-by: Vibhu Prashar <[email protected]>
1 parent bef63e7 commit cec5e8b

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

model_training/cmd_instruction.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Manual Metric Collection and Training with Entrypoint
22

3+
<!--toc:start-->
4+
5+
- [Manual Metric Collection and Training with Entrypoint](#manual-metric-collection-and-training-with-entrypoint)
6+
- [1. Collect metrics](#1-collect-metrics)
7+
- [1.1. By defining start time and end time](#11-by-defining-start-time-and-end-time)
8+
- [1.2. By defining last interval from the execution time](#12-by-defining-last-interval-from-the-execution-time)
9+
- [Output](#output)
10+
- [2. Train models](#2-train-models)
11+
- [3. Export models](#3-export-models)
12+
- [3.1. Extracting collect date from benchmark file](#31-extracting-collect-date-from-benchmark-file)
13+
- [3.2. Manually set collect-date](#32-manually-set-collect-date)
14+
15+
<!--toc:end-->
16+
317
## 1. Collect metrics
418

519
Without benchmark/pipeline automation, kepler metrics can be collected by `query` function by setting `BENCHMARK`, `PROM_URL`, `COLLECT_ID` and either one of the following time options.
@@ -12,25 +26,25 @@ PROM_URL= # e.g., http://localhost:9090
1226
COLLECT_ID= # any unique id e.g., machine name
1327
```
1428

15-
### 1.1. by defining start time and end time
29+
### 1.1. By defining start time and end time
1630

1731
```bash
1832
# time value setting
1933
START_TIME= # format date +%Y-%m-%dT%H:%M:%SZ
2034
END_TIME= # format date +%Y-%m-%dT%H:%M:%SZ
2135

2236
# query execution
23-
DATAPATH=/path/to/workspace python cmd/main.py query --benchmark $BENCHMARK --server $PROM_URL --output kepler_query --start-time $START_TIME --end-time $END_TIME --id $COLLECT_ID
37+
DATAPATH=/path/to/workspace kepler-model query --benchmark $BENCHMARK --server $PROM_URL --output kepler_query --start-time $START_TIME --end-time $END_TIME --id $COLLECT_ID
2438
```
2539

26-
### 1.2. by defining last interval from the execution time
40+
### 1.2. By defining last interval from the execution time
2741

2842
```bash
2943
# time value setting
3044
INTERVAL= # in second
3145

3246
# query execution
33-
DATAPATH=/path/to/workspace python cmd/main.py query --benchmark $BENCHMARK --server $PROM_URL --output kepler_query --interval $INTERVAL --id $COLLECT_ID
47+
DATAPATH=/path/to/workspace kepler-model query --benchmark $BENCHMARK --server $PROM_URL --output kepler_query --interval $INTERVAL --id $COLLECT_ID
3448
```
3549

3650
### Output
@@ -49,7 +63,7 @@ PIPELINE_NAME= # any unique name for the pipeline (one pipeline can be accumulat
4963

5064
# train execution
5165
# require COLLECT_ID from collect step
52-
DATAPATH=/path/to/workspace MODEL_PATH=/path/to/workspace python cmd/main.py train --pipeline-name $PIPELINE_NAME --input kepler_query --id $COLLECT_ID
66+
DATAPATH=/path/to/workspace MODEL_PATH=/path/to/workspace kepler-model train --pipeline-name $PIPELINE_NAME --input kepler_query --id $COLLECT_ID
5367
```
5468

5569
## 3. Export models
@@ -61,18 +75,18 @@ EXPORT_PATH= # /path/to/kepler-model-db/models
6175
PUBLISHER= # github account of publisher
6276
```
6377

64-
### 3.1. extracting collect date from benchmark file
78+
### 3.1. Extracting collect date from benchmark file
6579

6680
The benchmark file is created by CPE operator or by query function from step 1.
6781

6882
```bash
6983
# export execution
7084
# require BENCHMARK from collect step
7185
# require PIPELINE_NAME from train step
72-
DATAPATH=/path/to/workspace MODEL_PATH=/path/to/workspace python cmd/main.py export --benchmark $BENCHMARK --pipeline-name $PIPELINE_NAME -o $EXPORT_PATH --publisher $PUBLISHER --zip=true
86+
DATAPATH=/path/to/workspace MODEL_PATH=/path/to/workspace kepler-model export --benchmark $BENCHMARK --pipeline-name $PIPELINE_NAME -o $EXPORT_PATH --publisher $PUBLISHER --zip=true
7387
```
7488

75-
### 3.2. manually set collect-date
89+
### 3.2. Manually set collect-date
7690

7791
If the data is collected by tekton, there is no benchmark file created. Need to manually set `--collect-date` instead of `--benchmark` parameter.
7892

@@ -83,5 +97,5 @@ COLLECT_DATE= # collect date
8397
# export execution
8498
# require BENCHMARK from collect step
8599
# require PIPELINE_NAME from train step
86-
DATAPATH=/path/to/workspace MODEL_PATH=/path/to/workspace python cmd/main.py export --pipeline-name $PIPELINE_NAME -o $EXPORT_PATH --publisher $PUBLISHER --zip=true --collect-date $COLLECT_DATE
100+
DATAPATH=/path/to/workspace MODEL_PATH=/path/to/workspace kepler-model export --pipeline-name $PIPELINE_NAME -o $EXPORT_PATH --publisher $PUBLISHER --zip=true --collect-date $COLLECT_DATE
87101
```

0 commit comments

Comments
 (0)