ipex-llm
ipex-llm copied to clipboard
Chronos: add gen_synthetic_data API to provide users with offline dataset
Background
Built-in dataset can be downloaded and preprocessed by get_public_dataset
, but considering that users need dataset to benchmark, we may need to add a new API to help users generate dataset even with poor Internet connection.
API design
def gen_synthetic_data(len=10000, **kwargs)
# Generate a dataset according to sine function
# y=sin(2*PI*x/1000), x=[0,1,...,len-1]
parameter:
- len: int, the number indicates the dataset size, default to 10000.
- kwargs: extra arguments passed to initialize the tsdataset, including with_split, val_ratio and test_ratio.
example:
tsdata_gen = gen_synthetic_data()