Skip to content

Commit

Permalink
fix: magnitude must be greater than 0
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Oct 25, 2024
1 parent 9d1a82c commit 844d213
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions igneous/task_creation/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# split the work up into ~1000 tasks (magnitude 3)
def create_mesh_manifest_tasks(layer_path, magnitude=3, mesh_dir=None):
assert int(magnitude) == magnitude
assert magnitude >= 0
assert magnitude > 0

protocol = cloudfiles.paths.get_protocol(layer_path)
if protocol == "file":
Expand All @@ -64,8 +64,8 @@ def create_mesh_manifest_tasks(layer_path, magnitude=3, mesh_dir=None):
)
]

start = 10 ** (magnitude - 1)
end = 10 ** magnitude
start = int(10 ** (magnitude - 1))
end = int(10 ** magnitude)

class MeshManifestTaskIterator(object):
def __len__(self):
Expand Down Expand Up @@ -467,6 +467,7 @@ def create_unsharded_multires_mesh_tasks(
"""
# split the work up into ~1000 tasks (magnitude 3)
assert int(magnitude) == magnitude
assert magnitude > 0

configure_multires_info(
cloudpath,
Expand Down

0 comments on commit 844d213

Please sign in to comment.