Skip to content

Commit

Permalink
oops D:
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaraphael committed Nov 4, 2023
1 parent 23c7f08 commit 268af14
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
2 changes: 0 additions & 2 deletions cerulean_cloud/cloud_run_orchestrator/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,12 @@ async def _orchestrate(
base_tiles_inference = await perform_inference(
base_tiles,
cloud_run_inference.get_base_tile_inference,
100,
"base tiles",
)

offset_tiles_inference = await perform_inference(
offset_tiles_bounds,
cloud_run_inference.get_offset_tile_inference,
100,
"offset tiles",
)

Expand Down
50 changes: 48 additions & 2 deletions notebooks/run_sr_on_scene_ids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
"source": [
"import httpx\n",
"import json\n",
"def stage(scene_ids, API_KEY):\n",
"def stage(scene_ids, API_KEY=\"\"):\n",
" URL = \"https://europe-west1-cerulean-338116.cloudfunctions.net/cerulean-cloud-staging-cloud-function-sr\"\n",
" payload = {\n",
" \"Records\": [{\n",
Expand All @@ -279,13 +279,59 @@
" json=payload,\n",
" timeout=100,\n",
" headers={\"Authorization\": f\"Bearer {API_KEY}\", \"Content-Type\": \"application/json\"})\n",
" print(orchestrator_result)\n",
"def test(scene_ids, API_KEY=\"\"):\n",
" URL = \"https://europe-west1-cerulean-338116.cloudfunctions.net/cerulean-cloud-test-cloud-function-sr\"\n",
" payload = {\n",
" \"Records\": [{\n",
" \"Sns\": {\n",
" \"Message\": json.dumps({\n",
" \"id\": s,\n",
" \"footprint\": {\"coordinates\": [[[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]]}})}}\n",
" for s in scene_ids]}\n",
"\n",
" orchestrator_result = httpx.post(\n",
" URL,\n",
" json=payload,\n",
" timeout=100,\n",
" headers={\"Authorization\": f\"Bearer {API_KEY}\", \"Content-Type\": \"application/json\"})\n",
" print(orchestrator_result)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"test(slicks)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "pulumi_env",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 268af14

Please sign in to comment.