Git Product home page Git Product logo

pysisso's People

Contributors

davidwaroquiers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pysisso's Issues

SISSO executable

Hi,
Thanks for sharing. I am currently running SISSO for examplaes you shared, when I ran the cubic_function.py in the 01_regresion folder, it gave me the following message:
ValueError: SISSOJob requires the SISSO executable to be in the path.
Default executable name is "SISSO" and you provided "SISSO".
Download the SISSO code at https://github.com/rouyang2017/SISSO and compile the executable or fix the name of your executable.
When I execute SISSO.exe, he works correctly, but I can't use pysisso, it always reminds me that the SISSO executable is not in the path, so I would like to ask if this SISSO executable is a file or a folder, and if it is a folder, which files it should contain, I am looking forward to your reply!

the SISSO executable is not available

I have run the Fortran program and got the SISSO .exe executable, and I still get an error after setting up the virtual environment: ValueError: SISSOJob requires the SISSO executable to be in the path.
Hope to get answered. Thank you!

Operation set error

Dear David,

When applying all operations in the operation set "(+)(-)(*)(/)(exp)(exp-)(^-1)(^2)(^3)(sqrt)(cbrt)(log)(|-|)(scd)(^6)", I end up having the following error listed below.

Output:
Job return code is -9. Terminating...
Traceback (most recent call last):
File "/home/PycharmProjects/Pysisso_test/Diabetes Regression Test.py", line 34, in
sisso_regressor.fit(diabetes_X_train, diabetes_y_train) #generated predicted graph
File "/home/anaconda3/envs/mse-ml/lib/python3.8/site-packages/pysisso/sklearn.py", line 271, in fit
c.run()
File "/home/anaconda3/envs/mse-ml/lib/python3.8/site-packages/custodian/custodian.py", line 372, in run
self._run_job(job_n, job)
File "/home/anaconda3/envs/mse-ml/lib/python3.8/site-packages/custodian/custodian.py", line 510, in _run_job
raise ReturnCodeError(s, True)
custodian.custodian.ReturnCodeError: Job return code is -9. Terminating...

Could I check if there would be a way to fix this other than limiting operations to "(+)(*)(^2)(^3)(^-1)(cos)(sin)"? Also what would be the cause of this error?

Below is my code for reference.
Thanks.

Code:
import matplotlib.pyplot as plt
import numpy as np
from pysisso.sklearn import SISSORegressor
from sklearn import datasets, linear_model
from sklearn.metrics import mean_squared_error, r2_score
from pysisso.outputs import SISSOOut
from joblib import dump, load

Define general parameters

NPOINTS = 100 # Number of data points
SIGMA = 0.5 # Randomness in the data points
PLOT_FIGURES = False # whether to interactively plot the figures with matplotlib
SAVE_FIGURES = False # whether to save the matplotlib figures to a file
CLEAN_RUN_DIR = False # whether to remove the SISSO_dir after the fit

diabetes_X, diabetes_y = datasets.load_diabetes(return_X_y=True)

diabetes_X_train = diabetes_X[:-20]
diabetes_X_test = diabetes_X[-20:]

diabetes_y_train = diabetes_y[:-20]
diabetes_y_test = diabetes_y[-20:]

sisso_regressor = SISSORegressor(
rung=3,#rung of the feature space to be constructed i.e number of iterative applications of the mathematical operations in the construction of the complex features. i.e depth
opset="(+)(-)()(/)(exp)(exp-)(^-1)(^2)(^3)(sqrt)(cbrt)(log)(|-|)(scd)(^6)", #"(+)(-)()(exp)(exp-)(^-1)(^2)(^3)(sqrt)(^6)(sin)(cos)"
desc_dim=3,#number of descriptors used, i.e number of columns composed
clean_run_dir=CLEAN_RUN_DIR,
maxcomplexity=3 #max feature complexity (number of operators in a feature) i.e overall no. aft combining cols.
)

sisso_regressor.fit(diabetes_X_train, diabetes_y_train) #generated predicted graph
"""
filename = 'model.sav'
dump(sisso_regressor, filename)
"""
diabetes_y_pred = sisso_regressor.predict(diabetes_X_test)

sisso_out = SISSOOut.from_file(filepath="SISSO_dir/SISSO.out")
sisso_model = sisso_out.model

descriptors = [str(d) for d in sisso_model.descriptors]
#print(sisso_model.descriptors)
#print(descriptors)
coeff = [d for d in sisso_model.coefficients[0]] #note, .coeff is 2D so must have [0] first
#print(coeff)

for i in coeff:
t = coeff.index(i)
i = round(i)
if i>=0: i = "+" + str(i)
elif i<0: i = str(i)
coeff[t]=i

output = "Model:"
for i in range(len(descriptors)):
output += " " + coeff[i] + descriptors[i] + " "
print(output)
print("RMSE: " + str(sisso_model.rmse[0])) #Note, .rmse is 2D so must have [0]
print("Dimension: " + str(sisso_model.dimension))

