code: def main():
      args = parser.parse_args()
      train_data, val_data, test_data = create_data()
      forecaster = get_trained_forecaster(train_data, val_data)
  
      accelerator_fn = {
          "pytorch": forecaster.predict,
          "onnx": forecaster.predict_with_onnx,
          "openvino": forecaster.predict_with_openvino,
      }
  
      if args.accelerator == "onnx":
          forecaster.build_onnx()
      elif args.accelerator == "openvino":
          forecaster.build_openvino()
  
      predict_fn = accelerator_fn[args.accelerator]
  
      x_test, y_test = test_data.to_numpy()
      predict_start = time.time()
      for _ in range(100):
          y_hat = predict_fn(x_test)
      predict_end = time.time()
  
      output = json.dumps(
          {
              "config": args.name,
              "inference_time": predict_end - predict_start,
          }
      )
  
      print(f">>>{output}<<<")
  
file_path: BigDL/python/chronos/benchmark/forecaster_inference/forecaster_inference.py
imports: import time
  import json
  import argparse
  from bigdl.chronos.forecaster import TCNForecaster
  from bigdl.chronos.data import get_public_dataset
  from sklearn.preprocessing import StandardScaler
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types