Skip to content

Commit

Permalink
[tools] Second take to fix bloat check (#26544)
Browse files Browse the repository at this point in the history
Apparently, in the previous PR I replaced the deprecated
DataFrame.append with pandas.concat, but I didn't realize
that our scripts add extra attributes to the data frame,
which are not copied during the concatenation.

This time, I verified the script locally using
--github-comment and --github-dryrun-comment.

Also, do not fetch submodules in the bloat check job as
it takes most of the job's execution time.
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Aug 25, 2023
1 parent 32228d0 commit 1267152
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/bloat_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
with:
action: actions/checkout@v3
with: |
submodules: true
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
Expand Down
2 changes: 2 additions & 0 deletions scripts/tools/memory/gh_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,10 @@ def merge(df: pd.DataFrame, comment) -> pd.DataFrame:
cols, rows = memdf.util.markdown.read_hierified(body)
break
logging.debug('REC: read %d rows', len(rows))
attrs = df.attrs
df = pd.concat([df, pd.DataFrame(data=rows, columns=cols).astype(df.dtypes)],
ignore_index=True)
df.attrs = attrs
return df.sort_values(
by=['platform', 'target', 'config', 'section']).drop_duplicates()

Expand Down

0 comments on commit 1267152

Please sign in to comment.