Skip to content

Commit

Permalink
expose parallel parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jwong-nd committed Nov 5, 2024
1 parent 8b9c38f commit e961950
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/aind_behavior_video_transformation/etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class BehaviorVideoJobSettings(BasicJobSettings):
"request"
),
)
parallel_compression: bool = Field(
default=True,
description="Run compression in parallel or sequentially.",
)
video_extensions: List[str] = [
".mp4",
".avi",
Expand Down Expand Up @@ -154,7 +158,6 @@ def _resolve_compression_requests(
def _run_compression(
self,
path_comp_req_pairs: List[Tuple[PathLike, CompressionRequest]],
parallel=True,
) -> None:
"""
Runs CompressionRequests at the specified paths.
Expand All @@ -179,7 +182,7 @@ def _run_compression(
w/ {comp_req.compression_enum}"
)

if parallel:
if self.job_settings.parallel_compression:
# Dask implementation
# import dask
# jobs = [dask.delayed(convert_video)(*params)
Expand Down Expand Up @@ -259,6 +262,3 @@ def run_job(self) -> JobResponse:
job_response = job.run_job()
print(job_response.status_code)
logging.info(job_response.model_dump_json())

# TODO:
# Expose parallel parameter.

0 comments on commit e961950

Please sign in to comment.