class_docstr: An on-disk task.
  
  An on-disk task is for ``OnDiskDataset``. It contains the metadata and the
  train/val/test sets.
class_docstr_tok: ["An","on-disk","task",".","An","on-disk","task","is","for","``","OnDiskDataset","``",".","It","contains","the","metadata","and","the","train\/val\/test","sets","."]
docstr: Initialize a task.
  
  Parameters
  ----------
  metadata : Dict
      Metadata.
  train_set : Union[ItemSet, ItemSetDict]
      Training set.
  validation_set : Union[ItemSet, ItemSetDict]
      Validation set.
  test_set : Union[ItemSet, ItemSetDict]
      Test set.
docstr_tok: ["Initialize","a","task",".","Parameters","--","--","--","--","--","metadata",":","Dict","Metadata",".","train_set",":","Union","[","ItemSet",",","ItemSetDict","]","Training","set",".","validation_set",":","Union","[","ItemSet",",","ItemSetDict","]","Validation","set",".","test_set",":","Union","[","ItemSet",",","ItemSetDict","]","Test","set","."]
code: def __init__(
      self,
      metadata: Dict,
      train_set: Union[ItemSet, ItemSetDict],
      validation_set: Union[ItemSet, ItemSetDict],
      test_set: Union[ItemSet, ItemSetDict],
  ):
      """Initialize a task.
  
      Parameters
      ----------
      metadata : Dict
          Metadata.
      train_set : Union[ItemSet, ItemSetDict]
          Training set.
      validation_set : Union[ItemSet, ItemSetDict]
          Validation set.
      test_set : Union[ItemSet, ItemSetDict]
          Test set.
      """
      self._metadata = metadata
      self._train_set = train_set
      self._validation_set = validation_set
      self._test_set = test_set
  
imports: import json
  import os
  import shutil
  import textwrap
  from copy import deepcopy
  from typing import Dict, List, Union
  import torch
  import yaml
  import dgl
  from ...base import dgl_warning
  from ...data.utils import download, extract_archive
  from ..base import etype_str_to_tuple
  from ..dataset import Dataset, Task
  from ..internal import calculate_dir_hash, check_dataset_change, copy_or_convert_data, get_attributes, read_data, read_edges
  from ..itemset import ItemSet, ItemSetDict
  from ..sampling_graph import SamplingGraph
  from .fused_csc_sampling_graph import from_dglgraph, FusedCSCSamplingGraph
  from .ondisk_metadata import OnDiskGraphTopology, OnDiskMetaData, OnDiskTaskData, OnDiskTVTSet
  from .torch_based_feature_store import TorchBasedFeatureStore
label_desc: Use image node_id 1 to create a new OnDiskTask object  with example: obj = OnDiskTask(metadata, train_set, validation_set, test_set)