-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace the code with new run_batch.py
- Loading branch information
1 parent
d2d02d6
commit a5988b0
Showing
6 changed files
with
40 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from pathlib import Path | ||
|
||
import cyclopts | ||
from bfabric import Bfabric | ||
from bfabric.entities import Workunit | ||
from depiction_targeted_preproc.pipeline.run import set_workunit_processing, set_workunit_available, run_one_job | ||
from depiction_targeted_preprocbatch.batch_dataset import BatchDataset | ||
|
||
app = cyclopts.App() | ||
|
||
|
||
@app.default() | ||
def run_batch(workunit_id: int, work_dir: Path, ssh_user: str | None = None) -> None: | ||
client = Bfabric.from_config() | ||
set_workunit_processing(client=client, workunit_id=workunit_id) | ||
|
||
workunit = Workunit.find(id=workunit_id, client=client) | ||
batch_dataset = BatchDataset(dataset_id=workunit.input_dataset.id, client=client) | ||
|
||
for job in batch_dataset.jobs: | ||
run_one_job( | ||
client=client, | ||
work_dir=work_dir, | ||
sample_name=str(Path(job.imzml["name"]).stem), | ||
dataset_id=job.panel.id, | ||
workunit_id=workunit_id, | ||
imzml_resource_id=job.imzml.id, | ||
ssh_user=ssh_user, | ||
) | ||
|
||
set_workunit_available(client=client, workunit_id=workunit_id) | ||
|
||
|
||
if __name__ == "__main__": | ||
app() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 0 additions & 125 deletions
125
src/depiction_targeted_preprocbatch/job_export_results.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.