




'''simple docstring'''
import warnings
from typing import List, Optional, Union

import numpy as np
import PIL
import torch
from PIL import Image

from .configuration_utils import ConfigMixin, register_to_config
from .utils import CONFIG_NAME, PIL_INTERPOLATION, deprecate






class 	SCREAMING_SNAKE_CASE(    __A					):
       snake_case_			:					Tuple   = CONFIG_NAME

       @register_to_config
       def __init__(   self ,		lowerCamelCase__ = True ,		lowerCamelCase__ = 8 ,		lowerCamelCase__ = "lanczos" ,		lowerCamelCase__ = True ,		lowerCamelCase__ = False ,		)   -> Any:

           """simple docstring"""



           super().__init__()

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> PIL.Image.Image:

           """simple docstring"""



           if images.ndim == 3:
               __lowercase          =						images[None, ...]
           __lowercase          =						(images * 255).round().astype("""uint8"""					)
           if images.shape[-1] == 1:
               # special case for grayscale (single channel) images
               __lowercase          =						[Image.fromarray(image.squeeze() ,		mode="""L"""					) for image in images]
           else:
               __lowercase          =						[Image.fromarray(lowerCamelCase__					) for image in images]

           return pil_images

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> np.ndarray:

           """simple docstring"""



           if not isinstance(lowerCamelCase__ ,		lowerCamelCase__					):
               __lowercase          =						[images]
           __lowercase          =						[np.array(lowerCamelCase__					).astype(np.floataa					) / 2_55.0 for image in images]
           __lowercase          =						np.stack(lowerCamelCase__ ,		axis=0					)

           return images

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> torch.FloatTensor:

           """simple docstring"""



           if images.ndim == 3:
               __lowercase          =						images[..., None]

           __lowercase          =						torch.from_numpy(images.transpose(0 ,		3 ,		1 ,		2					)					)
           return images

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> np.ndarray:

           """simple docstring"""



           __lowercase          =						images.cpu().permute(0 ,		2 ,		3 ,		1					).float().numpy()
           return images

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> List[Any]:

           """simple docstring"""



           return 2.0 * images - 1.0

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> List[str]:

           """simple docstring"""



           return (images / 2 + 0.5).clamp(0 ,		1					)

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> PIL.Image.Image:

           """simple docstring"""



           __lowercase          =						image.convert("""RGB"""					)
           return image

       def    snake_case__      (   self ,		lowerCamelCase__ ,		lowerCamelCase__ = None ,		lowerCamelCase__ = None ,		)   -> PIL.Image.Image:

           """simple docstring"""



           if height is None:
               __lowercase          =						image.height
           if width is None:
               __lowercase          =						image.width

           __lowercase    ,__lowercase          =						(
               x - x % self.config.vae_scale_factor for x in (width, height)
           )  # resize to integer multiple of vae_scale_factor
           __lowercase          =						image.resize((width, height) ,		resample=PIL_INTERPOLATION[self.config.resample]					)
           return image

       def    snake_case__      (   self ,		lowerCamelCase__ ,		lowerCamelCase__ = None ,		lowerCamelCase__ = None ,		)   -> torch.Tensor:

           """simple docstring"""



           __lowercase          =						(PIL.Image.Image, np.ndarray, torch.Tensor)
           if isinstance(lowerCamelCase__ ,		lowerCamelCase__					):
               __lowercase          =						[image]
           elif not (isinstance(lowerCamelCase__ ,		lowerCamelCase__					) and all(isinstance(lowerCamelCase__ ,		lowerCamelCase__					) for i in image					)):
               raise ValueError(
                   F'Input is in incorrect format: {[type(lowerCamelCase__					) for i in image]}. Currently, we only support {", ".join(lowerCamelCase__					)}'					)

           if isinstance(image[0] ,		PIL.Image.Image					):
               if self.config.do_convert_rgb:
                   __lowercase          =						[self.convert_to_rgb(lowerCamelCase__					) for i in image]
               if self.config.do_resize:
                   __lowercase          =						[self.resize(lowerCamelCase__ ,		lowerCamelCase__ ,		lowerCamelCase__					) for i in image]
               __lowercase          =						self.pil_to_numpy(lowerCamelCase__					)  # to np
               __lowercase          =						self.numpy_to_pt(lowerCamelCase__					)  # to pt

           elif isinstance(image[0] ,		np.ndarray					):
               __lowercase          =						np.concatenate(lowerCamelCase__ ,		axis=0					) if image[0].ndim == 4 else np.stack(lowerCamelCase__ ,		axis=0					)
               __lowercase          =						self.numpy_to_pt(lowerCamelCase__					)
               __lowercase    ,__lowercase    ,__lowercase    ,__lowercase          =						image.shape
               if self.config.do_resize and (
                   height % self.config.vae_scale_factor != 0 or width % self.config.vae_scale_factor != 0
               ):
                   raise ValueError(
                       F'Currently we only support resizing for PIL image - please resize your numpy array to be divisible by {self.config.vae_scale_factor}'
                       F'currently the sizes are {height} and {width}. You can also pass a PIL image instead to use resize option in VAEImageProcessor'					)

           elif isinstance(image[0] ,		torch.Tensor					):
               __lowercase          =						torch.cat(lowerCamelCase__ ,		axis=0					) if image[0].ndim == 4 else torch.stack(lowerCamelCase__ ,		axis=0					)
               __lowercase    ,__lowercase    ,__lowercase    ,__lowercase          =						image.shape

               # don't need any preprocess if the image is latents
               if channel == 4:
                   return image

               if self.config.do_resize and (
                   height % self.config.vae_scale_factor != 0 or width % self.config.vae_scale_factor != 0
               ):
                   raise ValueError(
                       F'Currently we only support resizing for PIL image - please resize your pytorch tensor to be divisible by {self.config.vae_scale_factor}'
                       F'currently the sizes are {height} and {width}. You can also pass a PIL image instead to use resize option in VAEImageProcessor'					)

        # expected range [0,1], normalize to [-1,1]
           __lowercase          =						self.config.do_normalize
           if image.min() < 0:
               warnings.warn(
                   """Passing `image` as torch tensor with value range in [-1,1] is deprecated. The expected value range for image tensor is [0,1] """
                   F'when passing as pytorch tensor or numpy Array. You passed `image` with value range [{image.min()},{image.max()}]' ,		lowerCamelCase__ ,		)
               __lowercase          =						False

           if do_normalize:
               __lowercase          =						self.normalize(lowerCamelCase__					)

           return image




       def    snake_case__      (   self ,		lowerCamelCase__ ,		lowerCamelCase__ = "pil" ,		lowerCamelCase__ = None ,		)   -> int:

           """simple docstring"""



           if not isinstance(lowerCamelCase__ ,		torch.Tensor					):
               raise ValueError(
                   F'Input for postprocessing is in incorrect format: {type(lowerCamelCase__					)}. We only support pytorch tensor'					)
           if output_type not in ["latent", "pt", "np", "pil"]:
               __lowercase          =						(
                   F'the output_type {output_type} is outdated and has been set to `np`. Please make sure to set it to one of these instead: '
                   """`pil`, `np`, `pt`, `latent`"""
               )
               deprecate("""Unsupported output_type""" ,		"""1.0.0""" ,		lowerCamelCase__ ,		standard_warn=lowerCamelCase__					)
               __lowercase          =						"""np"""

           if output_type == "latent":
               return image

           if do_denormalize is None:
               __lowercase          =						[self.config.do_normalize] * image.shape[0]

           __lowercase          =						torch.stack(
               [self.denormalize(image[i]					) if do_denormalize[i] else image[i] for i in range(image.shape[0]					)]					)

           if output_type == "pt":
               return image

           __lowercase          =						self.pt_to_numpy(lowerCamelCase__					)

           if output_type == "np":
               return image

           if output_type == "pil":
               return self.numpy_to_pil(lowerCamelCase__					)






