docstr: Create model from dataset.
  
  Args:
      dataset: timeseries dataset
      allowed_encoder_known_variable_names: List of known variables that are allowed in encoder, defaults to all
      **kwargs: additional arguments such as hyperparameters for model (see ``__init__()``)
  
  Returns:
      Recurrent network
docstr_tok: ["Create","model","from","dataset",".","Args",":","dataset",":","timeseries","dataset","allowed_encoder_known_variable_names",":","List","of","known","variables","that","are","allowed","in","encoder",",","defaults","to","all","*","*","kwargs",":","additional","arguments","such","as","hyperparameters","for","model","(","see","``","__init__","(",")","``",")","Returns",":","Recurrent","network"]
code: def from_dataset(
      cls,
      dataset: TimeSeriesDataSet,
      allowed_encoder_known_variable_names: List[str] = None,
      **kwargs,
  ):
      """
      Create model from dataset.
  
      Args:
          dataset: timeseries dataset
          allowed_encoder_known_variable_names: List of known variables that are allowed in encoder, defaults to all
          **kwargs: additional arguments such as hyperparameters for model (see ``__init__()``)
  
      Returns:
          Recurrent network
      """
      new_kwargs = copy(kwargs)
      new_kwargs.update(
          cls.deduce_default_output_parameters(
              dataset=dataset, kwargs=kwargs, default_loss=MAE()
          )
      )
      assert not isinstance(
          dataset.target_normalizer, NaNLabelEncoder
      ) and (
          not isinstance(dataset.target_normalizer, MultiNormalizer)
          or all(
              [
                  not isinstance(normalizer, NaNLabelEncoder)
                  for normalizer in dataset.target_normalizer
              ]
          )
      ), "target(s) should be continuous - categorical targets are not supported"  # todo: remove this restriction
      return super().from_dataset(
          dataset,
          allowed_encoder_known_variable_names=allowed_encoder_known_variable_names,
          **new_kwargs,
      )
  
file_path: pytorch-forecasting/pytorch_forecasting/models/rnn/__init__.py
imports: from copy import copy
  from typing import Dict, List, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from pytorch_forecasting.data.encoders import MultiNormalizer, NaNLabelEncoder
  from pytorch_forecasting.data.timeseries import TimeSeriesDataSet
  from pytorch_forecasting.metrics import MAE, MAPE, MASE, RMSE, SMAPE, MultiHorizonMetric, MultiLoss, QuantileLoss
  from pytorch_forecasting.models.base_model import AutoRegressiveBaseModelWithCovariates
  from pytorch_forecasting.models.nn import HiddenState, MultiEmbedding, get_rnn
  from pytorch_forecasting.utils import apply_to_list, to_list
label_desc: Use image node_id 2 for calling the RecurrentNetwork obj's underlying member method code with example usage: obj.from_dataset(cls, dataset, allowed_encoder_known_variable_names) and returns: super