Skip to content

Commit

Permalink
suppress import errors for optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fjxmlzn committed Jan 9, 2025
1 parent 38712b8 commit f38c930
Show file tree
Hide file tree
Showing 4 changed files with 288 additions and 251 deletions.
34 changes: 33 additions & 1 deletion pe/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
from .runner.pe import PE
from generalimport import generalimport

generalimport(
"blobfile",
"torch",
"imageio",
"clip",
"diffusers",
"wilds",
"improved_diffusion",
message=(
"Please install private_evolution with [image] dependencies. "
"See https://microsoft.github.io/DPSDA/getting_started/installation.html for more details."
),
)
generalimport(
"gdown",
"openai",
"tenacity",
"azure-identity",
"tiktoken",
"python-dotenv",
"sentence-transformers",
"protobuf",
"sentencepiece",
"fschat",
"transformers",
"accelerate",
message=(
"Please install private_evolution with [text] dependencies. "
"See https://microsoft.github.io/DPSDA/getting_started/installation.html for more details."
),
)
Loading

0 comments on commit f38c930

Please sign in to comment.