code: def test_fit_lstm_feature(self):
      from sklearn.preprocessing import StandardScaler
  
      scaler = StandardScaler()
      tsdata_train = (
          get_tsdataset().gen_dt_feature().scale(scaler, fit=True)
      )
      tsdata_valid = (
          get_tsdataset().gen_dt_feature().scale(scaler, fit=False)
      )
  
      auto_estimator = AutoTSEstimator(
          model="lstm",
          search_space="minimal",
          past_seq_len=hp.randint(4, 6),
          future_seq_len=1,
          selected_features="auto",
          metric="mse",
          loss=torch.nn.MSELoss(),
          logs_dir="/tmp/auto_trainer",
          cpus_per_trial=2,
          name="auto_trainer",
      )
      ts_pipeline = auto_estimator.fit(
          data=tsdata_train,
          epochs=1,
          batch_size=hp.choice([32, 64]),
          validation_data=tsdata_valid,
          n_sampling=1,
      )
      best_config = auto_estimator.get_best_config()
      best_model = auto_estimator._get_best_automl_model()
      assert 4 <= best_config["past_seq_len"] <= 6
  
      assert isinstance(ts_pipeline, TSPipeline)
  
      # use raw base model to predic and evaluate
      tsdata_valid.roll(
          lookback=best_config["past_seq_len"],
          horizon=0,
          feature_col=best_config["selected_features"],
      )
      x_valid, y_valid = tsdata_valid.to_numpy()
      y_pred_raw = best_model.predict(x_valid)
      y_pred_raw = tsdata_valid.unscale_numpy(y_pred_raw)
  
      # use tspipeline to predic and evaluate
      eval_result = ts_pipeline.evaluate(tsdata_valid)
      y_pred = ts_pipeline.predict(tsdata_valid)
  
      # check if they are the same
      np.testing.assert_almost_equal(y_pred, y_pred_raw)
  
      # save and load
      ts_pipeline.save("/tmp/auto_trainer/autots_tmp_model_lstm")
      new_ts_pipeline = TSPipeline.load(
          "/tmp/auto_trainer/autots_tmp_model_lstm"
      )
  
      # check if load ppl is the same as previous
      eval_result_new = new_ts_pipeline.evaluate(tsdata_valid)
      y_pred_new = new_ts_pipeline.predict(tsdata_valid)
      np.testing.assert_almost_equal(eval_result[0], eval_result_new[0])
      np.testing.assert_almost_equal(y_pred, y_pred_new)
  
      # check if load ppl is the same as previous with onnx
      try:
          import onnx
          import onnxruntime
  
          eval_result_new_onnx = new_ts_pipeline.evaluate_with_onnx(
              tsdata_valid
          )
          y_pred_new_onnx = new_ts_pipeline.predict_with_onnx(
              tsdata_valid
          )
          np.testing.assert_almost_equal(
              eval_result[0], eval_result_new_onnx[0], decimal=5
          )
          np.testing.assert_almost_equal(
              y_pred, y_pred_new_onnx, decimal=5
          )
      except ImportError:
          pass
  
      # use tspipeline to incrementally train
      new_ts_pipeline.fit(tsdata_valid)
  
imports: from unittest import TestCase
  import pytest
  import torch
  import torch.nn
  from torch.utils.data import TensorDataset, DataLoader
  import numpy
  from zoo.chronos.autots import AutoTSEstimator, TSPipeline
  from zoo.chronos.data import TSDataset
  from zoo.orca.automl import hp
  import pandas
label_desc: Use image node_id 5 for calling the TestAutoTrainer obj's underlying member method code with example usage: obj.test_fit_lstm_feature() without return types