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

Refactor/oo more tests #1051

Merged
merged 13 commits into from
Aug 29, 2023
Merged

Refactor/oo more tests #1051

merged 13 commits into from
Aug 29, 2023

Conversation

jlnav
Copy link
Member

@jlnav jlnav commented Aug 2, 2023

No description provided.

@jlnav jlnav requested review from shuds13 and jmlarson1 August 9, 2023 20:15
@jlnav jlnav marked this pull request as ready for review August 10, 2023 16:28
out=[("num_procs", int), ("num_gpus", int), ("x", float, 2)],
user={
"initial_batch_size": gpu_test.nworkers - 1,
"max_procs": (gpu_test.nworkers - 1) // 2, # Any sim created can req. 1 worker up to max
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test needs updating following #1058, I can do this if it helps.

Update this line and add second loop.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops - I meant test_GPU_variable_resources_multi_task.py, But I think this line should be changed here also.

@shuds13
Copy link
Member

shuds13 commented Aug 23, 2023

I think adding the parse_args option to ensemble would be good, as otherwise, the knowing of nworkers is a bit magical.

assert np.array_equal(H0["x"], H["x"])
assert np.all(H["sim_ended"])
sampling = Ensemble()
sampling.H0 = H0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should stick to function calls, matter of style. Or should we make this an option to Ensemble()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sampling = Ensemble(H0=H0)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both ways of setting H0 (and other attributes) are valid:

sampling = Ensemble(H0=H0)
or:

sampling = Ensemble()
sampling.H0 = H0

@jlnav jlnav merged commit 368e36e into develop Aug 29, 2023
15 checks passed
@jmlarson1 jmlarson1 deleted the refactor/oo_more_tests branch September 21, 2023 13:51
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

3 participants