feat: complete catalog-driven preprocessing
Publish documentation / publish (push) Successful in 2m12s
Publish documentation / publish (push) Successful in 2m12s
This commit is contained in:
@@ -9,7 +9,7 @@ from tht.config import workspace_id_for_config
|
||||
|
||||
KIND_MAP = {
|
||||
"evidence": ["evidence"],
|
||||
"schema": ["schema_table", "schema_column"],
|
||||
"schema": ["schema_table", "schema_column", "schema_relationship"],
|
||||
"values": [], # solo LSH
|
||||
"formula": ["evidence"],
|
||||
}
|
||||
@@ -235,15 +235,8 @@ def search_cmd(
|
||||
from tht.mschema.render import to_mschema_text
|
||||
from tht.search import schema_tables
|
||||
|
||||
phys_file = dwh_snapshot.physical
|
||||
if not phys_file.exists():
|
||||
typer.secho(
|
||||
f"ERRORE: {phys_file} non trovato. Esegui prima `tht schema introspect`.",
|
||||
fg=typer.colors.RED, err=True,
|
||||
)
|
||||
raise typer.Exit(code=1)
|
||||
try:
|
||||
schema_context = load_schema_context(cfg, physical_file=phys_file)
|
||||
schema_context = load_schema_context(cfg)
|
||||
except SchemaContextError as exc:
|
||||
typer.secho(f"ERRORE: {exc}", fg=typer.colors.RED, err=True)
|
||||
raise typer.Exit(code=1) from None
|
||||
@@ -390,7 +383,7 @@ def pack_cmd(
|
||||
|
||||
workspace_id = workspace_id_for_config(cfg, config)
|
||||
validate_corpus_workspace(cfg, workspace_id)
|
||||
dwh_snapshot = _leased_dwh_snapshot(cfg, ctx)
|
||||
_leased_dwh_snapshot(cfg, ctx)
|
||||
require_vector_cfg(cfg)
|
||||
|
||||
tables: list[dict] = []
|
||||
@@ -414,12 +407,13 @@ def pack_cmd(
|
||||
|
||||
if vec is not None:
|
||||
descriptions: dict[str, str] = {}
|
||||
phys_file = dwh_snapshot.physical
|
||||
if phys_file.exists():
|
||||
from tht.mschema.models import PhysicalSchema
|
||||
from tht.mschema.context import SchemaContextError, load_schema_context
|
||||
|
||||
phys = PhysicalSchema.from_yaml(phys_file)
|
||||
try:
|
||||
phys = load_schema_context(cfg).physical
|
||||
descriptions = {t: tab.comment for t, tab in phys.tables.items()}
|
||||
except SchemaContextError:
|
||||
pass
|
||||
try:
|
||||
cand = combined_search(
|
||||
keyword=question, lsh_hits=None, store=searcher, embedder=embedder,
|
||||
|
||||
Reference in New Issue
Block a user