class 	SCREAMING_SNAKE_CASE(    __A					):
       snake_case_			:					List[str]   = CONFIG_NAME

       @register_to_config
       def __init__(   self ,		lowerCamelCase__ = True ,		lowerCamelCase__ = 8 ,		lowerCamelCase__ = "lanczos" ,		lowerCamelCase__ = True ,		)   -> Union[str, Any]:

           """simple docstring"""



           super().__init__()

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> Tuple:

           """simple docstring"""



           if images.ndim == 3:
               __lowercase          =						images[None, ...]
           __lowercase          =						(images * 255).round().astype("""uint8"""					)
           if images.shape[-1] == 1:
               # special case for grayscale (single channel) images
               __lowercase          =						[Image.fromarray(image.squeeze() ,		mode="""L"""					) for image in images]
           else:
               __lowercase          =						[Image.fromarray(image[:, :, :3]					) for image in images]

           return pil_images

       @staticmethod
       def    snake_case__      (   lowerCamelCase__					)   -> Optional[int]:

           """simple docstring"""



           return image[:, :, 1] * 2**8 + image[:, :, 2]

       def    snake_case__      (   self ,		lowerCamelCase__					)   -> Union[str, Any]:

           """simple docstring"""



           if images.ndim == 3:
               __lowercase          =						images[None, ...]
           __lowercase          =						images[:, :, :, 3:]
           if images.shape[-1] == 6:
               __lowercase          =						(images_depth * 255).round().astype("""uint8"""					)
               __lowercase          =						[
                   Image.fromarray(self.rgblike_to_depthmap(lowerCamelCase__					) ,		mode="""I;16"""					) for image_depth in images_depth
               ]
           elif images.shape[-1] == 4:
               __lowercase          =						(images_depth * 6_55_35.0).astype(np.uintaa					)
               __lowercase          =						[Image.fromarray(lowerCamelCase__ ,		mode="""I;16"""					) for image_depth in images_depth]
           else:
               raise Exception("""Not supported"""					)

           return pil_images




       def    snake_case__      (   self ,		lowerCamelCase__ ,		lowerCamelCase__ = "pil" ,		lowerCamelCase__ = None ,		)   -> Tuple:

           """simple docstring"""



           if not isinstance(lowerCamelCase__ ,		torch.Tensor					):
               raise ValueError(
                   F'Input for postprocessing is in incorrect format: {type(lowerCamelCase__					)}. We only support pytorch tensor'					)
           if output_type not in ["latent", "pt", "np", "pil"]:
               __lowercase          =						(
                   F'the output_type {output_type} is outdated and has been set to `np`. Please make sure to set it to one of these instead: '
                   """`pil`, `np`, `pt`, `latent`"""
               )
               deprecate("""Unsupported output_type""" ,		"""1.0.0""" ,		lowerCamelCase__ ,		standard_warn=lowerCamelCase__					)
               __lowercase          =						"""np"""

           if do_denormalize is None:
               __lowercase          =						[self.config.do_normalize] * image.shape[0]

           __lowercase          =						torch.stack(
               [self.denormalize(image[i]					) if do_denormalize[i] else image[i] for i in range(image.shape[0]					)]					)

           __lowercase          =						self.pt_to_numpy(lowerCamelCase__					)

           if output_type == "np":
               if image.shape[-1] == 6:
                   __lowercase          =						np.stack([self.rgblike_to_depthmap(im[:, :, 3:]					) for im in image] ,		axis=0					)
               else:
                   __lowercase          =						image[:, :, :, 3:]
               return image[:, :, :, :3], image_depth

           if output_type == "pil":
               return self.numpy_to_pil(lowerCamelCase__					), self.numpy_to_depth(lowerCamelCase__					)
           else:
               raise Exception(F'This type {output_type} is not supported'					)










