dora/active_sampling/base_sampler.py
def _update(self, uid, y_true):
        """
        Update a job with its observed value.

        Parameters
        ----------
        uid : str
            A hexadecimal ID that identifies the job to be updated
        y_true : float
            The observed value corresponding to the job identified by 'uid'

        Returns
        -------
        int
            Index location in the data lists 'Sampler.X' and
            'Sampler.y' corresponding to the job being updated
        """
        # Make sure the job uid given is valid
        if uid not in self.pending_results:
            warnings.warn('Result was not pending!')
        assert uid in self.pending_results

        # Kill the job and update collected data with true observation
        ind = self.pending_results.pop(uid)

        # If the user has been pushing Nones until now, we will init properly
        if self.n_tasks is None:
            self.n_tasks = len(np.atleast_1d(y_true))
            pending_count = len(self.y)
            self.y = ArrayBuffer()
            for _ in range(pending_count):
                self.y.append(np.zeros(self.n_tasks))

        self.y()[ind] = y_true
        self.virtual_flag()[ind] = False

        return ind

        Update a job with its observed value.

        Parameters
        ----------
        uid : str
            A hexadecimal ID that identifies the job to be updated
        y_true : float
            The observed value corresponding to the job identified by 'uid'

        Returns
        -------
        int
            Index location in the data lists 'Sampler.X' and
            'Sampler.y' corresponding to the job being updated
        
Update a job with its observed value.
Parameters

uid : str
A hexadecimal ID that identifies the job to be updated
y_true : float
The observed value corresponding to the job identified by 'uid'

Returns

int
Index location in the data lists 'Sampler.X' and
'Sampler.y' corresponding to the job being updated
Update a job with its observed value . Parameters uid : str A hexadecimal ID that identifies the job to be updated y_true : float The observed value corresponding to the job identified by ' uid ' Returns int Index location in the data lists ' Sampler . X ' and ' Sampler . y ' corresponding to the job being updated
def _update(self, uid, y_true):
        if uid not in self.pending_results:
            warnings.warn('Result was not pending!')
        assert uid in self.pending_results
        ind = self.pending_results.pop(uid)
        if self.n_tasks is None:
            self.n_tasks = len(np.atleast_1d(y_true))
            pending_count = len(self.y)
            self.y = ArrayBuffer()
            for _ in range(pending_count):
                self.y.append(np.zeros(self.n_tasks))
        self.y()[ind] = y_true
        self.virtual_flag()[ind] = False
        return ind
def _update ( self , uid , y_true ) : if uid not in self . pending_results : warnings . warn ( 'Result was not pending!' ) assert uid in self . pending_results ind = self . pending_results . pop ( uid ) if self . n_tasks is None : self . n_tasks = len ( np . atleast_1d ( y_true ) ) pending_count = len ( self . y ) self . y = ArrayBuffer ( ) for _ in range ( pending_count ) : self . y . append ( np . zeros ( self . n_tasks ) ) self . y ( ) [ ind ] = y_true self . virtual_flag ( ) [ ind ] = False return ind
Update a job with its observed value.
Update a job with its observed value .
"""
        Update a job with its observed value.

        Parameters
        ----------
        uid : str
            A hexadecimal ID that identifies the job to be updated
        y_true : float
            The observed value corresponding to the job identified by 'uid'

        Returns
        -------
        int
            Index location in the data lists 'Sampler.X' and
            'Sampler.y' corresponding to the job being updated
        """ # Make sure the job uid given is valid # Kill the job and update collected data with true observation # If the user has been pushing Nones until now, we will init properly
self
uid
y_true