Rate This Document
Findability
Accuracy
Completeness
Readability

train

Command Function

Uses the existing tuning result to continue tuning on the use interactive screen, or directly uses the template file directory for tuning on use interactive screen.

Syntax

1
train [-h] [-r <round>] [--algorithm <algo>] [-i <ratio>]

Parameter Description

Table 1 train subcommand parameters

Parameter

Description

-h/--help

Obtains help information.

-r/--round

Number of training rounds, which defaults to 50.

--algorithm

Training algorithm, which defaults to HPO.

-i/--initial-random-ratio

Initial random ratio. A larger value indicates more random training rounds. The default value is 0.5 before training starts and changes to 0 once training starts. Valid values range from 0 to 1.

Example

Continue two rounds of automatic tuning on the use interactive screen. The final report and the previous automatic tuning data are summarized and sorted.

1
train -r 2

Command output:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[2025-02-25 11:12:21 UTC] [KAT] [message] - Algorithm               : HPO
[2025-02-25 11:12:21 UTC] [KAT] [message] - ================================================================================
[2025-02-25 11:12:21 UTC] [KAT] [message] -           kunpeng automatic tuning - round 6
[2025-02-25 11:12:21 UTC] [KAT] [message] -           start time: 2025-02-25 11:12:21
[2025-02-25 11:12:21 UTC] [KAT] [message] - --------------------------------------------------------------------------------
[2025-02-25 11:12:21 UTC] [KAT] [message] - Due to the presence of historical data and the random iterations being set to 0, the inference tuning phase begins.
[2025-02-25 11:12:33 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step    <round set up>    start -----------
[2025-02-25 11:12:33 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step   <assign params>    start -----------
[2025-02-25 11:12:35 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step      <run test>      start -----------
[2025-02-25 11:12:42 UTC] [KAT] [message] - --------- Run test successfully.
[2025-02-25 11:12:42 UTC] [KAT] [message] - --------- Performance     :       83.74
[2025-02-25 11:12:42 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step  <round tear down>   start -----------
[2025-02-25 11:12:42 UTC] [KAT] [message] - ================================================================================
[2025-02-25 11:12:42 UTC] [KAT] [message] -           kunpeng automatic tuning - round 7
[2025-02-25 11:12:42 UTC] [KAT] [message] -           start time: 2025-02-25 11:12:42
[2025-02-25 11:12:42 UTC] [KAT] [message] - --------------------------------------------------------------------------------
[2025-02-25 11:12:42 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step    <round set up>    start -----------
[2025-02-25 11:12:42 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step   <assign params>    start -----------
[2025-02-25 11:12:44 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step      <run test>      start -----------
[2025-02-25 11:12:52 UTC] [KAT] [message] - --------- Run test successfully.
[2025-02-25 11:12:52 UTC] [KAT] [message] - --------- Performance     :       81.41
[2025-02-25 11:12:52 UTC] [KAT] [message] - --------- kunpeng automatic tuning - Step  <round tear down>   start -----------
[2025-02-25 11:12:52 UTC] [KAT] [message] - ============================== Auto Tuning Report ==============================
[2025-02-25 11:12:52 UTC] [KAT] [message] - Total round             : 7
[2025-02-25 11:12:52 UTC] [KAT] [message] - Total run               : 12
[2025-02-25 11:12:52 UTC] [KAT] [message] - Fail times              : 0
[2025-02-25 11:12:52 UTC] [KAT] [message] - Application             : Postgresql
[2025-02-25 11:12:52 UTC] [KAT] [message] - Application version     : 11.3
[2025-02-25 11:12:52 UTC] [KAT] [message] - Test tool               : benchmarksql
[2025-02-25 11:12:52 UTC] [KAT] [message] - Tuning direction        : high
[2025-02-25 11:12:52 UTC] [KAT] [message] - Algorithm               : HPO
[2025-02-25 11:12:52 UTC] [KAT] [message] - Random initial ratio    : 0.5
[2025-02-25 11:12:52 UTC] [KAT] [message] - Performance description : tpmC, transactions per minute
[2025-02-25 11:12:52 UTC] [KAT] [message] - Parameter groups        : Postgresql
[2025-02-25 11:12:52 UTC] [KAT] [message] - Baseline performance    : 97.03
[2025-02-25 11:12:52 UTC] [KAT] [message] - Top 10 performance :
[2025-02-25 11:12:52 UTC] [KAT] [message] - --------------------------------------------------------------------------------
[2025-02-25 11:12:52 UTC] [KAT] [message] - |  Rank  |     Round     |  Performance   |  Improvement  (%) |
[2025-02-25 11:12:52 UTC] [KAT] [message] - --------------------------------------------------------------------------------
[2025-02-25 11:12:52 UTC] [KAT] [message] - |   1    |   round  4    |     86.92      |      -10.42       |
[2025-02-25 11:12:52 UTC] [KAT] [message] - |   2    |   round  6    |     83.74      |      -13.70       |
[2025-02-25 11:12:52 UTC] [KAT] [message] - |   3    |   round  7    |     81.41      |      -16.10       |
[2025-02-25 11:12:52 UTC] [KAT] [message] - |   4    |   round  1    |     80.32      |      -17.22       |
[2025-02-25 11:12:52 UTC] [KAT] [message] - |   5    |   round  3    |     79.44      |      -18.13       |
[2025-02-25 11:12:52 UTC] [KAT] [message] - |   6    |   round  5    |     70.05      |      -27.81       |
[2025-02-25 11:12:52 UTC] [KAT] [message] - |   7    |   round  2    |     66.37      |      -31.60       |
[2025-02-25 11:12:52 UTC] [KAT] [message] - --------------------------------------------------------------------------------
[2025-02-25 11:12:52 UTC] [KAT] [message] - Note:
[2025-02-25 11:12:52 UTC] [KAT] [message] - The performance value is the return value of the run test step,
[2025-02-25 11:12:52 UTC] [KAT] [message] - Performance improvement (%) =
[2025-02-25 11:12:52 UTC] [KAT] [message] -     (round performance - baseline performance) / baseline performance * 100
[2025-02-25 11:12:52 UTC] [KAT] [message] - Case package locate: /opt/template/template_Postgresql_20250225_091524/train-20250225-112832
[2025-02-25 11:12:52 UTC] [KAT] [message] - ================================================================================