Giter VIP home page Giter VIP logo

Comments (5)

xzyaoi avatar xzyaoi commented on May 27, 2024 1

@babak-1990, Thanks for your reply! I can reproduce this error with a Windows Setup. I am trying to fix this error, and it should be soon. I will update here if I made a progress :)

from datascope.

xzyaoi avatar xzyaoi commented on May 27, 2024

Hi, I just ran the notebook again but I didn't encounter the same issue, could you please try again with the latest notebook in the readme file? If the error persists, I can look deeper into this.

Best regards,

from datascope.

babak-1990 avatar babak-1990 commented on May 27, 2024

Hi @xzyaoi , I still have the same problem with the new version. In the demo notebook when the line:
importances = importance.fit(X_train_dirty, y_train_dirty).score(X_test, y_test)
gets to run I face the error. what I did to ignore this problem was to use the python written function of "compute_all_importances" in "datascope/importance/shapley" instead of cython version "compute_all_importances_cy".
These variables are float "unit_distances, unit_utilities, null_scores" which is correct but shapley_cy.pyx expect these variable to be integer.

from datascope.

xzyaoi avatar xzyaoi commented on May 27, 2024

@babak-1990 Interesting, I still cannot reproduce this error, even with a newly created colab environment (see https://colab.research.google.com/drive/1RdArqm0ZpYR_Tq5rKMDu8U7KxsgNEhNl#scrollTo=8b974636-7c3e-4b82-8401-ff541a47a002).

I am now thinking this is due to your local compiler, which may have a different behavior about np.int (are you on Windows or Mac OS?). I have found a possible solution: eragonruan/text-detection-ctpn#380

However, I don't have a Windows PC at hand, could you please try to change the np.int to np.int64 or np.int32 (if np.int64 does not work out) in this Line https://github.com/easeml/datascope/blob/main/datascope/importance/shapley_cy.pyx#L30? Then after re-compiling, it should work.

If it works please let me know so I can release a stable fix on this. If it doesn't please also feel free to reach out!

Best regards,
Xiaozhe

from datascope.

babak-1990 avatar babak-1990 commented on May 27, 2024

Hi @xzyaoi, I already read this potential solution and I tried to fix it by assigning different DTYPE but it didn't work out. My local computer OS is windows. you are right this is due to my local compiler. Changing this line https://github.com/easeml/datascope/blob/main/datascope/importance/shapley_cy.pyx#L30? won't fix the problem because the error happens before entering function compute_all_importances_cy in /datascope/importance/shapley_cy.pyx , however I gave it a try to be sure about it.

In that time, I though maybe changing lines


and
ctypedef np.float_t DTYPE_t

will fix the problem but it didn't.

from datascope.

Related Issues (5)

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.