TIM Connector is a command-line tool that provides an interface through which users can approach TIM for forecasting and anomaly detection. TIM Connector can perform multiple tasks on multiple datasets in parallel. Its flow consists of the following steps:
- Import datasets stored as CSV-files.
- Import task configurations stored as YAML-files. A task configuration specifies what actions to perform on a given dataset. Each task is stored in a separate YAM-file inside a dataset directory. Any file stored in this directory with the appropriate suffix (.yaml) is considered a task file. A dataset directory can include many task files.
- Create the appropriate requests and send them to TIM Web Service.
- Receive the responses and save the forecast or anomaly indicator values as a CSV-file.
While executing these steps, the progress of each task is displayed in the terminal.
You can download TIM Connector from the following links:
Using TIM Connector¶
TIM Connector can be accessed through the following command line calls:
- single-task mode:
> timconnect.exe path\to\dataset\task.yaml
- batch mode:
> timconnect.exe path\to\datasets
- single-task mode:
$ ./timconnect path/to/dataset/task.yaml
- batch mode:
$ ./timconnect path/to/datasets
$ ./timconnect -h usage: timconnect [-u USER] [-p PASSWORD] [--license-key LICENSE-KEY] [-r MAX-CONCURRENT-REQUESTS] [--url-tim URL-TIM] [--url-timlic URL-TIMLIC] [-s] [--version] [-h] path positional arguments: path path to a directory with datasets, or a task file optional arguments: -u, --user USER -p, --password PASSWORD --license-key LICENSE-KEY -r, --max-concurrent-requests MAX-CONCURRENT-REQUESTS sets maximum number of concurrent requests (type: Int64) --url-tim URL-TIM URL of TIM API --url-timlic URL-TIMLIC URL of TIM License Manager API -s, --save save all requests and responses --version show version information and exit -h, --help show this help message and exit
|SUCCESSFUL||Everything went OK, without any warnings.|
|WARNING||Everything went OK, but some warnings occured.|
|DATA ERROR||Something is wrong with the data.|
|CONFIG ERROR||Something is wrong with the configuration. Check your YAML file in a good text editor to see whether there aren't any phantom characters.|
|RESPONSE ERROR||Parsing response failed.|
|REQUEST FAILED||Request was sent, but failed.|
|SKIPPED||The model building part was skipped.|
|UNKNOWN ERROR||An unknown error has occurred.|
When running in batch mode, an additional batch report will be created in the _batch reports directory.
datasets/ CoolDataset/ data.csv forecasting_task.yaml anomalyDetection_task.yaml ... report/ 2018-07-10T12-13-39/ log.txt forecasting_task/ accuracy.txt forecasting_task_copy.yaml log.txt prediction.csv TIMModelBuildingStatusResponse.json anomalyDetection_task/ accuracy.txt anomalyDetection_task_copy.yaml log.txt detection.csv TIMDetectModelBuildingStatusResponse.json ... 2018-07-11T12-12-12/ ... AnotherDataset/ ... _batch reports/ report_2018-07-10T12-13-39.csv report_2018-07-11T12-12-12.csv ...
TIM Connector configuration¶
The desired configuration for TIM Connector can be stored as a YAML-file called .timconnect.yaml in the home directory. If it doesn't exist, it will be automatically created. It may contain the following fields:
- TIM API URL
- TIMLIC API URL
- license key
- maximum concurrent requests
TIM API URL: https://timws.tangent.works/v4.0/api TIMLIC API URL: https://timlic.tangent.works/api/v1 user: myUsername password: myPassword license key: myLicenseKey maximum concurrent requests: 10