Giter Site home page Giter Site logo

Comments (8)

arnicas avatar arnicas commented on August 26, 2024 1

Ok, well, the internet is full of people asking about this: it's definitely a fact that cupy won't do numpy arrays on the GPU without some special handling: See https://docs.cupy.dev/en/stable/user_guide/basic.html. I doubt I'll be the only one hitting this one... I can try to modify your code to get it to run locally if I have time :)

from coreferee.

richardpaulhudson avatar richardpaulhudson commented on August 26, 2024

Hi Lynn, thanks for your message. Tensorflow 2.4.2 was indeed only released a few days ago and seemed like a likely culprit, so I upgraded to it, but unfortunately I was unable to reproduce the problem:


nlp = spacy.load('en_core_web_trf')
nlp.add_pipe('coreferee')
doc = nlp("""
... France retains its centuries-long status as a global centre of art, science, and philosophy, says Ljubomir Geric. He also notes it
... hosts the world's fifth-largest number of UNESCO World Heritage Sites and is the leading tourist destination,
... receiving over 89 million foreign visitors in 2018. France is a developed country with the world's
... seventh-largest economy by nominal GDP, and the ninth-largest by PPP. In terms of aggregate household wealth,
... it ranks fourth in the world. France performs well in international rankings of education, health care,
... life expectancy, and human development. It remains a great power in global affairs, being one of the five
... permanent members of the United Nations Security Council (UNSC) and an official nuclear-weapon state. France is a
... founding and leading member of the European Union (EU) and the Eurozone, and a member of the Group of 7, North
... Atlantic Treaty Organization (NATO), Organisation for Economic Co-operation and Development (OECD), and the
... World Trade Organization (TWO).
... """)
doc._.coref_chains.print()
0: France(1), its(3), it(27), France(59), France(100), It(120), France(154)
1: Geric(22), He(24)
2: world(66), world(98)
import numpy
print(numpy.__version__)
1.19.5 
import tensorflow
print(tensorflow.__version__)
2.4.2

If you or anyone else can get to the bottom of the problem, I would be most grateful!

Best wishes

Richard

from coreferee.

arnicas avatar arnicas commented on August 26, 2024

Hmm. I replicated it with my env stuff pinned to the versions you used. So it must be something deeper in my env. If I have time to look further, I will!

from coreferee.

arnicas avatar arnicas commented on August 26, 2024

Ah, can you tell me what version of cupy you are using?

from coreferee.

richardpaulhudson avatar richardpaulhudson commented on August 26, 2024

I'm not using cupy - I'm working on Windows with Cuda v11.3.109. There is a nightly test build that takes place on a Linux cloud server which is also working fine, but the cloud server does not have any GPUs. So the problem seems to be specific to certain GPU architectures / drivers.

from coreferee.

richardpaulhudson avatar richardpaulhudson commented on August 26, 2024

It would be great if you or anyone else could add Cupy compatibility as a feature. :-)

from coreferee.

richardpaulhudson avatar richardpaulhudson commented on August 26, 2024

I will be releasing a new version of Coreferee within the next few weeks that uses Thinc instead of TensorFlow and which is fully tested to run on GPU as well as CPU.

from coreferee.

richardpaulhudson avatar richardpaulhudson commented on August 26, 2024

This should all be resolved now with v1.2.0.

from coreferee.

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.