Git Product home page Git Product logo

Comments (6)

jcrist avatar jcrist commented on June 9, 2024

Hmmm, this is a bug, but it can be avoided by not specifying thinc in dependencies (since the pip installation of spacy will overwrite the existing thinc install). Why are you using spacy from pip instead of from conda-forge?

Basically, what's happening here is:

  • conda-env builds a new environment and first installs all the conda packages. This pulls in thinc=6.5.2.
  • conda-env then installs pip packages, which results in pip uninstalling thinc=6.5.2 and replacing it with thinc=6.10.3 from pypi. But since pip did the uninstall, the metadata for thinc is still in the conda-meta directory (pip doesn't play 100% well with conda).
  • conda-pack packages the environment by reading in the metadata from the conda-meta directory, which still includes the information for thinc=6.5.2. It then crawls the directory and finds thinc=6.10.3 from pypi and also includes that.

We should filter the files found from collecting conda-meta with those actually in the environment directory to catch issues of pip installs breaking stuff.

However, this can be avoided by having your pip install never uninstall packages (in this case, remove thinc from dependencies).

from conda-pack.

bharathguvvala avatar bharathguvvala commented on June 9, 2024

Thanks @jcrist for the explanation. Can I raise a PR with the fix for this? Agreed that this can be avoided by proactively pruning out conflicts from the environment.yaml itself, but with the environment already being created should the conda-pack fail fast for now in such case until the fix has been made to stop the user from packing the environment with incorrect set of packages?

from conda-pack.

jcrist avatar jcrist commented on June 9, 2024

Hmmm, this is a bit trickier than I originally thought. The main issue here is that manual changes to the environment may not change the total set of files, and instead just be small edits/replacement of individual files. In this case looking for missing conda files wouldn't catch these issues, as the sets would be identical. Instead we should check overwrites either by:

  • Hashing the file and comparing to the hash in the conda metadata. This is further complicated because older versions of the metadata don't include file hashes.
  • Looking at the hardlink status of the file to see if it still points to the package cache (only would work for files that are hardlinked, but would be faster than hashing).

This requires a larger refactor than I expected it would. You are welcome to work on it if you want, but it's not an easy problem. I'll probably have more time to work on this late next week.

from conda-pack.

bharathguvvala avatar bharathguvvala commented on June 9, 2024

Sure @jcrist . I realize this is a complicated problem. I'll wait for you to work upon it.

from conda-pack.

jcrist avatar jcrist commented on June 9, 2024

This should be fixed in #35.

from conda-pack.

github-actions avatar github-actions commented on June 9, 2024

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

from conda-pack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.