Skip to content

Commit

Permalink
fix download gcs
Browse files Browse the repository at this point in the history
  • Loading branch information
lruizcalico committed Sep 26, 2023
1 parent 3c86e2a commit 66b1c24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/baskerville/helpers/gcs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
import logging

import pdb
from base64 import b64decode
from json import loads
from os.path import exists, join, isfile
Expand Down Expand Up @@ -215,6 +215,8 @@ def download_rename_inputs(filepath: str, temp_dir: str) -> str:
Returns: new filepath in the local machine
"""
_, filename = split_gcs_uri(filepath)
if "/" in filename:
filename = filename.split("/")[-1]
download_from_gcs(filepath, f"{temp_dir}/{filename}")
return f"{temp_dir}/{filename}"

Expand Down
1 change: 1 addition & 0 deletions src/baskerville/scripts/hound_snp_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os
import tempfile
import shutil
import pdb
import tensorflow as tf
from baskerville.helpers.gcs_utils import (
upload_folder_gcs,
Expand Down

0 comments on commit 66b1c24

Please sign in to comment.