src/orion/core/worker/trial.py
def results(self, results):
        """Verify results before setting the property"""
        objective = self._fetch_one_result_of_type("objective", results)

        if objective is None:
            raise ValueError("No objective found in results: {}".format(results))
        if not isinstance(objective.value, (float, int)):
            raise ValueError(
                "Results must contain a type `objective` with type float/int: {}".format(
                    objective
                )
            )

        self._results = results
Verify results before setting the property
Verify results before setting the property
Verify results before setting the property
def results(self, results):
        objective = self._fetch_one_result_of_type("objective", results)
        if objective is None:
            raise ValueError("No objective found in results: {}".format(results))
        if not isinstance(objective.value, (float, int)):
            raise ValueError(
                "Results must contain a type `objective` with type float/int: {}".format(
                    objective
                )
            )
        self._results = results
def results ( self , results ) : objective = self . _fetch_one_result_of_type ( "objective" , results ) if objective is None : raise ValueError ( "No objective found in results: {}" . format ( results ) ) if not isinstance ( objective . value , ( float , int ) ) : raise ValueError ( "Results must contain a type `objective` with type float/int: {}" . format ( objective ) ) self . _results = results
Verify results before setting the property
Verify results before setting the property
"""Verify results before setting the property"""
self
results