Adds this loss to the MARKED_LOSSES collection.
420248
def mark_as_required(self):
    """"""
    if self not in tf.get_collection(bookkeeper.GraphKeys.MARKED_LOSSES):
      tf.add_to_collection(bookkeeper.GraphKeys.MARKED_LOSSES, self)
175013
private void addLeftItems() {
        // Log.w(TAG,"addLeftItems() {.... (0)");

        if (leftItems.size() == 0) {
            return;
        }
        // Log.w(TAG,"addLeftItems() {.... (1)");
        ArrayList<T> currentLeftItems = new ArrayList<T>();
        currentLeftItems.addAll(leftItems);
        // Log.w(TAG,"addLeftItems() {.... (2)");

        synchronized (leftItems) {
            // Log.w(TAG,"addLeftItems() {.... (3.1)");
            leftItems.clear();
            // Log.w(TAG,"addLeftItems() {.... (3.1)");
        }
        // Log.w(TAG,"addLeftItems() {.... (4)");
        for (T currentLeftItem : currentLeftItems) {
            // Log.w(TAG,"addLeftItems() {.... (5.1)");
            addItem(currentLeftItem);
            // Log.w(TAG,"addLeftItems() {.... (5.2)");
        }
    }
1268365
public Project addTrackers(Collection<Tracker> trackers) {
    	if (!storage.isPropertySet(TRACKERS)) //checks because trackers storage is not created for new projects
    		storage.set(TRACKERS, new HashSet<>());
        storage.get(TRACKERS).addAll(trackers);
        return this;
    }
250924
def build_loss_maps(self, losses, clp, stats=()):
        
        array = numpy.zeros((len(clp), len(losses)), F32)
        for r, ls in enumerate(losses):
            if len(ls) < 2:
                continue
            for c, poe in enumerate(clp):
                array[c, r] = conditional_loss_ratio(ls, self.poes, poe)
        return self.pair(array, stats)
556781
public EKBCommit addDeletes(Collection<?> deletes) {
        if (deletes != null) {
            for (Object delete : deletes) {
                checkIfModel(delete);
                this.deletes.add((OpenEngSBModel) delete);
            }
        }
        return this;
    }
194861
def add(self, domain_accession, domain_type, match_quality):
        ''''''
        self.matches[domain_type] = self.matches.get(domain_type, {})
        self.matches[domain_type][domain_accession] = match_quality
828548
public void mark() {
        final long currentTimeMillis = clock.currentTimeMillis();

        synchronized (queue) {
            if (queue.size() == capacity) {
                /*
                 * we're all filled up already, let's dequeue the oldest
                 * timestamp to make room for this new one.
                 */
                queue.removeFirst();
            }
            queue.addLast(currentTimeMillis);
        }
    }
913385
private function addPending()
    {
        while (count($this->inProcess) < $this->concurrency) {

            $item = $this->getUnprocessed();

            if (empty($item)) {

                break;
            }

            $this->inProcess[$item['index']] = $item['process'];

            $item['process']->start();

            if (count($this->inProcess) >= $this->concurrency) {

                break;
            }
        }
    }
180927
def mark(self, n=1):
        """"""
        self.tick_if_necessary()
        self.count += n
        self.m1_rate.update(n)
        self.m5_rate.update(n)
        self.m15_rate.update(n)
609162
public function attachCounters()
    {
        $config = $this->getConfig();
        $tagsAlias = $config['tagsAlias'];
        $taggedAlias = $config['taggedAlias'];

        $taggedTable = $this->_table->{$taggedAlias};

        if (!$taggedTable->hasBehavior('CounterCache')) {
            $taggedTable->addBehavior('CounterCache');
        }

        $counterCache = $taggedTable->behaviors()->CounterCache;

        if (!$counterCache->getConfig($tagsAlias)) {
            $counterCache->setConfig($tagsAlias, $config['tagsCounter']);
        }

        if ($config['taggedCounter'] === false) {
            return;
        }

        foreach ($config['taggedCounter'] as $field => $o) {
            if (!$this->_table->hasField($field)) {
                throw new RuntimeException(sprintf(
                    'Field "%s" does not exist in table "%s"',
                    $field,
                    $this->_table->getTable()
                ));
            }
        }

        if (!$counterCache->getConfig($taggedAlias)) {
            $field = key($config['taggedCounter']);
            $config['taggedCounter']['tag_count']['conditions'] = [
                $taggedTable->aliasField($this->getConfig('fkTableField')) => $this->_table->getTable(),
            ];
            $counterCache->setConfig($this->_table->getAlias(), $config['taggedCounter']);
        }
    }
808560
protected void associateBatched(Collection owners, Collection children)
    {
        ObjectReferenceDescriptor ord = getObjectReferenceDescriptor();
        ClassDescriptor cld = getOwnerClassDescriptor();
        Object owner;
        Object relatedObject;
        Object fkValues[];
        Identity id;
        PersistenceBroker pb = getBroker();
        PersistentField field = ord.getPersistentField();
        Class topLevelClass = pb.getTopLevelClass(ord.getItemClass());
        HashMap childrenMap = new HashMap(children.size());


        for (Iterator it = children.iterator(); it.hasNext(); )
        {
            relatedObject = it.next();
            childrenMap.put(pb.serviceIdentity().buildIdentity(relatedObject), relatedObject);
        }

        for (Iterator it = owners.iterator(); it.hasNext(); )
        {
            owner = it.next();
            fkValues = ord.getForeignKeyValues(owner,cld);
            if (isNull(fkValues))
            {
                field.set(owner, null);
                continue;
            }
            id = pb.serviceIdentity().buildIdentity(null, topLevelClass, fkValues);
            relatedObject = childrenMap.get(id);
            field.set(owner, relatedObject);
        }
    }
1300209
def addCollector(self, collector):
        
        collector.setSchema(self)
        self.__collectors[collector.name()] = collector
719765
public void markListDelivered(List list)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "markListDelivered", list);

    int len = list.size();
    for (int i = 0; i < len; i++)
    {
      AIValueTick valueTick = (AIValueTick) list.get(i);
      valueTick.setDelivered(true);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "markListDelivered");

  }
411260
def MarkDone(self, responses):
    """"""
    client_id = responses.request.client_id
    self.AddResultsToCollection(responses, client_id)
    self.MarkClientDone(client_id)
39514
void  addValToSets(List<RBBINode> sets, int val) {
        for (RBBINode usetNode : sets) {
            addValToSet(usetNode, val);
        }
    }
711264
protected function addLastModel()
    {
        if (!$this->lastModelPopulator) {
            return;
        }

        $this->addOwners($this->lastModelPopulator->getOwners());

        $this->modelPopulators[$this->lastModelClass] = $this->lastModelPopulator;
        $this->quantities[$this->lastModelClass] = $this->lastQuantity;
    }
395002
def backward(self, loss):
        """"""
        with mx.autograd.record():
            if isinstance(loss, (tuple, list)):
                ls = [l * self._scaler.loss_scale for l in loss]
            else:
                ls = loss * self._scaler.loss_scale
        mx.autograd.backward(ls)