demo feature-store problem
Opened this issue · 4 comments
Error when running dbdemos.install('feature-store') or
dbdemos.install('feature-store', catalog='databrickstest_catalog_devqa', schema = 'dbdemos')
Throws the below error:
JSONDecodeError Traceback (most recent call last)
File /databricks/python/lib/python3.9/site-packages/requests/models.py:910, in Response.json(self, **kwargs)
909 try:
--> 910 return complexjson.loads(self.text, **kwargs)
911 except JSONDecodeError as e:
912 # Catch JSON-related errors and raise as requests.JSONDecodeError
913 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
File /databricks/python/lib/python3.9/site-packages/simplejson/init.py:525, in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, use_decimal, **kw)
521 if (cls is None and encoding is None and object_hook is None and
522 parse_int is None and parse_float is None and
523 parse_constant is None and object_pairs_hook is None
524 and not use_decimal and not kw):
--> 525 return _default_decoder.decode(s)
526 if cls is None:
File /databricks/python/lib/python3.9/site-packages/simplejson/decoder.py:370, in JSONDecoder.decode(self, s, _w, _PY3)
369 s = str(s, self.encoding)
--> 370 obj, end = self.raw_decode(s)
371 end = _w(s, end).end()
File /databricks/python/lib/python3.9/site-packages/simplejson/decoder.py:400, in JSONDecoder.raw_decode(self, s, idx, _w, _PY3)
399 idx += 3
--> 400 return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
JSONDecodeError Traceback (most recent call last)
File :2
1 import dbdemos
----> 2 dbdemos.install('feature-store', catalog='databrickstest_catalog_devqa', schema = 'dbdemos')
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-9e086661-403e-443c-8e7c-83e8bef3bc20/lib/python3.9/site-packages/dbdemos/dbdemos.py:242, in install(demo_name, path, overwrite, username, pat_token, workspace_url, skip_dashboards, cloud, start_cluster, use_current_cluster, current_cluster_id, install_dashboard_sequentially, debug, catalog, schema)
239 if not installer.test_premium_pricing():
240 #Force dashboard skip as dbsql isn't available to avoid any error.
241 skip_dashboards = True
--> 242 installer.install_demo(demo_name, path, overwrite, skip_dashboards = skip_dashboards, start_cluster = start_cluster, use_current_cluster = use_current_cluster, debug = debug, catalog = catalog, schema = schema)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-9e086661-403e-443c-8e7c-83e8bef3bc20/lib/python3.9/site-packages/dbdemos/installer.py:218, in Installer.install_demo(self, demo_name, install_path, overwrite, update_cluster_if_exists, skip_dashboards, start_cluster, use_current_cluster, debug, catalog, schema)
216 use_cluster_id = self.current_cluster_id if use_current_cluster else None
217 try:
--> 218 cluster_id, cluster_name = self.load_demo_cluster(demo_name, demo_conf, update_cluster_if_exists, start_cluster, use_cluster_id)
219 except ClusterException as e:
220 self.report.display_cluster_creation_error(e, demo_conf)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-9e086661-403e-443c-8e7c-83e8bef3bc20/lib/python3.9/site-packages/dbdemos/installer.py:591, in Installer.load_demo_cluster(self, demo_name, demo_conf, update_cluster_if_exists, start_cluster, use_cluster_id)
588 del cluster_conf["autoscale"]
589 cluster_conf["num_workers"] = 0
--> 591 existing_cluster = self.find_cluster(cluster_conf["cluster_name"])
592 if existing_cluster is None:
593 cluster = self.db.post("2.0/clusters/create", json = cluster_conf)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-9e086661-403e-443c-8e7c-83e8bef3bc20/lib/python3.9/site-packages/dbdemos/installer.py:645, in Installer.find_cluster(self, cluster_name)
644 def find_cluster(self, cluster_name):
--> 645 clusters = self.db.get("2.0/clusters/list")
646 if "clusters" in clusters:
647 for c in clusters["clusters"]:
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-9e086661-403e-443c-8e7c-83e8bef3bc20/lib/python3.9/site-packages/dbdemos/conf.py:99, in DBClient.get(self, path, params, print_auth_error)
97 url = self.conf.workspace_url+"/api/"+self.clean_path(path)
98 with requests.get(url, headers = self.conf.headers, params=params, timeout=60) as r:
---> 99 return self.get_json_result(url, r, print_auth_error)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-9e086661-403e-443c-8e7c-83e8bef3bc20/lib/python3.9/site-packages/dbdemos/conf.py:114, in DBClient.get_json_result(self, url, r, print_auth_error)
112 except Exception as e:
113 print(f"API CALL ERROR - can't read json. status: {r.status_code} {r.text} - URL: {url} - {e}")
--> 114 raise e
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-9e086661-403e-443c-8e7c-83e8bef3bc20/lib/python3.9/site-packages/dbdemos/conf.py:111, in DBClient.get_json_result(self, url, r, print_auth_error)
109 print(f"Unauthorized call. Check your PAT token {r.text} - {r.url} - {url}")
110 try:
--> 111 return r.json()
112 except Exception as e:
113 print(f"API CALL ERROR - can't read json. status: {r.status_code} {r.text} - URL: {url} - {e}")
File /databricks/python/lib/python3.9/site-packages/requests/models.py:917, in Response.json(self, **kwargs)
915 raise RequestsJSONDecodeError(e.message)
916 else:
--> 917 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
JSONDecodeError: [Errno Expecting value] <!doctype html>
<title>Databricks - Sign In</title> <script id="__databricks_react_script"></script> <script>window.__DATABRICKS_SAFE_FLAGS__={"databricks.fe.infra.fixConfigPrefetch":true,"databricks.fe.infra.useReact18":true,"databricks.infra.showErrorModalOnFetchError":true,"databricks.fe.infra.useReact18NewAPI":false,"databricks.fe.infra.useNewRnDTaxonomy":false},window.__DATABRICKS_CONFIG__={"publicPath":{"mlflow":"https://ui-assets.cloud.databricks.com/","dbsql":"https://ui-assets.cloud.databricks.com/","feature-store":"https://ui-assets.cloud.databricks.com/","monolith":"https://ui-assets.cloud.databricks.com/","jaws":"https://ui-assets.cloud.databricks.com/"}}</script> <script> function setNoCdnAndReload() { document.cookie = `x-databricks-cdn-inaccessible=true; path=/; max-age=86400`; const metric = 'cdnFallbackOccurred'; const browserUserAgent = navigator.userAgent; const browserTabId = window.browserTabId; const performanceEntry = performance.getEntriesByType('resource').filter(e => e.initiatorType === 'script').slice(-1)[0] sessionStorage.setItem('databricks-cdn-fallback-telemetry-key', JSON.stringify({ tags: { browserUserAgent, browserTabId }, performanceEntry})); window.location.reload(); } </script> <script> // Set a manual timeout for dropped packets to CDN function loadScriptWithTimeout(src, timeout) { return new Promise((resolve, reject) => { const script = document.createElement('script'); script.defer = true; script.src = src; script.onload = resolve; script.onerror = reject; document.head.appendChild(script); setTimeout(() => { reject(new Error('Script load timeout')); }, timeout); }); } loadScriptWithTimeout('https://ui-assets.cloud.databricks.com/static/js/login/login.7d906ada.js', 10000).catch(setNoCdnAndReload); </script> : 0hey @conradtan, it looks like you can't list the clusters for some reason. Do you know why?
Can you try to install it with the option use_current_cluster=True? It should prevent all cluster list/creation.
Still has error when using dbdemos.install('feature-store', use_current_cluster=True)
I am using Databricks Enterprise and have workspace admin/unrestricted cluster creation privileges.
No issues creating clusters or read/write from unity catalog.
JSONDecodeError Traceback (most recent call last)
File /databricks/python/lib/python3.9/site-packages/requests/models.py:910, in Response.json(self, **kwargs)
909 try:
--> 910 return complexjson.loads(self.text, **kwargs)
911 except JSONDecodeError as e:
912 # Catch JSON-related errors and raise as requests.JSONDecodeError
913 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
File /databricks/python/lib/python3.9/site-packages/simplejson/init.py:525, in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, use_decimal, **kw)
521 if (cls is None and encoding is None and object_hook is None and
522 parse_int is None and parse_float is None and
523 parse_constant is None and object_pairs_hook is None
524 and not use_decimal and not kw):
--> 525 return _default_decoder.decode(s)
526 if cls is None:
File /databricks/python/lib/python3.9/site-packages/simplejson/decoder.py:370, in JSONDecoder.decode(self, s, _w, _PY3)
369 s = str(s, self.encoding)
--> 370 obj, end = self.raw_decode(s)
I wonder if the pat token generation from you cluster could have been blocked by an admin
Can you run this in a notebook is it working or throwing an error? dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiToken().get()
@QuentinAmbard The provided command was able to run successfully as below.
However it till has error when using dbdemos.install('feature-store', use_current_cluster=True)