Skip to main content

juniper-cascor-model

Shared CasCor candidate-training core for the Juniper ML platform — the importable model code a distributed CasCor worker needs to execute a candidate unit, decoupled from the cascor server / training stack.

Why this exists

juniper-cascor-worker executes candidate-training tasks dispatched by juniper-cascor. To do that it must be able to import CandidateUnit and its dependencies — but the worker container historically had no cascor codebase, no candidate-training deps, and several environment mismatches, so every remote candidate crashed on import (ModuleNotFoundError: candidate_unit). See juniper-cascor-worker#97 (CW-05).

juniper-cascor-model is the canonical fix (CW-05 Approach A): a single PyPI package the worker depends on, instead of needing the cascor source tree on sys.path.

What's inside

Extracted verbatim from juniper-cascor/src (zero coupling to the server/training stack — no FastAPI, no cascade_correlation, no api):

  • candidate_unit/ — CandidateUnit (the trainable candidate node).
  • utils/ — utils helpers + activation (the full ActivationWithDerivative.ACTIVATION_MAP).
  • log_config/ — the shared logger (made deployment-agnostic, see below).
  • cascor_constants/ — candidate-relevant constants.

Per the migration plan these ship under the same top-level package names cascor uses, so the canonical imports resolve verbatim.

Install

pip install juniper-cascor-model           # core (numpy, torch, PyYAML)
pip install juniper-cascor-model[full]     # + optional dev/debug helpers (dill, columnar)

Usage

from candidate_unit.candidate_unit import CandidateUnit
from utils.activation import ActivationWithDerivative

assert "Tanh" in ActivationWithDerivative.ACTIVATION_MAP   # 33 activations, both casings

Deployment-agnostic logging

The shared logger writes a log file under a source-relative logs/ directory by default. In containers where that path is not writable, set JUNIPER_CASCOR_LOG_DIR to a writable directory — or leave it unset and file logging degrades to console-only rather than raising (a missing log file never fails a candidate-training task). Log level is controlled by JUNIPER_CASCOR_LOG_LEVEL (legacy CASCOR_LOG_LEVEL still honored).

Relationship to juniper-cascor

This package is extracted from juniper-cascor/src and kept byte-identical to it by a drift-guard test (the candidate-critical modules), pending juniper-cascor itself adopting the package (CW-05 plan Wave 2). Until then, cascor remains the upstream source of truth for the candidate-training code.

License

MIT — see LICENSE.

Metadata

Release files for juniper-cascor-model 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for juniper-cascor-model 0.1.0
File Size Uploaded
juniper_cascor_model-0.1.0.tar.gz 76.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for juniper-cascor-model 0.1.0
File Interpreter ABI Platform
juniper_cascor_model-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 152.6 kB

Release files / juniper_cascor_model-0.1.0.tar.gz

Download URL juniper_cascor_model-0.1.0.tar.gz
Size 76.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cfa20f41be1395493976279e640c63c3560d173eabe646cc6a9daf318a84ab23
BLAKE2b-256 checksum
How to use checksums
9527216e4e7c41af5f5d8657d7f15ae6698809331414800b6cc43370a89b049b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Release files / juniper_cascor_model-0.1.0-py3-none-any.whl

Download URL juniper_cascor_model-0.1.0-py3-none-any.whl
Size 75.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d05790cce4f24624b6065d6e73aaf3e0ab7de6028f4784a860285ebcd5a988c
BLAKE2b-256 checksum
How to use checksums
cf88b2000a6b9f5bf561d30f15875de189e66837cae22f60d9ff08ca2ff3491b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page