'''simple docstring'''
from copy import deepcopy
from unittest.case import TestCase

import pytest

from datasets.arrow_dataset import Dataset
from datasets.features import Audio, ClassLabel, Features, Image, Sequence, Value
from datasets.info import DatasetInfo
from datasets.tasks import (
    AudioClassification,
    AutomaticSpeechRecognition,
    ImageClassification,
    LanguageModeling,
    QuestionAnsweringExtractive,
    Summarization,
    TextClassification,
    task_template_from_dict,
)
from datasets.utils.py_utils import asdict


A							:				Dict			     =	{
    """id""": """5733be284776f41900661182""",
    """title""": """University_of_Notre_Dame""",
    """context""": """Architecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend \"Venite Ad Me Omnes\". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.""",
    """question""": """To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?""",
    """answers""": {"""text""": ["""Saint Bernadette Soubirous"""], """answer_start""": [515]},
}
@pytest.mark.parametrize(
    """task_cls"""   ,[
        AudioClassification,
        AutomaticSpeechRecognition,
        ImageClassification,
        LanguageModeling,
        QuestionAnsweringExtractive,
        Summarization,
        TextClassification,
    ]   ,)
def     snake_case_  (       a__		:     str      ):



    """simple docstring"""




    __lowercase          =						task_cls()
    __lowercase          =						asdict(a__      )
    __lowercase          =						task_template_from_dict(a__      )
    assert task == reloaded






