raster-foundry / granary

Open source repo for AI-supported information feeds

Home Page:https://raster-foundry.github.io/granary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept a GeoJSON task grid in prediction posts alongside other arguments

jisantuc opened this issue · comments

Problem Description

For integration with tasking manager, models must be able to produce predictions / prioritization conforming to a task grid. We don't know in advance that we'll be able to pass the task grid along as a cli argument (the command might get huge, AWS Batch might get mad), so we'll need special, well-documented handling of a particular argument in the POST predictions endpoint that understands that it should transform an incoming task grid into a file on S3 and pass along a reference to that file instead of the geojson itself.

Acceptance

  • the model in the dev database has a TASK_GRID query parameter that validates against the geojson json schema
  • the model's CLI has been updated to accept a task grid URI
  • model output has been updated to produce prioritization conforming to that task grid
  • prediction model kick off transforms the incoming geojson in a POST into a file on S3 before attempting to kick off the model
  • prediction endpoints and model endpoints include an explanation of the special taskGrid key in their API docs