Version: 0.3.17 | Changelog | Full Documentation
Juniper is an AI/ML research platform for investigating dynamic neural network architectures and novel learning paradigms. The project emphasizes ground-up implementations from primary literature, enabling a more transparent exploration of fundamental algorithms.
This service is part of the Juniper ecosystem. Verified compatible versions:
| juniper-data | juniper-cascor | juniper-canopy | data-client | cascor-client | cascor-worker |
|---|---|---|---|---|---|
| 0.4.x | 0.3.x | 0.2.x | >=0.3.1 | >=0.1.0 | >=0.1.0 |
For full-stack Docker deployment and integration tests, see juniper-deploy.
JuniperCascor is the training service of the Juniper ecosystem. It depends on JuniperData for datasets and is monitored by juniper-canopy in real-time.
┌─────────────────────┐ REST+WS ┌──────────────────────┐
│ juniper-canopy │ ◄──────────────► │ JuniperCascor │
│ Dashboard │ │ Training Svc │
│ Port 8050 │ │ Port 8200 ◄── here │
└──────────┬──────────┘ └──────────┬───────────┘
│ REST │ REST
▼ ▼
┌──────────────────────────────────────────────────────────────┐
│ JuniperData │
│ Dataset Service · Port 8100 │
└──────────────────────────────────────────────────────────────┘
API: REST + WebSocket (/ws/training, /ws/control). All responses use a {status, data, meta} envelope.
| Service | Relationship | Notes |
|---|---|---|
| juniper-data | JuniperCascor fetches datasets from here | Set JUNIPER_DATA_URL |
| juniper-canopy | Monitors CasCor training in real-time | Connects to /ws/training |
| juniper-cascor-client | PyPI REST+WS client library | pip install juniper-cascor-client |
| Variable | Required | Default | Description |
|---|---|---|---|
JUNIPER_DATA_URL |
Yes | http://localhost:8100 |
JuniperData service URL |
CASCOR_HOST |
No | 0.0.0.0 |
Listen address |
CASCOR_PORT |
No | 8200 |
Service port |
CASCOR_LOG_LEVEL |
No | INFO |
Log verbosity (DEBUG, INFO, WARNING) |
# Standalone:
docker build -t juniper-cascor:latest .
docker run -p 8200:8200 -e JUNIPER_DATA_URL=http://host.docker.internal:8100 juniper-cascor:latest
# Full stack:
git clone https://github.com/pcalnon/juniper-deploy.git # (private repository)
cd juniper-deploy && docker compose up --buildThe requirements.lock file pins exact dependency versions for reproducible Docker builds. The pyproject.toml retains flexible >= ranges for local development.
Regenerate after changing dependencies in pyproject.toml:
uv pip compile pyproject.toml --extra ml --extra api --extra observability --extra juniper-data \
--extra-index-url https://download.pytorch.org/whl/cpu \
--index-strategy unsafe-best-match \
--no-emit-package torch -o requirements.lockPyTorch is excluded from the lockfile and installed separately in the Dockerfile from the CPU-only index.
- Python 3.11 or later (3.14 recommended)
- Conda package manager
# Clone the repository
git clone https://github.com/pcalnon/juniper-cascor.git
cd juniper-cascor
# Create and activate conda environment
conda env create -f conf/conda_environment.yaml
conda activate JuniperCascor
# Run the spiral problem evaluation
cd src && python main.py# Fast tests (recommended for development)
cd src/tests && bash scripts/run_tests.bash
# Or using pytest directly
pytest -m "not slow" -vFor detailed installation instructions, see the Quick Start Guide.
juniper_cascor: Cascade Correlation Neural Network
- Reference implementation from foundational research (Fahlman & Lebiere, 1990)
- Designed for flexibility, modularity, and scalability
- Enables investigation of constructive learning algorithms
juniper_canopy: Interactive Research Interface
- Research-driven monitoring and visualization environment
- Delivers novel observations through real-time network introspection
- Transforms metrics into insights, accelerating experimental iteration
| Category | Description |
|---|---|
| Documentation Overview | Complete navigation guide to all docs |
| Documentation Index | Quick documentation index |
| Quick Start | Get up and running quickly |
| User Manual | Comprehensive usage guide |
| API Reference | Complete API documentation |
| Testing Guide | Testing instructions |
| CI/CD Guide | Continuous integration |
| Source Code Guide | Contributor documentation |
| Constants Reference | Configuration constants |
from cascade_correlation.cascade_correlation import CascadeCorrelationNetwork
from cascade_correlation.cascade_correlation_config.cascade_correlation_config import CascadeCorrelationConfig
import torch
# Create configuration
config = CascadeCorrelationConfig(
input_size=2,
output_size=2,
random_seed=42
)
# Create and train network
network = CascadeCorrelationNetwork(config=config)
history = network.fit(x_train, y_train, epochs=100)
# Evaluate
accuracy = network.get_accuracy(x_test, y_test)
print(f"Test accuracy: {accuracy:.2%}")
# Save/Load
network.save_to_hdf5("model.h5")
loaded = CascadeCorrelationNetwork.load_from_hdf5("model.h5")Juniper prioritizes transparency over convenience and understanding over abstraction. By implementing algorithms from first principles, the platform provides researchers with increased visibility into network behavior, enabling a more rigorous and more controlled investigation of learning dynamics and architectural innovations.
The CascadeCorrelationNetwork class is NOT thread-safe. Do not share network instances between threads without proper synchronization. For concurrent training scenarios, create separate network instances per thread. The internal multiprocessing for candidate training is handled within the class and does not require external synchronization.
| Repository | Description |
|---|---|
| juniper-cascor | CasCor neural network training service (this repo) |
| juniper-canopy | Real-time monitoring dashboard |
| juniper-data | Dataset generation service |
| juniper-data-client | PyPI: juniper-data-client |
| juniper-cascor-client | PyPI: juniper-cascor-client |
| juniper-cascor-worker | PyPI: juniper-cascor-worker |
MIT License - see LICENSE for details.
Contributions are welcome. Please see the Source Code Guide for development setup and coding conventions.