Skip to content

Commit

Permalink
fixed checks in load_seeding that were not necesary
Browse files Browse the repository at this point in the history
  • Loading branch information
jcblemai committed Nov 15, 2023
1 parent ab3e7c9 commit 90b38ad
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions flepimop/gempyor_pkg/src/gempyor/seeding_ic.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,7 @@ def draw_seeding(self, sim_id: int, setup) -> nb.typed.Dict:
return _DataFrame2NumbaDict(df=seeding, amounts=amounts, setup=setup)

def load_seeding(self, sim_id: int, setup) -> nb.typed.Dict:
method = "NoSeeding"

if self.seeding_config is not None and "method" in self.seeding_config.keys():
method = self.seeding_config["method"].as_str()
if method not in ["FolderDraw", "SetInitialConditions", "InitialConditionsFolderDraw", "NoSeeding", "FromFile"]:
raise NotImplementedError(
f"Seeding method in inference run must be FolderDraw, SetInitialConditions, FromFile or InitialConditionsFolderDraw [got: {method}]"
)
""" only difference with draw seeding is that the sim_id is now sim_id2load"""
return self.draw_seeding(sim_id=sim_id, setup=setup)

def load_ic(self, sim_id: int, setup) -> nb.typed.Dict:
Expand Down

0 comments on commit 90b38ad

Please sign in to comment.