c663f9d6e8
Funciones nuevas en python/functions/datascience/: - gliner_load_model: carga + cachea modelo GLiNER por (name, device). device='auto' resuelve a cuda/cpu segun torch.cuda.is_available, sin fallar si torch no esta instalado. ImportError claro si falta gliner. - extract_entities_gliner: contrato drop-in de extract_entities_llm (mismo entity_schema, mismo list[EntityCandidate]). El caller inyecta el modelo (cargado UNA vez por proceso). Anota offsets start/end en attributes para reconciliar con extract_iocs (issue 0040). Diferencias vs LLM extractor: - 50-200x mas rapido en GPU, 0 USD/token. - Malo con IoCs tecnicos (lo cubre 0037). - Threshold y flat_ner ajustables por dominio. pyproject.toml: gliner como extra opcional `[nlp]` para no inflar el .venv de quien no use NER. Instalacion: `uv pip install -e '.[nlp]'`. Refs #0038 — Desbloquea 0039 (GLiREL) y 0040 (pipeline hibrido). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
654 B
TOML
31 lines
654 B
TOML
[project]
|
|
name = "fn-registry-python"
|
|
version = "0.1.0"
|
|
description = "Funciones Python del fn-registry: Metabase API, ML, utilidades"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"cryptography>=46.0.6",
|
|
"fpdf2>=2.8.7",
|
|
"google-cloud-bigquery>=3.25",
|
|
"google-cloud-bigquery-datatransfer>=3.22.0",
|
|
"google-cloud-bigquery-storage>=2.27",
|
|
"google-cloud-storage>=3.10.1",
|
|
"httpx",
|
|
"openpyxl>=3.1.5",
|
|
"pypdf>=6.10.0",
|
|
"python-docx>=1.2.0",
|
|
"pyyaml>=6.0.3",
|
|
"xlrd>=2.0.2",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
nlp = [
|
|
"gliner>=0.2.13",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=9.0.2",
|
|
]
|