Metadata-Version: 2.4
Name: juniper-cascor-worker
Version: 0.1.0
Summary: Remote candidate training worker for the JuniperCascor neural network service
Author: Paul Calnon
License-Expression: MIT
Project-URL: Homepage, https://github.com/pcalnon/juniper-cascor-worker
Project-URL: Repository, https://github.com/pcalnon/juniper-cascor-worker
Project-URL: Issues, https://github.com/pcalnon/juniper-cascor-worker/issues
Keywords: juniper,cascade-correlation,neural-network,distributed-training
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24.0
Requires-Dist: torch>=2.0.0
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Requires-Dist: pytest-timeout>=2.2.0; extra == "test"
Provides-Extra: dev
Requires-Dist: juniper-cascor-worker[test]; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: flake8>=7.0.0; extra == "dev"
Dynamic: license-file

# juniper-cascor-worker

Remote candidate training worker for the JuniperCascor cascade correlation neural network service.

## Overview

This package enables distributed candidate training by connecting to a CasCor
CandidateTrainingManager and processing training tasks on remote hardware.

## Installation

```bash
pip install juniper-cascor-worker
```

**Note:** This package requires the JuniperCascor source code to be importable
on the worker machine (the worker runs CasCor's training code locally).

## CLI Usage

```bash
# Basic usage
juniper-cascor-worker --manager-host 192.168.1.100 --manager-port 50000 --workers 4

# With CasCor source path
juniper-cascor-worker --manager-host 192.168.1.100 --cascor-path /opt/juniper-cascor/src --workers 8

# Full options
juniper-cascor-worker \
    --manager-host 192.168.1.100 \
    --manager-port 50000 \
    --authkey my-secret-key \
    --workers 4 \
    --mp-context forkserver \
    --log-level INFO
```

## Python API

```python
from juniper_cascor_worker import CandidateTrainingWorker, WorkerConfig

config = WorkerConfig(
    manager_host="192.168.1.100",
    manager_port=50000,
    authkey="my-secret-key",
    num_workers=4,
)

with CandidateTrainingWorker(config) as worker:
    worker.start()
    # Workers process tasks from the remote queue
    input("Press Enter to stop...")
    worker.stop()
```

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `CASCOR_MANAGER_HOST` | Manager hostname | 127.0.0.1 |
| `CASCOR_MANAGER_PORT` | Manager port | 50000 |
| `CASCOR_AUTHKEY` | Authentication key | juniper |
| `CASCOR_NUM_WORKERS` | Worker count | 1 |
| `CASCOR_MP_CONTEXT` | Multiprocessing method | forkserver |

## Juniper Ecosystem

This package is part of the Juniper Cascade Correlation Neural Network Research Platform.

| Package | Description | Install |
|---------|-------------|---------|
| [juniper-data-client](https://github.com/pcalnon/juniper-data-client) | Dataset service client | `pip install juniper-data-client` |
| [juniper-cascor-client](https://github.com/pcalnon/juniper-cascor-client) | Neural network service client | `pip install juniper-cascor-client` |
| [juniper-cascor-worker](https://github.com/pcalnon/juniper-cascor-worker) | Distributed training worker (this package) | `pip install juniper-cascor-worker` |

## License

MIT License - see [LICENSE](LICENSE) for details.
