report_results

Report all results to dbnl

dbnl.report_results(
    *,
    run: ,
    column_data: ,
    scalar_data: dict[str, Any] | pandas.DataFrame | None = None
) -> None:

Parameters

Arguments
Description

run

The DBNL Run that the results will be reported to.

column_data

A pandas DataFrame with all the column results to report to DBNL. The columns of the DataFrame must match the columns described in the RunConfig associated with the Run.

scalar_data

A dict or pandas Dataframe with all the scalar results to report to DBNL. The key of the dict must match the scalars described in the RunConfig associated with the Run.

report_results is the equivalent of calling both report_column_results and report_scalar_results .

Limitations

All data should be reported to dbnl at once. Calling dbnl.report_results more than once will overwrite the previously uploaded data.

Once a Run is closed. You can no longer call report_results to send data to DBNL.

Examples

import dbnl
import pandas as pd
dbnl.login()


proj1 = dbnl.get_or_create_project(name="test_p1")
runcfg1 = dbnl.create_run_config(project=proj1, columns=[{"name": "error", "type": "float"}])
run1 = dbnl.create_run(project=proj1, run_config=runcfg1)

data = pd.DataFrame({"error": [0.11, 0.33, 0.52, 0.24]})
dbnl.report_results(run=run1, column_data=data)


import dbnl
import pandas as pd
dbnl.login()


proj1 = dbnl.get_or_create_project(name="test_p1")
runcfg1 = dbnl.create_run_config(
    project=proj1, 
    columns=[{"name": "error", "type": "float"}],
    scalars=[{"name": "rmse": "type": "float"}],
)
run1 = dbnl.create_run(project=proj1, run_config=runcfg1)
data = pd.DataFrame({"error": [0.11, 0.33, 0.52, 0.24]})
dbnl.report_results(run=run1, column_data=data, scalar_data={"rmse": 0.37})

Last updated

Was this helpful?