From d26b1c49211f5b5467a5ce41612aaac07cff2c56 Mon Sep 17 00:00:00 2001 From: Felicity Liao Date: Fri, 11 Apr 2025 10:24:30 -0700 Subject: [PATCH] Resolve Linux Wheels and Pyre MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: ``` ƛ Found 1 type error! torchrec/distributed/planner/stats.py:1111:64 Incompatible parameter type [6]: In call `pd.core.frame.DataFrame.from_dict`, for argument `columns`, expected `Union[None, ndarray[typing.Any, typing.Any], SequenceNotStr[typing.Any], ExtensionArray, Index, Series, range]` but got `List[str]`. ``` Resolving this error from D72410003 for Github pyre ci Differential Revision: D72871677 --- .github/scripts/install_libs.sh | 1 + torchrec/distributed/planner/stats.py | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/scripts/install_libs.sh b/.github/scripts/install_libs.sh index 27522ff92..c7b7d2938 100644 --- a/.github/scripts/install_libs.sh +++ b/.github/scripts/install_libs.sh @@ -29,3 +29,4 @@ fi ${CONDA_RUN} pip install importlib-metadata +${CONDA_RUN} pip install pandas diff --git a/torchrec/distributed/planner/stats.py b/torchrec/distributed/planner/stats.py index df548d489..c119e4424 100644 --- a/torchrec/distributed/planner/stats.py +++ b/torchrec/distributed/planner/stats.py @@ -1108,6 +1108,7 @@ def _calculate_critical_path(best_plan: List[ShardingOption]) -> CriticalPathEst perf_type.split("_")[1], # compute or comms ) ] += perf_breakdown[perf_type] + # pyre-ignore[6] perf_df = pd.DataFrame.from_dict(perf_data, orient="index", columns=["perf"]) perf_df.index = pd.MultiIndex.from_tuples( perf_df.index,