class 	SCREAMING_SNAKE_CASE:

       def    snake_case__      (   self					)   -> Any:

           """simple docstring"""



           __lowercase          =						LanguageModeling(text_column="""input_text"""					)
           assert {"input_text": "text"} == task.column_mapping




       def    snake_case__      (   self					)   -> Any:

           """simple docstring"""



           __lowercase          =						Features({"""text""": Value("""string"""					)}					)
           __lowercase          =						{"""text_column""": """input_text"""}
           __lowercase          =						LanguageModeling.from_dict(lowerCamelCase__					)
           assert "language-modeling" == task.task
           assert input_schema == task.input_schema






class 	SCREAMING_SNAKE_CASE(    __A					):

       def    snake_case__      (   self					)   -> Dict:

           """simple docstring"""



           __lowercase          =						sorted(["""pos""", """neg"""]					)

       def    snake_case__      (   self					)   -> Tuple:

           """simple docstring"""



           __lowercase          =						TextClassification(text_column="""input_text""" ,		label_column="""input_label"""					)
           self.assertDictEqual({"""input_text""": """text""", """input_label""": """labels"""} ,		task.column_mapping					)

       def    snake_case__      (   self					)   -> Dict:

           """simple docstring"""



           __lowercase          =						Features({"""text""": Value("""string"""					)}					)
           # Labels are cast to tuple during `TextClassification.__post_init__`, so we do the same here
           __lowercase          =						Features({"""labels""": ClassLabel}					)
           __lowercase          =						{"""text_column""": """input_text""", """label_column""": """input_labels"""}
           __lowercase          =						TextClassification.from_dict(lowerCamelCase__					)
           self.assertEqual("""text-classification""" ,		task.task					)
           self.assertEqual(lowerCamelCase__ ,		task.input_schema					)
           self.assertEqual(lowerCamelCase__ ,		task.label_schema					)




       def    snake_case__      (   self					)   -> str:

           """simple docstring"""



           __lowercase          =						TextClassification(text_column="""input_text""" ,		label_column="""input_label"""					)
           self.assertEqual(task.label_schema["""labels"""] ,		lowerCamelCase__					)
           __lowercase          =						task.align_with_features(Features({"""input_label""": ClassLabel(names=self.labels					)}					)					)
           self.assertEqual(task.label_schema["""labels"""] ,		ClassLabel(names=self.labels					)					)






class 	SCREAMING_SNAKE_CASE(    __A					):

       def    snake_case__      (   self					)   -> List[str]:

           """simple docstring"""



           __lowercase          =						QuestionAnsweringExtractive(
               context_column="""input_context""" ,		question_column="""input_question""" ,		answers_column="""input_answers"""					)
           self.assertDictEqual(
               {"""input_context""": """context""", """input_question""": """question""", """input_answers""": """answers"""} ,		task.column_mapping					)




       def    snake_case__      (   self					)   -> Dict:

           """simple docstring"""



           __lowercase          =						Features({"""question""": Value("""string"""					), """context""": Value("""string"""					)}					)
           __lowercase          =						Features(
               {
                   """answers""": Sequence(
                       {
                           """text""": Value("""string"""					),
                           """answer_start""": Value("""int32"""					),
                       }					)
               }					)
           __lowercase          =						{
               """context_column""": """input_input_context""",
               """question_column""": """input_question""",
               """answers_column""": """input_answers""",
           }
           __lowercase          =						QuestionAnsweringExtractive.from_dict(lowerCamelCase__					)
           self.assertEqual("""question-answering-extractive""" ,		task.task					)
           self.assertEqual(lowerCamelCase__ ,		task.input_schema					)
           self.assertEqual(lowerCamelCase__ ,		task.label_schema					)