SISSOJob requires the SISSO executable to be in the path.

Sir,I'd like to ask you a question about installation. When I ran the first example, I encountered the following error.

SISSOJob requires the SISSO executable to be in the path.
Default executable name is "SISSO" and you provided "SISSO".
Download the SISSO code at https://github.com/rouyang2017/SISSO and compile the executable or fix the name of your executable.

Is there a problem with my installation?

OMP Usage

Hi Dr. Waroquiers,

I have a query regarding the OMP. It was stated that OMP was to be applied before applying SISSO in the documentation. However, it was also stated that OMP would be a special case of SISSO.

Could I check if this means OMP is already included in the .fit of the SISSORegressor class, and that we do not have to implement it first, followed by the regression? That is, having

sisso_regressor = SISSORegressor(...)
sisso_regressor.fit(...)

would be enough to run the SISSO algorithm?

Thanks.
P.s Regarding the sisso executable path email I sent last week, it executes fine now thanks.

Sample failed to run, Job return code is 174

Hi,
Thanks for sharing. I am currently running SISSO for examplaes you shared, when I ran the cubic_function.py in the 01_regresion folder, it gave me the following message:
Job return code is 174. Terminating...
Traceback (most recent call last):
File "cubic_function.py", line 71, in
sisso_regressor.fit(X, y)
File "/home/zihanyu/anaconda2/envs/py36/lib/python3.6/site-packages/pysisso/sklearn.py", line 271, in fit
c.run()
File "/home/zihanyu/anaconda2/envs/py36/lib/python3.6/site-packages/custodian/custodian.py", line 372, in run
self._run_job(job_n, job)
File "/home/zihanyu/anaconda2/envs/py36/lib/python3.6/site-packages/custodian/custodian.py", line 510, in _run_job
raise ReturnCodeError(s, True)
custodian.custodian.ReturnCodeError: Job return code is 174. Terminating...
I am not sure where I did wrong and I don't see any solution for that. May I get some help for that? Thanks!

SISSOJob requires the SISSO executable to be in the path

Dear David,

thank you for providing use a Python version of the SISSO approach. I am trying to run your example for the regression and I got this error : ""SISSOJob requires the SISSO executable to be in the path. Default executable name is "SISSO" and you provided "SISSO". Download the SISSO code at https://github.com/rouyang2017/SISSO and compile the executable or fix the name of your executable. ""

I already got the executable namely "sisso.x" from the repository you mentioned. However, I misunderstand the next steps to complete the installation.. Should I use also other files from such repository ?

Can you orientate me ?

Best,

ERROR while running pysisso

Hi there,

I am trying to run the "cubic_function.py" example however, I am facing an issue while running it.
First, an issue with the SISSO executable is not available. Then, after some search on the internet, I found a suggestion to add the SISSO executable to the path as an environment variable. But then some other error popped up, as mentioned below.

Traceback (most recent call last):
File "D:/MTP/Calculations/python script/databases.py", line 72, in
sisso_regressor.fit(X, y)
File "D:\MTP\Calculations\python script\lib\site-packages\pysisso\sklearn.py", line 271, in fit
c.run()
File "D:\MTP\Calculations\python script\lib\site-packages\custodian\custodian.py", line 372, in run
self._run_job(job_n, job)
File "D:\MTP\Calculations\python script\lib\site-packages\custodian\custodian.py", line 450, in _run_job
p = job.run()
File "D:\MTP\Calculations\python script\lib\site-packages\pysisso\jobs.py", line 72, in run
p = subprocess.Popen(cmd, stdin=None, stdout=f_stdout, stderr=f_stderr)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Could anyone please guide me towards resolving the issue.

Thanks

old sklearn version?

The project requires a very old sklearn:

scikit-learn = "^0.23.1"

is there any reason a more modern version couldn't be used? That requirement makes this basically incompatible with modern installations.

ValueError: Should get exactly one match for "Descriptor dimension:".

When I add SISSO 3.0 in my path, I can successfully run SISSO in terminal. But when I execute cubic_function.py, I get following error:

