Rollback one iteration.

        Returns
        -------
        self : Booster
            Booster with rolled back one iteration.
510865
def rollback_one_iter(self):
        
        _safe_call(_LIB.LGBM_BoosterRollbackOneIter(
            self.handle))
        self.__is_predicted_cur_iter = [False for _ in range_(self.__num_dataset)]
        return self
1334932
def rollback(self, label, plane):
        """"""
        cm_label = 'condoor-{}'.format(int(time.time()))
        self.device.send(self.rollback_cmd.format(label), timeout=120)
        return cm_label
1235914
def rollback(self) -> None:
        
        if len(self._transactions) == 0:
            raise RuntimeError("rollback called outside transaction")

        _debug("rollback:", self._transactions[-1])
        # if something goes wrong here, nothing we can do about it, leave
        # database as is.
        try:
            # for every rollback action ...
            for on_rollback in self._transactions[-1]:
                # execute it
                _debug("--> rolling back", on_rollback)
                self._do_with_retry(on_rollback)
        except:  # noqa: E722
            _debug("--> rollback failed")
            exc_class, exc, tb = sys.exc_info()
            raise tldap.exceptions.RollbackError(
                "FATAL Unrecoverable rollback error: %r" % exc)
        finally:
            # reset everything to clean state
            _debug("--> rollback success")
            self.reset()
1116589
public void rollback() {
        try {
            ldapOperations.unbind(dn);
        } catch (Exception e) {
            log.warn("Failed to rollback, dn:" + dn.toString(), e);
        }
    }
197202
public void rollback() {
        try {
            log.debug("Rolling back modifyAttributes operation");
            ldapOperations.modifyAttributes(dn, compensatingModifications);
        } catch (Exception e) {
            log
                    .warn("Failed to rollback ModifyAttributes operation, dn: "
                            + dn);
        }
    }
934365
def _restore_training_state(self, restore_state):
        
        self.load_state_dict(restore_state["model"])
        self.optimizer.load_state_dict(restore_state["optimizer"])
        self.lr_scheduler.load_state_dict(restore_state["lr_scheduler"])
        start_iteration = restore_state["iteration"] + 1
        if self.config["verbose"]:
            print(f"Restored checkpoint to iteration {start_iteration}.")

        if restore_state["best_model_found"]:
            # Update checkpointer with appropriate information about best model
            # Note that the best model found so far may not be the model in the
            # checkpoint that is currently being loaded.
            self.checkpointer.best_model_found = True
            self.checkpointer.best_iteration = restore_state["best_iteration"]
            self.checkpointer.best_score = restore_state["best_score"]
            if self.config["verbose"]:
                print(
                    f"Updated checkpointer: "
                    f"best_score={self.checkpointer.best_score:.3f}, "
                    f"best_iteration={self.checkpointer.best_iteration}"
                )
        return start_iteration
805136
def rollback(self, release):
        """"""
        r = self._h._http_resource(
            method='POST',
            resource=('apps', self.name, 'releases'),
            data={'rollback': release}
        )
        return self.releases[-1]
1371070
def revert(self):
        
        assert atexit.register == self._atexit__register, \
            "AtExitWrapper not installed."
        atexit.register = self.original['register']
1064155
public function rollback()
    {
        $this->attributes->rollback();
        $this->hasOneEmbeds->rollback();
        $this->hasManyEmbeds->rollback();
        $this->doDirtyCheck();
        return $this;
    }
991290
def rollback(cls, resource, background=False):
        
        disk_id = cls.usable_id(resource)
        result = cls.call('hosting.disk.rollback_from', disk_id)

        if background:
            return result

        cls.echo('Disk rollback in progress.')
        cls.display_progress(result)
        return result
962896
def rollback():
    

    init_tasks()

    run_hook("before_rollback")

    # Remove current version
    current_release = paths.get_current_release_path()
    if current_release:
        env.run("rm -rf %s" % current_release)

    # Restore previous version
    old_release = paths.get_current_release_name()
    if old_release:
        paths.symlink(paths.get_source_path(old_release),
                      paths.get_current_path())

    run_hook("rollback")
    run_hook("after_rollback")

    logger.info("Rollback complete")
8306
def on_backward_end(self, iteration:int, **kwargs)->None:
        ""
        if iteration == 0: return
        self._update_batches_if_needed()
        #TODO:  This could perhaps be implemented as queues of requests instead but that seemed like overkill. 
        # But I'm not the biggest fan of maintaining these boolean flags either... Review pls.
        if iteration % self.stats_iters == 0: self.gen_stats_updated, self.crit_stats_updated = False, False
        if not (self.gen_stats_updated and self.crit_stats_updated): self._write_model_stats(iteration=iteration)
