qbiocode.apps.quvine.api.aliases module#

Method-name resolution for the QuVINE embedding API.

A single string passed to quvine.embed() is mapped here to one of three execution kinds:

  • "sgns" – the true QuVINE SGNS walk embedding (views -> walks ->

    corpus -> word2vec) for a single walk kind (rwr/ctqw/dtqw).

  • "registry" – a single method from the comparison MethodRegistry

    (node2vec, gat_*, graphgps_*, filter_*, quvine_* GCN-MF, …).

  • "fused" – run every walk kind and fuse the results into one embedding.

No registry key is ever renamed, so the per-method tuned-hyperparameter lookups in baselines/hyperparameter_loader.py keep working. Friendly unified aliases are layered on top of the existing keys.

Summary#

Functions:

config_group_for

Return the cfg.baselines.<group> section name for a registry key.

list_methods

List all callable method names.

resolve_method

Resolve a method name to (kind, key).

variant_for

Return the GAT/GraphGPS variant string implied by a registry key.

Reference#

config_group_for(registry_key)[source]#

Return the cfg.baselines.<group> section name for a registry key.

Return type:

str

variant_for(registry_key)[source]#

Return the GAT/GraphGPS variant string implied by a registry key.

The GAT/GraphGPS config builders default variant='raw' and do NOT infer it from the method name, so e.g. gat_rwr_heat would silently run as a plain (non-quantum) GAT. embed() uses this to set the variant from the method name (gat_rwr_heat -> heat_qcal_rwr) unless the caller’s config already specifies one. Returns None for non-GAT/GraphGPS keys.

Return type:

Optional[str]

Mapping:

gat_baseline / graphgps_baseline -> “raw” gat_heat / graphgps_heat -> “heat_fixed” gat_poly / graphgps_poly -> “poly_fixed” gat_rwr / graphgps_rwr -> “rwr” gat_*_heat / graphgps_*_heat -> “heat_qcal_<walk>” gat_*_poly / graphgps_*_poly -> “poly_qcal_<walk>”

resolve_method(method)[source]#

Resolve a method name to (kind, key).

Return type:

Tuple[str, str]

Returns:

("sgns", walk_kind) for the SGNS walk path, ("registry", registry_key) for a single registry method, or ("fused", "fused") for a fused multi-walk embedding.

Raises:

KeyError – if the name is unknown (message includes close matches).

list_methods(kind=None)[source]#

List all callable method names.

Parameters:

kind (Optional[str]) – "sgns", "registry" or "fused" to filter, or None for everything (sorted, de-duplicated across aliases and canonical keys).

Return type:

List[str]