Skip to content

Commit ca7acf7

Browse files
authored
Merge pull request #49 from allenai/favyen/marine-infra
Add marine infrastructure dataset and model config
2 parents aa49643 + 4a251f8 commit ca7acf7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+6343
-135
lines changed

.github/workflows/build_test.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,27 @@ jobs:
109109
- name: Run unit tests with Docker Compose
110110
run: |
111111
docker compose -f docker-compose.yaml run \
112+
-e CI="true" \
112113
test pytest tests/unit/
113114
114115
- name: Run tests with Docker Compose
115116
run: |
116117
docker compose -f docker-compose.yaml run \
118+
-e CI="true" \
117119
-e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
118120
-e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
119121
-v ${{env.GOOGLE_GHA_CREDS_PATH}}:/tmp/gcp-credentials.json:ro \
120122
-e GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcp-credentials.json \
121123
-e RSLP_BUCKET=rslearn-eai \
122124
-e RSLP_PREFIX=gs://rslearn-eai \
123-
test pytest tests/integration/ --ignore tests/integration_slow/ -vv
125+
-e BKT_PROJECT_ID=earthsystem-dev-c3po \
126+
-e BKT_BUCKET_NAME=rslp-tests \
127+
-e BKT_BIGTABLE_PROJECT_ID=earthsystem-dev-c3po \
128+
-e BKT_BIGTABLE_INSTANCE_ID=rslp-bigtable-test-instance \
129+
-e TEST_PUBSUB_PROJECT=earthsystem-dev-c3po \
130+
-e TEST_PUBSUB_TOPIC=rslearn_projects_test_topic \
131+
-e TEST_PUBSUB_SUBSCRIPTION=rslearn_projects_test_subscription \
132+
test pytest tests/integration/ -vv
124133
125134
126135
- name: Clean up

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM pytorch/pytorch:2.5.0-cuda11.8-cudnn9-runtime@sha256:d15e9803095e462e351f097fb1f5e7cdaa4f5e855d7ff6d6f36ec4c2aa2938ea
22

33
RUN apt update
4-
RUN apt install -y libpq-dev ffmpeg libsm6 libxext6 git
4+
RUN apt install -y libpq-dev ffmpeg libsm6 libxext6 git wget
55

66
# Install rslearn.
77
# We use git clone and then git checkout instead of git clone -b so that the user could
@@ -27,4 +27,12 @@ ENV PYTHONPATH="${PYTHONPATH}:."
2727
COPY . /opt/rslearn_projects/
2828
# install rslp package
2929
RUN pip install --no-cache-dir /opt/rslearn_projects
30+
31+
# Build Satlas smooth_point_labels_viterbi.go program.
32+
WORKDIR /opt/rslearn_projects/rslp/satlas/scripts
33+
RUN wget https://go.dev/dl/go1.22.12.linux-amd64.tar.gz
34+
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.12.linux-amd64.tar.gz
35+
ENV PATH="${PATH}:/usr/local/go/bin"
36+
RUN go build smooth_point_labels_viterbi.go
37+
3038
WORKDIR /opt/rslearn_projects

ai2_docs/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ rslearn datasets, model checkpoints, etc. The easiest way is to create a `.env`
3333

3434
RSLP_PREFIX=gs://rslearn-eai
3535
RSLP_WEKA_PREFIX=weka://dfive-default/rslearn-eai
36+
BKT_PROJECT_ID=ai2-prior-satlas
37+
BKT_BUCKET_NAME=satlas-explorer-data
38+
BKT_BIGTABLE_PROJECT_ID=ai2-prior-satlas
39+
BKT_BIGTABLE_INSTANCE_ID=satlas
3640

3741
You will also need to setup GCP credentials that have access to this bucket.
3842

@@ -42,19 +46,6 @@ launcher like `rslp.launch_beaker`, then it isn't needed since the credentials a
4246
already configured as secrets on the platform, but you would need to setup your Beaker
4347
or other platform credentials to be able to launch the jobs.
4448

45-
TODO: update GCP/W&B to use service accounts.
46-
47-
Currently, until https://github.com/allenai/rslearn/issues/33 is resolved, model config
48-
files use S3-compatable API to access GCS rather than GCS directly. Therefore, you need
49-
to set up environment variables to provide the appropriate credentials:
50-
51-
S3_ACCESS_KEY_ID=GOOG...
52-
S3_SECRET_ACCESS_KEY=...
53-
54-
You can create these credentials at
55-
https://console.cloud.google.com/storage/settings;tab=interoperability?hl=en&project=skylight-proto-1
56-
under "Access keys for your user account".
57-
5849

5950
Usage
6051
-----
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"layers": {
3+
"label": {
4+
"type": "vector"
5+
},
6+
"mask": {
7+
"band_sets": [
8+
{
9+
"bands": [
10+
"mask"
11+
],
12+
"dtype": "uint8",
13+
"format": {
14+
"format": "png",
15+
"name": "single_image"
16+
}
17+
}
18+
],
19+
"type": "raster"
20+
},
21+
"output": {
22+
"format": {
23+
"coordinate_mode": "pixel",
24+
"name": "geojson"
25+
},
26+
"type": "vector"
27+
},
28+
"sentinel2": {
29+
"band_sets": [
30+
{
31+
"bands": [
32+
"B02",
33+
"B03",
34+
"B04",
35+
"B08"
36+
],
37+
"dtype": "uint16",
38+
"format": {
39+
"geotiff_options": {
40+
"compress": "zstd",
41+
"predictor": 2,
42+
"zstd_level": 1
43+
},
44+
"name": "geotiff"
45+
}
46+
},
47+
{
48+
"bands": [
49+
"B05",
50+
"B06",
51+
"B07",
52+
"B8A",
53+
"B11",
54+
"B12"
55+
],
56+
"dtype": "uint16",
57+
"format": {
58+
"geotiff_options": {
59+
"compress": "zstd",
60+
"predictor": 2,
61+
"zstd_level": 1
62+
},
63+
"name": "geotiff"
64+
},
65+
"zoom_offset": -1
66+
},
67+
{
68+
"bands": [
69+
"B01",
70+
"B09",
71+
"B10"
72+
],
73+
"dtype": "uint16",
74+
"format": {
75+
"geotiff_options": {
76+
"compress": "zstd",
77+
"predictor": 2,
78+
"zstd_level": 1
79+
},
80+
"name": "geotiff"
81+
},
82+
"zoom_offset": -2
83+
}
84+
],
85+
"data_source": {
86+
"harmonize": true,
87+
"index_cache_dir": "cache/sentinel2",
88+
"max_cloud_cover": 50,
89+
"max_time_delta": "0d",
90+
"modality": "L1C",
91+
"name": "rslp.satlas.data_sources.MonthlySentinel2",
92+
"query_config": {
93+
"max_matches": 4
94+
},
95+
"sort_by": "cloud_cover",
96+
"use_rtree_index": false
97+
},
98+
"type": "raster"
99+
}
100+
},
101+
"tile_store": {
102+
"class_path": "rslearn.tile_stores.default.DefaultTileStore",
103+
"init_args": {
104+
"geotiff_options": {
105+
"compress": "zstd",
106+
"predictor": 2,
107+
"zstd_level": 1
108+
}
109+
}
110+
}
111+
}

0 commit comments

Comments
 (0)