Skip to content

Commit

Permalink
lmdb
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Kleinhenz committed Nov 5, 2024
1 parent 331870c commit 39220ff
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/beignet/datasets/_lmdb_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@

from beignet.transforms import Transform

try:
import lmdb
except ImportError as error:
raise ImportError(
"""
LMDB datasets require the `lmdb` dependency:
$ pip install "beignet[lmdb]"
"""
) from error


class LMDBDataset(Dataset):
def __init__(
Expand All @@ -34,6 +23,17 @@ def __init__(
):
super().__init__()

try:
import lmdb
except ImportError as error:
raise ImportError(
"""
LMDB datasets require the `lmdb` dependency:
$ pip install "beignet[lmdb]"
"""
) from error

self._root = root

self._transform_fn = transform
Expand Down

0 comments on commit 39220ff

Please sign in to comment.