Skip to content

Commit

Permalink
use try/except in import_plugins function
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicBboy committed Jan 31, 2021
1 parent a2d477f commit 60b7068
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flytekit/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ def import_plugins():
import importlib

for plugin in ["awssagemaker", "hive", "kfpytorch", "kftensorflow", "pandera", "papermill", "pod", "spark"]:
importlib.import_module(f"flytekitplugins.{plugin}")
try:
importlib.import_module(f"flytekitplugins.{plugin}")
except ImportError:
pass

0 comments on commit 60b7068

Please sign in to comment.