Skip to content

Commit

Permalink
Fix custom modules import error for predict
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Blumenstiel <[email protected]>
  • Loading branch information
blumenstiel committed Dec 4, 2024
1 parent 4726ecf commit dc6d188
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terratorch/cli_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ def instantiate_classes(self) -> None:
custom_modules_path = self.config.fit.custom_modules_path
elif hasattr(self.config, "test") and hasattr(self.config.test, "custom_modules_path"):
custom_modules_path = self.config.test.custom_modules_path
elif hasattr(self.config, "predict") and hasattr(self.config.predict, "custom_modules_path"):
custom_modules_path = self.config.predict.custom_modules_path
else:
default_path = Path(".") / "custom_modules"
custom_modules_path = os.environ.get("TERRATORCH_CUSTOM_MODULE_PATH", default_path)
Expand Down

0 comments on commit dc6d188

Please sign in to comment.