Skip to content

Commit

Permalink
replace RuntimeWarning by logging
Browse files Browse the repository at this point in the history
  • Loading branch information
thorben-frank committed Apr 22, 2024
1 parent 04ebed8 commit 706fcf6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 8 additions & 2 deletions mlff/data/dataloader_sparse_tfds.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@
try:
import tensorflow as tf
except ModuleNotFoundError:
raise RuntimeWarning(
logging.warning(
"For using TFDSDataLoader please install tensorflow."
)
# raise RuntimeWarning(
# "For using TFDSDataLoader please install tensorflow."
# )
try:
import tensorflow_datasets as tfds
except ModuleNotFoundError:
raise RuntimeWarning(
logging.warning(
"For using TFDSDataLoader please install tensorflow_datasets."
)
# raise RuntimeWarning(
# "For using TFDSDataLoader please install tensorflow_datasets."
# )


logging.MLFF = 35
Expand Down
7 changes: 5 additions & 2 deletions mlff/data/dataloader_sparse_tfrecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
try:
import tensorflow as tf
except ModuleNotFoundError:
raise RuntimeWarning(
"For using TFRecordDataLoaderSparse please install tensorflow."
logging.warning(
"For using TFDSDataLoader please install tensorflow."
)
# raise RuntimeWarning(
# "For using TFRecordDataLoaderSparse please install tensorflow."
# )

logging.MLFF = 35
logging.addLevelName(logging.MLFF, 'MLFF')
Expand Down

0 comments on commit 706fcf6

Please sign in to comment.