docstr: Downloads prediction filenames and read urls from the datasource.
  
  Only samples with timestamp between `from_` (inclusive) and `to` (inclusive)
  will be downloaded.
  
  Args:
      task_name:
          Name of the prediction task.
      from_:
          Unix timestamp from which on samples are downloaded. Defaults to the
          very beginning (timestamp 0).
      to:
          Unix timestamp up to and including which samples are downloaded.
          Defaults to the current timestamp.
      relevant_filenames_file_name:
          Path to the relevant filenames text file in the cloud bucket.
          The path is relative to the datasource root. Optional.
      run_id:
          Run ID. Optional. Should be given along with
          `relevant_filenames_artifact_id` to download relevant files only.
      relevant_filenames_artifact_id:
          ID of the relevant filename artifact. Optional. Should be given along
          with `run_id` to download relevant files only. Note that this is
          different from `relevant_filenames_file_name`.
      use_redirected_read_url:
          Flag for redirected read urls. When this flag is true,
          RedirectedReadUrls are returned instead of ReadUrls, meaning that the
          returned URLs have unlimited access to the file.
          Defaults to False. When S3DelegatedAccess is configured, this flag has
          no effect because RedirectedReadUrls are always returned.
      progress_bar:
          Tqdm progress bar to show how many prediction files have already been
          retrieved.
  
  Returns:
      An iterator of (filename, url) tuples where each tuple represents a sample.
  
  Examples:
      >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
      >>>
      >>> # Already created some Lightly Worker runs with this dataset
      >>> task_name = "object-detection"
      >>> client.set_dataset_id_by_name("my-dataset")
      >>> list(client.download_raw_predictions(task_name=task_name))
      [('.lightly/predictions/object-detection/image-1.json', 'https://......'),
       ('.lightly/predictions/object-detection/image-2.json', 'https://......')]
  
  :meta private:  # Skip docstring generation
