python/replicate/experiment.py
def list(self, filter: Optional[Callable[[Any], bool]] = None) -> List[Experiment]:
        """
        Return all experiments for a project, sorted by creation date.
        """
        repository = self.project._get_repository()
        result: ExperimentList = ExperimentList()
        for path in repository.list("metadata/experiments/"):
            data = json.loads(repository.get(path))
            exp = Experiment.from_json(self.project, data)
            if filter is not None:
                include = False
                try:
                    include = filter(exp)
                except Exception as e:  # pylint: disable=broad-except
                    console.warn(
                        "Failed to apply filter to experiment {}: {}".format(
                            exp.short_id(), e
                        )
                    )
                if include:
                    result.append(exp)
            else:
                result.append(exp)
        result.sort(key=lambda e: e.created)
        return result

        Return all experiments for a project, sorted by creation date.
        
Return all experiments for a project, sorted by creation date.
Return all experiments for a project sorted by creation date .
def list(self, filter: Optional[Callable[[Any], bool]] = None) -> List[Experiment]:
        repository = self.project._get_repository()
        result: ExperimentList = ExperimentList()
        for path in repository.list("metadata/experiments/"):
            data = json.loads(repository.get(path))
            exp = Experiment.from_json(self.project, data)
            if filter is not None:
                include = False
                try:
                    include = filter(exp)
                except Exception as e:  
                    console.warn(
                        "Failed to apply filter to experiment {}: {}".format(
                            exp.short_id(), e
                        )
                    )
                if include:
                    result.append(exp)
            else:
                result.append(exp)
        result.sort(key=lambda e: e.created)
        return result
def list ( self , filter : Optional [ Callable [ [ Any ] , bool ] ] = None ) -> List [ Experiment ] : repository = self . project . _get_repository ( ) result : ExperimentList = ExperimentList ( ) for path in repository . list ( "metadata/experiments/" ) : data = json . loads ( repository . get ( path ) ) exp = Experiment . from_json ( self . project , data ) if filter is not None : include = False try : include = filter ( exp ) except Exception as e : console . warn ( "Failed to apply filter to experiment {}: {}" . format ( exp . short_id ( ) , e ) ) if include : result . append ( exp ) else : result . append ( exp ) result . sort ( key = lambda e : e . created ) return result
Return all experiments for a project, sorted by creation date.
Return all experiments for a project sorted by creation date .
"""
        Return all experiments for a project, sorted by creation date.
        """ # pylint: disable=broad-except
self
filter
Optional[Callable[[Any], bool]]