Shared CasCor candidate-training core (CandidateUnit + activation registry + utils + logging + candidate constants) for the Juniper ML platform — the importable model code the distributed worker needs, decoupled from the cascor server stack.
Project description
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/—utilshelpers +activation(the fullActivationWithDerivative.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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file juniper_cascor_model-0.1.0.tar.gz.
File metadata
- Download URL: juniper_cascor_model-0.1.0.tar.gz
- Upload date:
- Size: 76.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa20f41be1395493976279e640c63c3560d173eabe646cc6a9daf318a84ab23
|
|
| MD5 |
e4456f23068b6da5045f7d5b45818c0f
|
|
| BLAKE2b-256 |
9527216e4e7c41af5f5d8657d7f15ae6698809331414800b6cc43370a89b049b
|
Provenance
The following attestation bundles were made for juniper_cascor_model-0.1.0.tar.gz:
Publisher:
publish-cascor-model.yml on pcalnon/juniper-cascor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniper_cascor_model-0.1.0.tar.gz -
Subject digest:
cfa20f41be1395493976279e640c63c3560d173eabe646cc6a9daf318a84ab23 - Sigstore transparency entry: 1813861673
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-cascor@082bc5bf8c85c6f23b8d044851799768acfa49d2 -
Branch / Tag:
refs/tags/juniper-cascor-model-v0.1.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-cascor-model.yml@082bc5bf8c85c6f23b8d044851799768acfa49d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file juniper_cascor_model-0.1.0-py3-none-any.whl.
File metadata
- Download URL: juniper_cascor_model-0.1.0-py3-none-any.whl
- Upload date:
- Size: 75.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d05790cce4f24624b6065d6e73aaf3e0ab7de6028f4784a860285ebcd5a988c
|
|
| MD5 |
d30a3e04c6aa446db9fa908a498178e6
|
|
| BLAKE2b-256 |
cf88b2000a6b9f5bf561d30f15875de189e66837cae22f60d9ff08ca2ff3491b
|
Provenance
The following attestation bundles were made for juniper_cascor_model-0.1.0-py3-none-any.whl:
Publisher:
publish-cascor-model.yml on pcalnon/juniper-cascor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniper_cascor_model-0.1.0-py3-none-any.whl -
Subject digest:
0d05790cce4f24624b6065d6e73aaf3e0ab7de6028f4784a860285ebcd5a988c - Sigstore transparency entry: 1813861754
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-cascor@082bc5bf8c85c6f23b8d044851799768acfa49d2 -
Branch / Tag:
refs/tags/juniper-cascor-model-v0.1.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-cascor-model.yml@082bc5bf8c85c6f23b8d044851799768acfa49d2 -
Trigger Event:
push
-
Statement type: