Comments (18)
There is information around contributing here https://github.com/Qiskit/qiskit-machine-learning/blob/main/CONTRIBUTING.md#contributing which also links to the main Qiskit contributing docs that have a lot of common information.
The easiest way to get the tools you need for development installed is to do a pip install -r requirements-dev.txt
- you will see the file in the root of the repo. It has the list of all the tools needed - because they are only needed if you are doing dev they are not part of the standard requirements/install.
from qiskit-machine-learning.
This sounds like a super interesting introduction to this repo, any chance I could take this issue over @darshkaushik
@mattwright99, I have already invested several hours and would like to continue with it, hope that's fine
@darshkaushik how is your progress working on this issue?
Have gone through VQE and hope to commit by today, will let you know if I get stuck somewhere.
from qiskit-machine-learning.
@darshkaushik thanks, I'll keep this issue on you.
from qiskit-machine-learning.
Yeah, please install it via pip install pylintfileheader
. You should also have qiskit-terra
installed in your python environment.
from qiskit-machine-learning.
This is likely due to different line endings in linux and windows: \n
vs \r\n
. I guess you did not edit copyright notices, so ignore them.
from qiskit-machine-learning.
In looking at the code there are other params too with defaults of None where the typehint does not define them as Optional. I can see None being a valid value for optimizer if internally we then create some default Optimizer for convenience. Otherwise it seems to me that its being defaulted to an invalid value.
If some are left Optional I think we need to check the typehints on some of the getters to mark them Optional too - of course if we default an Optimizer on construction then the setter would not need to be type hinted as Optional.
from qiskit-machine-learning.
@adekusar-drl I would like to contribute to fix this issue.
Are the changes to be done in classifier/regressor or the parent class TrainableModel
?
NeuralNetworkClassifier
has an overriden __init__
method whereas NeuralNetworkRegressor
does not.
Also if we choose to have a default value for the parameters, on what basis should they be chosen is a little ambiguous.
from qiskit-machine-learning.
Thanks for taking care of this! I think this issue should be fixed in TrainableModel
as it is a super class for both regressor/classifier and there's optimizer
property in it. A default value and behavior may be similar to what we have in VQE
, e.g. let's start from SLSQP
(although it may be not the best choice) as a value, if it does work well by default in the tests, then you may switch to BFGS/Cobyla
as they are heavily used in the tests. Also, you may explore VQE
to understand how it should look like.
from qiskit-machine-learning.
This sounds like a super interesting introduction to this repo, any chance I could take this issue over @darshkaushik
from qiskit-machine-learning.
@darshkaushik how is your progress working on this issue?
from qiskit-machine-learning.
@adekusar-drl please review the changes.
Also, it being my first issue, I need some help on how to run tests and style checks on a windows system.
from qiskit-machine-learning.
@darshkaushik Could you please create a PR for your changes? If it is not yet fully ready, you can create a draft PR and/or mark with a prefix "[WIP]" in the title, work in progress.
Usually I run tests from PyCharm directly, it's pretty easy. To run various checks you can install make
on windows and run the makefile. Or you can run manually command from the makefile, e.g. pylint -rn qiskit_machine_learning test tools
for linting, black --check qiskit_machine_learning test tools
to check style and so on.
from qiskit-machine-learning.
@adekusar-drl I tried using pylint command directly from the qiskit-machine-learning
directory in my local system, but I always get the error ModuleNotFoundError: No module named 'pylintfileheader'
. This error comes only in this particular directory, in every other directory pylint works fine and I can't find a fix for it.
Also, I have cloned just the qiskit-machine-learning
repo, without qiskit-terra
, but I don't think that it would be the reason for it.
from qiskit-machine-learning.
when linting got invalid-file-header
for all the files, why is it so?
from qiskit-machine-learning.
The pylint header extension is quite error prone in my experience and doesn't give you any real debugging information. This is why other projects use the verify_headers.py
script I wrote to do this. It's faster and provides real debug information on why a header is invalid.
from qiskit-machine-learning.
other projects use the
verify_headers.py
script I wrote to do this.
@mtreinish where can I find it?
@adekusar-drl I did the unit tests they work fine for all the files in the algorithms
directory, but others do not, I hope that's okay as it is unrelated to this fix.
from qiskit-machine-learning.
@darshkaushik it's apparently not included in machine-learning repo we'll have to port it from another qiskit repository like: https://github.com/Qiskit/qiskit-terra/blob/main/tools/verify_headers.py it should be a separate PR moving away from the pylint plugin to that script.
from qiskit-machine-learning.
I hope the the changes look fine. Let me know if you have any suggestions.
from qiskit-machine-learning.
Related Issues (20)
- Add Python 3.12 support
- Update links to qiskit.org/documentation HOT 1
- Clarification on Method Used for PSD Projection in FidelityQuantumKernel HOT 5
- VQC inside session HOT 3
- Improve documentation on reshaping SamplerQNN output via interpret Callable
- How to merge custom quantum circuit with quantum machine learning model circuit? HOT 2
- Machine Learning Unit Tests Badge Shows Fail
- TorchConnector returns two sets of weights in the state dict instead of one
- ISA circuit support for latest Runtime HOT 4
- Enhancement of PyTorch connector HOT 2
- Extend unit test coverage with `Hypothesis` in numerical tests
- Add `jit` compilation to the Torch connector with `thunder`
- Revamp `README.md` with structured information HOT 4
- Set up a security policy (@maintainers)
- Multi-class Classification Problem Using QSVC HOT 3
- Error when testing samples with labels other than {0, 1} in the MNIST dataset. HOT 6
- Revert CI environment to latest PyTorch once UTF bug is fixed
- Binary classification problem using NeuralNetworkClassifier and cross entropy loss HOT 1
- MacOS in CI - macos-latest is now ARM HOT 2
- Link Qiskit 1.0 migration instructions in Readme
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qiskit-machine-learning.