mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-04 06:03:10 +00:00
Seed by microseconds. Determinisme checked.
This commit is contained in:
parent
377072ef79
commit
45bdcc3308
9
study.py
9
study.py
@ -27,17 +27,16 @@ def study():
|
|||||||
simCnt = 0
|
simCnt = 0
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
|
if config.deterministic:
|
||||||
|
random.seed("DASsimulator")
|
||||||
|
else:
|
||||||
|
random.seed(str(now).split(".")[1])
|
||||||
execID = now.strftime("%Y-%m-%d_%H-%M-%S_")+str(random.randint(100,999))
|
execID = now.strftime("%Y-%m-%d_%H-%M-%S_")+str(random.randint(100,999))
|
||||||
|
|
||||||
sim.logger.info("Starting simulations:", extra=sim.format)
|
sim.logger.info("Starting simulations:", extra=sim.format)
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
|
||||||
for shape in config.nextShape():
|
for shape in config.nextShape():
|
||||||
if config.deterministic:
|
|
||||||
random.seed("DASsimulator")
|
|
||||||
else:
|
|
||||||
random.seed(random.randint(0, 100))
|
|
||||||
|
|
||||||
|
|
||||||
sim.resetShape(shape)
|
sim.resetShape(shape)
|
||||||
sim.initValidators()
|
sim.initValidators()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user