Farreras dataset#11
Closed
DanaDagher wants to merge 15 commits into
Closed
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
data/ is gitignored so datanetAPI.py was missing in Colab. Copied to traffic_models/farreras/ and updated _load_datanet_api() to find it there automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the old 33-cell notebook (duplicated forward pass in every model) with a clean 25-cell version. All three models (Delay/Jitter/Loss) inherit from a single RouteNetFermi base that encapsulates the 8-step message-passing loop; subclasses add only their prediction head. No unicode or encoding issues. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The backslash line-continuation in the !git clone command was doubled (JSON-escaped), causing bash to see a literal double-backslash and then treat the URL as a second argument -- hence 'Too many arguments'. Fix: put the entire clone command on one line. Add a second isdir check after the clone so a failed clone raises RuntimeError immediately instead of silently continuing to the sys.path block. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the first Colab run fails mid-cell (e.g. broken git clone), Python caches a NullImporter for the non-existent path in sys.path_importer_cache. On re-run in the same kernel the clone now succeeds, but Python still uses the stale cache and raises ModuleNotFoundError even though the file exists. Fix: call importlib.invalidate_caches() right before the import so Python rescans all sys.path entries. Also removed the 'if p not in sys.path' guard so the insert always happens (duplicate entries are harmless). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
set_files_to_process uses 'tuple' as the loop variable, shadowing the built-in type. This makes 'type(tuple) is tuple' evaluate as type(element) is element, which is always False, so the method always raises DatanetException regardless of what arguments are passed. Fix: write directly to tool._selected_tuple_files -- the same private attribute that __iter__ reads (lines 892-895 of datanetAPI.py). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the repo is already cloned (same Colab session), the setup cell now runs 'git pull' instead of skipping, ensuring any fixes pushed since the last clone are reflected without a full restart. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lford The original cell iterated every scalar value in Python across all 56 training tars -- 30-60 min on Drive I/O. 500 simulations from 10 tars is statistically sufficient for z-scores to converge (CLT), and the batch-level vectorized Welford update runs in ~3-5 min instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
No description provided.