Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates repository documentation and folder layout, bumps a couple of Python dependencies, and cleans the src/analysis/ area by removing several older sinusoid/ElmanRNN example scripts while adding a new gaussianity-check script.
Changes:
- Added
src/analysis/test_gaussianity.pyfor normality testing/visualization of hidden activations. - Removed legacy sinusoid example scripts (
src/analysis/RNN.py,src/analysis/main.py,src/analysis/compute_pid_sinusoid.py) as part of thesrc/analysiscleanup. - Updated README structure + added placeholder directories via
.gitkeep, and bumpednumpy/matplotlibversions inrequirements.txt.
Reviewed changes
Copilot reviewed 6 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/analysis/test_gaussianity.py | New gaussianity testing script (currently references removed modules/old results paths). |
| src/analysis/RNN.py | Removed ElmanRNN definition (impacts scripts still importing RNN). |
| src/analysis/PID_figures.py | Commented out PID bar saving and appended gaussianity plotting code (currently depends on removed/relocated artifacts). |
| src/analysis/main.py | Removed training + artifact generation script for the sinusoid example. |
| src/analysis/compute_pid_sinusoid.py | Removed sinusoid PID computation driver script. |
| requirements.txt | Updated pinned versions for numpy and matplotlib. |
| README.md | Updated repo structure documentation to reflect current layout and results/figures subfolders. |
| results/stimulus_coherences/perceptual/.gitkeep | Ensures results subfolder exists in repo. |
| results/stimulus_coherences/context/.gitkeep | Ensures results subfolder exists in repo. |
| figures/pid/.gitkeep | Ensures figures subfolder exists in repo. |
| figures/learning_curves/.gitkeep | Ensures figures subfolder exists in repo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+37
to
+45
| import torch | ||
| import numpy as np | ||
| import matplotlib.pyplot as plt | ||
| from scipy import stats | ||
| from RNN import ElmanRNN | ||
|
|
||
| # Define directories | ||
| dir = "src/analysis/results/" | ||
|
|
Comment on lines
+210
to
+212
| end_time = time.time() | ||
| print(f"\nTotal run time: {end_time - start_time:.2f} seconds") | ||
| print(f"Figures saved to {dir}") |
Comment on lines
+47
to
+52
| # Measure Gaussianity of hidden unit activations across all timesteps, for each unit. | ||
| import torch | ||
| from scipy import stats | ||
|
|
||
| h = torch.load(f'{dir}hidden_Sinusoid.pt', weights_only=True).numpy() # (300, 10) | ||
| n_units = h.shape[1] |
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.