-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Implement complete MeshGraphNets sphere_dynamic example with 3D visualization and advanced metrics #650
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
Open
nsrawat0333
wants to merge
5
commits into
google-deepmind:master
Choose a base branch
from
nsrawat0333:solve-meshgraphnets-sphere-dynamic-529
base: master
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
Conversation
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
- Update aiohttp to address potential security vulnerabilities - Maintains compatibility with existing codebase - Addresses dependency security recommendations
…ation - Created comprehensive solution for convenient processed WikiText-103 dataset access - Added two complementary tools: * setup_wikitext103_dataset.py: Lightweight, dependency-free solution * create_processed_wikitext103_dataset.py: Full-featured with WikiGraphs integration - Features: * One-command dataset download and processing * Automatic vocabulary creation with configurable thresholds * Comprehensive validation and integrity checks * Ready-to-use examples and documentation * Cross-platform compatibility - Created WIKITEXT103_SETUP_GUIDE.md with detailed usage instructions - Updated main README.md with quick start section - Addresses 4+ year old Issue google-deepmind#40 from @cp-pc Files added: - wikigraphs/scripts/setup_wikitext103_dataset.py (400+ lines) - wikigraphs/scripts/create_processed_wikitext103_dataset.py (600+ lines) - wikigraphs/WIKITEXT103_SETUP_GUIDE.md (comprehensive guide) - ISSUE_40_SOLUTION.md (GitHub issue response) This solution transforms WikiText-103 setup from complex multi-step process to simple one-command operation, significantly improving researcher productivity.
- Enhanced TensorFlow session isolation between different DM21 functionals - Fixed graph context issues causing all functionals to default to DM21M - Added proper cleanup methods to prevent resource leaks - Added error handling and validation for model loading - Includes comprehensive test suite and documentation Technical changes: - Modified NeuralNumInt.__init__ to explicitly bind sessions to graphs - Added __del__ and close() methods for proper resource management - Enhanced _build_graph with better error handling and validation - Added test script to validate fix and demonstrate correct usage Fixes: google-deepmind#589
- Added comprehensive tensorflow_compatibility.py module with: * Automatic TensorFlow version detection (1.x vs 2.x) * GraphKeys compatibility layer for TF 2.x environments * CleverHans dependency handling including tensorflow-addons mock * Detailed environment diagnostics and troubleshooting guidance - Updated quick_eval_cifar.py to import compatibility layer before CleverHans - Updated requirements.txt with modern TensorFlow 2.x support and dependency guidance - Added comprehensive test_compatibility.py with full test coverage - Added detailed README_ISSUE_46_FIX.md documentation Resolves the 'tensorflow has no attribute GraphKeys' AttributeError that occurs when running unsupervised adversarial training with modern TensorFlow 2.x versions. The solution maintains backward compatibility with TensorFlow 1.15 while enabling researchers to use modern TensorFlow installations with the CleverHans library. Tested on: Python 3.12, TensorFlow 2.18.1, CleverHans 3.1.0
…c implementation - Added sphere_model.py: Dedicated model architecture for sphere dynamics * 3D position and velocity handling for spherical geometry * Verlet integration for stable dynamics simulation * Boundary condition handling for kinematic vs normal nodes - Added sphere_eval.py: Comprehensive evaluation metrics for spheres * Standard MSE metrics at multiple prediction horizons * Sphere-specific metrics: center of mass tracking, volume preservation * Enhanced trajectory analysis for spherical deformations - Added plot_sphere.py: Advanced visualization for sphere trajectories * Side-by-side ground truth vs prediction comparison * Real-time MSE error display during animation * Export capabilities (GIF, frames, data) * Interactive 3D visualization with rotation and zoom - Updated run_model.py: Added --model=sphere support * Integrated sphere model into existing training/evaluation pipeline * Configured appropriate parameters for sphere dynamics * Seamless integration with existing cloth/cfd workflows - Added comprehensive documentation: * SPHERE_DYNAMIC_GUIDE.md: Complete usage guide and technical details * example_sphere_usage.py: Demonstration script with sample data * test_sphere_implementation.sh: Validation and testing script Resolves the 4-year-old request for sphere_dynamic example code from the MeshGraphNets paper. Users can now train, evaluate, and visualize sphere dynamics using the same interface as cloth and CFD simulations. Usage: python -m meshgraphnets.run_model --mode=train --model=sphere --dataset_dir=sphere_dynamic python -m meshgraphnets.run_model --mode=eval --model=sphere --rollout_path=results.pkl python -m meshgraphnets.plot_sphere --rollout_path=results.pkl Technical implementation includes volume preservation metrics, center of mass tracking, and specialized handling of 3D spherical deformations while maintaining compatibility with the existing MeshGraphNets framework.
Dooray! Failure Notice
Failure Notice
Your message sent to
***@***.***)
has failed to be delivered.
Please refer to the below for details.
* Recipient :
***@***.***)
* Sent time :
2025-08-11T21:56:55
* Subject :
[google-deepmind/deepmind-research] Implement complete MeshGraphNets sphere_dynamic example with 3D visualization and advanced metrics (PR #650)
* Remote host said :
Your mail was denied from the receiver.
This message was sent from a notification-only address that cannot accept incoming email.
For more information, please contact ***@***.***
© Dooray!.
|
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.
Resolves Issue #529: Provides the missing sphere_dynamic implementation for MeshGraphNets paper examples.
Problem: Users have been requesting sphere_dynamic example code since 2024, but only cloth and CFD implementations were available in the official repository.
Solution Highlights:
sphere_model.py
with specialized 3D dynamics handlingsphere_eval.py
with volume preservation and center-of-mass metricsplot_sphere.py
with side-by-side comparison and GIF exportrun_model.py
to support--model=sphere
parameterTechnical Implementation:
Files Added:
sphere_model.py
(93 lines) - Core model architecturesphere_eval.py
(82 lines) - Evaluation metrics and rollout functionsplot_sphere.py
(101 lines) - Advanced 3D visualization with GIF exportSPHERE_DYNAMIC_GUIDE.md
(200+ lines) - Complete documentationexample_sphere_usage.py
- Working demonstration scripttest_sphere_implementation.sh
- Validation testingUsage: