Giter VIP home page Giter VIP logo

Comments (34)

StrikerRUS avatar StrikerRUS commented on May 11, 2024

See #69 and please provide reproducible example.

from rgf.

tianke0711 avatar tianke0711 commented on May 11, 2024

@StrikerRUS thanks for your comment. My OS is Mac OS, python3.6, rgf-python:2.03

my code is as following:

    `from rgf.sklearn import RGFClassifier
      from sklearn.datasets import load_iris
      from sklearn.model_selection import StratifiedKFold

      iris = load_iris()
      X = iris.data
      y = iris.target
      kfold = 4


    def eval_gini(y_true, y_pred):
           return 42


    skf = StratifiedKFold(n_splits=kfold, random_state=1)
   for i, (train_index, test_index) in enumerate(skf.split(X, y)):
         X_train, X_eval = X[train_index], X[test_index]
        y_train, y_eval = y[train_index], y[test_index]

      rgf_model = RGFClassifier(max_leaf=400,
                          algorithm="RGF_Sib",
                          test_interval=100,
                          verbose=True).fit(X_train, y_train)
    pred = rgf_model.predict_proba(X_eval)[:, 1]
   print("Gini = ", eval_gini(y_eval, pred))`

and error:

Ran 0 examples: 0 success, 0 failure, 0 error

None
Ran 0 examples: 0 success, 0 failure, 0 error

None
Ran 0 examples: 0 success, 0 failure, 0 error

None
Traceback (most recent call last):
File "/Users/k.den/Desktop/For_Submission/1_source_code/test.py", line 25, in
pred = rgf_model.predict_proba(X_eval)[:, 1]
File "/usr/local/lib/python3.6/site-packages/rgf/sklearn.py", line 652, in predict_proba
class_proba = clf.predict_proba(X)
File "/usr/local/lib/python3.6/site-packages/rgf/sklearn.py", line 798, in predict_proba
'This is rgf_python error.'.format(_TEMP_PATH))
Exception: Model learning result is not found in /tmp/rgf. This is rgf_python error.

Process finished with exit code 1

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@tianke0711 I haven't macOS around me, but I've created a job for CI service with your environmental settings.
The full output will be here: https://travis-ci.org/StrikerRUS/rgf_python/jobs/301669871 (it hasn't started at the moment I'm writing this comment, so check this link approximately after 1 hour).

The environmental settings is following: https://github.com/StrikerRUS/rgf_python/blob/test/.travis.yml
and the code for testing is here: https://github.com/StrikerRUS/rgf_python/blob/test/rgf/test/issue.py

from rgf.

tianke0711 avatar tianke0711 commented on May 11, 2024

@StrikerRUS thanks very much for your kind comments.
I have install the ref-python by your settings in ubuntu:

  • pip3 install rgf_python==2.0.3 -v

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@tianke0711 Yeah, I've created rgf/test/issue.py file specially for showing that I cannot reproduce your issue on macOS. There is no such file in source files of rgf_python. You can just run piece of code from issue.py in your favorite IDE.

btw, please paste logs of pip3 install rgf_python==2.0.3 -v here. Maybe something useful will be there...
Also if you use Anaconda, provide the output of conda list command.

from rgf.

tianke0711 avatar tianke0711 commented on May 11, 2024

hi @StrikerRUS I didn't use the Anaconda, I installed the ref-python with the command your provided: pip3 install rgf_python==2.0.3 -v and this log information:

The directory '/Users/k/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/k/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: rgf_python==2.0.3 in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: scikit-learn>=0.18 in /usr/local/lib/python3.6/site-packages (from rgf_python==2.0.3)
Cleaning up...

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@tianke0711 Your log says you already have rgf_python, so you need to run pip3 install rgf_python -U -v to reinstall it.

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@tianke0711 updates?

from rgf.

LavoriniV avatar LavoriniV commented on May 11, 2024

Hello, I had the same error. Reinstalling the package solves it, but now I get this other one:

Exception: Model learning result is not found in /tmp/rgf. Training is abnormally finished.

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV Hi! What is your OS?

from rgf.

