Generate Presto embeddings in Google Earth Engine#41
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| @@ -0,0 +1,631 @@ | |||
| { | |||
There was a problem hiding this comment.
It may be worth doing something to highlight 5c more. It would be a bummer if someone distracted started incurring costs. Maybe a
Reply via ReviewNB
| @@ -0,0 +1,631 @@ | |||
| { | |||
There was a problem hiding this comment.
This torchscripted model then only works for t=12 inputs right?
Thats fine for this use case but it might be clearer to have explicit variables (e.g. num_timesteps=12 ) here
Reply via ReviewNB
| @@ -0,0 +1,631 @@ | |||
| { | |||
There was a problem hiding this comment.
Can you add a bit describing why ClassifierHandler is necessary / what its doing?
Reply via ReviewNB
There was a problem hiding this comment.
Added short comment
| 'Embedding Generation Estimates\nCost: $' + | ||
| estimate(5.37) + | ||
| '-' + | ||
| estimate(10.14) |
There was a problem hiding this comment.
what do the 5.37 and 10.14 represent?
There was a problem hiding this comment.
a: cost estimates per 1000km^2 based on real runs (which is why we divide by 1000 in line 27)
| .add([-272.15, 0]) | ||
| .divide([35, 0.03]); | ||
| } | ||
| //var ERA5_temp = ee.Image([0,0]).rename(ERA5_BANDS).clip(roi) |
There was a problem hiding this comment.
nit - can be deleted
There was a problem hiding this comment.
leaving in for experimentation
| var elevation = ee.Image('USGS/SRTMGL1_003').clip(roi).select('elevation'); | ||
| var slope = ee.Terrain.slope(elevation); | ||
| var SRTM_img = ee.Image.cat([elevation, slope]).toDouble().divide([2000, 50]); | ||
| //var SRTM_temp = ee.Image([0,0]).rename(SRTM_BANDS).clip(roi) |
There was a problem hiding this comment.
nit - can be deleted
There was a problem hiding this comment.
leaving in for experimentation
|
|
||
| // 2. Cluster embeddings and display | ||
| var training = embeddings.sample({ region: roi, scale: 10, numPixels: 10000 }); | ||
| var trainedClusterer = ee.Clusterer.wekaKMeans(7).train(training); |
There was a problem hiding this comment.
It might be adding a note here that 7 == number of clusters
There was a problem hiding this comment.
Added a small comment
deploy/2_Generate_Embeddings.js
Outdated
|
|
||
| var ENDPOINT = | ||
| 'projects/presto-deployment/locations/us-central1/endpoints/vertex-pytorch-presto-endpoint'; | ||
| var RUN_VERTEX_AI = true; // Leave this as false to get a cost estimate first |
There was a problem hiding this comment.
can we this false by default
The PR includes a notebook for deploying Presto to Vertex AI and a Google Earth Engine script for generating Presto embeddings using the Vertex AI model.
Direct link to notebook: https://github.com/nasaharvest/presto/blob/initial-deploy-code/deploy/1_Presto_to_VertexAI.ipynb