class_docstr: A job provides data available for a single training job.
  
  It is first obtained from a training job run on AWS Sagemaker. By storing
  it locally, it can be loaded from the file system at a later point and no
  Sagemaker connection is required. The initializer of this class should not
  be used directly.
class_docstr_tok: ["A","job","provides","data","available","for","a","single","training","job",".","It","is","first","obtained","from","a","training","job","run","on","AWS","Sagemaker",".","By","storing","it","locally",",","it","can","be","loaded","from","the","file","system","at","a","later","point","and","no","Sagemaker","connection","is","required",".","The","initializer","of","this","class","should","not","be","used","directly","."]
docstr: Loads the job from the file system at the specified directory. This
  should only be called on a directory where a job has previously been
  saved.
  
  Args:
      directory: The directory where to load the job from.
  
  Returns:
      The training job loaded from the provided path.
docstr_tok: ["Loads","the","job","from","the","file","system","at","the","specified","directory",".","This","should","only","be","called","on","a","directory","where","a","job","has","previously","been","saved",".","Args",":","directory",":","The","directory","where","to","load","the","job","from",".","Returns",":","The","training","job","loaded","from","the","provided","path","."]
code: def load(cls, directory: Path) -> Job:
      """
      Loads the job from the file system at the specified directory. This
      should only be called on a directory where a job has previously been
      saved.
  
      Args:
          directory: The directory where to load the job from.
  
      Returns:
          The training job loaded from the provided path.
      """
      model = directory.parts[-3]
      dataset = directory.parts[-2]
  
      with (directory / "config.json").open("r") as f:
          config = json.load(f)
      with (directory / "performance.json").open("r") as f:
          performance = json.load(f)
  
      return Job(
          model, dataset, config, performance, source_path=directory
      )
  
imports: from __future__ import annotations
  import json
  import math
  import os
  import shutil
  from pathlib import Path
  from typing import Any, cast, Dict, List, Optional, Union
  import numpy
  from tsbench.config import MODEL_REGISTRY
  from tsbench.evaluations.aws import Analysis, TrainingJob
  from tsbench.evaluations.metrics import Metric, Performance
  from tsbench.forecasts import QuantileForecasts
label_desc: Use image node_id 2 for calling the Job obj's underlying member method code with example usage: obj.load(cls, directory) and returns: Job