π Reference Β· information-oriented
Workflow File Organization¶
This reference describes how DynVision organizes files for models, experiments, and results. Understanding this structure helps you locate files, interpret paths, and organize your own experiments.
Overview¶
DynVision uses a hierarchical file organization system that:
- Organizes models by architecture, parameters, and training data
- Groups experimental results by experiment type
- Optionally uses compact test identifiers to avoid filesystem limitations for complex test protocols
- Maintains clear relationships between models and results
Directory Structure¶
Models¶
Models are stored in a hierarchical structure:
models/
{model_name}/
{model_name}{model_args}_{seed}/
{data_name}/
βββ init.pt # Initialized model
βββ trained.pt # Trained model
βββ trained-epoch=149.pt # Intermediate checkpoints (optional)
βββ trained-best.pt # Best checkpoint (optional)
Example:
models/DyRCNNx8/
DyRCNNx8:tsteps=20+dt=2_0042/
imagenette/
βββ init.pt
βββ trained.pt
βββ trained-epoch=149.pt
Components:
{model_name}: Model architecture (e.g.,DyRCNNx8,CorNetRT){model_args}: Model parameters (e.g.,:tsteps=20+dt=2){seed}: Random seed (e.g.,0042){data_name}: Training dataset (e.g.,imagenette,cifar10)
Test Identifier Compression¶
For test protocols with very long parameter specifications, DynVision can optionally use hash-compressed test identifiers to avoid filesystem path length limitations. This is automatically handled by the workflow when needed.
Uncompressed form (default):
reports/uniformnoise/
DyRCNNx8:tsteps=20+dt=2_0042/
imagenette:all_trained/
StimulusNoise:noisetype=uniform+noiselevel=0.2+stim=50/
βββ test_outputs.csv
βββ test_responses.pt
βββ test_outputs.csv.config.yaml
Compressed form (when enabled):
reports/uniformnoise/
DyRCNNx8:tsteps=20+dt=2_0042/
imagenette:all_trained/
abc123ef/ # Hash of test protocol
βββ test_outputs.csv
βββ test_responses.pt
βββ test_outputs.csv.config.yaml # Contains full parameters
How it works:
- Long test specifications are hashed to short identifiers (8 characters)
- Configuration files (
.config.yaml) preserve the full parameter specification - The
process_test_data.pyscript reads parameters from config files, not paths - This is transparent to users - parameters are still accessible
Reports (Test Results)¶
Test results are organized by experiment, model, and test protocol:
reports/
{experiment}/
{model_name}{model_args}_{seed}/
{data_name}:{data_group}_{status}/
{test_identifier}/
βββ test_outputs.csv
βββ test_responses.pt
βββ test_outputs.csv.config.yaml
Example:
reports/uniformnoise/
DyRCNNx8:tsteps=20+dt=2_0042/
imagenette:all_trained/
StimulusNoise:noisetype=uniform+noiselevel=0.2/
βββ test_outputs.csv
βββ test_responses.pt
βββ test_outputs.csv.config.yaml
Components:
{experiment}: Experiment type (e.g.,uniformnoise,response){model_name}{model_args}_{seed}: Full model identifier{data_name}:{data_group}_{status}: Training data and test split{test_identifier}: Test protocol (either{data_loader}{data_args}or hash if compressed)
Processed Results¶
Aggregated results combine multiple test runs:
reports/
{experiment}/
{model_name}{model_args}_{seed}/
{data_name}:{data_group}_{status}/
βββ test_data.csv
Example:
reports/uniformnoise/
DyRCNNx8:tsteps=20+dt=2_0042/
imagenette:all_trained/
βββ test_data.csv # Combined results across noise levels
Figures¶
Visualizations follow the same hierarchy as processed results:
figures/
{experiment}/
{model_name}{model_args}_{seed}/
{data_name}:{data_group}_{status}/
βββ responses.png
βββ performance.png
Example:
figures/uniformnoise/
DyRCNNx8:tsteps=20+dt=2_0042/
imagenette:all_trained/
βββ responses.png
βββ performance.png
Path Patterns¶
Understanding the Naming Convention¶
DynVision uses a consistent syntax for paths:
Model identifiers:
- Arguments start with: and use + separators
- Example: DyRCNNx8:tsteps=20+dt=2_0042
Training/test specifications:
- Colon separates data name from group - Underscore separates group from status - Example:imagenette:all_trained
Data loader specifications:
- Arguments start with: and use + separators
- Example: StimulusNoise:noisetype=uniform+noiselevel=0.2
Common Path Examples¶
Model files:
models/DyRCNNx8:tsteps=20+dt=2_0042/imagenette/trained.pt
models/CorNetRT:dt=2_0000/cifar10/init.pt
models/DyRCNNx4_0015/mnist/trained.pt
Test outputs:
reports/uniformnoise/DyRCNNx8:hash=a7f3c9d4/imagenette:all_trained/StimulusNoise:noisetype=uniform+noiselevel=0.2/test_outputs.csv
reports/response/CorNetRT:dt=2_0000/cifar10:one_init/StimulusDuration:dsteps=50+stim=25/test_outputs.csv
Processed results:
reports/uniformnoise/DyRCNNx8:tsteps=20+dt=2_0042/imagenette:all_trained/test_data.csv
reports/response/CorNetRT:dt=2_0000/cifar10:one_init/test_data.csv
Figures:
figures/uniformnoise/DyRCNNx8:tsteps=20+dt=2_0042/imagenette:all_trained/responses.png
figures/response/CorNetRT:dt=2_0000/cifar10:one_init/performance.png
Experiments¶
Experiment Types¶
Experiments group related tests and analyses. Common experiment types:
| Experiment | Description | Data Loader |
|---|---|---|
response |
Temporal response characterization | StimulusDuration |
uniformnoise |
Uniform noise robustness | StimulusNoise (uniform) |
gaussianblurnoise |
Gaussian blur robustness | StimulusNoise (gaussianblur) |
contrast |
Contrast sensitivity | StimulusContrast |
adaptation |
Temporal adaptation effects | StimulusInterval |
Experiment Organization¶
Each experiment contains:
- Raw test outputs for individual model/test combinations
- Processed data aggregating results across parameters
- Visualizations summarizing findings
Example experiment structure:
uniformnoise/
# Raw outputs
DyRCNNx8:hash=a7f3c9d4/imagenette:all_trained/StimulusNoise:noiselevel=0.2/test_outputs.csv
DyRCNNx8:hash=a7f3c9d4/imagenette:all_trained/StimulusNoise:noiselevel=0.4/test_outputs.csv
...
# Processed results
DyRCNNx8:tsteps=20+dt=2_0042/imagenette:all_trained/test_data.csv
# Visualizations
DyRCNNx8:tsteps=20+dt=2_0042/imagenette:all_trained/responses.png
Working with Files¶
Finding Model Files¶
To locate a trained model:
- Navigate to
models/{model_name}/ - Look for directories matching your parameters
- Check the training dataset subdirectory
- Use
trained.ptfor trained models,init.ptfor initialized
Example:
# Find all trained DyRCNNx8 models
find models/DyRCNNx8/ -name "trained.pt"
# Find models trained on imagenette
find models/ -path "*/imagenette/trained.pt"
Finding Test Results¶
To locate test results:
- Navigate to
reports/{experiment}/ - Find the model directory (may use hash identifier)
- Look for the training/test specification
- Check the data loader subdirectory
Example:
# Find all uniformnoise experiment results
find reports/uniformnoise/ -name "test_outputs.csv"
# Find results for specific model
find reports/uniformnoise/DyRCNNx8:*/ -name "test_outputs.csv"
Resolving Test Parameters¶
To find the original test parameters when using compressed test identifiers:
# Check the config file in the test output directory
cat reports/uniformnoise/DyRCNNx8:tsteps=20_42/imagenette:all_trained/abc123ef/test_outputs.csv.config.yaml
# This contains all resolved parameters including data.* and model.* settings
Navigating the Structure¶
# List all model architectures
ls models/
# List all experiments
ls reports/
# List models for an architecture
ls models/DyRCNNx8/
# List results for an experiment
ls reports/uniformnoise/
# Show full directory tree (limited depth)
tree -L 4 models/DyRCNNx8/
File Formats¶
Model Files (.pt)¶
PyTorch model state dictionaries containing:
- Model parameters (weights and biases)
- Configuration information
- Training metadata
Load a model:
import torch
# Load state dictionary
state_dict = torch.load('models/DyRCNNx8:tsteps=20+dt=2_0042/imagenette/trained.pt')
# Extract components
model_state = state_dict['model_state']
config = state_dict['config']
Test Outputs (.csv)¶
CSV files with test results:
- Model predictions
- Ground truth labels
- Performance metrics
- Per-sample information
Columns typically include:
sample_id: Test sample identifiertrue_label: Ground truth classpredicted_label: Model predictionconfidence: Prediction confidence- Additional experiment-specific columns
Load test outputs:
Test Responses (.pt)¶
PyTorch tensors with layer-wise neural responses:
- Activations from each network layer
- Temporal dynamics (for recurrent models)
- Used for detailed response analysis
Load responses:
Configuration Files (.yaml)¶
YAML files documenting test configuration (automatically created for each test run):
- Data loader parameters (prefixed with
data.) - Model configuration (prefixed with
model.) - Test protocol details
- All resolved parameter values
Location: Alongside test outputs as test_outputs.csv.config.yaml
Load configuration:
import yaml
with open('reports/uniformnoise/.../test_outputs.csv.config.yaml') as f:
config = yaml.safe_load(f)
# Access parameters
noise_level = config['data.noiselevel']
model_tsteps = config['model.tsteps']
Purpose:
- Preserves full parameter specification when test identifiers are compressed
- Enables parameter extraction by
process_test_data.pyscript - Documents exact configuration used for reproducibility
Tips and Best Practices¶
Organizing Custom Experiments¶
When designing custom experiments:
- Choose descriptive names that reflect the experiment's purpose
- Use consistent naming across related experiments
- Document parameters in configuration files
- Group related tests under the same experiment name
Managing Large Parameter Sweeps¶
For experiments with many parameter combinations:
- Test identifier compression handles long test protocol specifications automatically
- Use full model identifiers - they clearly show model configuration
- Check config files when you need to verify exact parameter values
- Let Snakemake manage file organization automatically
- Check processed results (
test_data.csv) for aggregated views across parameter sweeps
Troubleshooting¶
Can't find a file:
- Verify the model identifier matches the trained model
- Check the experiment name
- Ensure the workflow has completed successfully
- Check Snakemake logs for errors
Unclear which parameters were used:
- Check
test_outputs.csv.config.yamlfiles for full parameter specification - Model identifiers in paths show model configuration directly
- Use
greporfindto search for specific parameter values
Need to clean up:
- Remove intermediate files carefully
- Keep model files and final results (
test_data.csv, figures) - Use
snakemake --delete-all-outputto remove workflow outputs - Back up important results before cleanup
Related Resources¶
- Workflow Management Guide - Running experiments with Snakemake
- Configuration Reference - Configuring experiments
- Developer Workflow Guide - Technical implementation details
- File Organization Planning - Design rationale