diff --git a/01.train_ODC.ipynb b/01.train_ODC.ipynb index bc39655..a5a4e5b 100644 --- a/01.train_ODC.ipynb +++ b/01.train_ODC.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 10, "id": "912ed572-1658-406b-976c-cd6de2d4e89e", "metadata": { "jupyter": { @@ -37,16 +37,503 @@ }, { "data": { - "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n const py_version = '3.6.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n const reloading = false;\n const Bokeh = root.Bokeh;\n\n // Set a timeout for this load but only if we are not already initializing\n if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n // Don't load bokeh if it is still initializing\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n // There is nothing to load\n run_callbacks();\n return null;\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error(e) {\n const src_el = e.srcElement\n console.error(\"failed to load \" + (src_el.href || src_el.src));\n }\n\n const skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n root._bokeh_is_loading = css_urls.length + 0;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n const existing_stylesheets = []\n const links = document.getElementsByTagName('link')\n for (let i = 0; i < links.length; i++) {\n const link = links[i]\n if (link.href != null) {\n existing_stylesheets.push(link.href)\n }\n }\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const escaped = encodeURI(url)\n if (existing_stylesheets.indexOf(escaped) !== -1) {\n on_load()\n continue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } var existing_scripts = []\n const scripts = document.getElementsByTagName('script')\n for (let i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n existing_scripts.push(script.src)\n }\n }\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (let i = 0; i < js_modules.length; i++) {\n const url = js_modules[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n const url = js_exports[name];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.holoviz.org/panel/1.5.3/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.6.0.min.js\", \"https://cdn.holoviz.org/panel/1.5.3/dist/panel.min.js\"];\n const js_modules = [];\n const js_exports = {};\n const css_urls = [];\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (let i = 0; i < inline_js.length; i++) {\n try {\n inline_js[i].call(root, root.Bokeh);\n } catch(e) {\n if (!reloading) {\n throw e;\n }\n }\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n var NewBokeh = root.Bokeh;\n if (Bokeh.versions === undefined) {\n Bokeh.versions = new Map();\n }\n if (NewBokeh.version !== Bokeh.version) {\n Bokeh.versions.set(NewBokeh.version, NewBokeh)\n }\n root.Bokeh = Bokeh;\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n // If the timeout and bokeh was not successfully loaded we reset\n // everything and try loading again\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n root._bokeh_is_loading = 0\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n if (!reloading && !bokeh_loaded) {\n if (root.Bokeh) {\n root.Bokeh = undefined;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));", - "application/vnd.holoviews_load.v0+json": "" + "application/javascript": [ + "(function(root) {\n", + " function now() {\n", + " return new Date();\n", + " }\n", + "\n", + " const force = true;\n", + " const py_version = '3.6.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n", + " const reloading = false;\n", + " const Bokeh = root.Bokeh;\n", + "\n", + " // Set a timeout for this load but only if we are not already initializing\n", + " if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n", + " root._bokeh_timeout = Date.now() + 5000;\n", + " root._bokeh_failed_load = false;\n", + " }\n", + "\n", + " function run_callbacks() {\n", + " try {\n", + " root._bokeh_onload_callbacks.forEach(function(callback) {\n", + " if (callback != null)\n", + " callback();\n", + " });\n", + " } finally {\n", + " delete root._bokeh_onload_callbacks;\n", + " }\n", + " console.debug(\"Bokeh: all callbacks have finished\");\n", + " }\n", + "\n", + " function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n", + " if (css_urls == null) css_urls = [];\n", + " if (js_urls == null) js_urls = [];\n", + " if (js_modules == null) js_modules = [];\n", + " if (js_exports == null) js_exports = {};\n", + "\n", + " root._bokeh_onload_callbacks.push(callback);\n", + "\n", + " if (root._bokeh_is_loading > 0) {\n", + " // Don't load bokeh if it is still initializing\n", + " console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", + " return null;\n", + " } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n", + " // There is nothing to load\n", + " run_callbacks();\n", + " return null;\n", + " }\n", + "\n", + " function on_load() {\n", + " root._bokeh_is_loading--;\n", + " if (root._bokeh_is_loading === 0) {\n", + " console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", + " run_callbacks()\n", + " }\n", + " }\n", + " window._bokeh_on_load = on_load\n", + "\n", + " function on_error(e) {\n", + " const src_el = e.srcElement\n", + " console.error(\"failed to load \" + (src_el.href || src_el.src));\n", + " }\n", + "\n", + " const skip = [];\n", + " if (window.requirejs) {\n", + " window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n", + " root._bokeh_is_loading = css_urls.length + 0;\n", + " } else {\n", + " root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n", + " }\n", + "\n", + " const existing_stylesheets = []\n", + " const links = document.getElementsByTagName('link')\n", + " for (let i = 0; i < links.length; i++) {\n", + " const link = links[i]\n", + " if (link.href != null) {\n", + " existing_stylesheets.push(link.href)\n", + " }\n", + " }\n", + " for (let i = 0; i < css_urls.length; i++) {\n", + " const url = css_urls[i];\n", + " const escaped = encodeURI(url)\n", + " if (existing_stylesheets.indexOf(escaped) !== -1) {\n", + " on_load()\n", + " continue;\n", + " }\n", + " const element = document.createElement(\"link\");\n", + " element.onload = on_load;\n", + " element.onerror = on_error;\n", + " element.rel = \"stylesheet\";\n", + " element.type = \"text/css\";\n", + " element.href = url;\n", + " console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", + " document.body.appendChild(element);\n", + " } var existing_scripts = []\n", + " const scripts = document.getElementsByTagName('script')\n", + " for (let i = 0; i < scripts.length; i++) {\n", + " var script = scripts[i]\n", + " if (script.src != null) {\n", + " existing_scripts.push(script.src)\n", + " }\n", + " }\n", + " for (let i = 0; i < js_urls.length; i++) {\n", + " const url = js_urls[i];\n", + " const escaped = encodeURI(url)\n", + " if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n", + " if (!window.requirejs) {\n", + " on_load();\n", + " }\n", + " continue;\n", + " }\n", + " const element = document.createElement('script');\n", + " element.onload = on_load;\n", + " element.onerror = on_error;\n", + " element.async = false;\n", + " element.src = url;\n", + " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", + " document.head.appendChild(element);\n", + " }\n", + " for (let i = 0; i < js_modules.length; i++) {\n", + " const url = js_modules[i];\n", + " const escaped = encodeURI(url)\n", + " if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n", + " if (!window.requirejs) {\n", + " on_load();\n", + " }\n", + " continue;\n", + " }\n", + " var element = document.createElement('script');\n", + " element.onload = on_load;\n", + " element.onerror = on_error;\n", + " element.async = false;\n", + " element.src = url;\n", + " element.type = \"module\";\n", + " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", + " document.head.appendChild(element);\n", + " }\n", + " for (const name in js_exports) {\n", + " const url = js_exports[name];\n", + " const escaped = encodeURI(url)\n", + " if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n", + " if (!window.requirejs) {\n", + " on_load();\n", + " }\n", + " continue;\n", + " }\n", + " var element = document.createElement('script');\n", + " element.onerror = on_error;\n", + " element.async = false;\n", + " element.type = \"module\";\n", + " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", + " element.textContent = `\n", + " import ${name} from \"${url}\"\n", + " window.${name} = ${name}\n", + " window._bokeh_on_load()\n", + " `\n", + " document.head.appendChild(element);\n", + " }\n", + " if (!js_urls.length && !js_modules.length) {\n", + " on_load()\n", + " }\n", + " };\n", + "\n", + " function inject_raw_css(css) {\n", + " const element = document.createElement(\"style\");\n", + " element.appendChild(document.createTextNode(css));\n", + " document.body.appendChild(element);\n", + " }\n", + "\n", + " const js_urls = [\"https://cdn.holoviz.org/panel/1.5.3/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.6.0.min.js\", \"https://cdn.holoviz.org/panel/1.5.3/dist/panel.min.js\"];\n", + " const js_modules = [];\n", + " const js_exports = {};\n", + " const css_urls = [];\n", + " const inline_js = [ function(Bokeh) {\n", + " Bokeh.set_log_level(\"info\");\n", + " },\n", + "function(Bokeh) {} // ensure no trailing comma for IE\n", + " ];\n", + "\n", + " function run_inline_js() {\n", + " if ((root.Bokeh !== undefined) || (force === true)) {\n", + " for (let i = 0; i < inline_js.length; i++) {\n", + " try {\n", + " inline_js[i].call(root, root.Bokeh);\n", + " } catch(e) {\n", + " if (!reloading) {\n", + " throw e;\n", + " }\n", + " }\n", + " }\n", + " // Cache old bokeh versions\n", + " if (Bokeh != undefined && !reloading) {\n", + " var NewBokeh = root.Bokeh;\n", + " if (Bokeh.versions === undefined) {\n", + " Bokeh.versions = new Map();\n", + " }\n", + " if (NewBokeh.version !== Bokeh.version) {\n", + " Bokeh.versions.set(NewBokeh.version, NewBokeh)\n", + " }\n", + " root.Bokeh = Bokeh;\n", + " }\n", + " } else if (Date.now() < root._bokeh_timeout) {\n", + " setTimeout(run_inline_js, 100);\n", + " } else if (!root._bokeh_failed_load) {\n", + " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", + " root._bokeh_failed_load = true;\n", + " }\n", + " root._bokeh_is_initializing = false\n", + " }\n", + "\n", + " function load_or_wait() {\n", + " // Implement a backoff loop that tries to ensure we do not load multiple\n", + " // versions of Bokeh and its dependencies at the same time.\n", + " // In recent versions we use the root._bokeh_is_initializing flag\n", + " // to determine whether there is an ongoing attempt to initialize\n", + " // bokeh, however for backward compatibility we also try to ensure\n", + " // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n", + " // before older versions are fully initialized.\n", + " if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n", + " // If the timeout and bokeh was not successfully loaded we reset\n", + " // everything and try loading again\n", + " root._bokeh_timeout = Date.now() + 5000;\n", + " root._bokeh_is_initializing = false;\n", + " root._bokeh_onload_callbacks = undefined;\n", + " root._bokeh_is_loading = 0\n", + " console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n", + " load_or_wait();\n", + " } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n", + " setTimeout(load_or_wait, 100);\n", + " } else {\n", + " root._bokeh_is_initializing = true\n", + " root._bokeh_onload_callbacks = []\n", + " const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n", + " if (!reloading && !bokeh_loaded) {\n", + " if (root.Bokeh) {\n", + " root.Bokeh = undefined;\n", + " }\n", + " console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", + " }\n", + " load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n", + " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", + " run_inline_js();\n", + " });\n", + " }\n", + " }\n", + " // Give older versions of the autoload script a head-start to ensure\n", + " // they initialize before we start loading newer version.\n", + " setTimeout(load_or_wait, 100)\n", + "}(window));" + ], + "application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n const py_version = '3.6.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n const reloading = false;\n const Bokeh = root.Bokeh;\n\n // Set a timeout for this load but only if we are not already initializing\n if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n // Don't load bokeh if it is still initializing\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n // There is nothing to load\n run_callbacks();\n return null;\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error(e) {\n const src_el = e.srcElement\n console.error(\"failed to load \" + (src_el.href || src_el.src));\n }\n\n const skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n root._bokeh_is_loading = css_urls.length + 0;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n const existing_stylesheets = []\n const links = document.getElementsByTagName('link')\n for (let i = 0; i < links.length; i++) {\n const link = links[i]\n if (link.href != null) {\n existing_stylesheets.push(link.href)\n }\n }\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const escaped = encodeURI(url)\n if (existing_stylesheets.indexOf(escaped) !== -1) {\n on_load()\n continue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } var existing_scripts = []\n const scripts = document.getElementsByTagName('script')\n for (let i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n existing_scripts.push(script.src)\n }\n }\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (let i = 0; i < js_modules.length; i++) {\n const url = js_modules[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n const url = js_exports[name];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.holoviz.org/panel/1.5.3/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.6.0.min.js\", \"https://cdn.holoviz.org/panel/1.5.3/dist/panel.min.js\"];\n const js_modules = [];\n const js_exports = {};\n const css_urls = [];\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (let i = 0; i < inline_js.length; i++) {\n try {\n inline_js[i].call(root, root.Bokeh);\n } catch(e) {\n if (!reloading) {\n throw e;\n }\n }\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n var NewBokeh = root.Bokeh;\n if (Bokeh.versions === undefined) {\n Bokeh.versions = new Map();\n }\n if (NewBokeh.version !== Bokeh.version) {\n Bokeh.versions.set(NewBokeh.version, NewBokeh)\n }\n root.Bokeh = Bokeh;\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n // If the timeout and bokeh was not successfully loaded we reset\n // everything and try loading again\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n root._bokeh_is_loading = 0\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n if (!reloading && !bokeh_loaded) {\n if (root.Bokeh) {\n root.Bokeh = undefined;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));" }, "metadata": {}, "output_type": "display_data" }, { "data": { - "application/javascript": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n", - "application/vnd.holoviews_load.v0+json": "" + "application/javascript": [ + "\n", + "if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n", + " window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n", + "}\n", + "\n", + "\n", + " function JupyterCommManager() {\n", + " }\n", + "\n", + " JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n", + " if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", + " var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", + " comm_manager.register_target(comm_id, function(comm) {\n", + " comm.on_msg(msg_handler);\n", + " });\n", + " } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", + " window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n", + " comm.onMsg = msg_handler;\n", + " });\n", + " } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", + " google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n", + " var messages = comm.messages[Symbol.asyncIterator]();\n", + " function processIteratorResult(result) {\n", + " var message = result.value;\n", + " console.log(message)\n", + " var content = {data: message.data, comm_id};\n", + " var buffers = []\n", + " for (var buffer of message.buffers || []) {\n", + " buffers.push(new DataView(buffer))\n", + " }\n", + " var metadata = message.metadata || {};\n", + " var msg = {content, buffers, metadata}\n", + " msg_handler(msg);\n", + " return messages.next().then(processIteratorResult);\n", + " }\n", + " return messages.next().then(processIteratorResult);\n", + " })\n", + " }\n", + " }\n", + "\n", + " JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n", + " if (comm_id in window.PyViz.comms) {\n", + " return window.PyViz.comms[comm_id];\n", + " } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", + " var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", + " var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n", + " if (msg_handler) {\n", + " comm.on_msg(msg_handler);\n", + " }\n", + " } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", + " var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n", + " comm.open();\n", + " if (msg_handler) {\n", + " comm.onMsg = msg_handler;\n", + " }\n", + " } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", + " var comm_promise = google.colab.kernel.comms.open(comm_id)\n", + " comm_promise.then((comm) => {\n", + " window.PyViz.comms[comm_id] = comm;\n", + " if (msg_handler) {\n", + " var messages = comm.messages[Symbol.asyncIterator]();\n", + " function processIteratorResult(result) {\n", + " var message = result.value;\n", + " var content = {data: message.data};\n", + " var metadata = message.metadata || {comm_id};\n", + " var msg = {content, metadata}\n", + " msg_handler(msg);\n", + " return messages.next().then(processIteratorResult);\n", + " }\n", + " return messages.next().then(processIteratorResult);\n", + " }\n", + " }) \n", + " var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n", + " return comm_promise.then((comm) => {\n", + " comm.send(data, metadata, buffers, disposeOnDone);\n", + " });\n", + " };\n", + " var comm = {\n", + " send: sendClosure\n", + " };\n", + " }\n", + " window.PyViz.comms[comm_id] = comm;\n", + " return comm;\n", + " }\n", + " window.PyViz.comm_manager = new JupyterCommManager();\n", + " \n", + "\n", + "\n", + "var JS_MIME_TYPE = 'application/javascript';\n", + "var HTML_MIME_TYPE = 'text/html';\n", + "var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n", + "var CLASS_NAME = 'output';\n", + "\n", + "/**\n", + " * Render data to the DOM node\n", + " */\n", + "function render(props, node) {\n", + " var div = document.createElement(\"div\");\n", + " var script = document.createElement(\"script\");\n", + " node.appendChild(div);\n", + " node.appendChild(script);\n", + "}\n", + "\n", + "/**\n", + " * Handle when a new output is added\n", + " */\n", + "function handle_add_output(event, handle) {\n", + " var output_area = handle.output_area;\n", + " var output = handle.output;\n", + " if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + " var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + " if (id !== undefined) {\n", + " var nchildren = toinsert.length;\n", + " var html_node = toinsert[nchildren-1].children[0];\n", + " html_node.innerHTML = output.data[HTML_MIME_TYPE];\n", + " var scripts = [];\n", + " var nodelist = html_node.querySelectorAll(\"script\");\n", + " for (var i in nodelist) {\n", + " if (nodelist.hasOwnProperty(i)) {\n", + " scripts.push(nodelist[i])\n", + " }\n", + " }\n", + "\n", + " scripts.forEach( function (oldScript) {\n", + " var newScript = document.createElement(\"script\");\n", + " var attrs = [];\n", + " var nodemap = oldScript.attributes;\n", + " for (var j in nodemap) {\n", + " if (nodemap.hasOwnProperty(j)) {\n", + " attrs.push(nodemap[j])\n", + " }\n", + " }\n", + " attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n", + " newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n", + " oldScript.parentNode.replaceChild(newScript, oldScript);\n", + " });\n", + " if (JS_MIME_TYPE in output.data) {\n", + " toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n", + " }\n", + " output_area._hv_plot_id = id;\n", + " if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n", + " window.PyViz.plot_index[id] = Bokeh.index[id];\n", + " } else {\n", + " window.PyViz.plot_index[id] = null;\n", + " }\n", + " } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " var bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " var script_attrs = bk_div.children[0].attributes;\n", + " for (var i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + "}\n", + "\n", + "/**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + "function handle_clear_output(event, handle) {\n", + " var id = handle.cell.output_area._hv_plot_id;\n", + " var server_id = handle.cell.output_area._bokeh_server_id;\n", + " if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n", + " var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n", + " if (server_id !== null) {\n", + " comm.send({event_type: 'server_delete', 'id': server_id});\n", + " return;\n", + " } else if (comm !== null) {\n", + " comm.send({event_type: 'delete', 'id': id});\n", + " }\n", + " delete PyViz.plot_index[id];\n", + " if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n", + " var doc = window.Bokeh.index[id].model.document\n", + " doc.clear();\n", + " const i = window.Bokeh.documents.indexOf(doc);\n", + " if (i > -1) {\n", + " window.Bokeh.documents.splice(i, 1);\n", + " }\n", + " }\n", + "}\n", + "\n", + "/**\n", + " * Handle kernel restart event\n", + " */\n", + "function handle_kernel_cleanup(event, handle) {\n", + " delete PyViz.comms[\"hv-extension-comm\"];\n", + " window.PyViz.plot_index = {}\n", + "}\n", + "\n", + "/**\n", + " * Handle update_display_data messages\n", + " */\n", + "function handle_update_output(event, handle) {\n", + " handle_clear_output(event, {cell: {output_area: handle.output_area}})\n", + " handle_add_output(event, handle)\n", + "}\n", + "\n", + "function register_renderer(events, OutputArea) {\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " var toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[0]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " events.on('output_added.OutputArea', handle_add_output);\n", + " events.on('output_updated.OutputArea', handle_update_output);\n", + " events.on('clear_output.CodeCell', handle_clear_output);\n", + " events.on('delete.Cell', handle_clear_output);\n", + " events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n", + "\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " safe: true,\n", + " index: 0\n", + " });\n", + "}\n", + "\n", + "if (window.Jupyter !== undefined) {\n", + " try {\n", + " var events = require('base/js/events');\n", + " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\n", + " }\n", + " } catch(err) {\n", + " }\n", + "}\n" + ], + "application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n" }, "metadata": {}, "output_type": "display_data" @@ -55,12 +542,12 @@ "data": { "application/vnd.holoviews_exec.v0+json": "", "text/html": [ - "
\n", - "
\n", + "
\n", + "
\n", "
\n", "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = false;\n const py_version = '3.6.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n const reloading = true;\n const Bokeh = root.Bokeh;\n\n // Set a timeout for this load but only if we are not already initializing\n if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n // Don't load bokeh if it is still initializing\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n // There is nothing to load\n run_callbacks();\n return null;\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error(e) {\n const src_el = e.srcElement\n console.error(\"failed to load \" + (src_el.href || src_el.src));\n }\n\n const skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n root._bokeh_is_loading = css_urls.length + 0;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n const existing_stylesheets = []\n const links = document.getElementsByTagName('link')\n for (let i = 0; i < links.length; i++) {\n const link = links[i]\n if (link.href != null) {\n existing_stylesheets.push(link.href)\n }\n }\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const escaped = encodeURI(url)\n if (existing_stylesheets.indexOf(escaped) !== -1) {\n on_load()\n continue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } var existing_scripts = []\n const scripts = document.getElementsByTagName('script')\n for (let i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n existing_scripts.push(script.src)\n }\n }\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (let i = 0; i < js_modules.length; i++) {\n const url = js_modules[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n const url = js_exports[name];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.holoviz.org/panel/1.5.3/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\"];\n const js_modules = [];\n const js_exports = {};\n const css_urls = [];\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (let i = 0; i < inline_js.length; i++) {\n try {\n inline_js[i].call(root, root.Bokeh);\n } catch(e) {\n if (!reloading) {\n throw e;\n }\n }\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n var NewBokeh = root.Bokeh;\n if (Bokeh.versions === undefined) {\n Bokeh.versions = new Map();\n }\n if (NewBokeh.version !== Bokeh.version) {\n Bokeh.versions.set(NewBokeh.version, NewBokeh)\n }\n root.Bokeh = Bokeh;\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n // If the timeout and bokeh was not successfully loaded we reset\n // everything and try loading again\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n root._bokeh_is_loading = 0\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n if (!reloading && !bokeh_loaded) {\n if (root.Bokeh) {\n root.Bokeh = undefined;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));", - "application/vnd.holoviews_load.v0+json": "" - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n", - "application/vnd.holoviews_load.v0+json": "" + "\n", + "/**\n", + " * Handle when a new output is added\n", + " */\n", + "function handle_add_output(event, handle) {\n", + " var output_area = handle.output_area;\n", + " var output = handle.output;\n", + " if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + " var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + " if (id !== undefined) {\n", + " var nchildren = toinsert.length;\n", + " var html_node = toinsert[nchildren-1].children[0];\n", + " html_node.innerHTML = output.data[HTML_MIME_TYPE];\n", + " var scripts = [];\n", + " var nodelist = html_node.querySelectorAll(\"script\");\n", + " for (var i in nodelist) {\n", + " if (nodelist.hasOwnProperty(i)) {\n", + " scripts.push(nodelist[i])\n", + " }\n", + " }\n", + "\n", + " scripts.forEach( function (oldScript) {\n", + " var newScript = document.createElement(\"script\");\n", + " var attrs = [];\n", + " var nodemap = oldScript.attributes;\n", + " for (var j in nodemap) {\n", + " if (nodemap.hasOwnProperty(j)) {\n", + " attrs.push(nodemap[j])\n", + " }\n", + " }\n", + " attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n", + " newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n", + " oldScript.parentNode.replaceChild(newScript, oldScript);\n", + " });\n", + " if (JS_MIME_TYPE in output.data) {\n", + " toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n", + " }\n", + " output_area._hv_plot_id = id;\n", + " if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n", + " window.PyViz.plot_index[id] = Bokeh.index[id];\n", + " } else {\n", + " window.PyViz.plot_index[id] = null;\n", + " }\n", + " } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " var bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " var script_attrs = bk_div.children[0].attributes;\n", + " for (var i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + "}\n", + "\n", + "/**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + "function handle_clear_output(event, handle) {\n", + " var id = handle.cell.output_area._hv_plot_id;\n", + " var server_id = handle.cell.output_area._bokeh_server_id;\n", + " if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n", + " var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n", + " if (server_id !== null) {\n", + " comm.send({event_type: 'server_delete', 'id': server_id});\n", + " return;\n", + " } else if (comm !== null) {\n", + " comm.send({event_type: 'delete', 'id': id});\n", + " }\n", + " delete PyViz.plot_index[id];\n", + " if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n", + " var doc = window.Bokeh.index[id].model.document\n", + " doc.clear();\n", + " const i = window.Bokeh.documents.indexOf(doc);\n", + " if (i > -1) {\n", + " window.Bokeh.documents.splice(i, 1);\n", + " }\n", + " }\n", + "}\n", + "\n", + "/**\n", + " * Handle kernel restart event\n", + " */\n", + "function handle_kernel_cleanup(event, handle) {\n", + " delete PyViz.comms[\"hv-extension-comm\"];\n", + " window.PyViz.plot_index = {}\n", + "}\n", + "\n", + "/**\n", + " * Handle update_display_data messages\n", + " */\n", + "function handle_update_output(event, handle) {\n", + " handle_clear_output(event, {cell: {output_area: handle.output_area}})\n", + " handle_add_output(event, handle)\n", + "}\n", + "\n", + "function register_renderer(events, OutputArea) {\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " var toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[0]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " events.on('output_added.OutputArea', handle_add_output);\n", + " events.on('output_updated.OutputArea', handle_update_output);\n", + " events.on('clear_output.CodeCell', handle_clear_output);\n", + " events.on('delete.Cell', handle_clear_output);\n", + " events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n", + "\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " safe: true,\n", + " index: 0\n", + " });\n", + "}\n", + "\n", + "if (window.Jupyter !== undefined) {\n", + " try {\n", + " var events = require('base/js/events');\n", + " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\n", + " }\n", + " } catch(err) {\n", + " }\n", + "}\n" + ], + "application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n" }, "metadata": {}, "output_type": "display_data" @@ -259,8 +1680,8 @@ "output_type": "stream", "text": [ "✅ All modules loaded successfully\n", - "CPU times: user 19.3 s, sys: 3.25 s, total: 22.6 s\n", - "Wall time: 14.9 s\n" + "CPU times: user 251 ms, sys: 338 μs, total: 251 ms\n", + "Wall time: 257 ms\n" ] } ], @@ -280,7 +1701,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 11, "id": "d824dc4f-994b-4d1c-8d24-ce6674da141c", "metadata": { "jupyter": { @@ -295,13 +1716,13 @@ "text": [ "✅ AWS credentials found in environment variables\n", "✅ Dask cluster initialized\n", - " Cluster: LocalCluster(e8e6e31b, 'tcp://127.0.0.1:45313', workers=4, threads=40, memory=128.00 GiB)\n", + " Cluster: LocalCluster(af18ec6f, 'tcp://127.0.0.1:41963', workers=4, threads=40, memory=128.00 GiB)\n", "✅ S3 access configured (requester_pays=True)\n", "✅ Datacube connected (metadata only)\n", "\n", "======================================================================\n", - "CPU times: user 1.19 s, sys: 69.2 ms, total: 1.26 s\n", - "Wall time: 6.3 s\n" + "CPU times: user 135 ms, sys: 50.8 ms, total: 186 ms\n", + "Wall time: 5.14 s\n" ] } ], @@ -402,7 +1823,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 12, "id": "1e113730", "metadata": { "jupyter": { @@ -441,8 +1862,8 @@ " - rededge2: s3://sentinel-cogs/sentinel-s2-l2a-cogs/56/M/NC/2023/5/S2B_56MNC_20230525_0_L2A/\n", " - rededge3: s3://sentinel-cogs/sentinel-s2-l2a-cogs/56/M/NC/2023/5/S2B_56MNC_20230525_0_L2A/\n", "======================================================================\n", - "CPU times: user 1min 23s, sys: 9.56 s, total: 1min 33s\n", - "Wall time: 1min 58s\n" + "CPU times: user 1min 31s, sys: 7.9 s, total: 1min 38s\n", + "Wall time: 2min 7s\n" ] } ], @@ -483,7 +1904,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 13, "id": "3cd69645", "metadata": { "jupyter": { @@ -503,8 +1924,8 @@ " Will download from S3 and save cache\n", " (Next run will use cache automatically)\n", "======================================================================\n", - "CPU times: user 910 μs, sys: 0 ns, total: 910 μs\n", - "Wall time: 5.23 ms\n" + "CPU times: user 126 μs, sys: 13 μs, total: 139 μs\n", + "Wall time: 132 μs\n" ] } ], @@ -557,12 +1978,9 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "435f9f78-a9a4-4226-86ca-d4bec42d454e", "metadata": { - "jupyter": { - "source_hidden": true - }, "tags": [] }, "outputs": [ @@ -577,29 +1995,273 @@ "[1] Finding native CRS...\n", " CRS: EPSG:32648\n", "\n", - "[2] Loading SCL (cloud mask) to filter cloudy scenes...\n", - "No datasets require offset correction\n", - "❌ Error: Empty list of variables to be set\n", - "======================================================================\n", - "CPU times: user 2.02 s, sys: 210 ms, total: 2.23 s\n", - "Wall time: 3.02 s\n" + "[2] Loading SCL (cloud mask) via dc.load() to filter cloudy scenes...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/3/S2B_48PXS_20230326_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2A_48PXR_20231206_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2B_48PXS_20231201_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/3/S2A_48PXR_20230331_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/4/S2A_48PXR_20230410_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2A_48PXR_20231216_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/11/S2A_48PXS_20231116_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2B_48PXS_20231231_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/3/S2B_48PXR_20230326_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2A_48PXR_20231226_0_L2A/SCL.tif\n", + "2026-03-03 08:47:58,841 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 114, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,844 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 10, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,847 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 110, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,863 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 16, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,863 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 120, 0, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset ], GeoBox(627, 1024, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1105740.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2B_48PXR_20231121_0_L2A/SCL.tif\n", + "2026-03-03 08:47:58,866 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 104, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,870 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 12, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/11/S2B_48PXS_20231121_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/4/S2B_48PXR_20230405_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/3/S2A_48PXR_20230331_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/11/S2B_48PXS_20231121_0_L2A/SCL.tif\n", + "2026-03-03 08:47:58,874 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 14, 1, 0)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset ], GeoBox(1024, 455, Affine(60.0, 0.0, 554760.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,876 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 118, 1, 0)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset ], GeoBox(1024, 455, Affine(60.0, 0.0, 554760.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,876 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 12, 1, 0)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset ], GeoBox(1024, 455, Affine(60.0, 0.0, 554760.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2A_48PXS_20231226_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2B_48PXR_20231111_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/4/S2A_48PXS_20230410_0_L2A/SCL.tif\n", + "2026-03-03 08:47:58,900 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 16, 0, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset ], GeoBox(627, 1024, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1105740.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,915 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 104, 0, 0)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset , Dataset , Dataset ], GeoBox(1024, 1024, Affine(60.0, 0.0, 554760.0,\n", + " 0.0, -60.0, 1105740.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'satu\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,919 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 104, 0, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset ], GeoBox(627, 1024, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1105740.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,920 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 108, 0, 0)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset , Dataset , Dataset ], GeoBox(1024, 1024, Affine(60.0, 0.0, 554760.0,\n", + " 0.0, -60.0, 1105740.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'satu\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "2026-03-03 08:47:58,920 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 10, 0, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset ], GeoBox(627, 1024, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1105740.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/3/S2A_48PXS_20230301_0_L2A/SCL.tif\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "❌ Error: VPC endpoints do not support cross-region requests\n", + "======================================================================\n", + "CPU times: user 2.66 s, sys: 286 ms, total: 2.94 s\n", + "Wall time: 3.88 s\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/3/S2A_48PXR_20230301_0_L2A/SCL.tif\n", + "2026-03-03 08:47:58,976 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 0, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/11/S2B_48PXS_20231111_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2A_48PXR_20231126_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/4/S2B_48PXR_20230405_0_L2A/SCL.tif\n", + "2026-03-03 08:47:58,985 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 14, 1, 1)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset ], GeoBox(627, 455, Affine(60.0, 0.0, 616200.0,\n", + " 0.0, -60.0, 1044300.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}, 'fuser': None}), False, 1, None, None)\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\\n with datasources[0].open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", "Traceback (most recent call last):\n", - " File \"\", line 38, in \n", - " File \"/home/jovyan/easi-notebooks/easi_tools/load_s2l2a.py\", line 227, in load_s2l2a_with_offset\n", - " xx = apply_correction_to_data(data, this_offset)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/jovyan/easi-notebooks/easi_tools/load_s2l2a.py\", line 145, in apply_correction_to_data\n", - " ds[refl_vars] = ds[refl_vars].where(mask) * scale_factor\n", - " ~~^^^^^^^^^^^\n", - " File \"/env/lib/python3.12/site-packages/xarray/core/dataset.py\", line 1649, in __setitem__\n", - " raise ValueError(\"Empty list of variables to be set\")\n", - "ValueError: Empty list of variables to be set\n" + " File \"rasterio/_base.pyx\", line 310, in rasterio._base.DatasetBase.__init__\n", + " File \"rasterio/_base.pyx\", line 221, in rasterio._base.open_dataset\n", + " File \"rasterio/_err.pyx\", line 221, in rasterio._err.exc_wrap_pointer\n", + "rasterio._err.CPLE_AWSAccessDeniedError: VPC endpoints do not support cross-region requests\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"\", line 53, in \n", + " File \"/env/lib/python3.12/site-packages/xarray/core/dataset.py\", line 1046, in compute\n", + " return new.load(**kwargs)\n", + " ^^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/xarray/core/dataset.py\", line 873, in load\n", + " evaluated_data: tuple[np.ndarray[Any, Any], ...] = chunkmanager.compute(\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/xarray/namedarray/daskmanager.py\", line 86, in compute\n", + " return compute(*data, **kwargs) # type: ignore[no-untyped-call, no-any-return]\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/dask/base.py\", line 662, in compute\n", + " results = schedule(dsk, keys, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\n", + " _fuse_measurement(data, datasets, geobox, measurement,\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\n", + " reproject_and_fuse(srcs,\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 77, in reproject_and_fuse\n", + " with datasources[0].open() as rdr:\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\n", + " return next(self.gen)\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\n", + " raise e\n", + " File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\n", + " with rasterio.open(str(self.filename), sharing=False) as src:\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\n", + " return f(*args, **kwds)\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\n", + " dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\n", + "rasterio.errors.RasterioIOError: VPC endpoints do not support cross-region requests\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/3/S2A_48PXS_20230331_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2B_48PXR_20231201_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2B_48PXR_20231221_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2A_48PXR_20231226_0_L2A/SCL.tif\n" ] } ], @@ -831,7 +2493,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 15, "id": "d2585562-88aa-4c7d-bf70-1f6affcf65d4", "metadata": { "jupyter": { @@ -863,6 +2525,48 @@ "\n", "======================================================================\n" ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2B_48PXS_20231231_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2A_48PXS_20231226_0_L2A/SCL.tif\n", + "2026-03-03 08:47:59,068 - distributed.worker - WARNING - Compute Failed\n", + "Key: ('dc_load_scl-4dce686e73dd44c18f966bb8085808d3', 120, 0, 0)\n", + "State: executing\n", + "Function: fuse_lazy\n", + "args: ([Dataset , Dataset , Dataset , Dataset ], GeoBox(1024, 1024, Affine(60.0, 0.0, 554760.0,\n", + " 0.0, -60.0, 1105740.0), EPSG:32648), Measurement({'name': 'scl', 'dtype': 'uint8', 'units': '1', 'nodata': 0, 'aliases': ['SCL', 'mask', 'qa'], 'flags_definition': {'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'satu\n", + "kwargs: {}\n", + "Exception: \"RasterioIOError('VPC endpoints do not support cross-region requests')\"\n", + "Traceback: ' File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 946, in fuse_lazy\\n _fuse_measurement(data, datasets, geobox, measurement,\\n File \"/env/lib/python3.12/site-packages/datacube/api/core.py\", line 972, in _fuse_measurement\\n reproject_and_fuse(srcs,\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_load.py\", line 89, in reproject_and_fuse\\n with source.open() as rdr:\\n File \"/usr/lib/python3.12/contextlib.py\", line 137, in __enter__\\n return next(self.gen)\\n ^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 146, in open\\n raise e\\n File \"/env/lib/python3.12/site-packages/datacube/storage/_rio.py\", line 117, in open\\n with rasterio.open(str(self.filename), sharing=False) as src:\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/env.py\", line 451, in wrapper\\n return f(*args, **kwds)\\n ^^^^^^^^^^^^^^^^\\n File \"/env/lib/python3.12/site-packages/rasterio/__init__.py\", line 304, in open\\n dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \"rasterio/_base.pyx\", line 312, in rasterio._base.DatasetBase.__init__\\n'\n", + "\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2B_48PXS_20231221_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/3/S2B_48PXS_20230326_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2B_48PXR_20231231_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2B_48PXR_20231211_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/4/S2B_48PXS_20230405_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/3/S2A_48PXR_20230301_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2B_48PXS_20231201_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/11/S2A_48PXS_20231126_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2B_48PXR_20231211_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/11/S2A_48PXS_20231126_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2A_48PXR_20231116_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/12/S2B_48PXR_20231231_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/3/S2A_48PXS_20230301_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2A_48PXR_20231116_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/3/S2B_48PXR_20230326_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2B_48PXS_20231221_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2B_48PXR_20231111_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/4/S2A_48PXS_20230410_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2A_48PXS_20231216_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2B_48PXR_20231121_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XR/2023/11/S2A_48PXR_20231126_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/4/S2B_48PXS_20230405_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/12/S2B_48PXS_20231211_0_L2A/SCL.tif\n", + "Error opening source dataset: s3://sentinel-cogs/sentinel-s2-l2a-cogs/48/P/XS/2023/3/S2A_48PXS_20230331_0_L2A/SCL.tif\n" + ] } ], "source": [ @@ -908,9 +2612,6 @@ "execution_count": 7, "id": "2e955884-d4af-422d-a8e6-d436199540e0", "metadata": { - "jupyter": { - "source_hidden": true - }, "tags": [] }, "outputs": [