eIQ Time Series Studio includes a command line interface (CLI) that allows you to generate time series models via the command line just like you would in the GUI. Full documentation of this feature can be found in the eIQ TSS documentation
A Quick Start with the basic key commands is also available.
In TSS version 1.5.5, there are a few command line interface issues to be aware of that will be addressed in the next TSS release. In the meantime, here are workarounds and clarifications:
Generating the TSS library with the library compile option may not work in all circumstances and may return a "Not Found" error.
Workaround: This will be fixed in the next TSS release.
- Windows Workspace Permissions
On Windows PCs, specify the workspace location when launching the TSS CLI server. The default workspace on Windows may not work properly due to a permissions issue, resulting in the following error: [PYI-12556:ERROR] Failed to execute script 'server' due to unhandled exception!
Workaround: Specify a workspace directory location where TSS has read/write access with the tss_cli engine launch --workspace <directory_location> argument
- Do Not Run CLI and GUI Simultaneously
The TSS CLI and TSS GUI should not be run at the same time. Also only one user should interact with the TSS CLI at a time to avoid race conditions in the TSS database if it is on a shared server.
- Engine Launch Syntax Correction
The TSS CLI documentation uses tss_cli engine launch –engine <path to tss_engine>, but the correct syntax is:
tss_cli engine –exe_path <path to tss_engine>
- Windows Command Prompt Delimiters
When using Windows Command Prompt and importing sensor data with the signal import command, use double quotes (" ") to specify the delimiters (ie a space in this case) instead of the single quotes (' ')
- Terminology Clarification
"Optimization" in the documentation refers to the process of training the time series model.
- Finding the Optimization ID during training
The my-opt-id value can be found by viewing the optimization list with tss_cli optimization list --project_name cli_test_project
The label-name value used for emulation commands can be found by viewing the name of the signals with tss_cli signal list --project_name cli_test_project
Arguments such as quick search during training are Boolean values, which are automatically enabled when included as part of the command line argument. For example, use -qs rather than -qs true.
Below is an example using the command line interface with eIQ Time Series Studio:
#Assumes the following items:
#1) tss_cli is in the executable path (C:\Program Files\NXP\eIQ_TimeSeriesStudio-1.5.5)
#2) The dataset is in C:\tss\dataset
#3) A workspace will be setup in C:\tss\workspace
#4) The license key has already been retrieved from the TSS GUI
#5) The TSS GUI is not also concurrently running
#Install license Key
tss_cli.exe license activate --key <your_key>
#Start TSS CLI
tss_cli engine launch -e "C:\Program Files\NXP\eIQ_TimeSeriesStudio-1.5.5\tss_engine\tss_engine.exe" --port 18000 --workspace "C:\tss\workspace"
#Install license key
tss_cli license activate --key <your_key>
#Create a classification project for a FRDM-MCXN947
tss_cli project create --project_name cli_fan_project --algo_type cls --device FRDM-MCXN947 --channels 3 --label_target_num 4
#List all projects in the workspace and see details for the newly generated cli_fan_project
tss_cli project list
tss_cli project query --project_name cli_fan_project
#Add training data
tss_cli signal list --project_name cli_fan_project
tss_cli signal import --project_name cli_fan_project --signal_name ON --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_on.csv --label_id 1 --delimiter " "
tss_cli signal import --project_name cli_fan_project --signal_name OFF --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_off.csv --label_id 2 --delimiter " "
tss_cli signal import --project_name cli_fan_project --signal_name FRICTION --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_friction.csv --label_id 3 --delimiter " "
tss_cli signal import --project_name cli_fan_project --signal_name CLOG --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_clog.csv --label_id 4 --delimiter " "
#Check training data
tss_cli signal query --project_name cli_fan_project --signal_id 1
#Start training the model. It will print out an opt_ID number, which the first time you run it will be "1".
tss_cli optimization start --project_name cli_fan_project -qs --opt_name cli_fan_opt --signals 1 2 3 4
#Get opt_id number while training is running
tss_cli optimization list --project_name cli_fan_project
#Check how far along the training is and get ranking of models to choose a result_ids
tss_cli optimization progress --project_name cli_fan_project --opt_id 1

#Can stop the training if feel like have enough results
tss_cli optimization stop --project_name cli_fan_project --opt_id 1
#Get the result_ids of the best result. It will also be the top ID when checking the progress above. In this case will use 48
tss_cli optimization results --project_name cli_fan_project --opt_id 1

#Get Execution Time estimate for that model
tss_cli library time_estimate --project_name cli_fan_project --opt_id 1 --result_id 48
#Get Label Names
tss_cli signal list --project_name cli_fan_project

#Emulate the library on test data
tss_cli emulation launch --project_name cli_fan_project --opt_id 1 --result_ids 48 --test_file_info "1" C:\tss\data\fan_state_monitoring_3channel\test\test_on.csv " " --test_file_info "2" C:\tss\data\fan_state_monitoring_3channel\test\test_off.csv " " --test_file_info "3" C:\tss\data\fan_state_monitoring_3channel\test\test_friction.csv " " --test_file_info "4" C:\tss\data\fan_state_monitoring_3channel\test\test_clog.csv " "
#Create a TSS library
tss_cli library compile --project_name cli_fan_project --opt_id 1 --result_id 48 --save_path "C:\tss\" --arch "cortex-m33" --toolchain "GCC"
#Create a TSS example project
tss_cli library sample_project --project_name cli_fan_project --opt_id 1 --result_id 48 --save_path "C:\tss" --arch "cortex-m33" --toolchain "GCC"