Enabling Quiet Mode (--quiet)
If a user does not need to receive risk warnings when invoking CLI APIs, add --quiet to the first parameter of the command to enable the quiet mode. After this mode is enabled, potential risks except boot_file_path are accepted by default. That is, the CLI interactive prompt is skipped.
Command Example
tk finetune --quiet --data_path /home/HwAiUser/datasets/ --output_path /home/HwAiUser/output/ -- pretrained_model_path /home/HwAiUser/pretrained_models/ --model_config_path /home/HwAiUser/config/model_config_finetune.yaml --boot_file_path /home/HwAiUser/finetune.py
--quiet must be placed at the beginning.
After the quiet mode is enabled, permission risks may exist. If so, the prompt mechanism is as follows.
API |
Option |
Risky Operation |
CLI |
CLI Quiet Mode |
Python API |
|---|---|---|---|---|---|
finetune |
pretrained_model_path |
The access permission of the file or folder specified by the input parameter path is too small, which may cause privilege escalation risks. |
Interactive risk warning, asking users to choose whether to accept the risk and continue the service. |
Warning log. |
Warning log. |
evaluate/infer |
ckpt_path |
||||
finetune/evaluate/infer |
data_path |
||||
output_path |
|||||
model_config_path |
|||||
boot_file_path |
Error returned. |
Error returned. |