Skip to content

Commit

Permalink
(MA) distributed optional dependency imports as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
amkrajewski committed Mar 29, 2024
1 parent 2cbcbc1 commit 4919926
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pysipfenn/core/modelAdjusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
# DEV requirements. Not installed by default.
import plotly.express as px
import plotly.graph_objects as go
from optimade.client import OptimadeClient
from optimade.adapters.structures import pymatgen as pymatgen_adapter
from optimade.models import StructureResource


class LocalAdjuster:
Expand Down Expand Up @@ -610,6 +607,8 @@ def __init__(
taskName: str = "OPTIMADEFineTuning",
maxResults: int = 10000
) -> None:
from optimade.client import OptimadeClient

super().__init__(
calculator=calculator,
model=model,
Expand Down Expand Up @@ -647,6 +646,9 @@ def fetchAndFeturize(
parallelWorkers: int = 1,
verbose: bool = True
) -> None:
from optimade.adapters.structures import pymatgen as pymatgen_adapter
from optimade.models import StructureResource

response = self.client.get(query)
providerResponse = response['structures'][query]
respondingProviderURL = list(providerResponse.keys())[0]
Expand Down

0 comments on commit 4919926

Please sign in to comment.