class_docstr: Implementations of DRL algorithms
  Attributes
  ----------
      env: gym environment class
          user-defined class
  Methods
  -------
      get_model()
          setup DRL algorithms
      train_model()
          train DRL algorithms in a train dataset
          and output the trained model
      DRL_prediction()
          make a prediction in a test dataset and get results
code: def get_model(self, model_name, model_kwargs):
      self.env_config = {
          "price_array": self.price_array,
          "tech_array": self.tech_array,
          "turbulence_array": self.turbulence_array,
          "if_train": True,
      }
      self.model_kwargs = model_kwargs
      self.gamma = model_kwargs.get("gamma", 0.985)
  
      env = self.env
      env.env_num = 1
      agent = MODELS[model_name]
      if model_name not in MODELS:
          raise NotImplementedError("NotImplementedError")
  
      stock_dim = self.price_array.shape[1]
      self.state_dim = 1 + 2 + 3 * stock_dim + self.tech_array.shape[1]
      self.action_dim = stock_dim
      self.env_args = {
          "env_name": "StockEnv",
          "config": self.env_config,
          "state_dim": self.state_dim,
          "action_dim": self.action_dim,
          "if_discrete": False,
          "max_step": self.price_array.shape[0] - 1,
      }
  
      model = Config(
          agent_class=agent, env_class=env, env_args=self.env_args
      )
      model.if_off_policy = model_name in OFF_POLICY_MODELS
      if model_kwargs is not None:
          try:
              model.break_step = int(
                  2e5
              )  # break training if 'total_step > break_step'
              model.net_dims = (
                  128,
                  64,
              )  # the middle layer dimension of MultiLayer Perceptron
              model.gamma = (
                  self.gamma
              )  # discount factor of future rewards
              model.horizon_len = model.max_step
              model.repeat_times = 16  # repeatedly update network using ReplayBuffer to keep critic's loss small
              model.learning_rate = model_kwargs.get(
                  "learning_rate", 1e-4
              )
              model.state_value_tau = 0.1  # the tau of normalize for value and state `std = (1-std)*std + tau*std`
              model.eval_times = model_kwargs.get("eval_times", 2**5)
              model.eval_per_step = int(2e4)
          except BaseException:
              raise ValueError(
                  "Fail to read arguments, please check 'model_kwargs' input."
              )
      return model
  
file_path: FinRL/finrl/agents/elegantrl/models.py
imports: from __future__ import annotations
  import torch
  from elegantrl.agents import *
  from elegantrl.train.config import Config
  from elegantrl.train.run import train_agent
label_desc: Use image node_id 2 for calling the DRLAgent obj's underlying member method code with example usage: obj.get_model(model_name, model_kwargs) and returns: model