Skip to main content

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/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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

juniper_cascor_model-0.1.0.tar.gz (76.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

juniper_cascor_model-0.1.0-py3-none-any.whl (75.8 kB view details)

Uploaded Python 3

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

Hashes for juniper_cascor_model-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cfa20f41be1395493976279e640c63c3560d173eabe646cc6a9daf318a84ab23
MD5 e4456f23068b6da5045f7d5b45818c0f
BLAKE2b-256 9527216e4e7c41af5f5d8657d7f15ae6698809331414800b6cc43370a89b049b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file juniper_cascor_model-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for juniper_cascor_model-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d05790cce4f24624b6065d6e73aaf3e0ab7de6028f4784a860285ebcd5a988c
MD5 d30a3e04c6aa446db9fa908a498178e6
BLAKE2b-256 cf88b2000a6b9f5bf561d30f15875de189e66837cae22f60d9ff08ca2ff3491b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page