Skip to content

Commit

Permalink
some debugging changes left over from last year
Browse files Browse the repository at this point in the history
  • Loading branch information
metazool committed Jan 14, 2025
1 parent 99b9d1c commit 112788b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion scripts/params.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cluster:
n_clusters: 5

collection: untagged-images-lana
collection: untagged-images-lana
36 changes: 26 additions & 10 deletions scripts/run_luigi_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,47 @@
from cyto_ml.pipeline.pipeline_decollage import FlowCamPipeline
from cyto_ml.data.flowcam import parse_filename
import logging

logging.basicConfig(level=logging.INFO)


if __name__ == "__main__":

parser = argparse.ArgumentParser(
prog='Luigi FlowCam pipeline',
description='Triggers the process of decollaging images, embedding spatio-temporal metadata in headers, and uploading to s3 storage',
prog="Luigi FlowCam pipeline",
description="Triggers the process of decollaging images, embedding spatio-temporal metadata in headers, and uploading to s3 storage",
)

parser.add_argument('-o', '--output_directory', type=str, default="./data/images_decollage", help="directory for intermediate data")
parser.add_argument('-d', '--directory', type=str, default="./tests/fixtures/MicrobialMethane_MESO_Tank10_54.0143_-2.7770_04052023_1", help='Enable verbose mode')
parser.add_argument('-s', '--s3_bucket', type=str, default="untagged-images-lana")
parser.add_argument('-e', '--experiment_name', type=str)
parser.add_argument(
"-o",
"--output_directory",
type=str,
default="./data/images_decollage",
help="directory for intermediate data",
)
parser.add_argument(
"-d",
"--directory",
type=str,
default="./tests/fixtures/MicrobialMethane_MESO_Tank10_54.0143_-2.7770_04052023_1",
help="Enable verbose mode",
)
parser.add_argument("-s", "--s3_bucket", type=str, default="untagged-images-lana")
parser.add_argument("-e", "--experiment_name", type=str)
args = parser.parse_args()

experiment = args.experiment_name
if not experiment:
if not experiment or experiment == "":
try:
prefix, _, _, date, _ = parse_filename(args.directory)
experiment = ''.join([prefix, date])
experiment = "".join([prefix, date])
except ValueError as err:
logging.info("Could't figure out experiment name and date from {args.directory} - please call this with --experiment_name to set this")
logging.info(
"Could't figure out experiment name and date from {args.directory} - please call this with --experiment_name to set this"
)
logging.debug(err)
exit
# TODO this properly
experiment = str(args.directory).split("/")[-2]

luigi.build(
[
Expand Down

0 comments on commit 112788b

Please sign in to comment.