Skip to content

Commit

Permalink
open v3 dataset in readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-manukyan committed Nov 14, 2024
1 parent 9b4cafd commit 31b784e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ def __init__(
self.index_params = index_params
self.kwargs = kwargs
if read_only:
self.ds = deeplake.open_read_only(self.path, self.token)
try:
self.ds = deeplake.open_read_only(self.path, self.token)
except Exception as e:
try:
self.ds = deeplake.query(
f"select * from {self.path}", token=self.token)
except Exception:
raise e
else:
try:
self.ds = deeplake.open(self.path, self.token)
Expand Down

0 comments on commit 31b784e

Please sign in to comment.