Skip to content

Commit 3af95b6

Browse files
authored
Merge pull request #233 from allenai/patrickj/configure-oerun-logging
Configure olmoearth_run logging
2 parents 2281a2a + b15bb02 commit 3af95b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rslp/olmoearth_run/olmoearth_run.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Run OlmoEarthRunPredictRunner inference pipeline."""
22

33
import hashlib
4+
import logging
45
import shutil
56
import tempfile
67
from enum import StrEnum
@@ -9,6 +10,7 @@
910
import fsspec
1011
from olmoearth_run.runner.local.fine_tune_runner import OlmoEarthRunFineTuneRunner
1112
from olmoearth_run.runner.local.predict_runner import OlmoEarthRunPredictRunner
13+
from olmoearth_run.shared.tools.logger import configure_logging
1214
from upath import UPath
1315

1416
from rslp.log_utils import get_logger
@@ -51,6 +53,7 @@ def get_local_checkpoint(checkpoint_path: UPath) -> Path:
5153

5254
def prepare_labeled_windows(project_path: Path, scratch_path: Path) -> None:
5355
"""Run OlmoEarthRunFineTuneRunner's prepare_windows pipeline."""
56+
configure_logging(log_level=logging.INFO)
5457
logger.info("Loading OlmoEarthRunFineTuneRunner")
5558
runner = OlmoEarthRunFineTuneRunner(
5659
project_path=project_path,
@@ -62,6 +65,7 @@ def prepare_labeled_windows(project_path: Path, scratch_path: Path) -> None:
6265

6366
def finetune(project_path: Path, scratch_path: Path) -> None:
6467
"""Run EsFineTuneRunner finetune pipeline."""
68+
configure_logging(log_level=logging.INFO)
6569
logger.info("Loading OlmoEarthRunFineTuneRunner")
6670
runner = OlmoEarthRunFineTuneRunner(
6771
project_path=project_path,
@@ -80,6 +84,7 @@ def olmoearth_run(config_path: Path, scratch_path: Path, checkpoint_path: str) -
8084
scratch_path: directory to use for scratch space.
8185
checkpoint_path: path to the model checkpoint.
8286
"""
87+
configure_logging(log_level=logging.INFO)
8388
runner = OlmoEarthRunPredictRunner(
8489
# OlmoEarth Run does not work with relative path, so make sure to convert to absolute here.
8590
project_path=config_path.absolute(),
@@ -132,6 +137,7 @@ def one_stage(
132137
for all partitions, except BUILD_DATASET and COMBINE, which happens across
133138
partitions.
134139
"""
140+
configure_logging(log_level=logging.INFO)
135141
if stage == OlmoEarthRunStage.COMBINE and partition_id is not None:
136142
raise ValueError("partition_id cannot be set for COMBINE stage")
137143

0 commit comments

Comments
 (0)