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,237 Bytes
aa73ff9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | """Load only the explicitly allowed, hash-verified local preprocessing code."""
import hashlib
import importlib
from pathlib import Path
ROOT=Path(__file__).resolve().parent
ALLOWED={'command_normalizer':set(),'command_canonicalizer':{'command_normalizer.py'},'command_normalizer_v2':set(),'command_canonicalizer_v2':{'command_normalizer_v2.py'}}
def load_preprocessor(metadata):
name=metadata.get('module')
if name not in ALLOWED:raise ValueError('Unrecognized input preprocessing module')
file=ROOT/(name+'.py')
if hashlib.sha256(file.read_bytes()).hexdigest()!=metadata.get('sha256'):raise ValueError('Input preprocessing source mismatch')
dependencies=metadata.get('dependencies',{})
if set(dependencies)!=ALLOWED[name]:raise ValueError('Input preprocessing dependencies mismatch')
for filename,expected in dependencies.items():
if hashlib.sha256((ROOT/filename).read_bytes()).hexdigest()!=expected:raise ValueError('Input preprocessing dependency source mismatch')
module=importlib.import_module(name)
if Path(module.__file__).resolve()!=file or module.VERSION!=metadata.get('version'):raise ValueError('Input preprocessing module identity mismatch')
return module.normalize_state
|