Passes the result to Nevergrad unless early terminated or errored.

        The result is internally negated when interacting with Nevergrad
        so that Nevergrad Optimizers can "maximize" this value,
        as it minimizes on default.

def on_trial_complete(self,
                          trial_id,
                          result=None,
                          error=False,
                          early_terminated=False):
        """Passes the result to Nevergrad unless early terminated or errored.

        The result is internally negated when interacting with Nevergrad
        so that Nevergrad Optimizers can "maximize" this value,
        as it minimizes on default.
        """
        ng_trial_info = self._live_trial_mapping.pop(trial_id)
        if result:
            self._nevergrad_opt.tell(ng_trial_info, -result[self._reward_attr])