class 	SCREAMING_SNAKE_CASE(    __A					):

       def    snake_case__      (   self					)   -> int:

           """simple docstring"""



           __lowercase          =						Summarization(text_column="""input_text""" ,		summary_column="""input_summary"""					)
           self.assertDictEqual({"""input_text""": """text""", """input_summary""": """summary"""} ,		task.column_mapping					)




       def    snake_case__      (   self					)   -> Union[str, Any]:

           """simple docstring"""



           __lowercase          =						Features({"""text""": Value("""string"""					)}					)
           __lowercase          =						Features({"""summary""": Value("""string"""					)}					)
           __lowercase          =						{"""text_column""": """input_text""", """summary_column""": """input_summary"""}
           __lowercase          =						Summarization.from_dict(lowerCamelCase__					)
           self.assertEqual("""summarization""" ,		task.task					)
           self.assertEqual(lowerCamelCase__ ,		task.input_schema					)
           self.assertEqual(lowerCamelCase__ ,		task.label_schema					)






class 	SCREAMING_SNAKE_CASE(    __A					):

       def    snake_case__      (   self					)   -> str:

           """simple docstring"""



           __lowercase          =						AutomaticSpeechRecognition(audio_column="""input_audio""" ,		transcription_column="""input_transcription"""					)
           self.assertDictEqual({"""input_audio""": """audio""", """input_transcription""": """transcription"""} ,		task.column_mapping					)




       def    snake_case__      (   self					)   -> List[str]:

           """simple docstring"""



           __lowercase          =						Features({"""audio""": Audio()}					)
           __lowercase          =						Features({"""transcription""": Value("""string"""					)}					)
           __lowercase          =						{
               """audio_column""": """input_audio""",
               """transcription_column""": """input_transcription""",
           }
           __lowercase          =						AutomaticSpeechRecognition.from_dict(lowerCamelCase__					)
           self.assertEqual("""automatic-speech-recognition""" ,		task.task					)
           self.assertEqual(lowerCamelCase__ ,		task.input_schema					)
           self.assertEqual(lowerCamelCase__ ,		task.label_schema					)






class 	SCREAMING_SNAKE_CASE(    __A					):

       def    snake_case__      (   self					)   -> List[Any]:

           """simple docstring"""



           __lowercase          =						sorted(["""pos""", """neg"""]					)

       def    snake_case__      (   self					)   -> Optional[Any]:

           """simple docstring"""



           __lowercase          =						AudioClassification(audio_column="""input_audio""" ,		label_column="""input_label"""					)
           self.assertDictEqual({"""input_audio""": """audio""", """input_label""": """labels"""} ,		task.column_mapping					)

       def    snake_case__      (   self					)   -> Optional[Any]:

           """simple docstring"""



           __lowercase          =						Features({"""audio""": Audio()}					)
           __lowercase          =						Features({"""labels""": ClassLabel}					)
           __lowercase          =						{
               """audio_column""": """input_image""",
               """label_column""": """input_label""",
           }
           __lowercase          =						AudioClassification.from_dict(lowerCamelCase__					)
           self.assertEqual("""audio-classification""" ,		task.task					)
           self.assertEqual(lowerCamelCase__ ,		task.input_schema					)
           self.assertEqual(lowerCamelCase__ ,		task.label_schema					)




       def    snake_case__      (   self					)   -> str:

           """simple docstring"""



           __lowercase          =						AudioClassification(audio_column="""input_audio""" ,		label_column="""input_label"""					)
           self.assertEqual(task.label_schema["""labels"""] ,		lowerCamelCase__					)
           __lowercase          =						task.align_with_features(Features({"""input_label""": ClassLabel(names=self.labels					)}					)					)
           self.assertEqual(task.label_schema["""labels"""] ,		ClassLabel(names=self.labels					)					)






