How to use the datalab.utils.Iterator function in datalab

To help you get started, we’ve selected a few datalab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googledatalab / pydatalab / datalab / ml / _cloud_models.py View on Github external
def get_iterator(self):
    """Get iterator of models so it can be used as "for model in Models().get_iterator()".
    """
    return iter(datalab.utils.Iterator(self._retrieve_models))
github googledatalab / pydatalab / datalab / ml / _cloud_models.py View on Github external
def get_iterator(self):
    """Get iterator of versions so it can be used as
       "for v in ModelVersions(model_name).get_iterator()".
    """
    return iter(datalab.utils.Iterator(self._retrieve_versions))
github googledatalab / pydatalab / datalab / context / _project.py View on Github external
def __iter__(self):
    """ Returns an iterator for iterating through the Datasets in the project.
    """
    return iter(datalab.utils.Iterator(self._retrieve_projects))
github googledatalab / pydatalab / datalab / bigquery / _dataset.py View on Github external
def views(self):
    """ Returns an iterator for iterating through the Views in the dataset. """
    return iter(datalab.utils.Iterator(self._retrieve_views))
github googledatalab / pydatalab / datalab / ml / _job.py View on Github external
def get_iterator(self):
    """Get iterator of jobs so it can be used as "for model in Jobs().get_iterator()".
    """
    return iter(datalab.utils.Iterator(self._retrieve_jobs))
github googledatalab / pydatalab / datalab / bigquery / _table.py View on Github external
def range(self, start_row=0, max_rows=None):
    """ Get an iterator to iterate through a set of table rows.

    Args:
      start_row: the row of the table at which to start the iteration (default 0)
      max_rows: an upper limit on the number of rows to iterate through (default None)

    Returns:
      A row iterator.
    """
    fetcher = self._get_row_fetcher(start_row=start_row, max_rows=max_rows)
    return iter(datalab.utils.Iterator(fetcher))