# Buggy code
def Dataset(*args, **kwargs):
    """Dataset for AutoGluon image classification tasks.
       May either be a :class:`autogluon.task.image_classification.ImageFolderDataset`, :class:`autogluon.task.image_classification.RecordDataset`,
       or a popular dataset already built into AutoGluon ('mnist', 'fashionmnist', 'cifar10', 'cifar100', 'imagenet').

    Parameters
    ----------
    name : str, optional
        Which built-in dataset to use, will override all other options if specified.
        The options are: 'mnist', 'fashionmnist', 'cifar', 'cifar10', 'cifar100', 'imagenet'
    train : bool, default = True
        Whether this dataset should be used for training or validation.
    train_path : str
        The training data location. If using :class:`ImageFolderDataset`,
        image folder`path/to/the/folder` should be provided.
        If using :class:`RecordDataset`, the `path/to/*.rec` should be provided.
    input_size : int
        The input image size.
    crop_ratio : float
        Center crop ratio (for evaluation only).

    Returns
    -------
    Dataset object that can be passed to `task.fit()`, which is actually an :class:`autogluon.space.AutoGluonObject`.
    To interact with such an object yourself, you must first call `Dataset.init()` to instantiate the object in Python.
    """
    return get_dataset(*args, **kwargs)


# Traceback (TypeError)
scheduler: FIFOScheduler(
DistributedResourceManager{
(Remote: Remote REMOTE_ID: 0,
<Remote: 'inproc://172.18.30.18/28461/1' processes=1 threads=4, memory=7.28 GB>, Resource: NodeResourceManager(4 CPUs, 0 GPUs))
})

Starting Experiments
Num of Finished Tasks is 0
Num of Pending Tasks is 4
25%|█████████████████████▌                                                                | 1/4 [00:00<00:00,  8.97it/s]Process Process-2:
Traceback (most recent call last):
File "/home/z/anaconda3/envs/IC2/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/z/anaconda3/envs/IC2/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/z/anaconda3/envs/IC2/lib/python3.6/site-packages/autogluon/scheduler/scheduler.py", line 125, in _worker
ret = fn(**kwargs)
File "/home/z/anaconda3/envs/IC2/lib/python3.6/site-packages/autogluon/core/decorator.py", line 52, in __call__
args = sample_config(args, new_config)
File "/home/z/anaconda3/envs/IC2/lib/python3.6/site-packages/autogluon/core/decorator.py", line 38, in sample_config
args_dict[k] = v.init()
File "/home/z/anaconda3/envs/IC2/lib/python3.6/site-packages/autogluon/core/space.py", line 110, in init
return self.sample(**config)
File "/home/z/anaconda3/envs/IC2/lib/python3.6/site-packages/autogluon/core/decorator.py", line 185, in sample
return self.func(*self.args, **kwargs)
File "/home/z/anaconda3/envs/IC2/lib/python3.6/site-packages/autogluon/task/image_classification/dataset.py", line 108, in get_dataset
if '.rec' in path:
TypeError: argument of type 'NoneType' is not iterable

# Fixed code
def Dataset(
    path=None, name=None, train=True, input_size=224, crop_ratio=0.875, *args, **kwargs
):
    """Dataset for AutoGluon image classification tasks.
       May either be a :class:`autogluon.task.image_classification.ImageFolderDataset`, :class:`autogluon.task.image_classification.RecordDataset`,
       or a popular dataset already built into AutoGluon ('mnist', 'fashionmnist', 'cifar10', 'cifar100', 'imagenet').

    Parameters
    ----------
    path : str, optional
        The data location. If using :class:`ImageFolderDataset`,
        image folder`path/to/the/folder` should be provided.
        If using :class:`RecordDataset`, the `path/to/*.rec` should be provided.
    name : str, optional
        Which built-in dataset to use, will override all other options if specified.
        The options are: 'mnist', 'fashionmnist', 'cifar', 'cifar10', 'cifar100', 'imagenet'
    train : bool, optional, default = True
        Whether this dataset should be used for training or validation.
    input_size : int
        The input image size.
    crop_ratio : float
        Center crop ratio (for evaluation only).

    Returns
    -------
    Dataset object that can be passed to `task.fit()`, which is actually an :class:`autogluon.space.AutoGluonObject`.
    To interact with such an object yourself, you must first call `Dataset.init()` to instantiate the object in Python.
    """
    if name is None:
        if path is None:
            raise ValueError(
                "Either `path` or `name` must be present in Dataset(). "
                "If `name` is provided, it will override the rest of the arguments."
            )
    return get_dataset(
        path=path,
        train=train,
        name=name,
        input_size=input_size,
        crop_ratio=crop_ratio,
        *args,
        **kwargs,
    )