Skip to content

Commit

Permalink
minor black formatting and configuration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonw committed Nov 2, 2023
1 parent 75ff6ff commit 865fe53
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion gunpowder/nodes/batch_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def request_batch(self, request):
batch = None

try:

self.set_seeds(request)

logger.debug("%s got request %s", self.name(), request)
Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/deform_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def setup(self):
self.provides(self.transform_key, spec)

def prepare(self, request):

# get the total ROI of all requests
total_roi = request.get_total_roi()
logger.debug("total ROI is %s" % total_roi)
Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/elastic_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ def __init__(
self.recompute_missing_points = recompute_missing_points

def prepare(self, request):

# get the voxel size
self.voxel_size = self.__get_common_voxel_size(request)

Expand Down
2 changes: 0 additions & 2 deletions gunpowder/nodes/noise_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ def process(self, batch, request):
seed = request.random_seed

try:

raw.data = skimage.util.random_noise(
raw.data, mode=self.mode, rng=seed, clip=self.clip, **self.kwargs
).astype(raw.data.dtype)

except ValueError:

# legacy version of skimage random_noise
raw.data = skimage.util.random_noise(
raw.data, mode=self.mode, seed=seed, clip=self.clip, **self.kwargs
Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/random_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def setup(self):
self.provides(self.random_shift_key, ArraySpec(nonspatial=True))

def prepare(self, request):

logger.debug("request: %s", request.array_specs)
logger.debug("my spec: %s", self.spec)

Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/random_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def setup(self):
self.provides(self.random_provider_key, ArraySpec(nonspatial=True))

def provide(self, request):

if self.random_provider_key is not None:
del request[self.random_provider_key]

Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/reject.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def setup(self):
self.upstream_provider = self.get_upstream_provider()

def provide(self, request):

report_next_timeout = 10
num_rejected = 0

Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/shift_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def __init__(self, prob_slip=0, prob_shift=0, sigma=0, shift_axis=0):
self.lcm_voxel_size = None

def prepare(self, request):

self.ndim = request.get_total_roi().dims
assert self.shift_axis in range(self.ndim)

Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/simple_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def setup(self):
self.permutation_dict[k] = v

def prepare(self, request):

self.mirror = [
random.random() < self.mirror_probs[d] if self.mirror_mask[d] else 0
for d in range(self.dims)
Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def __init__(self, num_repetitions):
self.num_repetitions = num_repetitions

def provide(self, request):

batches = []
for _ in range(self.num_repetitions):
upstream_request = request.copy()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ full = [
version = { attr = "gunpowder.version_info.__version__" }

[tool.black]
target_version = ['py36', 'py37', 'py38', 'py39', 'py310']
target_version = ['py38', 'py39', 'py310']

[tool.setuptools.packages.find]
include = ["gunpowder*"]

0 comments on commit 865fe53

Please sign in to comment.