Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add QMC sampler #2423
Add QMC sampler #2423
Changes from 81 commits
08d446b
5ebd943
227a410
f66ce66
e18f7bc
1b63ac8
9b77379
da4afd5
a22163e
3324814
5b9316c
38146d8
af638c8
04dbb26
44d2c08
68f493e
1c79e13
e69eabc
d06d3d0
d734437
bafae2b
d63fab9
bd87bf1
2a1a3ce
e74026b
a832f29
9004da8
417ad68
2c2af67
0eff706
3132568
08095fb
42b4a7f
9013512
a4db2c5
1c4f4a6
1e05676
6e27391
e5c3964
d0d6518
7c4b3f0
31a2e00
92765aa
84703d4
ce81c33
ebe8095
cf66127
d6a5d15
bbeba12
013bf56
121e5b2
dfb86cd
1c958fd
d0771a3
bbe7e06
e72d243
fad5610
9a02e7d
0e41caa
4a6ef96
d933179
10948e2
afac48f
7f1dfa8
30dc72c
1a1793e
5734766
4ea95e2
d652971
8f64754
b1b28eb
b9e4393
9d8d75f
74d320f
a6a9099
f5125b3
a0e3c24
ee532db
4f1f281
2679f5e
73dbf53
7c58199
3edc8b3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keisuke-umezawa
I am wondering if we should leave the dependence of
key_qmc_id
onself._qmc_type
,self._scramble
, andself._seed
. Let me know if this is what you intended!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I meant that we can use some constant string such as
qmc_sampler:sample_id
e.g. https://github.com/optuna/optuna/blob/master/optuna/integration/botorch.py#L471-L473
Why do we need to create a different key for each
scramble
andseed
pair?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current implementation, users can use different
scramble
options andseed
(of QMC sequence, not random seed) in different workers in distributed settings. Maybe it makes sense to warn users if they used differentscramble
andseed
because it is unlikely to be an intended use case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I understand. But, if we really want to warn it to users, we may have better way to share the information. We do not need to add it in this PR, but we can update it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it is not an atomic transaction. Is it okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atomicity is unnecessary for single-thread optimization but in parallel / distributed cases, it makes a difference. As long as the evaluation of function takes a much longer time than the access to the storage here, the transaction becomes "almost" atomic. Experimentally, these operations are almost atomic unless the objective function can be evaluated really quickly and the number of workers is more than 100. If this is not atomic, multiple workers will end up evaluating the same
sample_id
(therefore, same hyperparameters), but this does not result in skip ofsample_id
anyways. Therefore, we don't actually need atomicity, but without atomicity, the performance of optimization might decay due to duplicated evaluation of the hyperparameters.