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

Remove params setting options from constructors of samplers #375

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

K-Suzuki-Jij
Copy link
Collaborator

Changes

Removed the option to set parameters such as num_reads from the constructors of SASampler and SQASampler.
We also added a test to confirm that it cannot be set, but this will be removed in the next update as it will become a specification in the future.

Examples

After this changes,

>>> import openjij as oj
>>> oj.SASampler(num_reads=10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'num_reads'
>>> oj.SQASampler(num_reads=10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'num_reads'

@codeclimate
Copy link

codeclimate bot commented Jun 12, 2023

Code Climate has analyzed commit 6affaa7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 56.1% (-0.5% change).

View more on Code Climate.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #375 (6affaa7) into main (5106a84) will decrease coverage by 0.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #375      +/-   ##
==========================================
- Coverage   66.05%   65.81%   -0.24%     
==========================================
  Files          46       46              
  Lines        2675     2671       -4     
  Branches      959      943      -16     
==========================================
- Hits         1767     1758       -9     
- Misses        623      628       +5     
  Partials      285      285              
Flag Coverage Δ
cxxopenjij 68.24% <ø> (ø)
openjij 63.48% <100.00%> (-0.48%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
openjij/sampler/sa_sampler.py 84.15% <100.00%> (+0.07%) ⬆️
openjij/sampler/sqa_sampler.py 87.93% <100.00%> (-0.50%) ⬇️

... and 2 files with indirect coverage changes

@yuyamashiro yuyamashiro merged commit 5eedc34 into main Jun 15, 2023
22 checks passed
@yuyamashiro yuyamashiro deleted the hotfix/params branch June 15, 2023 02:36
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

Successfully merging this pull request may close these issues.

None yet

2 participants