264688
def discard(self):  # pylint: disable=no-self-use
        
        try:
            self.rollback(0)
        except pyPluribus.exceptions.RollbackError as rbackerr:
            raise pyPluribus.exceptions.ConfigurationDiscardError("Cannot discard configuration: {err}.\
                ".format(err=rbackerr))
1079832
def rollout(self, batch_info: BatchInfo, model: RlModel, number_of_steps: int) -> Rollout:
        
        assert not model.is_recurrent, "Replay env roller does not support recurrent models"

        accumulator = TensorAccumulator()
        episode_information = []  # List of dictionaries with episode information

        for step_idx in range(number_of_steps):
            step = model.step(self.last_observation)

            if self.action_noise is not None:
                step['actions'] = self.action_noise(step['actions'], batch_info=batch_info)

            replay_extra_information = {}

            accumulator.add('observations', self.last_observation_cpu)

            # Add step to the tensor accumulator
            for name, tensor in step.items():
                tensor_cpu = tensor.cpu()
                accumulator.add(name, tensor_cpu)

                if name != 'actions':
                    replay_extra_information[name] = tensor_cpu.numpy()

            actions_numpy = step['actions'].detach().cpu().numpy()
            new_obs, new_rewards, new_dones, new_infos = self.environment.step(actions_numpy)

            # Store rollout in the experience replay buffer
            self.replay_buffer.store_transition(
                frame=self.last_observation_cpu.numpy(),
                action=actions_numpy,
                reward=new_rewards,
                done=new_dones,
                extra_info=replay_extra_information
            )

            if self.ret_rms is not None:
                self.accumulated_returns = new_rewards + self.discount_factor * self.accumulated_returns
                self.ret_rms.update(self.accumulated_returns)

            # Done is flagged true when the episode has ended AND the frame we see is already a first frame from the
            # next episode
            dones_tensor = torch.from_numpy(new_dones.astype(np.float32)).clone()
            accumulator.add('dones', dones_tensor)

            if self.action_noise is not None:
                self.action_noise.reset_training_state(dones_tensor, batch_info=batch_info)

            self.accumulated_returns = self.accumulated_returns * (1.0 - new_dones.astype(np.float32))

            self.last_observation_cpu = torch.from_numpy(new_obs).clone()
            self.last_observation = self.last_observation_cpu.to(self.device)

            if self.ret_rms is not None:
                new_rewards = np.clip(new_rewards / np.sqrt(self.ret_rms.var + 1e-8), -self.clip_obs, self.clip_obs)

            accumulator.add('rewards', torch.from_numpy(new_rewards.astype(np.float32)).clone())

            episode_information.append(new_infos)

        accumulated_tensors = accumulator.result()

        return Trajectories(
            num_steps=accumulated_tensors['observations'].size(0),
            num_envs=accumulated_tensors['observations'].size(1),
            environment_information=episode_information,
            transition_tensors=accumulated_tensors,
            rollout_tensors={}
        ).to_transitions()
1034233
def rollback(self):
        """"""
        if not self._in_transaction:
            raise NotInTransaction
        self._init_cache()
        self._in_transaction = False
145134
def rollback(self, verbose=False):
        
        for ns, insts in self.instances.items():
            insts.reverse()
            for inst in insts:
                try:
                    if verbose:
                        print(_format("Deleting instance {0}", inst.path))
                    self.conn.DeleteInstance(inst.path)
                except CIMError as ce:
                    print(_format("Error deleting instance {0}", inst.path))
                    print(_format("     {0} {1}",
                                  ce.status_code, ce.status_description))
        for ns, cnames in self.class_names.items():
            self.default_namespace = ns
            cnames.reverse()
            for cname in cnames:
                try:
                    if verbose:
                        print(_format("Deleting class {0!A}:{1!A}",
                                      ns, cname))
                    self.conn.DeleteClass(cname)
                except CIMError as ce:
                    print(_format("Error deleting class {0!A}:{1!A}",
                                  ns, cname))
                    print(_format("     {0} {1}",
                                  ce.status_code, ce.status_description))
419614
def rollback(self):
        
        self._check_thread()
        if self.state not in (_STATE_ACTIVE, _STATE_PARTIAL_COMMIT):
            raise TransactionError("Transaction is not active.")
        try:
            if self.state != _STATE_PARTIAL_COMMIT:
                request = transaction_rollback_codec.encode_request(self.id, self.thread_id)
                self.client.invoker.invoke_on_connection(request, self.connection).result()
            self.state = _STATE_ROLLED_BACK
        finally:
            self._locals.transaction_exists = False