echoing-farmer-15630
03/31/2021, 7:25 PMrequirements.txt
which is calculated when requirements.txt
changes, but until requirements.txt changes, that cache doesn't appear to be rebuilt). We can get an approximation to that by manually looking at some files pants uses (can proxy that all requirements.txt files could be hashed together, say) but there are also some internal dependencies that pants sorts through while creating its caches.
So my question--is there any way to extract that from pants, to tell when the cache has to be rebuilt? Or is it better to just make a best guess based on all the requirements.txt
and maybe BUILD
files hashed together?
(sorry if that's unclear; fair amount of flailing here and GARGANTUAN pants caches; still working on the advice in https://www.pantsbuild.org/docs/using-pants-in-ci but ever since our developers started using torch
any cache just gets punishingly large)flat-zoo-31952
03/31/2021, 8:26 PMflat-zoo-31952
03/31/2021, 8:37 PMechoing-farmer-15630
04/01/2021, 1:58 AMrequirements.txt
files for a checksum, which does the trick for reasonable values of "the trick"--but the caches are indeed massive (actually something didn't work correctly for the pip cache perhaps, but it's still a work in progress).flat-zoo-31952
04/01/2021, 12:24 PMnamed_caches
but I think the torch wheel should only be downloaded once there. That said, I don't think anyone has a good CI solution for how to deal with an 800 MB library. Pants tends to cache requirements as pexes, which when combined with a big lib like that can lead to a lot of bloat. I think there's been some work done on this, but I'm not sure. Might need to summon @hundreds-father-404 to know more.