Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntoineToubhans/c8f942f0d8bc1a6d6d98d63a51b7f026 to your computer and use it in GitHub Desktop.
Save AntoineToubhans/c8f942f0d8bc1a6d6d98d63a51b7f026 to your computer and use it in GitHub Desktop.
import yaml
def _read_train_params(rev: str) -> dict:
with git_open("dvc.lock", rev=rev) as file:
dvc_lock = yaml.safe_load(file)
return dvc_lock["stages"]["train"]["params"]["params.yaml"]
MODELS_PARAMETERS = {
commit.hexsha: _read_train_params(rev=commit.hexsha)
for commit in MODELS_COMMITS
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment