Git Product home page Git Product logo

Comments (8)

xiaoran007 avatar xiaoran007 commented on September 20, 2024 1

And I tried removing them and rebuilding the whl package now. It may takes a bit of time.

It works, thank you very much!

from pytorch.

malfet avatar malfet commented on September 20, 2024

Tentatively assigning to @c-p-i-o , who added the dependency in #122999

@ezyang just curios, is it used for anything yet? If not, then perhaps revert?

P.S. I wonder how it works with the nightly builds though?

from pytorch.

xiaoran007 avatar xiaoran007 commented on September 20, 2024

I found this issue when building directly whl on my ubuntu machine (without using docker), or maybe I need to use docker (follow the ci script) to build it?
And if I set "Unknown license" as return value rather than value error, it works.

        if 'ApacheLicense' in txt:
            # Hmm, do we need to check the text?
            return 'Apache-2.0'
        .
        .
        .
        elif all([squeeze(m) in txt.lower() for m in bsd3_src_txt]):
            return 'BSD-Source-Code'
        elif any([squeeze(m) in txt.lower() for m in mit_txt]):
            return 'MIT'
        else:
            # A license may not be on this list, but is still a valid license.
            raise ValueError('unknown license')

from pytorch.

c-p-i-o avatar c-p-i-o commented on September 20, 2024

We did attempt to fix this in build_bundled.py script (https://github.com/pytorch/pytorch/blob/main/third_party/build_bundled.py#L117)
Is this fix not working?

from pytorch.

c-p-i-o avatar c-p-i-o commented on September 20, 2024

Tentatively assigning to @c-p-i-o , who added the dependency in #122999

@ezyang just curios, is it used for anything yet? If not, then perhaps revert?

We are waiting for some higher level abstractions for metrics to land. Once landed, for the OSS community, we plan on implementing those higher level abstractions via OTEL.

P.S. I wonder how it works with the nightly builds though?

Works on nightly because of (https://github.com/pytorch/pytorch/blob/main/third_party/build_bundled.py#L117)

from pytorch.

c-p-i-o avatar c-p-i-o commented on September 20, 2024

@xiaoran007 FWIW, the issue didn't repro for me on main.

python setup.py bdist_wheel

...
adding license file 'LICENSE'
adding license file 'NOTICE'
...
adding 'torch-2.4.0a0+gitc5d83bc.dist-info/LICENSE'
adding 'torch-2.4.0a0+gitc5d83bc.dist-info/METADATA'
adding 'torch-2.4.0a0+gitc5d83bc.dist-info/NOTICE'
adding 'torch-2.4.0a0+gitc5d83bc.dist-info/WHEEL'
adding 'torch-2.4.0a0+gitc5d83bc.dist-info/entry_points.txt'

I think what's happening here is that

  1. you might have checked out main. This fetches third-party/opentelemetry-cpp.

  2. Now, when you switch over to tag v2.1.0, you end up pulling an oldbuild_bundled.py from the tag but you still have third-party/opentelemetry-cpp in your directory left there.

  3. The old build_bundled.py script tries to iterate over the new third-party/opentelemetry-cpp library looking for LICENSE files and fails as it doesn't understand the weird sigslot file.

To confirm this, you'd need to do git status after you checkout v2.1.0 tag and you should see third-party/opentelemetry-cpp as a untracked files

Can you confirm this is what might be happening?

from pytorch.

xiaoran007 avatar xiaoran007 commented on September 20, 2024

Yes, when I checkout to tag v2.1.0, the files are untracked:

HEAD detached at v2.1.0
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        third_party/cpp-httplib/
        third_party/opentelemetry-cpp/

And I tried removing them and rebuilding the whl package now. It may takes a bit of time.

from pytorch.

c-p-i-o avatar c-p-i-o commented on September 20, 2024

Thanks @xiaoran007!
I'm closing this issue for now - but re-open it if you run into any further issues.

from pytorch.

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.