From training script to compliance-approved model
A 4-step walkthrough of how Cognify instruments your existing fine-tuning pipeline without requiring any changes to your model artifacts or training infrastructure.
SDK instrumentation — one import, one init call
Drop cognify-sdk into your training environment. Import it alongside your training framework. One init() call points it at your Cognify workspace. Your existing training loop runs unchanged.
View quickstartimport torch
from transformers import Trainer
import cognify # ← one import
# One init call — points to your workspace
cognify.init(
workspace="meridian-clinical-nlp",
api_key=os.environ["COGNIFY_KEY"],
run_name="clinical-ner-v2-ft"
)
# Your existing training loop — unchanged
trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_ds,
)
trainer.train() # Cognify hooks in automatically
Automatic versioning at every checkpoint
As your training loop runs, Cognify intercepts dataset reads, logs hyperparameters, and snapshots checkpoint metadata at each save. No manual log() calls needed — the SDK hooks into your framework's native checkpoint events.
Compliance review in the Cognify dashboard
When a training run completes, compliance teams get a notification. They review the lineage graph, check eval benchmarks against policy thresholds, and approve or request changes — all inside Cognify's review interface.
Export audit package, deploy with confidence
Once approved, export the complete audit package. Your compliance team has signed off. Your ML team has an artifact they can confidently deploy. The audit trail is locked, immutable, and archived.
Start your first audit-ready run# Export compliance package — one call
pkg = cognify.export_audit(
run_id="cgnf-run-447",
formats=["pdf", "json", "xlsx"],
template="eu_ai_act"
)
# Outputs:
# ✓ model_card_run447.pdf
# ✓ data_provenance_run447.json
# ✓ eval_benchmark_summary.xlsx
# ✓ training_config_attestation.pdf
print(pkg.status) # → "AUDIT_SEALED"