diff --git a/rslp/satlas/README.md b/rslp/satlas/README.md index 57b773c..2291454 100644 --- a/rslp/satlas/README.md +++ b/rslp/satlas/README.md @@ -1,15 +1,36 @@ +This contains training, inference, and post-processing pipelines for the models served +at https://satlas.allen.ai/. + ## Marine Infrastructure +Training: + + python -m rslp.rslearn_main model fit --config data/satlas/marine_infra/config.yaml + Inference: python -m rslp.main satlas write_jobs_for_year_months '[[2024, 7]]' MARINE_INFRA 'gs://rslearn-eai/projects/satlas/marine_infra/version-20241212/{year:04d}-{month:02d}/' skylight-proto-1 rslp-job-queue-favyen Post-processing: + python -m rslp.main satlas merge_points MARINE_INFRA 2024-07 gs://rslearn-eai/projects/satlas/marine_infra/version-20241212/2024-07/ gs://rslearn-eai/projects/satlas/marine_infra/version-20241212/merged/ + python -m rslp.main satlas smooth_points MARINE_INFRA 2024-07 gs://rslearn-eai/projects/satlas/marine_infra/version-20241212/merged/ gs://rslearn-eai/projects/satlas/marine_infra/version-20241212/smoothed/ + python -m rslp.main satlas publish_points MARINE_INFRA gs://rslearn-eai/projects/satlas/marine_infra/version-20241212/smoothed/ 'marine-default-cluster@v4' + ## Wind Turbine +Training: + + python -m rslp.rslearn_main model fit --config data/satlas/wind_turbine/config.yaml + Inference: python -m rslp.main satlas write_jobs_for_year_months '[[2024, 1]]' WIND_TURBINE 'gs://rslearn-eai/projects/satlas/wind_turbine/version-20241210/{year:04d}-{month:02d}/' skylight-proto-1 rslp-job-queue-favyen --days_before 90 --days_after 181 Post-processing: + + python -m rslp.main satlas merge_points WIND_TURBINE 2024-01 gs://rslearn-eai/projects/satlas/wind_turbine/version-20241210/2024-01/ gs://rslearn-eai/projects/satlas/wind_turbine/version-20241210/merged/ + python -m rslp.main satlas smooth_points WIND_TURBINE 2024-01 gs://rslearn-eai/projects/satlas/wind_turbine/version-20241210/merged/ gs://rslearn-eai/projects/satlas/wind_turbine/version-20241210/smoothed/ + +Publishing for wind turbine is not supported yet since it needs to be combined with the +detected solar farms and published as "renewable energy" GeoJSON. diff --git a/rslp/satlas/publish.py b/rslp/satlas/publish.py index ace959f..12049f7 100644 --- a/rslp/satlas/publish.py +++ b/rslp/satlas/publish.py @@ -144,61 +144,22 @@ def publish_points( for fname in available_fnames[-NUM_RECOMPUTE:]: logger.info("upload %s", str(fname)) local_geojson_fname = os.path.join(tmp_dir, "data.geojson") - # local_shp_prefix = os.path.join(tmp_dir, "shp_data") - # local_kml_fname = os.path.join(tmp_dir, "data.kml") with fname.open("rb") as src: with open(local_geojson_fname, "wb") as dst: shutil.copyfileobj(src, dst) - """ - subprocess.check_call([ - 'ogr2ogr', - '-F', 'ESRI Shapefile', - '-nlt', 'POINT', - local_shp_prefix + ".shp", - local_geojson_fname, - ]) - make_shapefile_zip(local_shp_prefix) - subprocess.check_call([ - 'ogr2ogr', - '-F', 'KML', - local_kml_fname, - local_geojson_fname, - ]) - """ - fname_prefix = fname.name.split(".")[0] bucket.upload_file( local_geojson_fname, f"outputs/{app_name_on_r2}/{fname_prefix}.geojson", ) - """ - bucket.upload_file( - local_shp_prefix + ".shp.zip", - f"outputs/{app_name_on_r2}/{fname_prefix}.shp.zip", - ) - bucket.upload_file( - local_kml_fname, - f"outputs/{app_name_on_r2}/{fname_prefix}.kml", - ) - """ if fname == available_fnames[-1]: bucket.upload_file( local_geojson_fname, f"outputs/{app_name_on_r2}/latest.geojson", ) - """ - bucket.upload_file( - local_shp_prefix + ".shp.zip", - f"outputs/{app_name_on_r2}/latest.shp.zip", - ) - bucket.upload_file( - local_kml_fname, - f"outputs/{app_name_on_r2}/latest.kml", - ) - """ update_index(bucket, f"outputs/{app_name_on_r2}/")