Skip to content

Commit

Permalink
Merge pull request #43 from janelia-cellmap/actions/black
Browse files Browse the repository at this point in the history
Format Python code with psf/black push
  • Loading branch information
mzouink authored Feb 9, 2024
2 parents ce71fb5 + 353b8cb commit 7ba3662
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions dacapo/experiments/trainers/gunpowder_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def __init__(self, trainer_config):
self.clip_raw = trainer_config.clip_raw

# Testing out if calculating multiple times and multiplying is necessary
self.add_predictor_nodes_to_dataset = trainer_config.add_predictor_nodes_to_dataset
self.add_predictor_nodes_to_dataset = (
trainer_config.add_predictor_nodes_to_dataset
)

self.scheduler = None

Expand Down Expand Up @@ -166,7 +168,9 @@ def build_batch_provider(self, datasets, model, task, snapshot_container=None):
task.predictor,
gt_key=gt_key,
target_key=target_key,
weights_key=datasets_weight_key if self.add_predictor_nodes_to_dataset else weight_key,
weights_key=datasets_weight_key
if self.add_predictor_nodes_to_dataset
else weight_key,
mask_key=mask_key,
)

Expand Down
4 changes: 3 additions & 1 deletion dacapo/experiments/trainers/gunpowder_trainer_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ class GunpowderTrainerConfig(TrainerConfig):

add_predictor_nodes_to_dataset: Optional[bool] = attr.ib(
default=True,
metadata={"help_text": "Whether to add a predictor node to dataset_source and apply product of weights"}
metadata={
"help_text": "Whether to add a predictor node to dataset_source and apply product of weights"
},
)

0 comments on commit 7ba3662

Please sign in to comment.