gigl.src.inference.v1.gnn_inferencer#

Attributes#

Classes#

InferencerOutputPaths

Dataclass containing the output path fields from running inference for a single node type. These fields are used to write files from gcs to bigquery.

InferencerV1

****** WILL BE DEPRECATED ******

Module Contents#

class gigl.src.inference.v1.gnn_inferencer.InferencerOutputPaths[source]#

Dataclass containing the output path fields from running inference for a single node type. These fields are used to write files from gcs to bigquery.

bq_inferencer_output_paths: snapchat.research.gbml.inference_metadata_pb2.InferenceOutput[source]#
temp_embedding_gcs_path: gigl.common.GcsUri | None[source]#
temp_predictions_gcs_path: gigl.common.GcsUri | None[source]#
class gigl.src.inference.v1.gnn_inferencer.InferencerV1(bq_gcp_project)[source]#

****** WILL BE DEPRECATED ****** Note this class will get deprecated in the future without notice Use python/gigl/src/inference/inferencer.py instead ****** WILL BE DEPRECATED ****** GiGL Component that runs inference of a trained model on samples generated by the Subgraph Sampler component and outputs embedding and/or prediction assets.

Parameters:

bq_gcp_project (str)

generate_inferencer_instance()[source]#
Return type:

gigl.src.inference.v1.lib.base_inferencer.BaseInferencer

run(applied_task_identifier, task_config_uri, custom_worker_image_uri=None)[source]#
Parameters:
  • applied_task_identifier (gigl.src.common.types.AppliedTaskIdentifier)

  • task_config_uri (gigl.common.Uri)

  • custom_worker_image_uri (Optional[str])

write_from_gcs_to_bq(schema, gcs_uri, bq_table_uri)[source]#

Writes embeddings or predictions from gcs folder to bq table with specified schema :param schema: BQ Table schema for embeddings or predictions from inference output :type schema: Optional[Dict[str, List[Dict[str, str]]] :param gcs_uri: GCS Folder for embeddings or predictions from inference output :type gcs_uri: GcsUri :param bq_table_uri: Path to the table for embeddings or predictions output :type bq_table_uri: str

Parameters:
  • schema (Dict[str, List[Dict[str, str]]])

  • gcs_uri (gigl.common.GcsUri)

  • bq_table_uri (str)

Return type:

None

property bq_utils: gigl.src.common.utils.bq.BqUtils[source]#
Return type:

gigl.src.common.utils.bq.BqUtils

property gbml_config_pb_wrapper: gigl.src.common.types.pb_wrappers.gbml_config.GbmlConfigPbWrapper[source]#
Return type:

gigl.src.common.types.pb_wrappers.gbml_config.GbmlConfigPbWrapper

gigl.src.inference.v1.gnn_inferencer.MAX_INFERENCER_NUM_WORKERS = 4[source]#
gigl.src.inference.v1.gnn_inferencer.logger[source]#
gigl.src.inference.v1.gnn_inferencer.parser[source]#