{
  "title": "BatchData",
  "public_path": "flex_rf.web.BatchData",
  "lookup_path": "tidy3d.web.BatchData",
  "slug": "flex_rf/web/BatchData",
  "public_url": "/rf/latest/autogenerated/flex_rf/web/batchdata/",
  "object_kind": "class",
  "introduction": "Holds a collection of `SimulationData` returned by `Batch`.",
  "notes": "When the batch is completed, the output is not a `SimulationData` but rather a\n`BatchData`. The data within this `BatchData` object can either be indexed\ndirectly `batch_results[task_name]` or can be looped through `batch_results.items()` to\nget the `SimulationData` for each task.\nConverting with `dict(batch_results.items())` eagerly touches all tasks and can load all\nresults.",
  "examples": "",
  "references": "",
  "signature": "class BatchData(Tidy3dBaseModel, Mapping)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/web/api/container.py",
    "url": "",
    "lineno": 649,
    "endlineno": 821
  },
  "bases": [
    "Tidy3dBaseModel",
    "Mapping"
  ],
  "parameter_rows": [
    {
      "name": "task_paths",
      "annotation": "dict[TaskName, str]",
      "default": "",
      "description": "Mapping of task_name to path to corresponding data for each task in batch.",
      "origin": "declared"
    },
    {
      "name": "task_ids",
      "annotation": "dict[TaskName, str]",
      "default": "",
      "description": "Mapping of task_name to task_id for each task in batch.",
      "origin": "declared"
    },
    {
      "name": "verbose",
      "annotation": "bool",
      "default": "True",
      "description": "Whether to print info messages and progressbars.",
      "origin": "declared"
    },
    {
      "name": "cached_tasks",
      "annotation": "dict[TaskName, bool] | None",
      "default": "None",
      "description": "Whether the data of a task came from the cache.",
      "origin": "declared"
    },
    {
      "name": "lazy",
      "annotation": "bool",
      "default": "False",
      "description": "Whether to load the actual data (lazy=False) or return a proxy that loads the data when accessed (lazy=True).",
      "origin": "declared"
    },
    {
      "name": "is_downloaded",
      "annotation": "bool | None",
      "default": "False",
      "description": "Whether the simulation data was downloaded before.",
      "origin": "declared"
    },
    {
      "name": "attrs",
      "annotation": "dict",
      "default": "factory: dict",
      "description": "Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, `attrs` are mutable. For example, the following is allowed for setting an `attr` `obj.attrs['foo'] = bar`. Also note that Tidy3D will raise a `TypeError` if `attrs` contain objects that can not be serialized. One can check if `attrs` are serializable by calling `obj.model_dump_json()`.",
      "origin": "inherited"
    }
  ],
  "members": [
    {
      "name": "load",
      "kind": "function",
      "signature": "load(path_dir: PathLike = DEFAULT_DATA_DIR, replace_existing: bool = False)",
      "description": "Load `Batch` from file, download results, and load them."
    },
    {
      "name": "load_sim_data",
      "kind": "function",
      "signature": "load_sim_data(task_name: str)",
      "description": "Load a simulation data object from file by task name."
    }
  ],
  "group": "flex_rf.web"
}
