Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
a59eedd
fix: cleanup ingest code
akhileshh Aug 6, 2023
28a054b
add ttl column family
akhileshh Aug 6, 2023
b845f84
fix: new l2 cx edge attribute
akhileshh Aug 6, 2023
092220e
feat: post process sv cross edges
akhileshh Aug 6, 2023
64ad81a
fix: use longer expiry for debugging
akhileshh Aug 11, 2023
5153353
feat(ingest): read l2 cross edges
akhileshh Aug 11, 2023
f959dfb
feat(ingest): postprocess job handling
akhileshh Aug 12, 2023
e50302e
fix(ingest): status
akhileshh Aug 12, 2023
79fe188
fix: timedelta import
akhileshh Aug 12, 2023
968f484
fix(ingest): status
akhileshh Aug 12, 2023
86b19f6
fix(ingest): use hypenated names for valid dns
akhileshh Aug 12, 2023
074d798
fix: rename attr; better var names
akhileshh Aug 20, 2023
87602e4
fix: rename attr; better var names
akhileshh Aug 20, 2023
182493c
fix: add more docs; better var names
akhileshh Aug 20, 2023
b1e8848
fix: move cross_edges module to ingest module; only used in ingest
akhileshh Aug 20, 2023
2549e88
fix: reduce mem use; var names; remove unused code
akhileshh Aug 20, 2023
df7d24b
fix: adds cg typehint
akhileshh Aug 20, 2023
f2aca5c
fix: reduce loc
akhileshh Aug 20, 2023
bdc5cf7
fix: use shorter name
akhileshh Aug 20, 2023
da9fba7
feat: cache cx edges at each layer
akhileshh Aug 20, 2023
5159d92
fix: convert array type
akhileshh Aug 20, 2023
3e5a8a0
fix: use atomic edges during ingest
akhileshh Aug 20, 2023
c3cc4c7
fix: tests
akhileshh Aug 20, 2023
f84f76a
fix: remove postprocess step
akhileshh Aug 20, 2023
41315ce
fix: raises specific error
akhileshh Aug 20, 2023
ccc82d9
fix: removes dangerous default value
akhileshh Aug 21, 2023
56f1a3f
wip: read from cached edges
akhileshh Aug 21, 2023
844fffc
wip: edits refactor
akhileshh Aug 21, 2023
c9aa738
wip: edits refactor
akhileshh Aug 21, 2023
dffdcc4
fix(ingest): cache cross chunk edges from children
akhileshh Aug 22, 2023
a4d008d
feat: add unique flag
akhileshh Aug 22, 2023
731e33d
feat: cross edges column family gcversionrule
akhileshh Aug 22, 2023
72bedf8
fix: convert input to np arrays
akhileshh Aug 22, 2023
d675821
fix: linting issues
akhileshh Aug 22, 2023
8955334
wip: edits refactor
akhileshh Aug 22, 2023
ab4945b
fix: undo gcrule changes
akhileshh Aug 23, 2023
85d0bce
fix: add mock_edges; linting issues
akhileshh Aug 23, 2023
65e144b
feat: edits using cached cross edges
akhileshh Aug 23, 2023
c2ed963
fix: use function for dry code
akhileshh Aug 24, 2023
da3d296
fix: mask skipped nodes
akhileshh Aug 28, 2023
35a5668
fix: use the correct layer variable
akhileshh Aug 28, 2023
4344315
fix: redis pipeline for lower latency
akhileshh Aug 29, 2023
5ed4239
fix: pass redis connection
akhileshh Aug 29, 2023
68c79d2
fix: version update for deployment
akhileshh Aug 29, 2023
27addf2
fix: status print padding
akhileshh Aug 29, 2023
8ab74e1
fix: filter active edges for split, add timestamp for reading cross c…
akhileshh Aug 30, 2023
5c5d159
fix: get roots no cache flag
akhileshh Aug 30, 2023
af9f0bd
fix: parent and roots no cache
akhileshh Aug 31, 2023
58c83f0
fix: out edges here dont refer to edges crossing chunk
akhileshh Aug 31, 2023
0b3502c
fix: missing timestamps
akhileshh Sep 2, 2023
bd37a9d
fix: consolidate neighbor nodes cx edge updates
akhileshh Sep 8, 2023
a9a57e5
fix: set to list for np.array
akhileshh Sep 8, 2023
525bbe2
fix: use copy=False where possible; some cleanup
akhileshh Sep 8, 2023
3855f66
fix: attribute type must be np.array
akhileshh Sep 8, 2023
fd36a03
fix(ingest): worker details in status
akhileshh Sep 9, 2023
21b8e1e
fix: handle empty input
akhileshh Sep 9, 2023
d3fad85
fix: use empty array instead
akhileshh Sep 9, 2023
4a00ea0
fix: missed time_stamp
akhileshh Sep 10, 2023
2065ac7
fix: only consolidate cx_edge writes; update per new_id
akhileshh Sep 10, 2023
7525679
fix: reset parent layer in loop
akhileshh Sep 11, 2023
8c76d87
fix(ingest): use get_roots with ceil=False instead of get_parents
akhileshh Sep 11, 2023
4eb26e1
fix(ingest): incorrect stop_layer
akhileshh Sep 11, 2023
43f47b1
fix: add safeguard to against data corruption
akhileshh Sep 12, 2023
6b503ae
add another safeguard
akhileshh Sep 12, 2023
d0521be
feat: log operation_id in errors
akhileshh Sep 12, 2023
d804036
fix: remove temp error
akhileshh Sep 12, 2023
4bd9fbd
add more safeguards
akhileshh Sep 12, 2023
3350502
fix: circular import
akhileshh Sep 12, 2023
1f4e9d7
fix: consider layer 2 as well
akhileshh Sep 12, 2023
fa2e5da
fix(edits): incorrect order of opeartions; documentation
akhileshh Sep 13, 2023
9ac27ce
feat(ingest): add tests command
akhileshh Sep 15, 2023
fe29932
fix(edits): make sure to add reverse edges
akhileshh Sep 26, 2023
b2bf85f
fix(edits): read neighbor cx edges from cache
akhileshh Sep 26, 2023
4d99382
fix(edits): check for no cx edges; comments
akhileshh Sep 27, 2023
18667f9
fix(edits): update neighbor cx edges in a skipped layer
akhileshh Oct 3, 2023
fd08306
fix(edits): make sure to update all skipped neighbors
akhileshh Oct 11, 2023
29d03c0
fix(edits): ignore new ids in neighbor update
akhileshh Oct 11, 2023
bc35c85
add docs
akhileshh Oct 12, 2023
6d92dd8
fix: resolve column filter ambiguity
akhileshh Jan 14, 2024
d8d44d3
fix: resolve column filter ambiguity(2)
akhileshh Jan 14, 2024
e615f13
V3 migration (#484)
akhileshh May 12, 2024
b772627
reset version v3
akhileshh May 12, 2024
6b7f846
breakup long fn
akhileshh May 12, 2024
296d0fc
gh actions for pcgv3
akhileshh May 15, 2024
c72c22c
update split tests (#497)
akhileshh May 25, 2024
6719bcc
segregate update nodes logic
akhileshh Jun 10, 2024
28f64fe
fix(edits): overwrite children partners when superseded by parents
akhileshh Jun 28, 2024
6d6563f
fix: unique edges always, predecing edit ts, allow same segment merge
akhileshh Jul 4, 2024
c075e55
Bump version: 3.0.0 → 3.0.1
akhileshh Jul 4, 2024
5428760
fix(edits): mask all descendants when updating cx edges
akhileshh Jul 6, 2024
9bca6aa
Bump version: 3.0.1 → 3.0.2
akhileshh Jul 6, 2024
e82bb2e
fix(edits): use supervoxels to get the correct cross edge parents
akhileshh Jul 7, 2024
8aa37f4
Bump version: 3.0.2 → 3.0.3
akhileshh Jul 7, 2024
e1c1c62
fix(edits/split): filter out inactive cross edges
akhileshh Jul 16, 2024
1f69511
fix(edits/split): filter out inactive cross edges AT EACH LAYER
akhileshh Jul 17, 2024
c66f7fa
migration debug code
akhileshh Aug 30, 2024
e4ec8e7
use parent timestamps to lift cx edges
akhileshh Sep 22, 2024
4aae99b
make dynamic mesh dir graph specific
akhileshh Sep 23, 2024
7656d78
fix(upgrade): use hierarchy from supervoxels
akhileshh Sep 26, 2024
7ccacb7
fix(upgrade): include cx edges at node_ts explicitly
akhileshh Sep 26, 2024
1bbd08a
adds job type guard, flush_redis prompts, improved status output
akhileshh Sep 29, 2024
89cf069
fix(upgrade): include timestamps for partner supervoxel parents
akhileshh Nov 10, 2024
f92b31e
fix(upgrade): use timestamps of partners at layers > 2
akhileshh Nov 21, 2024
7961a43
version 3.0.9
akhileshh Dec 5, 2024
58e5b19
feat: use mesh dir and dynamic dir from metadata
akhileshh Dec 9, 2024
c671e9e
ingest: change job batch size, more logging
akhileshh Jul 15, 2025
cb60d28
Bump version: 3.0.10 → 3.0.11
akhileshh Jul 15, 2025
deecc38
ingest: add socket_timeout for redis connections
akhileshh Jul 15, 2025
d888161
Bump version: 3.0.11 → 3.0.12
akhileshh Jul 15, 2025
847e454
feat: stitching support in v3
akhileshh May 29, 2025
aeb922e
fix: add tensorstore to req
akhileshh May 29, 2025
d57ad69
fix: more numpy 2 fixes
dodamih May 30, 2025
8bdfd22
fix: more numpy2 fixes
dodamih May 30, 2025
02a8180
fix: even more numpy2 fixes
dodamih May 31, 2025
c0b4510
debug: sanity check in add_atomic_chunk
dodamih Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.20.0
current_version = 3.0.12
commit = True
tag = True

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- "main"
- "pcgv3"
pull_request:
branches:
- "main"
- "pcgv3"

jobs:
unit-tests:
Expand Down
2 changes: 1 addition & 1 deletion pychunkedgraph/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.20.0"
__version__ = "3.0.12"
2 changes: 2 additions & 0 deletions pychunkedgraph/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def configure_app(app):
with app.app_context():
from ..ingest.rq_cli import init_rq_cmds
from ..ingest.cli import init_ingest_cmds
from ..ingest.cli_upgrade import init_upgrade_cmds

init_rq_cmds(app)
init_ingest_cmds(app)
init_upgrade_cmds(app)
60 changes: 0 additions & 60 deletions pychunkedgraph/debug/cross_edge_test.py

This file was deleted.

78 changes: 0 additions & 78 deletions pychunkedgraph/debug/existence_test.py

This file was deleted.

54 changes: 0 additions & 54 deletions pychunkedgraph/debug/family_test.py

This file was deleted.

52 changes: 40 additions & 12 deletions pychunkedgraph/debug/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# pylint: disable=invalid-name, missing-docstring, bare-except, unidiomatic-typecheck

import numpy as np

from ..graph import ChunkedGraph
from ..graph.utils.basetypes import NODE_ID
from pychunkedgraph.graph.meta import ChunkedGraphMeta, GraphConfig


def print_attrs(d):
Expand All @@ -16,28 +17,55 @@ def print_attrs(d):
print(v)


def print_node(
cg: ChunkedGraph,
node: NODE_ID,
indent: int = 0,
stop_layer: int = 2,
) -> None:
def print_node(cg, node: np.uint64, indent: int = 0, stop_layer: int = 2) -> None:
children = cg.get_children(node)
print(f"{' ' * indent}{node}[{len(children)}]")
if cg.get_chunk_layer(node) <= stop_layer:
return
for child in children:
print_node(cg, child, indent=indent + 1, stop_layer=stop_layer)
print_node(cg, child, indent=indent + 4, stop_layer=stop_layer)


def get_l2children(cg: ChunkedGraph, node: NODE_ID) -> np.ndarray:
nodes = np.array([node], dtype=NODE_ID)
def get_l2children(cg, node: np.uint64) -> np.ndarray:
nodes = np.array([node], dtype=np.uint64)
layers = cg.get_chunk_layers(nodes)
assert np.all(layers > 2), "nodes must be at layers > 2"
assert np.all(layers >= 2), "nodes must be at layers >= 2"
l2children = []
while nodes.size:
children = cg.get_children(nodes, flatten=True)
layers = cg.get_chunk_layers(children)
l2children.append(children[layers == 2])
nodes = children[layers > 2]
return np.concatenate(l2children)


def sanity_check(cg, new_roots, operation_id):
"""
Check for duplicates in hierarchy, useful for debugging.
"""
# print(f"{len(new_roots)} new ids from {operation_id}")
l2c_d = {}
for new_root in new_roots:
l2c_d[new_root] = get_l2children(cg, new_root)
success = True
for k, v in l2c_d.items():
success = success and (len(v) == np.unique(v).size)
# print(f"{k}: {np.unique(v).size}, {len(v)}")
if not success:
raise RuntimeError("Some ids are not valid.")


def sanity_check_single(cg, node, operation_id):
v = get_l2children(cg, node)
msg = f"invalid node {node}:"
msg += f" found {len(v)} l2 ids, must be {np.unique(v).size}"
assert np.unique(v).size == len(v), f"{msg}, from {operation_id}."
return v


def update_graph_id(cg, new_graph_id:str):
old_gc = cg.meta.graph_config._asdict()
old_gc["ID"] = new_graph_id
new_gc = GraphConfig(**old_gc)
new_meta = ChunkedGraphMeta(new_gc, cg.meta.data_source, cg.meta.custom_data)
cg.update_meta(new_meta, overwrite=True)
23 changes: 19 additions & 4 deletions pychunkedgraph/graph/attributes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# pylint: disable=invalid-name, missing-docstring, protected-access, raise-missing-from

# TODO design to use these attributes across different clients
# `family_id` is specific to bigtable

from enum import Enum
from typing import NamedTuple

from .utils import serializers
Expand Down Expand Up @@ -101,20 +104,34 @@ class Connectivity:
serializer=serializers.NumPyArray(dtype=basetypes.EDGE_AREA),
)

CrossChunkEdge = _AttributeArray(
AtomicCrossChunkEdge = _AttributeArray(
pattern=b"atomic_cross_edges_%d",
family_id="3",
serializer=serializers.NumPyArray(
dtype=basetypes.NODE_ID, shape=(-1, 2), compression_level=22
),
)

FakeEdges = _Attribute(
CrossChunkEdge = _AttributeArray(
pattern=b"cross_edges_%d",
family_id="4",
serializer=serializers.NumPyArray(
dtype=basetypes.NODE_ID, shape=(-1, 2), compression_level=22
),
)

FakeEdgesCF3 = _Attribute(
key=b"fake_edges",
family_id="3",
serializer=serializers.NumPyArray(dtype=basetypes.NODE_ID, shape=(-1, 2)),
)

FakeEdges = _Attribute(
key=b"fake_edges",
family_id="4",
serializer=serializers.NumPyArray(dtype=basetypes.NODE_ID, shape=(-1, 2)),
)


class Hierarchy:
Child = _Attribute(
Expand Down Expand Up @@ -157,8 +174,6 @@ class GraphVersion:
class OperationLogs:
key = b"ioperations"

from enum import Enum

class StatusCodes(Enum):
SUCCESS = 0 # all is well, new changes persisted
CREATED = 1 # log record created in storage
Expand Down
Loading
Loading