Home / Function/ write_filtered_csvs() — pytorch Function Reference

write_filtered_csvs() — pytorch Function Reference

Architecture documentation for the write_filtered_csvs() function in update_expected.py from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  9c7cdd83_081e_ffec_b29f_0c8c75d577e4["write_filtered_csvs()"]
  48ac7219_0d89_c217_fc61_0fdfee3ad13e["parser()"]
  48ac7219_0d89_c217_fc61_0fdfee3ad13e -->|calls| 9c7cdd83_081e_ffec_b29f_0c8c75d577e4
  c4a9f6c1_de66_1e74_7b94_87f1e31d3f21["apply_lints()"]
  9c7cdd83_081e_ffec_b29f_0c8c75d577e4 -->|calls| c4a9f6c1_de66_1e74_7b94_87f1e31d3f21
  style 9c7cdd83_081e_ffec_b29f_0c8c75d577e4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/ci_expected_accuracy/update_expected.py lines 234–250

def write_filtered_csvs(root_path, dataframes):
    for (suite, phase), df in dataframes.items():
        out_fn = os.path.join(root_path, f"{suite}_{phase}.csv")
        # Read existing CSV and merge with new data to preserve entries
        # from shards that failed to download
        if os.path.exists(out_fn):
            existing_df = pd.read_csv(out_fn)
            # Use new data where available, keep old data for missing entries
            # Set 'name' as index for both, update existing with new, then reset
            existing_df = existing_df.set_index("name")
            df = df.set_index("name")
            existing_df.update(df)
            # Add any new entries from df that weren't in existing
            df = existing_df.combine_first(df).reset_index()
        df = df.sort_values(by="name")
        df.to_csv(out_fn, index=False, columns=["name", "accuracy", "graph_breaks"])
        apply_lints(out_fn)

Subdomains

Called By

Frequently Asked Questions

What does write_filtered_csvs() do?
write_filtered_csvs() is a function in the pytorch codebase.
What does write_filtered_csvs() call?
write_filtered_csvs() calls 1 function(s): apply_lints.
What calls write_filtered_csvs()?
write_filtered_csvs() is called by 1 function(s): parser.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free