Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chronos: tool mode for bigdl-chronos #5841

Open
TheaperDeng opened this issue Sep 19, 2022 · 0 comments
Open

Chronos: tool mode for bigdl-chronos #5841

TheaperDeng opened this issue Sep 19, 2022 · 0 comments
Labels

Comments

@TheaperDeng
Copy link
Collaborator

This Issue is used for discussion

Background

Chronos currenly provides a full set of python API with which users could build a forecaster/detector in their python application easily. While this may bring some kind of learning barrier to our users. Although we have quick tour, examples and how to guides to help our users to copy-and-revise, users still need to

  1. understand the concept of TSDataset, Forecaster and so on.

  2. write and debug 30-100 lines of code to prepare data and train their forecaster

  3. refer to 2-3 how-to guides/examples to understand how to evaluate/save/serve the forecaster.

During our collaboration with customers and the inspiration of other libraries (e.g. mmdetection, mmsegmentation...), we found that a command line tool could be more friendly to engineers.

Tool mode might be the solution to this, this means users only need to type 1 lines of bash cmd and a forecaster is either trained, evaluated, being used to inference or even served on a port.

Methodology

We will develop a new command line tool chronos-cmd with five operations: train, evaluate, predict, benchmark, serve for this tool mode chronos.

Train

For chronos-cmd:

chronos-cmd train --data /path/to/data
                  --lookback 100
                  --horizon 1
                  --output_dir /path/to/save
                  --model "tcn"" # optional
                  --other_options # optional

Inside this cmd

  1. Data will be loaded, checked for quality, automatically applied typical preprocess methods.

  2. A forecaster will be fitted and saved

Evaluate

chronos-cmd evaluate --data /path/to/data
                     --model_dir /path/to/load
                     --other_options # optional

Predict

chronos-cmd predict --data /path/to/data
                    --model_dir /path/to/load
                    --other_options # optional

Benchmark

Similar tool is developing here: https://github.com/analytics-zoo/Chronos-benchmark-tool

chronos-cmd benchmark --data /path/to/data
                      --model_dir /path/to/load
                      --stage "latency"
                      --other_options # optional

Serve

A better way to serve is to use chronos with other inferece server(e.g. NVIDIA Triton), but we may have a self-written(naive one) time series server

chronos-cmd serve --model_dir /path/to/load
                  --port 12345
                  --other_options # optional

FAQ

  • chronos-cmd will be developed in python (not bash) and be installed with other src to user by pip install bigdl-chronos

  • The implementation workload should be OK since we are working on the benchmark tool and most of the code could be reused

  • chronos-cmd will only be a friendly extension to users, python API will still be the mature way to use chronos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant