Skip to content

Commit

Permalink
Allow Timeout Seconds for Databricks Job to Be Configurable Via Resou…
Browse files Browse the repository at this point in the history
…rce (#30)
  • Loading branch information
jhamet93 authored May 30, 2024
1 parent 89bc89a commit 0d19eb6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions block_cascade/executors/databricks/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ def create_job(self):
self.cluster_policy
),
run_path=self.run_path,
timeout_seconds=self.resource.timeout_seconds,
)

def _run(self):
Expand Down
2 changes: 1 addition & 1 deletion block_cascade/executors/databricks/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DatabricksJob:
run_path: str
cluster_policy_id: str
existing_cluster_id: Optional[str] = None
timeout_seconds: str = 86400
timeout_seconds: int = 86400

def create_payload(self):
""""""
Expand Down
3 changes: 3 additions & 0 deletions block_cascade/executors/databricks/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ class DatabricksResource:
python_libraries: Optional[List[str]] = None
If provided, install these additional libraries on the cluster when the
remote task is run
timeout_seconds: int = 86400
The maximum time this job can run for; default is 24 hours.
""" # noqa: E501

Expand All @@ -117,6 +119,7 @@ class DatabricksResource:
cloud_pickle_infer_base_module: Optional[bool] = True
task_args: Optional[dict] = None
python_libraries: Optional[List[str]] = None
timeout_seconds: int = 86400

def __post_init__(self):
if self.group_name is None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "block-cascade"
packages = [
{include = "block_cascade"}
]
version = "2.5.2"
version = "2.5.3"
description = "Library for model training in multi-cloud environment."
readme = "README.md"
authors = ["Block"]
Expand Down

0 comments on commit 0d19eb6

Please sign in to comment.