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?
Thanks in advance,
Brian
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/qboost
There is also the option to go down the path of contributing to our qboost demo project by creating a pull request.
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.
When I click new pull request, this is the screen I get:
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/qboost/blob/master/qboost/qboost.py
Copying the script does not allow qboost to run. Thanks anyway.
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?
Please sign in to leave a comment.