Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Error in MacOS #26

Closed
bhishanpdl opened this issue Nov 23, 2020 · 2 comments
Closed

Installation Error in MacOS #26

bhishanpdl opened this issue Nov 23, 2020 · 2 comments

Comments

@bhishanpdl
Copy link

bhishanpdl commented Nov 23, 2020

I was trying to install this module in brand new conda environment "expl" in Macos catalina.

Commands

xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install nodejs
npm install -g localtunnel
/Users/poudel/opt/miniconda3/envs/expl/bin/pip install explainx

Code

path_model_xgb = '../models/model_xgb_logtarget.dump'
model = xgboost.XGBRegressor()
model.load_model(path_model_xgb)
ypreds_log1p = model.predict(df_Xtest)
ypreds = np.expm1(ypreds_log1p)
print('ytest:', ytest[:3]) # this works, xgboost have no problem

#=========== this code fails===========
from explainx import *
explainx.ai(df_Xtest, ytest, model, model_name="xgboost")

Error

---------------------------------------------------------------------------
gaierror                                  Traceback (most recent call last)
<ipython-input-9-18b2a22d1f88> in <module>
      1 from explainx import *
----> 2 explainx.ai(df_Xtest, ytest, model, model_name="xgboost")

~/opt/miniconda3/envs/expl/lib/python3.7/site-packages/explainx/explain.py in ai(self, df, y, model, model_name, mode)
     57         instance_id = self.random_string_generator()
     58         analytics = Analytics()
---> 59         analytics['ip'] = analytics.finding_ip()
     60         analytics['mac'] = analytics.finding_address()
     61         analytics['instance_id'] = instance_id

~/opt/miniconda3/envs/expl/lib/python3.7/site-packages/explainx/lib/analytics.py in finding_ip()
     15     @staticmethod
     16     def finding_ip():
---> 17         val = socket.gethostbyname(socket.gethostname())
     18         return val
     19 

gaierror: [Errno 8] nodename nor servname provided, or not known

Question

How to install explainx in Macos?

Versions

CPython 3.7.9
IPython 7.19.0

compiler   : Clang 10.0.0 
system     : Darwin
release    : 19.6.0
machine    : x86_64
processor  : i386
CPU cores  : 4
interpreter: 64bit

xgboost   1.2.0
numpy     1.19.4
joblib    0.17.0
pandas    1.0.4
sklearn   0.23.2
json      2.0.9
watermark 2.0.2
@rab657
Copy link
Contributor

rab657 commented Nov 23, 2020

Thank you for bringing this to our attention.
This error was not showing up when we push the code but we'll fix this right away.

@tawabshakeel
Copy link
Contributor

This issue has been resolved. @bhishanpdl kindly

  • uninstall the library using pip then install it again.

Thanks for pointing out the error.

@ms8909 ms8909 closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants