bdlb/diabetic_retinopathy_diagnosis/benchmark.py
def _download() -> None:
    """Downloads data from Kaggle using `tensorflow_datasets`.

    Raises:
      OSError: if `~/.kaggle/kaggle.json` is not set up.
    """
    import subprocess as sp
    import tensorflow_datasets as tfds

    # Append `/home/$USER/.local/bin` to path
    os.environ["PATH"] += ":/home/{}/.local/bin/".format(os.environ["USER"])

    # Download all files from Kaggle
    drd = tfds.download.kaggle.KaggleCompetitionDownloader(
        "diabetic-retinopathy-detection")
    try:
      for dfile in drd.competition_files:
        drd.download_file(dfile,
                          output_dir=_DIABETIC_RETINOPATHY_DIAGNOSIS_DATA_DIR)
    except sp.CalledProcessError as cpe:
      raise OSError(
          str(cpe) + "." +
          " Make sure you have ~/.kaggle/kaggle.json setup, fetched from the Kaggle website"
          " https://www.kaggle.com/<username>/account -> 'Create New API Key'."
          " Also accept the dataset license by going to"
          " https://www.kaggle.com/c/diabetic-retinopathy-detection/rules"
          " and look for the button 'I Understand and Accept' (make sure when reloading the"
          " page that the button does not pop up again).")
Downloads data from Kaggle using `tensorflow_datasets`.

    Raises:
      OSError: if `~/.kaggle/kaggle.json` is not set up.
    
Downloads data from Kaggle using `tensorflow_datasets`.
Downloads data from Kaggle using ` tensorflow_datasets ` .
def _download() -> None:
    import subprocess as sp
    import tensorflow_datasets as tfds
    os.environ["PATH"] += ":/home/{}/.local/bin/".format(os.environ["USER"])
    drd = tfds.download.kaggle.KaggleCompetitionDownloader(
        "diabetic-retinopathy-detection")
    try:
      for dfile in drd.competition_files:
        drd.download_file(dfile,
                          output_dir=_DIABETIC_RETINOPATHY_DIAGNOSIS_DATA_DIR)
    except sp.CalledProcessError as cpe:
      raise OSError(
          str(cpe) + "." +
          " Make sure you have ~/.kaggle/kaggle.json setup, fetched from the Kaggle website"
          " https://www.kaggle.com/<username>/account -> 'Create New API Key'."
          " Also accept the dataset license by going to"
          " https://www.kaggle.com/c/diabetic-retinopathy-detection/rules"
          " and look for the button 'I Understand and Accept' (make sure when reloading the"
          " page that the button does not pop up again).")
def _download ( ) -> None : import subprocess as sp import tensorflow_datasets as tfds os . environ [ "PATH" ] += ":/home/{}/.local/bin/" . format ( os . environ [ "USER" ] ) drd = tfds . download . kaggle . KaggleCompetitionDownloader ( "diabetic-retinopathy-detection" ) try : for dfile in drd . competition_files : drd . download_file ( dfile , output_dir = _DIABETIC_RETINOPATHY_DIAGNOSIS_DATA_DIR ) except sp . CalledProcessError as cpe : raise OSError ( str ( cpe ) + "." + " Make sure you have ~/.kaggle/kaggle.json setup, fetched from the Kaggle website" " https://www.kaggle.com/<username>/account -> 'Create New API Key'." " Also accept the dataset license by going to" " https://www.kaggle.com/c/diabetic-retinopathy-detection/rules" " and look for the button 'I Understand and Accept' (make sure when reloading the" " page that the button does not pop up again)." )
Downloads data from Kaggle using `tensorflow_datasets`.
Downloads data from Kaggle using ` tensorflow_datasets ` .
"""Downloads data from Kaggle using `tensorflow_datasets`.

    Raises:
      OSError: if `~/.kaggle/kaggle.json` is not set up.
    """ # Append `/home/$USER/.local/bin` to path # Download all files from Kaggle
if `~/.kaggle/kaggle.json` is not set up.
if ` ~ / . kaggle / kaggle . json ` is not set up .
OSError