Text Classification
MLX
Safetensors
Laya
Polish
English
devops
decision-model
apple-silicon
experimental
synthetic-data
claude-code
litellm
Instructions to use tebebe/laya-devops-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use tebebe/laya-devops-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download tebebe/laya-devops-mlx --local-dir laya-devops-mlx
- Laya
How to use tebebe/laya-devops-mlx with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 1,129 Bytes
aa73ff9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | """Persist a validation-selected threshold without granting execution permission."""
import json
def load_allow_threshold(model, override=None):
if override is not None:return override
path=model/'operating-policy.json'
if not path.exists():return .90
policy=json.loads(path.read_text());threshold=float(policy['allow_threshold'])
if not 0<=threshold<=1.0001:raise ValueError('Invalid saved operating threshold')
if (threshold>1)!=bool(policy.get('disable_automatic_allow',False)):
raise ValueError('Inconsistent automatic ALLOW disabling policy')
return threshold
def save_experimental_policy(model,validation):
policy=dict(allow_threshold=validation['operating_threshold'],disable_automatic_allow=validation['operating_threshold']>1,
selected_on='validation_only',validation_sha256=validation['dataset_sha256'],validation_passed=validation['readiness']['passed'],
criteria_passed=False,status='experimental_until_test_and_audit_pass',production_execution_enabled=False)
(model/'operating-policy.json').write_text(json.dumps(policy,indent=2)+'\n')
|