Giter Club home page Giter Club logo

Comments (8)

edenlightning avatar edenlightning commented on August 18, 2024

@aribornstein can you paste the error? and explain intended behaviour?

from lightning-flash.

aribornstein avatar aribornstein commented on August 18, 2024

The error is already pasted

[nltk_data] Error loading punkt: <urlopen error [Errno -3] Temporary
[nltk_data] failure in name resolution>

If I'm not using a NLP Task it makes no sense to load NLTK.

from lightning-flash.

aniketmaurya avatar aniketmaurya commented on August 18, 2024

I would like to fix this.

from lightning-flash.

aniketmaurya avatar aniketmaurya commented on August 18, 2024

Hi @aribornstein, since __init__.py of flash imports all the modules, the text module is also imported and nltk.download("punkt", quiet=True) is executed. This download should happen only when someone uses the library for the first time.

https://github.com/PyTorchLightning/lightning-flash/blob/202717d888fccb934dcc4507d22542d7cf71de96/flash/text/seq2seq/summarization/utils.py#L21

from lightning-flash.

edenlightning avatar edenlightning commented on August 18, 2024

Is there a way to only load if using the task?

from lightning-flash.

edgarriba avatar edgarriba commented on August 18, 2024

@edenlightning one thing I've been noticing is that some tasks like ImageClassification have pretrained weights set to True by default. Not sure if this can be related but the underlying libraries providing the backbones like torchvision have it to False I guess to avoid auto-downloading issues.

from lightning-flash.

kaushikb11 avatar kaushikb11 commented on August 18, 2024

@aniketmaurya Would you like to do a PR for this?

from lightning-flash.

aniketmaurya avatar aniketmaurya commented on August 18, 2024

Yes @kaushikb11 I'd love to add a PR for this.

from lightning-flash.

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.