From 48503d4f40ede01c755b65b3fdc3912020148355 Mon Sep 17 00:00:00 2001 From: Tyler Erickson Date: Wed, 5 Jun 2024 16:53:07 -0700 Subject: [PATCH] Improved credentials checking --- index.ipynb | 440 ++-------------------------------------------------- 1 file changed, 9 insertions(+), 431 deletions(-) diff --git a/index.ipynb b/index.ipynb index 677804c..8e5e7fe 100644 --- a/index.ipynb +++ b/index.ipynb @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -79,7 +79,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -103,94 +103,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "17aa0dba96ba442892e6445f9721c007", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Output()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
\n"
-      ],
-      "text/plain": []
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "data": {
-      "text/html": [
-       "
╭──────────────────────────────── Package Info ────────────────────────────────╮\n",
-       "│                    ╷                                                         │\n",
-       "│   Package           Note                                                    │\n",
-       "│ ╶──────────────────┼───────────────────────────────────────────────────────╴ │\n",
-       "│   earthengine-dask │ Wheel built from                                        │\n",
-       "│                    │ ~/Documents/GitHub/VorGeo/earthengine-dask              │\n",
-       "│                    ╵                                                         │\n",
-       "╰──────────────────────────────────────────────────────────────────────────────╯\n",
-       "
\n" - ], - "text/plain": [ - "╭──────────────────────────────── \u001b[1;32mPackage Info\u001b[0m ────────────────────────────────╮\n", - "│ ╷ │\n", - "│ \u001b[1m \u001b[0m\u001b[1mPackage \u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mNote \u001b[0m\u001b[1m \u001b[0m │\n", - "│ ╶──────────────────┼───────────────────────────────────────────────────────╴ │\n", - "│ earthengine-dask │ Wheel built from │\n", - "│ │ ~/Documents/GitHub/VorGeo/earthengine-dask │\n", - "│ ╵ │\n", - "╰──────────────────────────────────────────────────────────────────────────────╯\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "cd050b60dacf42a1973daaf94c721af2", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Output()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
\n"
-      ],
-      "text/plain": []
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Google Application Default Credentials have been written to a file on your Coiled VM(s).\n",
-      "These credentials will potentially be valid until explicitly revoked by running\n",
-      "gcloud auth application-default revoke\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "cluster = ClusterGEE(\n",
     "    name='test-class-cluster',\n",
@@ -209,226 +124,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "
\n", - "
\n", - "
\n", - "

Client

\n", - "

Client-6d2ffaee-1eab-11ef-acda-fe11494405b6

\n", - " \n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "
Connection method: Cluster objectCluster type: earthengine_dask.ClusterGEE
\n", - " Dashboard: https://cluster-zoqmf.dask.host/mnc9NHlG1-Dp_CBQ/status\n", - "
\n", - "\n", - " \n", - "\n", - " \n", - "
\n", - "

Cluster Info

\n", - "
\n", - "
\n", - "
\n", - "
\n", - "

ClusterGEE

\n", - "

test-class-cluster

\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - " Dashboard: https://cluster-zoqmf.dask.host/mnc9NHlG1-Dp_CBQ/status\n", - " \n", - " Workers: 2\n", - "
\n", - " Total threads: 16\n", - " \n", - " Total memory: 61.17 GiB\n", - "
\n", - "\n", - "
\n", - " \n", - "

Scheduler Info

\n", - "
\n", - "\n", - "
\n", - "
\n", - "
\n", - "
\n", - "

Scheduler

\n", - "

Scheduler-81ff2eac-d070-45e0-8601-8eff06d7d72c

\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - " Comm: tls://10.2.0.48:8786\n", - " \n", - " Workers: 2\n", - "
\n", - " Dashboard: http://10.2.0.48:8787/status\n", - " \n", - " Total threads: 16\n", - "
\n", - " Started: Just now\n", - " \n", - " Total memory: 61.17 GiB\n", - "
\n", - "
\n", - "
\n", - "\n", - "
\n", - " \n", - "

Workers

\n", - "
\n", - "\n", - " \n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "

Worker: test-class-cluster-worker-5e0fe43b89

\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - " \n", - "\n", - " \n", - "\n", - "
\n", - " Comm: tls://10.2.0.47:42155\n", - " \n", - " Total threads: 8\n", - "
\n", - " Dashboard: http://10.2.0.47:8787/status\n", - " \n", - " Memory: 30.58 GiB\n", - "
\n", - " Nanny: tls://10.2.0.47:45609\n", - "
\n", - " Local directory: /scratch/dask-scratch-space/worker-rk_7aw52\n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "

Worker: test-class-cluster-worker-b75971f916

\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - " \n", - "\n", - " \n", - "\n", - "
\n", - " Comm: tls://10.2.0.46:39499\n", - " \n", - " Total threads: 8\n", - "
\n", - " Dashboard: http://10.2.0.46:8787/status\n", - " \n", - " Memory: 30.58 GiB\n", - "
\n", - " Nanny: tls://10.2.0.46:39223\n", - "
\n", - " Local directory: /scratch/dask-scratch-space/worker-d0zam3_g\n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "\n", - "
\n", - "
\n", - "\n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "\n", - "
\n", - "
" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "client = cluster.get_client()\n", "client" @@ -449,129 +147,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
countryarea_km2mean_elev
0Abyei Area10460402.592190
1Afghanistan6420931809.717311
2Akrotiri12760.796081
3Aksai Chin304485324.949965
4Albania28638689.740847
............
279West Bank5813341.715816
280Western Sahara269689253.175100
281Yemen454682932.051351
282Zambia7540321118.995950
283Zimbabwe391916973.295555
\n", - "

284 rows × 3 columns

\n", - "
" - ], - "text/plain": [ - " country area_km2 mean_elev\n", - "0 Abyei Area 10460 402.592190\n", - "1 Afghanistan 642093 1809.717311\n", - "2 Akrotiri 127 60.796081\n", - "3 Aksai Chin 30448 5324.949965\n", - "4 Albania 28638 689.740847\n", - ".. ... ... ...\n", - "279 West Bank 5813 341.715816\n", - "280 Western Sahara 269689 253.175100\n", - "281 Yemen 454682 932.051351\n", - "282 Zambia 754032 1118.995950\n", - "283 Zimbabwe 391916 973.295555\n", - "\n", - "[284 rows x 3 columns]" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Get a list of countries to analyze.\n", "country_fc = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017')\n", @@ -611,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [