speechbrain.utils.check_HF_repo module

Library for the HuggingFace (HF) repositories.

Authors
  • Mirco Ravanelli 2022

Summary

Functions:

check_repo

Runs the code reported in the README file of the given HF_repo.

repo_list

Get the list of HF recipes in the csv recipe file.

run_HF_check

Checks if the code reported in the readme files of the HF repository is runnable.

Reference

speechbrain.utils.check_HF_repo.run_HF_check(recipe_csvfile='tests/recipes.csv', field='HF_repo', output_folder='HF_repos')[source]

Checks if the code reported in the readme files of the HF repository is runnable. Note: the tests run the code marked as python in the readme file.

Parameters
  • recipe_csvfile (path) – Path of the csv recipe file summarizing all the recipes in the repo.

  • field (string) – Field of the csv recipe file containing the links to HF repos.

  • output_folder (path) – Where to download the HF readme files.

Returns

check – True if all the code runs, False otherwise.

Return type

True

speechbrain.utils.check_HF_repo.repo_list(recipe_csvfile='tests/recipes.csv', field='HF_repo')[source]

Get the list of HF recipes in the csv recipe file.

Parameters
  • recipe_csvfile (path) – Path of the csv recipe file summarizing all the recipes in the repo.

  • field (string) – Field of the csv recipe file containing the links to HF repos.

Returns

HF_repos – List of the detected HF repos.

Return type

list

speechbrain.utils.check_HF_repo.check_repo(HF_repo)[source]

Runs the code reported in the README file of the given HF_repo. It checks if the code runs without errors.

Parameters

HF_repo (string) – URL of the HF repository to check.

Returns

check – True if all the code runs, False otherwise.

Return type

bool