Skip to content

Commit

Permalink
fix(upgrade): include timestamps for partner supervoxel parents
Browse files Browse the repository at this point in the history
  • Loading branch information
akhileshh committed Nov 10, 2024
1 parent dcbecd1 commit f493b9d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pychunkedgraph/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.0.6"
__version__ = "3.0.7"
8 changes: 6 additions & 2 deletions pychunkedgraph/ingest/upgrade/atomic_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def update_cross_edges(
cg: ChunkedGraph, node, cx_edges_d, node_ts, timestamps, earliest_ts
cg: ChunkedGraph, node, cx_edges_d: dict, node_ts, timestamps: set, earliest_ts
) -> list:
"""
Helper function to update a single L2 ID.
Expand All @@ -27,7 +27,11 @@ def update_cross_edges(
assert not exists_as_parent(cg, node, edges[:, 0])
return rows

for ts in timestamps:
partner_parent_ts_d = get_parent_timestamps(cg, edges[:, 1])
for v in partner_parent_ts_d.values():
timestamps.update(v)

for ts in sorted(timestamps):
if ts < earliest_ts:
ts = earliest_ts
val_dict = {}
Expand Down
3 changes: 2 additions & 1 deletion pychunkedgraph/ingest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import logging
import functools
import math
from os import environ
from time import sleep
from typing import Any, Generator, Tuple
Expand Down Expand Up @@ -163,7 +164,7 @@ def print_status(imanager: IngestionManager, redis, upgrade: bool = False):
)
print(header)
for layer, done, count in zip(layers, completed, layer_counts):
print(f"{layer}\t| {done:9} / {count} \t| {done/count:6.1%}")
print(f"{layer}\t| {done:9} / {count} \t| {math.floor(done/count):6%}")

print("\n\nqueue status:")
for layer, q, f, wb in zip(layers, queued, failed, worker_busy):
Expand Down

0 comments on commit f493b9d

Please sign in to comment.