Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yawenzzzz committed Oct 18, 2024
1 parent f7081e4 commit b64ab97
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN pip install -r /opt/rslearn_projects/rslearn/extra_requirements.txt
COPY requirements.txt /opt/rslearn_projects/requirements.txt
RUN pip install -r /opt/rslearn_projects/requirements.txt

# We can use `pip install rslearn[extra]` now
# Not sure if we want to replace to `pip install rslearn[extra]` now, the current setup always import the latest version of rslearn
# We need rslp to be pip installed as well

ENV PYTHONPATH="${PYTHONPATH}:/opt/rslearn_projects/rslearn:."
Expand Down
1 change: 1 addition & 0 deletions rslp/landsat_vessels/example_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
LANDSAT_ENDPOINT = f"http://localhost:{PORT}/detections"
TIMEOUT_SECONDS = 60000
SCENE_ID = "LC09_L1GT_106084_20241002_20241002_02_T2"
# TODO: change the paths
CROP_PATH = "/home/yawenz/rslearn_projects/rslp/landsat_vessels/temp_crops"
SCRATCH_PATH = "/home/yawenz/rslearn_projects/rslp/landsat_vessels/temp_scratch"
JSON_PATH = "/home/yawenz/rslearn_projects/rslp/landsat_vessels/vessels.json"
Expand Down
14 changes: 0 additions & 14 deletions rslp/landsat_vessels/predict_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,6 @@ def predict_pipeline(
scene_id: Landsat scene ID. Exactly one of image_files or scene_id should be
specified.
"""
# if not scratch_path:
# tmp_dir = TemporaryDirectory()
# scratch_path = tmp_dir.name
# else:
# tmp_dir = None

print(f"scratch_path: {scratch_path}")
print(f"crop_path: {crop_path}")
print(f"json_path: {json_path}")
print(f"image_files: {image_files}")
print(f"scene_id: {scene_id}")

start_time = time.time() # Start the timer

ds_path = UPath(scratch_path)
Expand Down Expand Up @@ -344,8 +332,6 @@ def predict_pipeline(
)
)

# if tmp_dir:
# tmp_dir.cleanup()
elapsed_time = time.time() - start_time # Calculate elapsed time
print(f"Prediction pipeline completed in {elapsed_time:.2f} seconds")

Expand Down
2 changes: 0 additions & 2 deletions rslp/utils/rslearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ def materialize_dataset(ds_path: UPath, group: str | None = None, workers: int =
dataset,
workers=workers,
group=group,
use_initial_job=False,
)
apply_on_windows(
MaterializeHandler(),
dataset,
workers=workers,
group=group,
use_initial_job=False,
)


Expand Down

0 comments on commit b64ab97

Please sign in to comment.