def test_runattrs_with_all(): df = results.get_runattrs(r, include_itervars=True, include_runattrs=True, include_param_assignments=True, include_config_entries=True) _assert_sequential_index(df) _assert(sanitize_and_compare_csv(df, "runattrs_with_all.csv"), "content mismatch") _assert( df.apply(lambda r: r[r["name"]] == r["value"], axis=1).all(), "wrong join")
def get_data(filter): sc = results.get_scalars(filter, include_attrs=True) iv = results.get_itervars(filter) ra = results.get_runattrs(filter) df = pd.concat([sc, iv, ra]) # print(df) df["value"] = pd.to_numeric(df["value"], errors="ignore") df = pd.pivot_table(df, columns="name", index="runID", dropna=False, aggfunc=aggfunc) # print(df) return df
def get_data(filter): try: sc = results.get_scalars(filter, include_attrs=True) iv = results.get_itervars(filter) ra = results.get_runattrs(filter) except ValueError as e: raise chart.ChartScriptError("Error while querying results: " + str(e)) df = pd.concat([sc, iv, ra]) df["value"] = pd.to_numeric(df["value"], errors="ignore") df = pd.pivot_table(df, columns="name", index="runID", dropna=False, aggfunc=aggfunc) return df
def test_runattrs(): df = results.get_runattrs(r) _assert_sequential_index(df) _assert(sanitize_and_compare_csv(df, "runattrs.csv"), "content mismatch")