Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "lakebench"
version = "0.13.0"
version = "0.13.1"
authors = [
{ name="Miles Cole" },
]
Expand Down
13 changes: 10 additions & 3 deletions src/lakebench/engines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ def _detect_runtime(self) -> str:

# Check for Microsoft Fabric or Synapse
try:
notebookutils = get_ipython().user_ns.get("notebookutils") # noqa: F821
notebookutils = None
utils_modules = ('notebookutils', 'mssparkutils')
for utils_module in utils_modules:
try:
notebookutils = __import__(utils_module)
except ImportError:
continue
if notebookutils and hasattr(notebookutils, 'runtime'):
if hasattr(notebookutils.runtime, 'context'):
context = notebookutils.runtime.context
Expand All @@ -119,11 +125,12 @@ def _detect_runtime(self) -> str:

# Check for Databricks
try:
dbutils = None
if 'DATABRICKS_RUNTIME_VERSION' in os.environ:
return "databricks"
try:
dbutils = get_ipython().user_ns.get("dbutils") # noqa: F821
if dbutils:
dbutils = __import__('dbutils')
if dbutils is not None:
return "databricks"
except:
pass
Expand Down