docstr_tok: ["Downloads","prediction","filenames","and","read","urls","from","the","datasource",".","Only","samples","with","timestamp","between","`","from_","`","(","inclusive",")","and","`","to","`","(","inclusive",")","will","be","downloaded",".","Args",":","task_name",":","Name","of","the","prediction","task",".","from_",":","Unix","timestamp","from","which","on","samples","are","downloaded",".","Defaults","to","the","very","beginning","(","timestamp","0",")",".","to",":","Unix","timestamp","up","to","and","including","which","samples","are","downloaded",".","Defaults","to","the","current","timestamp",".","relevant_filenames_file_name",":","Path","to","the","relevant","filenames","text","file","in","the","cloud","bucket",".","The","path","is","relative","to","the","datasource","root",".","Optional",".","run_id",":","Run","ID",".","Optional",".","Should","be","given","along","with","`","relevant_filenames_artifact_id","`","to","download","relevant","files","only",".","relevant_filenames_artifact_id",":","ID","of","the","relevant","filename","artifact",".","Optional",".","Should","be","given","along","with","`","run_id","`","to","download","relevant","files","only",".","Note","that","this","is","different","from","`","relevant_filenames_file_name","`",".","use_redirected_read_url",":","Flag","for","redirected","read","urls",".","When","this","flag","is","true",",","RedirectedReadUrls","are","returned","instead","of","ReadUrls",",","meaning","that","the","returned","URLs","have","unlimited","access","to","the","file",".","Defaults","to","False",".","When","S3DelegatedAccess","is","configured",",","this","flag","has","no","effect","because","RedirectedReadUrls","are","always","returned",".","progress_bar",":","Tqdm","progress","bar","to","show","how","many","prediction","files","have","already","been","retrieved",".","Returns",":","An","iterator","of","(","filename",",","url",")","tuples","where","each","tuple","represents","a","sample",".","Examples",":",">",">",">","client","=","ApiWorkflowClient","(","token=","''","MY_AWESOME_TOKEN","''",")",">",">",">",">",">",">","#","Already","created","some","Lightly","Worker","runs","with","this","dataset",">",">",">","task_name","=","``","object-detection","''",">",">",">","client.set_dataset_id_by_name","(","``","my-dataset","''",")",">",">",">","list","(","client.download_raw_predictions","(","task_name=task_name",")",")","[","(","'.lightly\/predictions\/object-detection\/image-1.json","'",",","'https",":","\/\/","......","'",")",",","(","'.lightly\/predictions\/object-detection\/image-2.json","'",",","'https",":","\/\/","......","'",")","]",":","meta","private",":","#","Skip","docstring","generation"]
code: def download_raw_predictions_iter(
      self,
      task_name: str,
      from_: int = 0,
      to: Optional[int] = None,
      relevant_filenames_file_name: Optional[str] = None,
      run_id: Optional[str] = None,
      relevant_filenames_artifact_id: Optional[str] = None,
      use_redirected_read_url: bool = False,
      progress_bar: Optional[tqdm.tqdm] = None,
  ) -> Iterator[Tuple[str, str]]:
      """Downloads prediction filenames and read urls from the datasource.
  
      Only samples with timestamp between `from_` (inclusive) and `to` (inclusive)
      will be downloaded.
  
      Args:
          task_name:
              Name of the prediction task.
          from_:
              Unix timestamp from which on samples are downloaded. Defaults to the
              very beginning (timestamp 0).
          to:
              Unix timestamp up to and including which samples are downloaded.
              Defaults to the current timestamp.
          relevant_filenames_file_name:
              Path to the relevant filenames text file in the cloud bucket.
              The path is relative to the datasource root. Optional.
          run_id:
              Run ID. Optional. Should be given along with
              `relevant_filenames_artifact_id` to download relevant files only.
          relevant_filenames_artifact_id:
              ID of the relevant filename artifact. Optional. Should be given along
              with `run_id` to download relevant files only. Note that this is
              different from `relevant_filenames_file_name`.
          use_redirected_read_url:
              Flag for redirected read urls. When this flag is true,
              RedirectedReadUrls are returned instead of ReadUrls, meaning that the
              returned URLs have unlimited access to the file.
              Defaults to False. When S3DelegatedAccess is configured, this flag has
              no effect because RedirectedReadUrls are always returned.
          progress_bar:
              Tqdm progress bar to show how many prediction files have already been
              retrieved.
  
      Returns:
          An iterator of (filename, url) tuples where each tuple represents a sample.
  
      Examples:
          >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
          >>>
          >>> # Already created some Lightly Worker runs with this dataset
          >>> task_name = "object-detection"
          >>> client.set_dataset_id_by_name("my-dataset")
          >>> list(client.download_raw_predictions(task_name=task_name))
          [('.lightly/predictions/object-detection/image-1.json', 'https://......'),
           ('.lightly/predictions/object-detection/image-2.json', 'https://......')]
  
      :meta private:  # Skip docstring generation
      """
      if run_id is not None and relevant_filenames_artifact_id is None:
          raise ValueError(
              "'relevant_filenames_artifact_id' should not be `None` when 'run_id' "
              "is specified."
          )
      if run_id is None and relevant_filenames_artifact_id is not None:
          raise ValueError(
              "'run_id' should not be `None` when 'relevant_filenames_artifact_id' "
              "is specified."
          )
      relevant_filenames_kwargs = {}
      if (
          run_id is not None
          and relevant_filenames_artifact_id is not None
      ):
          relevant_filenames_kwargs[
              "relevant_filenames_run_id"
          ] = run_id
          relevant_filenames_kwargs[
              "relevant_filenames_artifact_id"
          ] = relevant_filenames_artifact_id
  
      yield from self._download_raw_files_iter(
          download_function=self._datasources_api.get_list_of_raw_samples_predictions_from_datasource_by_dataset_id,
          from_=from_,
          to=to,
          relevant_filenames_file_name=relevant_filenames_file_name,
          use_redirected_read_url=use_redirected_read_url,
          task_name=task_name,
          progress_bar=progress_bar,
          **relevant_filenames_kwargs,
      )
  
imports: import time
  import warnings
  from typing import Dict, Iterator, List, Optional, Set, Tuple, Union
  import tqdm
  from lightly.openapi_generated.swagger_client.models import DatasourceConfig, DatasourceProcessedUntilTimestampRequest, DatasourceProcessedUntilTimestampResponse, DatasourcePurpose, DatasourceRawSamplesData
  from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_data_row import DatasourceRawSamplesDataRow
label_desc: Use image node_id 3 for calling the _DatasourcesMixin obj's underlying member method code with example usage: obj.download_raw_predictions_iter(task_name, from_, to, relevant_filenames_file_name, run_id, relevant_filenames_artifact_id, use_redirected_read_url, progress_bar) without return types