/home/liwentao/robot/pysisso/examples_usage/basic/01_regression Traceback (most recent call last): File "/home/liwentao/robot/pysisso/examples_usage/basic/01_regression/cubic_function.py", line 64, in <module> sisso_regressor.fit(X, y) File "/home/liwentao/robot/pysisso/pysisso/sklearn.py", line 273, in fit self.sisso_out = SISSOOut.from_file( # pylint: disable=W0201 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/liwentao/robot/pysisso/pysisso/outputs.py", line 562, in from_file params = SISSOParams.from_string(match[0]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/liwentao/robot/pysisso/pysisso/outputs.py", line 501, in from_string raise ValueError( ValueError: Should get exactly one match for "Descriptor dimension:".

Are there any solutions? Thanks!

ValueError: SISSOJob requires the SISSO executable to be in the path.

I downloaded SISSO Fortran code from https://github.com/rouyang2017/SISSO
and I compiled it on Windows 10. Then I got "SISSO.exe" executable.
Then I move "SISSO.exe" to my pysisso working directory and I renamed "SISSO.exe" to "SISSO", as shown in below figure.
image

When I run python code containing SISSORegressor(), I got error message as below:

ValueError: SISSOJob requires the SISSO executable to be in the path.
Default executable name is "SISSO" and you provided "SISSO".
Download the SISSO code at https://github.com/rouyang2017/SISSO and compile the executable or fix the name of your executable.

I don't understand why I encountered this error even though I prepared SISSO executable in my working directory.

custodian.custodian.ReturnCodeError: Job return code is 1

Hi, I am trying to run the examples in cluster system.Whenever I try to run the code using 'mpirun -np 8 python cubic.py',the following error comes,
sisso_regressor.fit(X, y)
File "/export/home/kjeyakumar/anaconda3/lib/python3.8/site-packages/pysisso/sklearn.py", line 271, in fit
c.run()
File "/export/home/kjeyakumar/anaconda3/lib/python3.8/site-packages/custodian/custodian.py", line 372, in run
self._run_job(job_n, job)
File "/export/home/kjeyakumar/anaconda3/lib/python3.8/site-packages/custodian/custodian.py", line 510, in _run_job
raise ReturnCodeError(s, True)
custodian.custodian.ReturnCodeError: Job return code is 1. Terminating...

Installation issue

I met with the following error when trying to install pysisso with peotry

cd pysisso
poetry add pysisso

Using version ^0.3.1 for pysisso

Updating dependencies
Resolving dependencies... (0.0s)

  AssertionError

  

  at ~/miniconda3/lib/python3.7/site-packages/poetry/mixology/incompatibility.py:60 in __init__
       56│                     # intersection, they're mutually exclusive, making this incompatibility
       57│                     # irrelevant, since we already know that mutually exclusive version
       58│                     # ranges are incompatible. We should never derive an irrelevant
       59│                     # incompatibility.
    →  60│                     assert by_ref[ref] is not None
       61│                 else:
       62│                     by_ref[ref] = term
       63│ 
       64│             new_terms = []

SISSO Executables

I added the path in ~/.bashrc. Still the error.
ValueError: SISSOJob requires the SISSO executable to be in the path.
Default executable name is "SISSO" and you provided "SISSO".
Download the SISSO code at https://github.com/rouyang2017/SISSO and compile the executable or fix the name of your executable.

Installation failed for pip install pysisso (both versions 0.3.1 and 0.3.2)

Hello,

I tried to executre pip install pysisso both with latest release and version 0.3.1. First, I was told to install Visual C++14 with the corresponding link, which I did. Afterwards, I still get the error in the attached file and do not know how to solve it. Cloning the code, going to root pysisso and executing poetry install also failed.

I am using Windows, and python version 3.9.12. Could you help me with this?

Thanks in advance!
Milena
error_pysisso.txt

ValueError: SISSOJob requires the SISSO executable to be in the path.

Hi, I'm just beginning to use this package, and I can't seem to get the example working.

System: NVIDIA HPC SDK 20.11
CUDA 11.0 Ubuntu 20.04

Steps to reproduce:

  1. Install poetry: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
  2. Add poetry to path export PATH="$HOME/.poetry/bin:$PATH"
  3. Clone pysisso:git clone [email protected]:Matgenix/pysisso.git
  4. Install pysisso: cd pysisso ** poetry install
  5. Open poetry: poetry shell
  6. Run example: python examples_usage/basic/01_regression/cubic_function.py

Stack trace:

Traceback (most recent call last):
File "examples_usage/basic/01_regression/cubic_function.py", line 59, in
sisso_regressor.fit(X, y)
File "/home/jovyan/pysisso/pysisso/sklearn.py", line 271, in fit
c.run()
File "/home/jovyan/.cache/pypoetry/virtualenvs/pysisso-zaPbc9Aa-py3.7/lib/python3.7/site-packages/custodian/custodian.py", line 372, in run
self._run_job(job_n, job)
File "/home/jovyan/.cache/pypoetry/virtualenvs/pysisso-zaPbc9Aa-py3.7/lib/python3.7/site-packages/custodian/custodian.py", line 450, in _run_job
p = job.run()
File "/home/jovyan/pysisso/pysisso/jobs.py", line 58, in run
self.SISSO_exe
ValueError: SISSOJob requires the SISSO executable to be in the path.
Default executable name is "SISSO" and you provided "SISSO".
Download the SISSO code at https://github.com/rouyang2017/SISSO and compile the executable or fix the name of your executable.

Any idea what could be going wrong?

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.