tianke0711 avatar tianke0711 commented on May 11, 2024

hi @StrikerRUS there is still error after installed the package: Exception: Model learning result is not found in /tmp/rgf. Training is abnormally finished.

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@tianke0711
What's the output of this command? #77 (comment)

from rgf.

LavoriniV avatar LavoriniV commented on May 11, 2024

Hello @StrikerRUS , it's MacOs 10.12.6, Python 3.6.3 running on Jupyter Notebook. Attached the log for the command you suggested
a.log

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV It seems from the log that rgf_python hasn't been upgraded via pip on your system.

OK, let's try to compile it manualy: https://github.com/fukatani/rgf_python#cmake
Please provide the log of the commands.

from rgf.

LavoriniV avatar LavoriniV commented on May 11, 2024

Done, attached the logs. It seems everything it's fine...
cmake.log
build.log

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV Yeah, it's seems everything is OK.
Now please go to bin\rgf folder where successfully compiled rgf file is placed. Create two dummy files there:
data.x and write in it the following content

1 0 1 0
0 1 0 1

and data.y and write in it the following content

1
-1

After creating two files try to fit rgf:
rgf train train_x_fn=data.x train_y_fn=data.y model_fn_prefix=temp.model reg_L2=1

And post the log here please.

A little explanation: sometimes on some systems rgf compiles without any errors but it's still broken (I don't know why). So we need to confirm (with the simplest task) that binary rgf file works well.

from rgf.

LavoriniV avatar LavoriniV commented on May 11, 2024

Than maybe this is the case:
Ran 0 examples: 0 success, 0 failure, 0 error

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV What is this? Did you run my test case?

from rgf.

LavoriniV avatar LavoriniV commented on May 11, 2024

Yes, I created the two files and ran the command you suggested

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV So this is the output of the command with 2 files?

Ran 0 examples: 0 success, 0 failure, 0 error

from rgf.

LavoriniV avatar LavoriniV commented on May 11, 2024

yes, exactly. I suppose it do not try to read anything: I get the same response if running rgf --help

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV It's strange. Do you have the possibility to download g++ and compile with it?

from rgf.

fukatani avatar fukatani commented on May 11, 2024

I can't find the word 'examples' in this repository.
This output may be not from rgf.

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@fukatani Yeah! I confirm that this is not rgf's output.

@LavoriniV Is this output from AWS or something like this?

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV Please repeat all activities from my comment, but add the Verbose parameter: rgf train train_x_fn=data.x train_y_fn=data.y model_fn_prefix=temp.model reg_L2=1 Verbose

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@tianke0711 @LavoriniV updates?

You also could try to install new (2.1.2) version.

from rgf.

LavoriniV avatar LavoriniV commented on May 11, 2024

Hello! So, I'm running all from my laptop, and also with the 'verbose' parameter set I get the same output. Also with the 2.1.2 version. I will try with another system in the weekend, and come back to you

from rgf.

fukatani avatar fukatani commented on May 11, 2024

This issue may help you.
#69

Finally, reporter solved installation problem by fix ~/.rgfrc

exe_location=C:\Anaconda3\Lib\site-packages\rgf\rgf.exe

However, the location of rgf.exe may be different depending on the user.

Do you correctly specify the location of rgf.exe?
You can confirm its location by output of installation.

from rgf.

fukatani avatar fukatani commented on May 11, 2024

@LavoriniV
Basically, the response is always OK.
When I or StrikeRUS may close the issue when we think it is outdated.

But in that case you can reopen the issue when you want to restart.

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV
Does just rgf -h have the same output?
If yes you could either install last version from master branch, or read #97 and set executional rights to rgf by yourself.

UPD: Just found that you've already answered to this question. So please try to give executional rights to rgf.

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV I've reread the thread and become almost sure that the solution is giving execution rights to rgf.

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

@LavoriniV any updates?

from rgf.

StrikerRUS avatar StrikerRUS commented on May 11, 2024

ping @LavoriniV

from rgf.

fukatani avatar fukatani commented on May 11, 2024

Please feel free to reopen this issue, if anyone want to restart.

from rgf.

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.