Skip to content

Commit e5fdc73

Browse files
authored
fix: synapse engine blocked by double negative (#69)
1 parent 959fe29 commit e5fdc73

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "lakebench"
7-
version = "0.13.2"
7+
version = "0.13.3"
88
authors = [
99
{ name="Miles Cole" },
1010
]

src/lakebench/engines/spark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ def get_compute_size(self) -> str:
263263
vm_host_count = len(set(executor.host() for executor in self.spark.sparkContext._jsc.sc().statusTracker().getExecutorInfos()))
264264
worker_count = vm_host_count - 1
265265
worker_cores = os.cpu_count()
266-
as_min_workers = sc_conf_dict['spark.dynamicAllocation.initialExecutors'] if sc_conf_dict.get('spark.autoscale.executorResourceInfoTag.enabled', 'false') == 'true' else None
267-
as_max_workers = sc_conf_dict['spark.dynamicAllocation.maxExecutors'] if sc_conf_dict.get('spark.autoscale.executorResourceInfoTag.enabled', 'false') == 'true' else None
266+
as_min_workers = sc_conf_dict.get('spark.dynamicAllocation.initialExecutors') if sc_conf_dict.get('spark.autoscale.executorResourceInfoTag.enabled', 'false') == 'true' else None
267+
as_max_workers = sc_conf_dict.get('spark.dynamicAllocation.maxExecutors') if sc_conf_dict.get('spark.autoscale.executorResourceInfoTag.enabled', 'false') == 'true' else None
268268
as_enabled = True if as_min_workers != as_max_workers and sc_conf_dict.get('spark.dynamicAllocation.minExecutors', None) != sc_conf_dict.get('spark.dynamicAllocation.maxExecutors', None) else False
269269
type = "SingleNode" if vm_host_count == 1 and not as_enabled else 'MultiNode'
270270
workers_word = 'Workers' if worker_count > 1 or (as_max_workers is not None and int(as_max_workers) > 1) else 'Worker'

src/lakebench/engines/synapse_spark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(
3737
compute_stats_all_cols=False
3838
)
3939

40-
if not self.runtime != 'synapse':
40+
if self.runtime != 'synapse':
4141
raise RuntimeError("This engine is only supports Synapse Spark Pools.")
4242
self.version: str = f"{self.spark.sparkContext.version} (vhd_name=={self.spark.conf.get('spark.synapse.vhd.name')})"
4343
region = self.spark.conf.get('spark.cluster.region')

0 commit comments

Comments
 (0)