Skip to content

Commit

Permalink
remove gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu0619 committed May 22, 2024
1 parent b6757ca commit 4b2bae8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions auroris/curation/_curator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from auroris.types import VerbosityLevel
from auroris.utils import is_parquet_file


class Curator(BaseModel):
"""
A curator is a collection of actions that are applied to a dataset.
Expand Down
8 changes: 3 additions & 5 deletions auroris/report/broadcaster/_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,10 @@ def broadcast(self):
def _img_to_html_src(self, path: str):
"""
Convert a path to a corresponding `src` attribute for an `<img />` tag.
Currently only supports GCP and local paths.
Currently only supports local paths.
"""
protocol = dm.utils.fs.get_protocol(path)
if protocol == "gs":
return path.replace("gs://", "https://storage.googleapis.com/")
elif protocol == "file":
if protocol == "file":
return os.path.relpath(path, self._destination)
else:
raise ValueError("We only support images hosted in GCP or locally")
raise ValueError("We only support images hosted locally")
1 change: 0 additions & 1 deletion auroris/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ def is_parquet_file(path):
return True
except (IOError, ValueError):
return False

0 comments on commit 4b2bae8

Please sign in to comment.