Skip to main content

pod_db_utils

Utilities for the Pod results database.

Module

Functions

map_task_to_hash_add_to_db

def map_task_to_hash_add_to_db(    serialized_protocol: SerializedProtocol, task_hash: str, project_db_con: Connection,)> None:

Maps the task hash to the protocol and algorithm used.

Adds the task to the task database if it is not already present.

Arguments

  • serialized_protocol: The serialized protocol used for the task.
  • task_hash: The hash of the task.
  • project_db_con: The connection to the database.

save_processed_datapoint_to_project_db

def save_processed_datapoint_to_project_db(    project_db_con: Connection, datasource: FileSystemIterableSource, task_hash: str,)> None:

Saves the result of a task run to the database.

Arguments

  • project_db_con: The connection to the project database.
  • datasource: The datasource used for the task.
  • task_hash: The hash of the task, a unique identifier for when results have come from the same task definition, regardless of whether they are from the same run.