Setup

Before using the library, the user must set up the MLFlow execution, as well as library specific configurations:

prov4ml.start_run(
    prov_user_namespace: str,
    experiment_name: Optional[str] = None,
    provenance_save_dir: Optional[str] = None,
    collect_all_processes: Optional[bool] = False,
    save_after_n_logs: Optional[int] = 100,
    rank : Optional[int] = None, 
)

The parameters are as follows:

ParameterTypeDescription
prov_user_namespacestringRequired. User namespace for the provenance graph
experiment_namestringRequired. Name of the experiment
provenance_save_dirstringRequired. Directory to save the provenance graph
collect_all_processesboolOptional. Whether to collect all processes
save_after_n_logsintOptional. Save the graph after n logs
rankintOptional. Rank of the process

At the end of the experiment, the user must end the run:

prov4ml.end_run(
    create_graph: Optional[bool] = False, 
    create_svg: Optional[bool] = False, 
)
ParameterTypeDescription
create_graphboolOptional. Whether to create the graph
create_svgboolOptional. Whether to create the svg

This call allows the library to save the provenance graph in the specified directory.

Home | Prev | Next