GithubHelp home page GithubHelp logo

Comments (3)

jameswex avatar jameswex commented on July 21, 2024 1

The What-If Tool wasn't updated to work with the new Vertex AI models/cloud deployments, but only works with the old AI Platform models. I wonder if that is the issue you are running into. That being said, if you can query your model through other means in the jupyter notebook (outside of the What-If Tool), then you could put that same code inside a custom prediction function for WIT instead of using the set_ai_platform_model functionality.

from what-if-tool.

jameswex avatar jameswex commented on July 21, 2024

Thanks for reaching out. Are you able to share the exact code that is failing to execute and what is your setup? Is this inside a notebook environment?

from what-if-tool.

callysthenes avatar callysthenes commented on July 21, 2024

Thanks for the response. I am running a Jupyter notebook with Python 3.9.12 in an Anaconda framework:

C:\Users\Equipo\anaconda3\python.exe
3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]
sys.version_info(major=3, minor=9, micro=12, releaselevel='final', serial=0)
Selected Jupyter core packages...
IPython : 8.2.0
ipykernel : 6.9.1
ipywidgets : 7.6.5
jupyter_client : 6.1.12
jupyter_core : 4.9.2
jupyter_server : 1.13.5
jupyterlab : 3.3.2
nbclient : 0.5.13
nbconvert : 6.4.4
nbformat : 5.3.0
notebook : 6.4.8
qtconsole : 5.3.0
traitlets : 5.1.1

The code is as follows, (after fitting an XGBoost model)

import os
os.environ["GOOGLE_APPLICATION_CREDENTIALS"]="folkloric-grid-353308-c47f8ed05edf.json"
def adjust_prediction(y_test_predict):
  return [1 - y_test_predict, y_test_predict]

config_builder = (WitConfigBuilder(test_examples.tolist(), data.columns.tolist() + ['Target'])
  .set_ai_platform_model('folkloric-grid-353308', 'Whatif', 'v1', adjust_prediction=adjust_prediction)
  .set_target_feature('Target')
  .set_label_vocab([0, 1]))
WitWidget(config_builder, height=1000)

Tool works partially, but not sure how to get the permissions so to have the full functionality (i.e. optimizaiton strategies, confusion matrixes, etc)

from what-if-tool.

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.