def __init__(self, values): self._values = to_list(values) self._data = reader.read(self._values) Parser.check_data(spec=self, data=self._data) headers = Parser.get_headers(spec=self, data=self._data) matrix = Parser.get_matrix(spec=self, data=self._data) try: self._matrix = validator.validate_matrix(matrix) except ValidationError as e: raise PolyaxonConfigurationError(e) try: self._headers = validator.validate_headers(spec=self, data=headers) except ValidationError as e: raise PolyaxonConfigurationError(e) self._parsed_data = [] self._validated_data = [] self._experiment_specs = [] matrix_declarations = self.matrix_declarations if self.matrix_declarations else [ {} ] for i, matrix_declaration in enumerate(matrix_declarations): parsed_data = Parser.parse(self, self._data, matrix_declaration) self._validated_data.append( validator.validate(spec=self, data=parsed_data)) self._parsed_data.append(parsed_data) self._experiment_specs.append( Specification(experiment=i, values=parsed_data))
def __init__(self, values): self._values = to_list(values) self._data = reader.read(self._values) Parser.check_data(spec=self, data=self._data) headers = Parser.get_headers(spec=self, data=self._data) try: self._headers = validator.validate_headers(spec=self, data=headers) except ValidationError as e: raise PolyaxonConfigurationError(e) parsed_data = Parser.parse(self, self._data, None) self._validated_data = validator.validate(spec=self, data=parsed_data) self._parsed_data = parsed_data