pytorch / torchrec

Pytorch domain library for recommendation systems
BSD 3-Clause "New" or "Revised" License
1.79k stars 381 forks source link

Refactor source code parity check with `ast` #2160

Open XuehaiPan opened 1 week ago

XuehaiPan commented 1 week ago

Use ast.unparse(ast.parse(code)) to normalize the source code. This ignores formatting differences and allows us to enable code formattor on torch upstream.

As per: