Digits Example

Hi all,

I am trying to run a classification model for the Digits dataset on the quantum annealing processor. However, I am getting an error in the Jupyter notebook, no module named QBoost. How do I import the QBoost module into the Jupyter notebook? My code can be found here: https://github.com/Bhaney44/Leap/blob/master/Quantum_Digits.py 

Thanks in advance,

Brian

0

Comments

7 comments
  • Hi Brian,

    Unfortunately qboost is actually a demo, and not really a library.
    For this reason, it is not installed on Jupyter Hub.

    If you want to include the qboost functionality in your project, you can copy the qboost.py file to your project.

    The qboost code now lives here:
    https://github.com/dwavesystems/demos/tree/master/qboost

    There is also the option to go down the path of contributing to our qboost demo project by creating a pull request.

    0
    Comment actions Permalink
  • Issues with that are 1) I do not know the syntax for pulling a function from another script from the command line; 2) I do not know how to do do a pull request from GitHub. Do you have any advice for running a classifier for image data on the QPU  or to resolve the two issues? Ultimately, that is all I am trying to do right now. Thanks again, I sincerely appreciate the advice.

    0
    Comment actions Permalink
  • When I click new pull request, this is the screen I get:

    0
    Comment actions Permalink
  • 0
    Comment actions Permalink
  • Hi Brian,

    A pull request actually is used to request to add your code to the repository.

    Here are some links with information about it:
    https://help.github.com/en/articles/about-pull-requests

    https://help.github.com/en/articles/creating-a-pull-request-from-a-fork

    Since QBoost is not a library, but part of a demo project, copying the whole qboost.py file to your project seems like the most straight forward solution.

    Here's the link to the specific file:
    https://github.com/dwavesystems/demos/blob/master/qboost/qboost.py

     

    0
    Comment actions Permalink
  • Copying the script does not allow qboost to run. Thanks anyway.

    0
    Comment actions Permalink
  • Hi Brian,

    What part doesn't work exactly?

    I believe I had to install a package that is required by qboost.

    It should tell you the package required in an error message when you try to run it.

    There will be a dependency error or something along those lines.

    Did you put the qboost.py file in the same directory as the script that is importing it?

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post