Skip to content

Conversation

@ahmadsharif1
Copy link
Contributor

@ahmadsharif1 ahmadsharif1 commented Nov 13, 2024

Cherry-pick #5789 and #5821 to release/2.5 branch

This is needed for torchcodec CI to succeed:

meta-pytorch/torchcodec#373

By default setup-miniconda installs a bunch of packages that may cause
conflicts with packages the user wants to install.

So add a parameter that can control the default packages. A user could
set it to empty if they don't want to install anything but python.

More context: I was using this library and getting failures when
installing ffmpeg7:


![image](https://github.com/user-attachments/assets/34514055-a518-41bf-965d-22e35190f988)



https://github.com/pytorch/torchcodec/actions/runs/11431285586/job/31800252965?pr=272

After this change I can install ffmpeg successfully by specifying it in
the default-packages list.
Without this there would be cache collisions of different
default-packages. i.e. the symptom I was seeing was the cache
would restore my conda environment but without the packages.

I tested it here with torchcodec
meta-pytorch/torchcodec#298


https://github.com/pytorch/torchcodec/actions/runs/11523232397/job/32081186451?pr=298

And it seems to be working fine.

Example the cache key contains the package hashes:

<img width="1193" alt="image"
src="https://github.com/user-attachments/assets/f04d6ac9-ff72-4f07-b5ef-831b6d3fd09f">
@vercel
Copy link

vercel bot commented Nov 13, 2024

@ahmadsharif1 is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 13, 2024
@ahmadsharif1 ahmadsharif1 marked this pull request as ready for review November 13, 2024 19:06
Copy link
Contributor

@atalman atalman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ahmadsharif1
Copy link
Contributor Author

@atalman you will have to merge this PR because I do not have the authorization to run the Vercel check.

@atalman atalman merged commit df7490d into pytorch:release/2.5 Nov 13, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants