gigl.src.inference.lib.assets#
Attributes#
Classes#
Utility class for managing temp and permanent inferencer assets. |
Module Contents#
- class gigl.src.inference.lib.assets.InferenceAssets[source]#
Utility class for managing temp and permanent inferencer assets.
- static get_enumerated_embedding_table_path(gbml_config_pb_wrapper, node_type)[source]#
Get the enumerated embedding table path for a given node type. i.e. table should containe (enumerated_node_id: int) —> embedding
- Parameters:
gbml_config_pb_wrapper (gigl.src.common.types.pb_wrappers.gbml_config.GbmlConfigPbWrapper)
node_type (str)
- Return type:
str
- static get_enumerated_predictions_table_path(gbml_config_pb_wrapper, node_type)[source]#
Get the enumerated predictions table path for a given node type. i.e. table should containe (enumerated_node_id: int) —> prediction
- Parameters:
gbml_config_pb_wrapper (gigl.src.common.types.pb_wrappers.gbml_config.GbmlConfigPbWrapper)
node_type (str)
- Return type:
str
- static get_gcs_asset_write_path_prefix(applied_task_identifier, bq_table_path)[source]#
Formulated an intermediary GCS path for writing embeddings or predictions based on the bq table path :param applied_task_identifier: The name provided for the gigl job :type applied_task_identifier: AppliedTaskIdentifier :param bq_table_path: Path to the table for embeddings or predictions output :type bq_table_path: str
- Returns:
The path to the gcs folder based on the bq table path
- Return type:
- Parameters:
applied_task_identifier (gigl.src.common.types.AppliedTaskIdentifier)
bq_table_path (str)
- static get_unenumerated_embedding_table_path(gbml_config_pb_wrapper, node_type)[source]#
Get the unenumerated embedding table path for a given node type. i.e. table contains the embeddings indexed by original node id
- Parameters:
gbml_config_pb_wrapper (gigl.src.common.types.pb_wrappers.gbml_config.GbmlConfigPbWrapper)
node_type (str)
- Return type:
str
- static get_unenumerated_prediction_table_path(gbml_config_pb_wrapper, node_type)[source]#
Get the unenumerated embedding table path for a given node type. i.e. table contains the embeddings indexed by original node id
- Parameters:
gbml_config_pb_wrapper (gigl.src.common.types.pb_wrappers.gbml_config.GbmlConfigPbWrapper)
node_type (str)
- Return type:
str
- static prepare_staging_paths(applied_task_identifier, gbml_config_pb_wrapper, project)[source]#
Prepare staging paths for inferencer assets by clearing the paths that inferencer would be writing to, to avoid clobbering of data.
- Parameters:
applied_task_identifier (gigl.src.common.types.AppliedTaskIdentifier)
gbml_config_pb_wrapper (gigl.src.common.types.pb_wrappers.gbml_config.GbmlConfigPbWrapper)
project (str)
- Return type:
None