class_docstr: SharedEmbedding in mmap mode.
  
  Args:
      num_embeddings (int):
          The number of embeddings.
      embedding_dim (int):
          The dimension of embeddings.
      high (float):
          Optional. The upper bound of embedding values.
      low (float):
          Optional. The lower bound of embedding values.
      weight (np.ndarray):
          Optional. The array used to initialize embeddings.
      weight_path (str):
          The file to save and load embeddings.
      optimizer (str):
          The optimizer used to update embeddings during training. Choices: sgd, adagrad.
      learning_rate (float):
          The learning rate of optimizer.
      init_mode (str):
          The source of embeddings initialization. Choices: range, array, file.
      num_workers (int):
          The number of processes to update gradients.
class_docstr_tok: ["SharedEmbedding","in","mmap","mode",".","Args",":","num_embeddings","(","int",")",":","The","number","of","embeddings",".","embedding_dim","(","int",")",":","The","dimension","of","embeddings",".","high","(","float",")",":","Optional",".","The","upper","bound","of","embedding","values",".","low","(","float",")",":","Optional",".","The","lower","bound","of","embedding","values",".","weight","(","np.ndarray",")",":","Optional",".","The","array","used","to","initialize","embeddings",".","weight_path","(","str",")",":","The","file","to","save","and","load","embeddings",".","optimizer","(","str",")",":","The","optimizer","used","to","update","embeddings","during","training",".","Choices",":","sgd",",","adagrad",".","learning_rate","(","float",")",":","The","learning","rate","of","optimizer",".","init_mode","(","str",")",":","The","source","of","embeddings","initialization",".","Choices",":","range",",","array",",","file",".","num_workers","(","int",")",":","The","number","of","processes","to","update","gradients","."]
docstr: Update embeddings according to given trace
          
docstr_tok: ["Update","embeddings","according","to","given","trace"]
code: def step_trace(self, trace):
      """Update embeddings according to given trace"""
      with paddle.no_grad():
          index, grad_trace = trace
          if self._async_q is not None:
              self._async_q.put(
                  [index, grad_trace],
              )
              self._async_e.wait()
              self._async_e.clear()
          else:
              self._update(index, grad_trace)
  
imports: import os
  import time
  import numpy
  import paddle
  import paddle.distributed
label_desc: Use image node_id 13 for calling the SharedEmbedding obj's underlying member method code with example usage: obj.step_trace(trace) without return types