Skip to content

Commit

Permalink
add logging on failed tabular goggle import (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
robsdavis authored Jan 7, 2025
1 parent d6da33a commit 21f8e30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/synthcity/plugins/generic/plugin_goggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from torch.utils.data import sampler

# synthcity absolute
import synthcity.logger as log
from synthcity.plugins.core.dataloader import DataLoader
from synthcity.plugins.core.distribution import (
CategoricalDistribution,
Expand All @@ -32,8 +33,9 @@
from synthcity.plugins.core.models.tabular_goggle import TabularGoggle

module_disabled = False
except ImportError:
except ImportError as e:
module_disabled = True
log.critical(f"Error importing TabularGoggle: {e}")


class GOGGLEPlugin(Plugin):
Expand Down Expand Up @@ -89,7 +91,7 @@ def __init__(
workspace: Path = Path("workspace"),
compress_dataset: bool = False,
dataloader_sampler: Optional[sampler.Sampler] = None,
**kwargs: Any
**kwargs: Any,
) -> None:
"""
.. inheritance-diagram:: synthcity.plugins.generic.plugin_goggle.GOGGLEPlugin
Expand Down

0 comments on commit 21f8e30

Please sign in to comment.