class 	SCREAMING_SNAKE_CASE(    __A					):

       def    snake_case__      (   self					)   -> Optional[Any]:

           """simple docstring"""



           __lowercase          =						sorted(["""pos""", """neg"""]					)

       def    snake_case__      (   self					)   -> List[str]:

           """simple docstring"""



           __lowercase          =						ImageClassification(image_column="""input_image""" ,		label_column="""input_label"""					)
           self.assertDictEqual({"""input_image""": """image""", """input_label""": """labels"""} ,		task.column_mapping					)

       def    snake_case__      (   self					)   -> List[str]:

           """simple docstring"""



           __lowercase          =						Features({"""image""": Image()}					)
           __lowercase          =						Features({"""labels""": ClassLabel}					)
           __lowercase          =						{
               """image_column""": """input_image""",
               """label_column""": """input_label""",
           }
           __lowercase          =						ImageClassification.from_dict(lowerCamelCase__					)
           self.assertEqual("""image-classification""" ,		task.task					)
           self.assertEqual(lowerCamelCase__ ,		task.input_schema					)
           self.assertEqual(lowerCamelCase__ ,		task.label_schema					)




       def    snake_case__      (   self					)   -> Tuple:

           """simple docstring"""



           __lowercase          =						ImageClassification(image_column="""input_image""" ,		label_column="""input_label"""					)
           self.assertEqual(task.label_schema["""labels"""] ,		lowerCamelCase__					)
           __lowercase          =						task.align_with_features(Features({"""input_label""": ClassLabel(names=self.labels					)}					)					)
           self.assertEqual(task.label_schema["""labels"""] ,		ClassLabel(names=self.labels					)					)






class 	SCREAMING_SNAKE_CASE(    __A					):

       def    snake_case__      (   self					)   -> Tuple:

           """simple docstring"""



           __lowercase          =						DatasetInfo(task_templates=QuestionAnsweringExtractive()					)
           __lowercase          =						Dataset.from_dict({k: [v] for k, v in SAMPLE_QUESTION_ANSWERING_EXTRACTIVE.items()} ,		info=lowerCamelCase__					)
           assert isinstance(dataset.info.task_templates ,		lowerCamelCase__					)
           assert len(dataset.info.task_templates					) == 1

           def keep_task(lowerCamelCase__					):
               return x

           def dont_keep_task(lowerCamelCase__					):
               __lowercase          =						deepcopy(lowerCamelCase__					)
               __lowercase          =						0
               return out

           __lowercase          =						dataset.map(lowerCamelCase__					)
           assert mapped_dataset.info.task_templates == dataset.info.task_templates
           # reload from cache
           __lowercase          =						dataset.map(lowerCamelCase__					)
           assert mapped_dataset.info.task_templates == dataset.info.task_templates

           __lowercase          =						dataset.map(lowerCamelCase__					)
           assert mapped_dataset.info.task_templates == []
           # reload from cache
           __lowercase          =						dataset.map(lowerCamelCase__					)
           assert mapped_dataset.info.task_templates == []




       def    snake_case__      (   self					)   -> Union[str, Any]:

           """simple docstring"""



           __lowercase          =						Features({"""text""": Value("""string"""					), """label""": ClassLabel(names=("""pos""", """neg""")					)}					)
           __lowercase          =						TextClassification(text_column="""text""" ,		label_column="""label"""					)
           __lowercase          =						DatasetInfo(features=lowerCamelCase__ ,		task_templates=lowerCamelCase__					)
           __lowercase          =						Dataset.from_dict({"""text""": ["""A sentence."""], """label""": ["""pos"""]} ,		info=lowerCamelCase__					)

           def process(lowerCamelCase__					):
               return example

           __lowercase          =						dataset.remove_columns("""label"""					)
           __lowercase          =						modified_dataset.map(lowerCamelCase__					)
           assert mapped_dataset.info.task_templates == []




