Skip to content

Commit

Permalink
Update bids validator to use new job manager
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvrajjain2003 committed Nov 16, 2023
1 parent 361546c commit 909380e
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions clpipe/bids_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,13 @@ def bids_validate(
)
sys.exit(1)

# batch_manager = BatchManager(
# config.batch_config_path, output_directory=log_dir, debug=debug
# )
# batch_manager.update_mem_usage(DEFAULT_MEMORY_USAGE)

batch_manager = JobManagerFactory.get(
batch_config=config.batch_config_path,
output_directory=log_dir,
debug=debug,
mem_use=DEFAULT_MEMORY_USAGE
)

# Not sure what this is doing tbh
config.bids_validation.bids_validator_image

singularity_string = SINGULARITY_CMD_TEMPLATE
if verbose:
logger.debug("Verbose mode: on")
Expand All @@ -70,31 +62,20 @@ def bids_validate(
singularity_string.format(
validatorInstance=config.bids_validation.bids_validator_image,
bidsDir=bids_dir,
bindPaths=batch_manager.config["SingularityBindPaths"],
bindPaths=batch_manager.config.singularity_bind_paths,
)
)
logger.info("Validation complete.")
else:
# batch_manager.addjob(
# Job(
# "BIDSValidator",
# singularity_string.format(
# validatorInstance=config.bids_validation.bids_validator_image,
# bidsDir=config.fmriprep.bids_directory,
# bindPaths=batch_manager.config["SingularityBindPaths"],
# ),
# )
# )
batch_manager.addjob(
"BIDSValidator",
batch_manager.add_job(
STEP_NAME,
singularity_string.format(
validatorInstance=config.bids_validation.bids_validator_image,
bidsDir=config.fmriprep.bids_directory,
bindPaths=batch_manager.config["SingularityBindPaths"],
bindPaths=batch_manager.config.singularity_bind_paths,
)
)

# batch_manager.compilejobstrings()
if submit:
logger.info("Running BIDS validation in batch mode.")
batch_manager.submit_jobs()
Expand Down

0 comments on commit 909380e

Please sign in to comment.