Returns a :class:`SparkStageInfo` object, or None if the stage
        info could not be found or was garbage collected.
5239
def getStageInfo(self, stageId):
        
        stage = self._jtracker.getStageInfo(stageId)
        if stage is not None:
            # TODO: fetch them in batch for better performance
            attrs = [getattr(stage, f)() for f in SparkStageInfo._fields[1:]]
            return SparkStageInfo(stageId, *attrs)
522067
def stage(x, staging):
    
    linknames = []

    # Objects that don't represent a file shouldn't be staged
    non_file_objects = (
        track.ViewTrack,
        track.CompositeTrack,
        track.AggregateTrack,
        track.SuperTrack,
        genome.Genome,
    )
    if isinstance(x, non_file_objects):
        return linknames

    # If it's an object representing a file, then render it.
    #
    # Track objects don't represent files, but their documentation does
    linknames.append(x.render(staging))

    if hasattr(x, 'source') and hasattr(x, 'filename'):
        def _stg(x, ext=''):
            # A remote track hosted elsewhere does not need staging. This is
            # defined by a track with a url, but no source or filename.
            if (
                x.source is None
                and x.filename is None
                and getattr(x, 'url', None) is not None
            ):
                return

            linknames.append(
                local_link(x.source + ext, x.filename + ext, staging)
            )

        _stg(x)

        if isinstance(x, track.Track):
            if x.tracktype == 'bam':
                _stg(x, ext='.bai')
            if x.tracktype == 'vcfTabix':
                _stg(x, ext='.tbi')

        if isinstance(x, track.CompositeTrack):
            if x._html:
                _stg(x._html)

    return linknames
278163
def _get_info(self):
        
        out_parts = []
        while True:
            line = self.proc.stderr.readline()
            if not line:
                # EOF and data not found.
                raise CommunicationError("stream info not found")

            # In Python 3, result of reading from stderr is bytes.
            if isinstance(line, bytes):
                line = line.decode('utf8', 'ignore')

            line = line.strip().lower()

            if 'no such file' in line:
                raise IOError('file not found')
            elif 'invalid data found' in line:
                raise UnsupportedError()
            elif 'duration:' in line:
                out_parts.append(line)
            elif 'audio:' in line:
                out_parts.append(line)
                self._parse_info(''.join(out_parts))
                break
402518
def message(self) -> str:
        
        if self.is_error:
            assert self._error
            return self._error.human
        else:
            return self._stage.value.human
1325197
def get_field_info(self) -> FieldInfo:
        
        byte_buffer = self.game.UpdateFieldInfoFlatbuffer()

        if byte_buffer.size >= 4:  # GetRootAsGameTickPacket gets angry if the size is less than 4
            # We're counting on this copying the data over to a new memory location so that the original
            # pointer can be freed safely.
            proto_string = ctypes.string_at(byte_buffer.ptr, byte_buffer.size)
            self.game.Free(byte_buffer.ptr)  # Avoid a memory leak
            self.game_status(None, RLBotCoreStatus.Success)
            return FieldInfo.GetRootAsFieldInfo(proto_string, 0)
665791
def get_phase(self):
        

        if self.phase != PodPhase.TERMINATING:
            self.phase = PodPhase.get_from_string(self.get_status().phase)

        return self.phase
1324603
def get_mutation(self, stage, data):
        '''
        
        '''
        payload = None
        # Commented out for now: we want to return the same
        # payload - while inside the same test
        # if self._keep_running() and self._do_fuzz.is_set():
        if self._keep_running():
            fuzz_node = self._fuzz_path[self._index_in_path].dst
            if self._should_fuzz_node(fuzz_node, stage):
                fuzz_node.set_session_data(data)
                payload = fuzz_node.render().tobytes()
                self._last_payload = payload
            else:
                self._update_path_index(stage)
        if payload:
            self._notify_mutated()
        self._requested_stages.append((stage, payload))
        return payload
239064
def get_sub_comp_info(source_info, comp):
        
        sub_comps = source_info.get('components', None)
        if sub_comps is None:
            return source_info.copy()
        moving = source_info.get('moving', False)
        selection_dependent = source_info.get('selection_dependent', False)
        if selection_dependent:
            key = comp.make_key('{ebin_name}_{evtype_name}')
        elif moving:
            key = "zmax%i" % comp.zmax
        ret_dict = source_info.copy()
        ret_dict.update(sub_comps[key])
        return ret_dict
750282
public static Object delayedNull(CompletionStage<Void> stage) {
      // If stage was null - meant we didn't notify or if it already completed, no reason to create a stage instance
      if (stage == null || CompletionStages.isCompletedSuccessfully(stage)) {
         return null;
      } else {
         return asyncValue(stage);
      }
   }
851710
def get_rendered_fields(self, ctx=None):
        '''
        
        '''
        times = self._min_times
        if self._mutating() and self._in_repeat_stage():
            times += (self._current_index) * self._step
        return super(Repeat, self).get_rendered_fields(ctx) * times
617700
def workflow_remove_stage(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/removeStage' % object_id, input_params, always_retry=always_retry, **kwargs)
107784
@SuppressWarnings("VariableNotUsedInsideIf")
  public Stage stage()
  {
    if (sortProject != null) {
      return Stage.SORT_PROJECT;
    } else if (sort != null) {
      return Stage.SORT;
    } else if (aggregateProject != null) {
      return Stage.AGGREGATE_PROJECT;
    } else if (havingFilter != null) {
      return Stage.HAVING_FILTER;
    } else if (aggregate != null) {
      return Stage.AGGREGATE;
    } else if (selectSort != null) {
      return Stage.SELECT_SORT;
    } else if (selectProject != null) {
      return Stage.SELECT_PROJECT;
    } else if (whereFilter != null) {
      return Stage.WHERE_FILTER;
    } else {
      return Stage.SCAN;
    }
  }
364283
def get_selected_object(self):
        
        model, paths = self.tree_view.get_selection().get_selected_rows()
        if len(paths) == 1:
            return self.tree_store.get_iter(paths[0]), paths[0]
        else:
            return None, paths
1189787
def load(self, train_info: TrainingInfo) -> (dict, dict):
        
        last_epoch = train_info.start_epoch_idx

        model_state = torch.load(self.checkpoint_filename(last_epoch))
        hidden_state = torch.load(self.checkpoint_hidden_filename(last_epoch))

        self.checkpoint_strategy.restore(hidden_state)
        train_info.restore(hidden_state)

        return model_state, hidden_state
128626
def get_model_info(self):
        '''
        
        '''
        info = {}
        info['model_name'] = self.name
        info['stages'] = '->'.join([repr(s) for s in self._stages])
        info['sequence'] = {
            'index': self._current_index
        }
        return info
843000
def get_stages(self):
        '''
        
        '''
        sequence = self.get_sequence()
        stages = {}
        for seq in self._sequences:
            for e in seq:
                if e.src.get_name() not in stages:
                    stages[e.src.get_name()] = []
                if e.dst.get_name() not in stages[e.src.get_name()]:
                    stages[e.src.get_name()].append(e.dst.get_name())
        return {
            'current': [e.dst.get_name() for e in sequence],
            'stages': stages
        }
832403
def info(self, action=None):
        
        if action in self.cache:
            return self.cache[action]['info']
        return self.cache.keys() or None