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

Use OrderedDict #31

Open
bkraske opened this issue Oct 25, 2023 · 1 comment
Open

Use OrderedDict #31

bkraske opened this issue Oct 25, 2023 · 1 comment

Comments

@bkraske
Copy link
Member

bkraske commented Oct 25, 2023

Propose using ordered dictionaries for reproducibility/fixing of seeds (see branch: ordered_dictionaries)

Both expand! and branching_sim iterate over a dictionary (odict), which may not have consistent order (Why don’t Julia dictionaries preserve order?). As I understand it, the seeding scheme is dependent on these dictionaries having a consistent order. There are cases with unordered dictionaries where lower bound values may be different with the same seed due to the scenarios being evaluated in a different order. Using ordered dictionaries fixes this as evaluation order will be consistent.

Tests are currently passing, but I haven't compared benchmark times yet.

@zsunberg
Copy link
Member

I went ahead and created a PR (#32 ) so that it is easier to see the changes.

We'll talk about this more in a meeting sometime.

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

No branches or pull requests

2 participants