mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
Mechanically re-derived: bin/debrand runs over a fresh import of posthog/posthog@fa1a9a60d4 (2026-08-06). The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md and the squashed initial migration are restored from the shipped tree, same as the previous import. The prune's import-closure guard kept 21 products the new core now imports; dropping them is a refactor now, recorded rather than forced.
32 lines
1.3 KiB
Python
32 lines
1.3 KiB
Python
from typing import TYPE_CHECKING
|
|
|
|
from django.apps import AppConfig
|
|
|
|
if TYPE_CHECKING:
|
|
from products.exports.backend.models.exported_asset import ExportedAsset
|
|
|
|
|
|
def _export_dataset_jsonl(asset: "ExportedAsset") -> None:
|
|
from products.ai_observability.backend.dataset_export import ( # noqa: PLC0415 -- keeps dataset export dependencies off the Django startup path
|
|
export_dataset_jsonl,
|
|
)
|
|
|
|
export_dataset_jsonl(asset)
|
|
|
|
|
|
class AIObservabilityConfig(AppConfig):
|
|
default_auto_field = "django.db.models.BigAutoField"
|
|
name = "products.ai_observability.backend"
|
|
label = "ai_observability"
|
|
|
|
def ready(self) -> None:
|
|
# Connect the Evaluation activity-log receiver at app-population. It lives in a light
|
|
# activity_logging module (not the evaluations viewset, which pulls scipy / google.genai /
|
|
# the ai_observability Temporal worker) so wiring it here stays off the django.setup() path.
|
|
from products.ai_observability.backend import activity_logging # noqa: F401, PLC0415
|
|
from products.exports.backend.facade.exporters import ( # noqa: PLC0415 -- registration belongs at app population
|
|
register_export_format_handler,
|
|
)
|
|
|
|
register_export_format_handler("application/x-ndjson", _export_dataset_jsonl)
|