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

Hawk/dove batch run code for data analysis #60

Merged
merged 21 commits into from
Jan 23, 2024
Merged

Hawk/dove batch run code for data analysis #60

merged 21 commits into from
Jan 23, 2024

Conversation

rlskoeser
Copy link
Contributor

@rlskoeser rlskoeser commented Jan 16, 2024

in this PR:

  • custom batch run script specific to hawk/dove multi risk attitude game, optimized for large number of parameters + data collection
  • readme for the hawk/dove multi risk attitude with basic summary about the game setup and documentation for running the script
  • sample slurm batch script for running the batch run on an HPC cluster
  • fine tuning parameters and data collection for batch run + data analysis

revisions after review

  • fix relative link in the readme
  • remove extra newline in pyproject.toml
  • set file prefix default in argparse
  • clean up comments in slurm batch script
  • add more estimates for batch run & document (postponing since this will change pending other planned revisions)

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Merging #60 (caaf30b) into main (907c290) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
+ Coverage   63.53%   63.66%   +0.13%     
==========================================
  Files          16       16              
  Lines         820      823       +3     
==========================================
+ Hits          521      524       +3     
  Misses        299      299              

simulatingrisk/hawkdovemulti/README.md Show resolved Hide resolved
simulatingrisk/hawkdove/model.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
simulatingrisk/hawkdovemulti/README.md Outdated Show resolved Hide resolved
simulatingrisk/hawkdovemulti/batch_run.py Outdated Show resolved Hide resolved
simulatingrisk/hawkdovemulti/simrisk_batch.slurm Outdated Show resolved Hide resolved
simrisk-hawkdovemulti-batchrun --iterations 1 --max-step 125 --no-progress

# longer run: one iteration, max of 125 steps, no progress bar
# (typically completes in less than 15 minutes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Either remove this line or provide an estimate of how long 10 iterations typically takes

Suggested change
# (typically completes in less than 15 minutes)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't figure out that estimate yet for the current config (I tweaked the parameter set), but I probably need to for my own batch running anyway - do you think it's worth including some time estimates here?

Copy link
Contributor

@laurejt laurejt Jan 18, 2024

Choose a reason for hiding this comment

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

Not really, unless the extrapolation of 150 minutes (10 * 15) is really off

Comment on lines 34 to 50
3000 in one minute

8100 with one iteration

try with larger max step?


81000 with ten iterations

3000

8100 with one iteration, 125 max step
00:11:03


10 iterations, 125 steps, 2 hours = 66395 runs

Copy link
Contributor

Choose a reason for hiding this comment

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

Should these notes be included?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hahaha, whoops! nope, will clean that up

simulatingrisk/hawkdovemulti/batch_run.py Outdated Show resolved Hide resolved
@rlskoeser rlskoeser requested a review from laurejt January 19, 2024 16:32
@rlskoeser rlskoeser requested a review from laurejt January 23, 2024 20:32
@laurejt laurejt merged commit c3affde into main Jan 23, 2024
4 checks passed
@laurejt laurejt deleted the hawkdove-batchrun branch January 23, 2024 21:00
rlskoeser added a commit that referenced this pull request Feb 12, 2024
* Suppress convergence print statement for batch runs

* Customize risk category string output for batch run data collection

* Custom batch runner for hawk/dove multi risk sim

* Configure hawk/dove multi batch run to be installed as a script

* Step argument needs to be an integer also

* Revise multiprocessing based on slurm cpu efficiency report

* Correct basic hawk/dove readme for scope

* Use configured neighborhood sizes; correct typo in help string

* Add file prefix option for generated data files

* Turn random play odds completely off by default

* Add readme for hawk/dove multi risk game; document batch running

* Add sample batch run slurm script

* Update simulatingrisk/hawkdove/model.py

Co-authored-by: Laure Thompson <[email protected]>

* Update simulatingrisk/hawkdovemulti/README.md

Co-authored-by: Laure Thompson <[email protected]>

* Update simulatingrisk/hawkdovemulti/batch_run.py

Co-authored-by: Laure Thompson <[email protected]>

* Update simulatingrisk/hawkdovemulti/simrisk_batch.slurm

Co-authored-by: Laure Thompson <[email protected]>

* Update simulatingrisk/hawkdovemulti/batch_run.py

Co-authored-by: Laure Thompson <[email protected]>

* Cleanup items flagged by @laurejt in code review

* Set file prefix default in argparse for consistency

* Document step offset between scheduler and data collection

* Better documentation for sample slurm batch script

---------

Co-authored-by: Laure Thompson <[email protected]>
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.

2 participants