TUM-DAML / seml

SEML: Slurm Experiment Management Library
Other
165 stars 29 forks source link

Random config: reverse if-statements #93

Closed yascho closed 2 years ago

yascho commented 2 years ago

Reference issue

Given the following config:

random:
  samples: 5
  seed: 42
  a:
    type: uniform
    min: 0
    max: 1
    seed: 43

  b:
    type: uniform
    min: 0
    max: 1
    seed: 44

The outer seed overwrites the inner seeds.

What does this implement/fix?

Reversing the if-statements [1] solves the problem.

[1] https://github.com/TUM-DAML/seml/blob/master/seml/parameters.py#L79

Additional information

Not sure if you really want to reset the outer seed for every parameter. Just setting the outer seed once should be sufficient. But seems like this requires a larger fix, since the inner seeds then overwrite the outer seed again.