-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph Snapshot Feature: Store & Retrieve Graph History #600
Open
Susmita331
wants to merge
26
commits into
codezonediitj:main
Choose a base branch
from
Susmita331:feature/graph-time-series
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Graph Snapshot Feature: Store & Retrieve Graph History #600
Susmita331
wants to merge
26
commits into
codezonediitj:main
from
Susmita331:feature/graph-time-series
Conversation
This file contains 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
…ng real-time timestamps.
Implemented list_snapshots() and attached snapshot methods to Graph, ensuring timestamp-based snapshots across all graph types.
…uture possibilities
@czgdp1807 @Kishan-Ved Please review the code and give feedback |
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.
This PR introduces timestamped graph snapshots, allowing users to store, retrieve, and track historical graph states for debugging, fraud detection, and network analysis.
Instead of relying on cached data (pycache), this implementation ensures explicit snapshot storage, making graph versioning deterministic and retrievable across sessions.
##Key Features
Snapshot Storage & Retrieval
Saves graph states with real-time timestamps (add_snapshot()).
Restores a past state with get_snapshot(timestamp).
Lists all stored timestamps via list_snapshots().
Why This Over pycache?
pycache is for Python bytecode compilation, not structured historical tracking.
This approach persists meaningful snapshots, independent of runtime cache invalidation.
Ensures predictable retrieval of graph states, even after code modifications.
Edge & Adjacency List Fixes
Ensures edge weights and relationships persist across snapshots.
Fixes deep-copy issues with GraphEdge.
Tests & Validation
Added test_snapshot_creation, test_snapshot_retrieval, and test_invalid_snapshot.
All tests pass successfully with pytest --cov=./.
##Documentation
Added timestamped_graph.md detailing:
Feature usage & API methods
Real-world applications
Future improvements (e.g., matrix support, optimized storage).