Skip to content

Commit

Permalink
Addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsitsi committed Jan 30, 2024
1 parent 18f84b5 commit bf11342
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/tiledb/cloud/bioimg/ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from tiledb.cloud import dag
from tiledb.cloud.bioimg.helpers import get_logger_wrapper
from tiledb.cloud.bioimg.helpers import serialize_filter
from tiledb.cloud.dag.mode import Mode
from tiledb.cloud.rest_api.models import RetryStrategy
from tiledb.cloud.utilities._common import run_dag

Expand All @@ -24,7 +25,7 @@ def ingest(
threads: Optional[int] = 8,
resources: Optional[Mapping[str, Any]] = None,
compute: bool = True,
run_on: Optional[str] = None,
mode: Optional[Mode] = Mode.BATCH,
namespace: Optional[str],
verbose: bool = False,
exclude_metadata: bool = False,
Expand All @@ -44,7 +45,7 @@ def ingest(
defaults to None
:param compute: When True the DAG returned will be computed inside the function
otherwise DAG will only be returned.
:param run_on: By default runs on server if value is "client" runs client side.
:param mode: By default runs Mode.Batch
:param namespace: The namespace where the DAG will run
:param verbose: verbose logging, defaults to False
:param output_ext: extension for the output images in tiledb
Expand Down Expand Up @@ -164,13 +165,9 @@ def ingest_tiff_udf(

logger.debug("Building graph")

run_mode = run_on or "server"
if run_mode not in _RUNNING_PROFILES:
raise ValueError("Invalid value for argument 'run_on'")

graph = dag.DAG(
name=dag_name,
mode=dag.Mode.REALTIME if run_mode == "client" else dag.Mode.BATCH,
mode=mode,
max_workers=max_workers,
namespace=namespace,
retry_strategy=RetryStrategy(
Expand Down

0 comments on commit bf11342

Please sign in to comment.