docstr: Load NeuralForecast
  
  `core.NeuralForecast`'s method to load checkpoint from path.
  
  Parameters
  -----------
  path : str
      Directory to save current status.
  kwargs
      Additional keyword arguments to be passed to the function
      `load_from_checkpoint`.
  
  Returns
  -------
  result : NeuralForecast
      Instantiated `NeuralForecast` class.
docstr_tok: ["Load","NeuralForecast","`","core.NeuralForecast","`","'s","method","to","load","checkpoint","from","path",".","Parameters","--","--","--","--","--","-","path",":","str","Directory","to","save","current","status",".","kwargs","Additional","keyword","arguments","to","be","passed","to","the","function","`","load_from_checkpoint","`",".","Returns","--","--","--","-","result",":","NeuralForecast","Instantiated","`","NeuralForecast","`","class","."]
code: def load(path, verbose=False, **kwargs):
      """Load NeuralForecast
  
      `core.NeuralForecast`'s method to load checkpoint from path.
  
      Parameters
      -----------
      path : str
          Directory to save current status.
      kwargs
          Additional keyword arguments to be passed to the function
          `load_from_checkpoint`.
  
      Returns
      -------
      result : NeuralForecast
          Instantiated `NeuralForecast` class.
      """
      files = [
          f
          for f in os.listdir(path)
          if os.path.isfile(os.path.join(path, f))
      ]
  
      # Load models
      models_ckpt = [f for f in files if f.endswith(".ckpt")]
      if len(models_ckpt) == 0:
          raise Exception("No model found in directory.")
  
      if verbose:
          print(10 * "-" + " Loading models " + 10 * "-")
      models = []
      for model in models_ckpt:
          model_name = model.split("_")[0]
          models.append(
              MODEL_FILENAME_DICT[model_name].load_from_checkpoint(
                  f"{path}/{model}", **kwargs
              )
          )
          if verbose:
              print(f"Model {model_name} loaded.")
  
      if verbose:
          print(10 * "-" + " Loading dataset " + 10 * "-")
      # Load dataset
      if "dataset.pkl" in files:
          with open(f"{path}/dataset.pkl", "rb") as f:
              dataset = pickle.load(f)
          if verbose:
              print("Dataset loaded.")
      else:
          dataset = None
          if verbose:
              print("No dataset found in directory.")
  
      if verbose:
          print(10 * "-" + " Loading configuration " + 10 * "-")
      # Load configuration
      if "configuration.pkl" in files:
          with open(f"{path}/configuration.pkl", "rb") as f:
              config_dict = pickle.load(f)
          if verbose:
              print("Configuration loaded.")
      else:
          raise Exception("No configuration found in directory.")
  
      # Create NeuralForecast object
      neuralforecast = NeuralForecast(
          models=models,
          freq=config_dict["freq"],
          local_scaler_type=config_dict["local_scaler_type"],
      )
  
      for attr in ["id_col", "time_col", "target_col"]:
          setattr(neuralforecast, attr, config_dict[attr])
  
      # Dataset
      if dataset is not None:
          neuralforecast.dataset = dataset
          restore_attrs = [
              "uids",
              "last_dates",
              "ds",
              "sort_df",
          ]
          for attr in restore_attrs:
              setattr(neuralforecast, attr, config_dict[attr])
  
      # Fitted flag
      neuralforecast._fitted = config_dict["_fitted"]
  
      neuralforecast.scalers_ = config_dict["scalers_"]
  
      return neuralforecast
  
imports: import os
  import pickle
  import warnings
  from copy import deepcopy
  from itertools import chain
  from typing import Any, Dict, List, Optional, Union
  import numpy
  import pandas
  import torch
  import utilsforecast.processing
  from utilsforecast.compat import DataFrame, Series, pl_DataFrame, pl_Series
  from utilsforecast.grouped_array import GroupedArray
  from utilsforecast.target_transforms import BaseTargetTransform, LocalBoxCox, LocalMinMaxScaler, LocalRobustScaler, LocalStandardScaler
  from utilsforecast.validation import validate_freq
  from .tsdataset import TimeSeriesDataset
  from neuralforecast.models import GRU, LSTM, RNN, TCN, DeepAR, DilatedRNN, MLP, NHITS, NBEATS, NBEATSx, TFT, VanillaTransformer, Informer, Autoformer, FEDformer, StemGNN, PatchTST, TimesNet
label_desc: Use image node_id 16 for calling the NeuralForecast obj's underlying member method code with example usage: obj.load(path, verbose) and returns: neuralforecast