Skip to content

Commit 9799698

Browse files
committed
Remove manual type validation from SparkClient.connect()
Signed-off-by: Hemanth <vhemanthnaik45@gmail.com>
1 parent 77397ee commit 9799698

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

kubeflow/spark/backends/kubernetes/backend.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,6 @@ def _create_session(
121121
options: Optional[list] = None,
122122
) -> SparkConnectInfo:
123123
"""Create a new SparkConnect session (INTERNAL USE ONLY)."""
124-
# Validate input types
125-
if resources_per_executor is not None and not isinstance(resources_per_executor, dict):
126-
raise TypeError(
127-
f"resources_per_executor must be a dict, got {type(resources_per_executor)}"
128-
)
129-
if spark_conf is not None and not isinstance(spark_conf, dict):
130-
raise TypeError(f"spark_conf must be a dict, got {type(spark_conf)}")
131-
if num_executors is not None and not isinstance(num_executors, int):
132-
raise TypeError(f"num_executors must be an int, got {type(num_executors)}")
133-
if driver is not None and not isinstance(driver, Driver):
134-
raise TypeError(f"driver must be a Driver instance, got {type(driver)}")
135-
if executor is not None and not isinstance(executor, Executor):
136-
raise TypeError(f"executor must be an Executor instance, got {type(executor)}")
137-
138124
# Extract Name option if present, or auto-generate
139125
name, filtered_options = self._extract_name_option(options)
140126

0 commit comments

Comments
 (0)