Skip to content

Commit 7eb8a99

Browse files
increase timeout limit when downloading randomforest model eu-cdse/openeo-cdse-infra#636
A model can be very large, a sensible absolute upper limit here would 6 hours. Things will likely break earlier and this is just to avoid having a batch job that is stuck for days.
1 parent 45b0bd0 commit 7eb8a99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openeogeotrellis/ml/modelloader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def load_from_batch_job(model_path: Path) -> GeopysparkMlModel:
5959
"""Load ML model from batch job output directory.
6060
6161
Attempts to load model from directory, falling back to packed .tar.gz format.
62+
NOTE: Currently only `GeopySparkRandomForestModel` is supported.
6263
6364
:param model_path: Path to model directory or base path for packed model
6465
:return: Loaded model instance
@@ -78,7 +79,7 @@ def load_from_batch_job(model_path: Path) -> GeopysparkMlModel:
7879

7980
@staticmethod
8081
def _fetch_stac_metadata(model_id: str) -> dict:
81-
with requests.get(model_id, timeout=30) as resp:
82+
with requests.get(model_id, timeout=60*60*6) as resp:
8283
resp.raise_for_status()
8384
return resp.json()
8485

0 commit comments

Comments
 (0)