openml/datasets/dataset.py
def _get_file_elements(self) -> Dict:
        """ Adds the 'dataset' to file elements. """
        file_elements = {}
        path = None if self.data_file is None else os.path.abspath(self.data_file)

        if self._dataset is not None:
            file_elements["dataset"] = self._dataset
        elif path is not None and os.path.exists(path):
            with open(path, "rb") as fp:
                file_elements["dataset"] = fp.read()
            try:
                dataset_utf8 = str(file_elements["dataset"], "utf8")
                arff.ArffDecoder().decode(dataset_utf8, encode_nominal=True)
            except arff.ArffException:
                raise ValueError("The file you have provided is not a valid arff file.")
        elif self.url is None:
            raise ValueError("No valid url/path to the data file was given.")
        return file_elements
 Adds the 'dataset' to file elements. 
Adds the 'dataset' to file elements.
Adds the ' dataset ' to file elements .
def _get_file_elements(self) -> Dict:
        file_elements = {}
        path = None if self.data_file is None else os.path.abspath(self.data_file)
        if self._dataset is not None:
            file_elements["dataset"] = self._dataset
        elif path is not None and os.path.exists(path):
            with open(path, "rb") as fp:
                file_elements["dataset"] = fp.read()
            try:
                dataset_utf8 = str(file_elements["dataset"], "utf8")
                arff.ArffDecoder().decode(dataset_utf8, encode_nominal=True)
            except arff.ArffException:
                raise ValueError("The file you have provided is not a valid arff file.")
        elif self.url is None:
            raise ValueError("No valid url/path to the data file was given.")
        return file_elements
def _get_file_elements ( self ) -> Dict : file_elements = { } path = None if self . data_file is None else os . path . abspath ( self . data_file ) if self . _dataset is not None : file_elements [ "dataset" ] = self . _dataset elif path is not None and os . path . exists ( path ) : with open ( path , "rb" ) as fp : file_elements [ "dataset" ] = fp . read ( ) try : dataset_utf8 = str ( file_elements [ "dataset" ] , "utf8" ) arff . ArffDecoder ( ) . decode ( dataset_utf8 , encode_nominal = True ) except arff . ArffException : raise ValueError ( "The file you have provided is not a valid arff file." ) elif self . url is None : raise ValueError ( "No valid url/path to the data file was given." ) return file_elements
Adds the 'dataset' to file elements.
Adds the ' dataset ' to file elements .
""" Adds the 'dataset' to file elements. """
self