Add streaming session separability assessment tool - #284
Draft
CodyCBakerPhD wants to merge 35 commits into
Draft
Conversation
Produces histogram + CDF plots of inter-request intervals per IP (log scale) and gap-beyond-bin distributions for 10min/30min/1hr/2hr candidate session timeouts, to assess whether a natural dead-zone exists in the data that would justify a formal 'view session' definition for streaming requests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015rd4wDp52P3Ryv3QqMJ4Z9
for more information, see https://pre-commit.ci
CodyCBakerPhD
commented
Jun 23, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
=======================================
Coverage 78.58% 78.58%
=======================================
Files 41 41
Lines 1742 1742
=======================================
Hits 1369 1369
Misses 373 373
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
- --exclude-asset/--exclude-asset-file to drop bot-hammered testing assets - Attribute guard-band intervals to assets/IPs, flag same-asset (bot) fraction - Relabel 'decades' as 'orders of magnitude' to avoid time confusion
… testing_blobs.txt - find_min_density_band: log-binned minimum-density valley (zero-density was degenerate at real data volumes) with per-bin profile and suggested T - sweep_guard_bands: coarse log-spaced ambiguity sweep across 1m-7d with a visual bar so the valley is obvious end-to-end - Commit scripts/testing_blobs.txt exclusion list of bot-dominated blobs
Reproducible join of dandi-cache structural metrics (groups, datasets, Sackin index), S3 asset sizes, and dandi/access-summaries request/download counts, plus the three relationship figures and a correlation summary. - build_dataset.py: fetch + join content-id -> (dandiset,path) -> access counts, and S3 HEAD for asset sizes, into a single CSV - plot_relationships.py: structure pairplot, consumption-mode split, and size-vs-streaming with size-controlled partial for complexity - README documenting sources, usage, and findings - Allowlist 'sackin' in codespell (proper name, not a typo)
…-property normalization
Explains why the binary-tree baseline behind the Sackin normalization is inappropriate for high-fan-out HDF5 trees, and surveys degree-agnostic alternatives (total cophenetic index, B1/B2 entropy, out-degree and depth descriptors) with a size-conditioned standardization recommendation.
… empirical check to supplement - build_dataset.py/plot_relationships.py: join and plot cophenetic index and out-degree caches (derivatives branch) in place of the binary-baseline Sackin - Regenerate figures with cophenetic index (log-log); update N to 1,829 - White paper now features the total cophenetic index; Sackin-specific critique (binary baseline, negative values) and an empirical check (cophenetic/out-degree vs access match Sackin) moved to SUPPLEMENT_tree_metrics.md - Commit a snapshot access_structure.csv for figure provenance
Document that S3 logs blend all access methods (web/API/ROS3/fsspec/Neurosift), all logging as REST.GET.OBJECT, so meta-statistics cannot be partitioned by method and streaming-request volume conflates interest with client chunking/caching — reinforcing the session-based view unit over raw request counts.
… resilient - build_dataset.py: retry transient network/5xx errors via a urllib3 Retry session (a ConnectionReset had killed the full run); route all GET/HEAD through it - Full end-to-end rebuild: 4,493 files across 253 dandisets (was 1,829 overlap) - plot_relationships.py: cophenetic panels on log-y; regenerate all three figures - Update white paper / README / supplement numbers to the full-set values (size vs streaming +0.75, download fraction −0.37, orthogonality −0.11, etc.) - Refresh committed snapshot access_structure.csv
… mode to session analysis - analysis/visitor_threshold_findings.md: no request-count valley exists; recommend number_of_viewers = unique IPs with >=1 streaming session (categorical stream-vs-not split) alongside the total unique-requester count - assess_streaming_sessions.py --per-asset: compute gaps within each (IP, asset) group to recalibrate the session timeout on the scope the per-asset number_of_views metric actually uses (vs the cross-asset calibration)
…subsection to white paper - assess_streaming_sessions.py: in --per-asset mode the same-asset fraction is a tautology (always 100%), so stop labeling it a 'bot signature'; report only the top contributing (candidate-bot) assets - White paper 2.3: same-asset gap distribution is diurnal-dominated (no sub-hour valley; GA's 30 min does not transfer), 8h sits near an ambiguity peak under the per-asset scope, but the view is heavily periodic-bot contaminated so exact peak/valley locations are preliminary pending expanded bot exclusion - Move uploaded session_assessment_per_asset.png into figures/
… label validation) Scores every (IP, asset) time series for the metronomic monitoring signature (gap CV + dominant-period fraction + persistence), and validates detection against two ground-truth labels: DANDI testing datasets/assets and GitHub Actions IP ranges (api.github.com/meta). Reports flagged-activity fraction, precision/recall vs the labels, a CV-threshold sweep, and the top offenders.
…d of repeatable flag
…tion ground truth)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new analysis tool (
assess_streaming_sessions.py) that evaluates the separability of user sessions in streaming HTTP requests by analyzing inter-request intervals and testing candidate session timeout windows.Key Changes
assess_streaming_sessions.py— a standalone tool for assessing session separability in streaming (HTTP 206, download=0) requestsImplementation Details
https://claude.ai/code/session_015rd4wDp52P3Ryv3QqMJ4Z9