Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
87fb2cd
wip
akhileshh Jan 10, 2023
5ee86da
wip: multiscale manifest
akhileshh Mar 26, 2023
85ea02e
feat: multiscale manifest endpoint
akhileshh Mar 29, 2023
237031f
fix: cleanup utils
akhileshh Mar 29, 2023
879a75c
fix: initial values
akhileshh Apr 4, 2023
c38e094
fix: handle l2 and leaf ids
akhileshh Apr 7, 2023
6414f10
fix: handle missing fragments due to skips
akhileshh Apr 8, 2023
4f76669
fix: max layer for lower level IDs
akhileshh Apr 16, 2023
5f668cd
fix: octree hierarchy based on bfs level
akhileshh Apr 19, 2023
72cd446
fix: account for leaves without meshes
akhileshh Apr 19, 2023
7f2e43d
fix: no mesh edge case
akhileshh Apr 19, 2023
66bd59f
fix: use only chunk coordinates
akhileshh Apr 25, 2023
0a50110
fix: include clip bounds
akhileshh May 4, 2023
20e2c9b
virtual bit
akhileshh Jul 26, 2023
e6db70f
fix: sort children nodes by morton code
akhileshh Sep 15, 2023
a9c4ad4
fix(temp): auth bp for local ng
akhileshh Oct 12, 2023
62cf6ea
fix: efficient comparison for morton sort
akhileshh Oct 26, 2023
262d148
fix(manifest): chunk shape in nm
akhileshh Feb 28, 2024
4690543
try octree coordinates in nm
akhileshh Apr 22, 2024
73f52b6
adds octree validation
akhileshh Jan 27, 2025
a4b2ff2
fix(mesh): skipped nodes in manifest
akhileshh Jan 27, 2025
9ec35df
combine fragments per chunk
akhileshh Feb 18, 2025
499a3bb
mark root as virtual
akhileshh Feb 18, 2025
1245784
combine single fragment per chunk with inserted skipped nodes
akhileshh Feb 27, 2025
e88a40b
fix: missing chunks, octree validation
akhileshh Mar 15, 2025
f8c971c
fix: don't mark chunks with fragments as empty
akhileshh May 1, 2025
56fd655
fix(multiscale_mesh): reverse morton order
akhileshh Jun 10, 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
11 changes: 11 additions & 0 deletions pychunkedgraph/app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# pylint: disable=invalid-name, missing-docstring

import datetime
import json
import logging
Expand All @@ -8,6 +10,7 @@
import pandas as pd
import numpy as np
import redis
from flask import Blueprint
from flask import Flask
from flask.json.provider import DefaultJSONProvider
from flask.logging import default_handler
Expand Down Expand Up @@ -74,6 +77,14 @@ def create_app(test_config=None):
app.register_blueprint(segmentation_api_legacy)
app.register_blueprint(segmentation_api_v1)

auth_bp = Blueprint("auth_info", __name__, url_prefix="/")

@auth_bp.route("/auth_info")
def index():
return {"login_url": "https://globalv1.flywire-daf.com/sticky_auth"}

app.register_blueprint(auth_bp)

return app


Expand Down
15 changes: 11 additions & 4 deletions pychunkedgraph/app/meshing/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
from pychunkedgraph.meshing.manifest import get_highest_child_nodes_with_meshes
from pychunkedgraph.meshing.manifest import get_children_before_start_layer
from pychunkedgraph.meshing.manifest import ManifestCache
from pychunkedgraph.meshing.manifest import speculative_manifest_sharded
from pychunkedgraph.meshing.manifest.multiscale import (
get_manifest as get_multiscale_manifest,
)


__meshing_url_prefix__ = os.environ.get("MESHING_URL_PREFIX", "meshing")
Expand Down Expand Up @@ -54,7 +58,7 @@ def handle_valid_frags(table_id, node_id):
## MANIFEST --------------------------------------------------------------------


def handle_get_manifest(table_id, node_id):
def handle_get_manifest(table_id, node_id, multiscale=False):
current_app.request_type = "manifest"
current_app.table_id = table_id

Expand Down Expand Up @@ -84,6 +88,7 @@ def handle_get_manifest(table_id, node_id):
args = (
node_id,
verify,
multiscale,
return_seg_ids,
prepend_seg_ids,
start_layer,
Expand All @@ -95,11 +100,10 @@ def handle_get_manifest(table_id, node_id):


def manifest_response(cg, args):
from pychunkedgraph.meshing.manifest import speculative_manifest_sharded

(
node_id,
verify,
multiscale,
return_seg_ids,
prepend_seg_ids,
start_layer,
Expand All @@ -109,11 +113,14 @@ def manifest_response(cg, args):
) = args
resp = {}
seg_ids = []
node_id = np.uint64(node_id)
if not verify:
seg_ids, resp["fragments"] = speculative_manifest_sharded(
cg, node_id, start_layer=start_layer, bounding_box=bounding_box
)

elif multiscale is True:
seg_ids, response = get_multiscale_manifest(cg, node_id)
resp.update(response)
else:
seg_ids, resp["fragments"] = get_highest_child_nodes_with_meshes(
cg,
Expand Down
11 changes: 11 additions & 0 deletions pychunkedgraph/app/meshing/v1/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ def handle_get_manifest(table_id, node_id):
return common.handle_get_manifest(table_id, node_id)


@bp.route("/table/<table_id>/manifest/multiscale/<node_id>", methods=["GET"])
@auth_requires_permission(
"view",
public_table_key="table_id",
public_node_key="node_id",
)
@remap_public
def handle_get_multilod_manifest(table_id, node_id):
return common.handle_get_manifest(table_id, node_id, multiscale=True)


## ENQUE MESHING JOBS ----------------------------------------------------------


Expand Down
3 changes: 2 additions & 1 deletion pychunkedgraph/graph/chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,9 +1014,10 @@ def get_proofread_root_ids(
return get_proofread_root_ids(self, start_time, end_time)

def get_earliest_timestamp(self):
from datetime import timedelta
from datetime import timedelta, datetime

for op_id in range(100):
_, timestamp = self.client.read_log_entry(op_id)
if timestamp is not None:
return timestamp - timedelta(milliseconds=500)
return datetime.fromtimestamp(0)
Loading