Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
dc82565
written more tests includingsome edge cases
Nov 4, 2021
ced7f14
minor fixes
gbellantuono Nov 5, 2021
29a2065
Fixed empty vectors and arrays returning non empty dicts for generate…
Nov 5, 2021
ecbcc66
fixed ndarray combination generator returning wrong type
hayden97VEC Nov 8, 2021
2c2491f
Merge branch 'run_manager_serapis_c38' into run_manager_serapis_c38_m…
gbellantuono Nov 8, 2021
1bacc64
Merge pull request #530 from dstl/run_manager_serapis_c38_maketests
gbellantuono Nov 8, 2021
42fc083
pull request fixed some issues
gbellantuono Nov 8, 2021
bb8bd7c
Fixed remaining issues on previous merge
hayden97VEC Nov 8, 2021
066e3c1
very minor import fix
hayden97VEC Nov 8, 2021
c39966e
Fixed csv load from config, one issue left with metrics to csv
hayden97VEC Nov 8, 2021
6102aad
Fixed metrics_to_csv test and weird pandas import error
Nov 9, 2021
3c6d84d
checking circleci tests
Nov 9, 2021
81168cd
fix for running circleci tests
Nov 9, 2021
f4c415e
circleci test checking
Nov 9, 2021
ed86da2
checking circle ci tests
Nov 9, 2021
9486a29
circle ci check
Nov 9, 2021
14c69ea
circle ci check
Nov 9, 2021
054ae22
added test for checking directories
Nov 9, 2021
91780ff
checking circle ci
Nov 9, 2021
6242e89
circle ci test check
Nov 9, 2021
62eae66
very minor change
Nov 9, 2021
5dd92e3
test fixes
Nov 9, 2021
55459ba
more test fixes
Nov 9, 2021
f9a5c44
Fixed all issues for tests inclduing flake8 checks
Nov 9, 2021
c6e1964
fixed all remaining flake8 issues
Nov 9, 2021
72df61a
last flake8 fixes
Nov 9, 2021
5d76a2f
Docs added, new file added for run the runmanager, code cleaned
gbellantuono Nov 10, 2021
7e968e0
code cleaning
gbellantuono Nov 10, 2021
08c7064
flake8 fixes
gbellantuono Nov 10, 2021
734f02b
Initial multiprocess commit
Nov 15, 2021
c9b8283
multiprocess fix + new config and parameters files
Nov 16, 2021
ad6cc83
read_config_file now handle 1 file element
gbellantuono Nov 16, 2021
1b9c33b
Merge branch 'run_manager_serapis_c38_multiprocess' of https://github…
gbellantuono Nov 16, 2021
3dd084b
multiprocess improvements
Nov 16, 2021
a5d658d
Merge branch 'run_manager_serapis_c38_multiprocess' of https://github…
Nov 16, 2021
219ed38
Some multiprocess improvements and minor fixes
Nov 16, 2021
6dd1337
Added pair creation for dictionary
DavidJBoardman Nov 16, 2021
61765e0
added arguments to runmanager.py template file
DavidJBoardman Nov 16, 2021
0171d2c
changing run function
DavidJBoardman Nov 17, 2021
a8ea386
minor fixes + mp improvements
Nov 22, 2021
08f9bce
Added test for mp and flake8 fixes
Nov 22, 2021
cc754e2
added loop for config dir
Nov 29, 2021
a2a495e
groundtruth read fix
hayden97VEC Nov 29, 2021
1112f8f
quick minor improvement
hayden97VEC Nov 29, 2021
e21f088
Added multi-tracker directory functionality & ability to run just con…
DavidJBoardman Nov 29, 2021
9b928da
started to rework run function
DavidJBoardman Nov 30, 2021
7341920
improved argparser functionality
DavidJBoardman Nov 30, 2021
2f18687
added fix for numruns
DavidJBoardman Nov 30, 2021
f841c37
quick fix for if parameter is list type
Dec 6, 2021
ec5fdbe
merged runmanagercore
Dec 7, 2021
870920f
added fixes that didnt merge
Dec 7, 2021
20d6d69
added fixes that didnt merge
Dec 7, 2021
bfff87d
added docstrings for runmanagercore.py
DavidJBoardman Dec 7, 2021
a7c1ead
Added docstrings in numpy format to all functions
Dec 8, 2021
9630909
Added tests for runmanagercore.py additions
Dec 8, 2021
2f6584b
fixed name for functions in test.py
Dec 8, 2021
3d7c759
fixed small bug that occured from yesterday
DavidJBoardman Dec 9, 2021
d7a954a
create instane of RunManagerMetrics in init
hayden97VEC Dec 9, 2021
cb5d471
initialise parameters in rmc constructor
hayden97VEC Dec 9, 2021
035795f
prepare_and_run both functions take attributes from constructor
hayden97VEC Dec 9, 2021
d391994
added logging bakc to runmanagercore
DavidJBoardman Dec 9, 2021
4de4188
added try catch to runmanagermetrics.py
DavidJBoardman Dec 9, 2021
05af6c8
moved write params to own function
DavidJBoardman Dec 9, 2021
3bfed66
generate parameters combinations refactored
gbellantuono Dec 9, 2021
f156a0f
add documentation
gbellantuono Dec 9, 2021
d27aa2c
Fix flake8
gbellantuono Dec 9, 2021
dc241f9
Merge pull request #546 from dstl/run_manager_serapis_SRP-73
gbellantuono Dec 9, 2021
725f758
fixed some linting issues
DavidJBoardman Dec 9, 2021
78dc690
RunManagerCore instance with default attributes in runmanager.py
hayden97VEC Dec 9, 2021
8e0168d
Merge pull request #548 from dstl/run_manager_metric_managerfix
Dec 9, 2021
6353be9
Merge branch 'run_manager_serapis_multi_tracker' into run_manager_ser…
hayden750 Dec 9, 2021
9231c7e
Merge pull request #547 from dstl/run_manager_serapis_rmc_constructor
hayden750 Dec 9, 2021
8ba5eb2
Fix for test
gbellantuono Dec 9, 2021
c8268ab
Merge branch 'run_manager_serapis_multi_tracker' of https://github.co…
gbellantuono Dec 9, 2021
208c953
add try catch
gbellantuono Dec 9, 2021
076b8dc
Fixed
gbellantuono Dec 9, 2021
73bf05f
added try catch for read config yaml load
hayden97VEC Dec 9, 2021
d08671c
FIXED SRP-56
gbellantuono Dec 9, 2021
d5d7a80
Merge pull request #550 from dstl/run_manager_serapis_srp_54
gbellantuono Dec 9, 2021
958c436
Slight modify of reading config data
hayden97VEC Dec 9, 2021
243890b
create dict object for read_config_file returning tracker, gt, mm
hayden97VEC Dec 9, 2021
75d6e54
Fixed SRP-58 and SRP 61
gbellantuono Dec 9, 2021
6a62b9b
flake8 fixes
hayden97VEC Dec 9, 2021
9d200ee
small refactoring
gbellantuono Dec 9, 2021
7ab2d88
Merge branch 'run_manager_serapis_multi_tracker' into run_manager_ser…
hayden750 Dec 9, 2021
cd08868
Merge pull request #552 from dstl/run_manager_serapis_SRP_58
gbellantuono Dec 9, 2021
d65c968
Merge branch 'run_manager_serapis_multi_tracker' into run_manager_ser…
hayden750 Dec 9, 2021
186178b
Merge pull request #551 from dstl/run_manager_serapis_readconfig_fix
hayden750 Dec 9, 2021
3a4ddef
SRP-63
gbellantuono Dec 9, 2021
82e8454
Merge pull request #553 from dstl/run_manager_serapis_SRP_58
gbellantuono Dec 9, 2021
377f358
set_components change return type to dict obj
hayden97VEC Dec 9, 2021
7238cae
Merge pull request #554 from dstl/run_manager_serapis_returnobj_set_c…
hayden750 Dec 9, 2021
43f049d
Fix config and parameter path bug.
gbellantuono Dec 9, 2021
df9307a
Merge branch 'run_manager_serapis_multi_tracker' of https://github.co…
gbellantuono Dec 9, 2021
131b18f
fixed issues with static functions
DavidJBoardman Dec 9, 2021
b39c290
fixing minor bugs runmanagercore
DavidJBoardman Dec 9, 2021
9b9b85e
fixed contructor bugs
DavidJBoardman Dec 10, 2021
f8e2509
Merge pull request #556 from dstl/run_manager_bugfix
Dec 10, 2021
22e8996
renamed temp var names in inputmanager
DavidJBoardman Dec 10, 2021
f3b09d0
Merge pull request #557 from dstl/run_manager_get_arraylist
Dec 10, 2021
b272cf1
fixed tests for test_runmanagermetrics.py
DavidJBoardman Dec 10, 2021
66ce4b4
Merge pull request #558 from dstl/run_manager_metrics_testsfix
Dec 10, 2021
fc7ac2b
fixed tests. Added constant in runmanager core
gbellantuono Dec 10, 2021
1b644ec
Merge branch 'run_manager_serapis_multi_tracker' of https://github.co…
gbellantuono Dec 10, 2021
853328b
Merge pull request #559 from dstl/run_manager_fix_runmanager_core_test
gbellantuono Dec 10, 2021
b8ebcd5
fixed all flake8 issues
DavidJBoardman Dec 10, 2021
8f3db8d
Merge pull request #560 from dstl/run_manager_flake8
Dec 10, 2021
23622cc
Fixed flake8
gbellantuono Dec 10, 2021
2a4f7bc
Merge branch 'run_manager_serapis_c38_multiprocess' into run_manager_…
hayden750 Dec 13, 2021
535b660
Merge pull request #562 from dstl/run_manager_serapis_multi_tracker
hayden750 Dec 13, 2021
af080f0
restart on multiprocess on updated runmanager
hayden97VEC Dec 13, 2021
b284aa1
quick fixes
hayden97VEC Dec 13, 2021
298fb3e
some multiprocess improvements
hayden97VEC Dec 13, 2021
0d1e877
added multiprocessing for monte carlo simulations
Dec 21, 2021
3373e5f
flake8 fixes
Dec 22, 2021
e22b733
Improved multiprocessing
Jan 5, 2022
da06299
cleanup and flake8 fixes
Jan 5, 2022
1c9bd9d
quick coverage check
Jan 6, 2022
aeb229a
flake8 fix for coverage check
Jan 6, 2022
1cb20fb
Merge branch 'run_manager_serapis_multi_tracker' into run_manager_ser…
hayden750 Jan 7, 2022
753dcab
Merge pull request #571 from dstl/run_manager_serapis_c38_multiprocess
hayden750 Jan 7, 2022
2d2d1f3
test and flake8 fix
hayden97VEC Jan 7, 2022
97d5219
added quick test for coverage check
hayden97VEC Jan 7, 2022
4b0249a
Merge pull request #572 from dstl/run_manager_serapis_fix_coverage
hayden750 Jan 7, 2022
d1d7c42
bug fixes
gbellantuono Jan 10, 2022
05323d5
Fixed read config and parameters position
gbellantuono Jan 10, 2022
dcec3ee
bugfix
Jan 10, 2022
b395dcf
Groundtruth id and state fixed. Not all the groundtruths have an id.
Jan 10, 2022
db26a7b
flake8 fixing
gbellantuono Jan 11, 2022
7b6a9cb
nprocess removed from file
gbellantuono Jan 11, 2022
ed7b8c8
fixed multiprocessing with pathos
Jan 11, 2022
a804761
bug fixing
gbellantuono Jan 11, 2022
aed6076
fix tests for multicore. Pathos added
gbellantuono Jan 11, 2022
c307b5e
Remove useless file, update requirements.txt
gbellantuono Jan 11, 2022
e650486
setup file updated for multiprocess
gbellantuono Jan 11, 2022
ee34ae3
added README.md
Jan 11, 2022
00ba17e
Merge branch 'run_manager_multi_bug_fixing' of https://github.com/dst…
Jan 11, 2022
22bc943
Fix flake8
gbellantuono Jan 11, 2022
e2e2a11
Merge branch 'run_manager_multi_bug_fixing' of https://github.com/dst…
gbellantuono Jan 11, 2022
8656583
Minor additions to the readme
Jan 11, 2022
41f0586
Merge branch 'run_manager_multi_bug_fixing' of https://github.com/dst…
Jan 11, 2022
f9bf0bd
test csv added
gbellantuono Jan 11, 2022
49889f2
Flake8 fixes
gbellantuono Jan 11, 2022
49584b9
Documentation added to some functions
gbellantuono Jan 11, 2022
eba3028
groundtruth search fixed
gbellantuono Jan 12, 2022
bcaabff
Groundtruth fixes
gbellantuono Jan 12, 2022
365b5a0
fix CovarianceMatrix
Jan 12, 2022
99eadb9
Merge branch 'run_manager_multi_bug_fixing' of https://github.com/dst…
Jan 12, 2022
85b9114
Fixed reading groundtruth into the metric manager from config + test …
hayden97VEC Jan 12, 2022
4c056b1
fixed covariance and iterations function
Jan 12, 2022
d61aa06
removed some gt functionality
Jan 12, 2022
0ad4d82
metric manager is the second element to read
gbellantuono Jan 13, 2022
fe79a71
Readme updated
gbellantuono Jan 13, 2022
483b81e
update readme
gbellantuono Jan 13, 2022
73eb2f3
update readme
gbellantuono Jan 13, 2022
029dbd9
Added multiprocessing for single runs
hayden97VEC Feb 11, 2022
cd311a9
added timing for multiprocess run comparison experiments
hayden97VEC Feb 11, 2022
52a34d6
Refactor and cleaned run simulation functions, flake8 fixes
hayden97VEC Feb 14, 2022
e70419c
Added more documentation to run manager core
hayden97VEC Feb 14, 2022
440c29b
quick bug fix nruns not setting properly
hayden97VEC Feb 14, 2022
6f6f4bd
flake 8 fix
hayden97VEC Feb 14, 2022
8f8bf57
Fixed typo & error for wrong file location
DavidJBoardman Feb 15, 2022
e61e678
added better and more readable logging for logfile and console.
DavidJBoardman Feb 15, 2022
60cec70
changed datetime to ISO YYYY_MM_DD format
DavidJBoardman Feb 15, 2022
e77755a
Reset metric manager variables after runs to stop next run going slower
hayden97VEC Feb 15, 2022
3289801
Added dummy parameter json file for reference
DavidJBoardman Feb 15, 2022
ef77b6a
making sure command line arguments take priority over parameter jsons
hayden97VEC Feb 16, 2022
f61f87e
Merge pull request #599 from dstl/run_manager_improve_multicore
hayden750 Feb 16, 2022
fe4fc76
minor bugfix
DavidJBoardman Feb 16, 2022
b2a7a89
merge changes
Feb 17, 2022
a09ef9f
merge test
Feb 17, 2022
08a1927
Moved logging to own function
Feb 17, 2022
0247427
Better more detailed logging
Feb 17, 2022
1e0f851
Merge pull request #602 from dstl/run_manager_bug_sprint
Feb 17, 2022
b277677
Changed filename to yaml instead of metrics
DavidJBoardman Feb 18, 2022
26a66fc
Documentation improvements + removed unneeded files
hayden97VEC Feb 21, 2022
7badebe
quick parameter fix in rmc
hayden97VEC Feb 21, 2022
cd6000f
fixed np.sqrt(n) error!
Feb 21, 2022
8cd7056
Improved some testing and flake8 fixes
hayden97VEC Feb 21, 2022
f567d83
Forgot to add modified test parameters json
hayden97VEC Feb 21, 2022
2d6871d
Logging works for multiprocess
Feb 21, 2022
49fe6c4
Improved and added tests + minor cleaning
hayden97VEC Feb 22, 2022
3f676c1
Some documentation improvements
hayden97VEC Feb 22, 2022
24ab88e
Merge pull request #607 from dstl/run_manager_serapis_docs_tests
hayden750 Feb 23, 2022
443a1b9
changes for runmanager
Feb 24, 2022
04f6e4c
minor fix for removing mc from runmanager.py
DavidJBoardman Feb 24, 2022
5ff494b
merged with main branch
DavidJBoardman Feb 24, 2022
56e87bb
Merge pull request #608 from dstl/run_manager_bug_sprint_2
Feb 24, 2022
c082deb
Test improvements and minor fixes
hayden97VEC Feb 24, 2022
70be60f
Improvements and refactoring
hayden97VEC Feb 28, 2022
5d42a02
test fix
hayden97VEC Feb 28, 2022
a58bd32
more test improvements and coverage
hayden97VEC Feb 28, 2022
c958360
More minor improvements
hayden97VEC Feb 28, 2022
df0bb87
Quick logger fix for mp
hayden97VEC Feb 28, 2022
74c3cee
Added timer for full run, slight test improvement
hayden97VEC Feb 28, 2022
16e9c17
flake8 fix
hayden97VEC Mar 1, 2022
4fc6ea2
added functions for averaging the metrics
DavidJBoardman Mar 9, 2022
2739958
added average simulations and sum_simulations metrics
DavidJBoardman Mar 10, 2022
579910e
added RunManagerScheduler class for scheduling run manager executions…
hayden97VEC Mar 10, 2022
cf9cc56
Minor fix optimisation fix
Mar 10, 2022
b530039
Refactoring of scheduling over run split
hayden97VEC Mar 11, 2022
07ea3af
run manager improvements for slurm scheduler
hayden97VEC Mar 14, 2022
728200b
flake 8 fixes
hayden97VEC Mar 14, 2022
432619b
quick edit for testing on aws
hayden97VEC Mar 15, 2022
32a8989
quick edit for testing on aws
hayden97VEC Mar 15, 2022
ae9e9f8
quick edit for testing on aws
hayden97VEC Mar 15, 2022
27e0bad
testing sbatch
hayden97VEC Mar 15, 2022
abd7500
minor change for slurm execution
hayden97VEC Mar 15, 2022
11ae50b
Fixed issue where run number wasn't aligning with console output
Mar 15, 2022
95e73f5
Fixes for slurm runs
hayden97VEC Mar 15, 2022
b50370c
added working integration of averaging metrics for single and multi m…
Mar 15, 2022
444fe05
fixed minor bug with mp + single config averaging
Mar 16, 2022
3429e74
Removed splitting simulations into batches for slurm and improved out…
hayden97VEC Mar 16, 2022
5704a2c
Added docstrings to average functions
Mar 16, 2022
a7e69da
Better organisation of runmanager slurm outputs
hayden97VEC Mar 16, 2022
fdae044
minor improvements for slurm organise + flake8 fixes
hayden97VEC Mar 16, 2022
0cc0a51
very quick fix
hayden97VEC Mar 16, 2022
4ce5da8
very quick fix
hayden97VEC Mar 16, 2022
2ba6f34
Added changes to readme file for averaging and fixed flake8 issues
Mar 16, 2022
5410d89
merged slurm branch
Mar 16, 2022
0426269
Fixed issue of not averaging slurm runs because of directory structure
hayden97VEC Mar 17, 2022
928e4ee
quick fix
hayden97VEC Mar 17, 2022
47d3ce0
added file structure fix in wrong place
hayden97VEC Mar 17, 2022
1066cdc
added working summary file
Mar 18, 2022
371df87
Merge branch 'run_manager_average' into run_manager_failed_runs
Mar 18, 2022
f373f6c
fixed issue with slurm + single file run
Mar 18, 2022
9d9740a
Fixed not finding run files when averaging using slurm and single sim…
hayden97VEC Mar 18, 2022
169869e
small fix
Mar 18, 2022
3cb3ae1
Merge pull request #612 from dstl/run_manager_failed_runs
Mar 18, 2022
3c86f8b
fixed file not found error
Mar 18, 2022
42c1495
fixed batch runs
Mar 18, 2022
34232f5
added exit function to error reading bad config
Mar 18, 2022
056d913
force simulation log to overwrite
Mar 18, 2022
f09964a
Fixed overwriting log breaking multi-processing logging
Mar 18, 2022
ea28b6b
small patch for filehandler with multiprocess
Mar 18, 2022
1c0cf3b
fixed tracking csv being placed outside slurm directory when using slurm
hayden97VEC Mar 18, 2022
9eec080
Merge branch 'run_manager_average' of https://github.com/dstl/Stone-S…
hayden97VEC Mar 18, 2022
39925dd
added handler close to runmanager.py
Mar 18, 2022
bc85216
Finished documentation for runmanagercore
hayden97VEC Mar 18, 2022
a27ca12
Finished docs for run manager scheduler
hayden97VEC Mar 18, 2022
30e959e
quick rmc test fix
hayden97VEC Mar 18, 2022
2968f1f
fixed issue where running batch files only averages last
Mar 18, 2022
5dbccdc
Test fixes and final docs
hayden97VEC Mar 18, 2022
8793fd9
added average_metrics.py averaging file to the runamnager folder
Mar 21, 2022
71bf2cd
Merge branch 'run_manager_average' of https://github.com/dstl/Stone-S…
Mar 21, 2022
f28f221
Flake8 fixes
gbellantuono Mar 21, 2022
ac8552c
Add pandas in setup.py
gbellantuono Mar 21, 2022
9a1e3a3
Update README.md
hayden750 Mar 21, 2022
f0d336b
Update README.md
hayden750 Mar 21, 2022
cc809f3
fixed issue where flake8 broke the averaging
DavidJBoardman Mar 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# General Python
build/
dist/
venv/
*.egg-info
.eggs/
__pycache__/

# Version from setuptools_scm
Expand All @@ -17,3 +19,9 @@ htmlcov/

# pytest
.pytest_cache/

#vscode
.vscode

#run-manager csv file for the test
stonesoup/tests/test_csvs/*.csv
18,624 changes: 18,624 additions & 0 deletions SolentAIS_20160112_130211.csv

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
absl-py==0.12.0
anytree==2.8.0
astunparse==1.6.3
cachetools==4.2.1
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
cycler==0.10.0
decorator==4.4.2
dominate==2.6.0
ffmpeg-python==0.2.0
Flask==1.1.2
Flask-Bootstrap==3.3.7.1
future==0.18.2
gast==0.3.3
google-auth==1.29.0
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
grpcio==1.37.0
h5py==2.10.0
idna==2.10
imageio==2.9.0
imageio-ffmpeg==0.4.3
itsdangerous==1.1.0
Jinja2==2.11.3
Keras-Preprocessing==1.1.2
kiwisolver==1.3.1
Markdown==3.3.4
MarkupSafe==1.1.1
matplotlib==3.4.1
moviepy==1.0.3
numpy==1.20.2
oauthlib==3.1.0
opt-einsum==3.3.0
pandas==1.3.1
pathos==0.2.8
Pillow==8.2.0
plotly==5.1.0
proglog==0.1.9
protobuf==3.15.8
pyasn1==0.4.8
pyasn1-modules==0.2.8
pymap3d==2.6.1
pyparsing==2.4.7
python-dateutil==2.8.1
python-dotenv==0.17.1
pytz==2021.1
requests==2.25.1
requests-oauthlib==1.3.0
rsa==4.7.2
ruamel.yaml==0.17.4
ruamel.yaml.clib==0.2.2
scipy==1.4.1
six==1.15.0
stonesoup==0.1b5
tenacity==8.0.1
tensorboard==2.2.2
tensorboard-plugin-wit==1.8.0
tensorflow==2.2.0
tensorflow-estimator==2.2.0
tensornet==0.0.0
tensornets==0.4.6
termcolor==1.1.0
tqdm==4.60.0
urllib3==1.26.4
utm==0.7.0
visitor==0.1.3
Werkzeug==1.0.1
wrapt==1.12.1
68 changes: 68 additions & 0 deletions requirements1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
absl-py==0.12.0
anytree==2.8.0
astunparse==1.6.3
cachetools==4.2.1
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
cycler==0.10.0
decorator==4.4.2
dominate==2.6.0
ffmpeg-python==0.2.0
Flask==1.1.2
Flask-Bootstrap==3.3.7.1
future==0.18.2
gast==0.3.3
google-auth==1.29.0
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
grpcio==1.37.0
h5py==2.10.0
idna==2.10
imageio==2.9.0
imageio-ffmpeg==0.4.3
itsdangerous==1.1.0
Jinja2==2.11.3
Keras-Preprocessing==1.1.2
kiwisolver==1.3.1
Markdown==3.3.4
MarkupSafe==1.1.1
matplotlib==3.4.1
moviepy==1.0.3
numpy==1.20.2
oauthlib==3.1.0
opt-einsum==3.3.0
pandas==1.3.1
Pillow==8.2.0
plotly==5.1.0
proglog==0.1.9
protobuf==3.15.8
pyasn1==0.4.8
pyasn1-modules==0.2.8
pymap3d==2.6.1
pyparsing==2.4.7
python-dateutil==2.8.1
python-dotenv==0.17.1
pytz==2021.1
requests==2.25.1
requests-oauthlib==1.3.0
rsa==4.7.2
ruamel.yaml==0.17.4
ruamel.yaml.clib==0.2.2
scipy==1.4.1
six==1.15.0
stonesoup==0.1b5
tenacity==8.0.1
tensorboard==2.2.2
tensorboard-plugin-wit==1.8.0
tensorflow==2.2.0
tensorflow-estimator==2.2.0
tensornet==0.0.0
tensornets==0.4.6
termcolor==1.1.0
tqdm==4.60.0
urllib3==1.26.4
utm==0.7.0
visitor==0.1.3
Werkzeug==1.0.1
wrapt==1.12.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use_scm_version=True,
install_requires=[
'ruamel.yaml>=0.15.45', 'numpy>=1.17', 'scipy', 'matplotlib', 'utm', 'pymap3d',
'setuptools>=42',
'setuptools>=42', 'pathos>=0.2.8', 'pandas'
],
extras_require={
'dev': [
Expand Down
180 changes: 180 additions & 0 deletions stonesoup/runmanager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# Runmanager

The runmanager is a command line interface that allows the user to run monte-carlo simulations on various configuration files. The runmanager can run a single
configuration file, configuration file along with a parameter file or a directory containing multiple configurations & parameters.

---

## Setup

**Requires pathos module to work. This is a dependancy for the multiprocessing feature. (BSD LICENSE)**

To use the runmanager you must make a copy of the runmanager.py folder in the directory you wish to run from i.e your root folder.

---

## Running

The run manager has a few options for running these can be found using the command `python runmanager.py --help` or `-h`.

The following arguments are accepted.

- `-h` or `--help`: Shows the help message.
- `-c` or `--config`: Path to a configuration .yaml file (_May be used for a single run_)
- `-p` or `--parameter`: Path to a paramater .json file (_List of a all parameters required for the monte-carlo simulations._)
- `-g` or `--groundtruth`: Ground truth setting. True if a ground truth is present, False if no ground truth is present. (_Default False_)
- `-d` or `--dir`: Directory to a set of configuration files & parameter files. Used to run multiple trackers in a directory.
- `-n` or `--nruns`: Number of monte-carlo runs. This feature supersedes if nruns is also set in the parameter.json file. (_Default 1 run_)
- `-pc` or `--processes`: Number of cpu processing cores to use. This feature supersedes if num*proc is also set in the parameter.json file. (\_Default 1 core*)

The runmanager will work with 3 different options:

1. A single configuration file with single run. Example: `python runmanager.py -c "path/to/config.yaml"`
2. A single configuration file with a parameter file. This will run n amount of times based on amount of parameter combinations. Example: `python runmanager.py -c "path/to/config.yaml -p "path/to/parameters.json"`
3. A directory of configuration files with parameter files. This will run n amount of times based on amount of parameter combinations across all configs. Example: `python runmanager.py -d "path/to/configdirectory"`

## Config File.

The config file can have 3 components:

- Tracker
- Ground Truth
- Metric Manager

If the file has 2 components, they will be recognise as:

- Tracker
- Metric Manager

The groundtruth will be set as `tracker.detection.groundtruth`.

If the file has 1 component, it will be recognise as:

- Tracker

The groundtruth will be set as `tracker.detection.groundtruth`.
No metric manager.

If the command line has the argument `-g` the components will be recognise as:

- Tracker
- Ground Truth

## Ground truth

In the case where the ground truth is a csv datafile make sure this is in the directory which is specified in the configuration file. The runmanager will automatically pick up the ground truth from this location if it is present.

## Number of runs

Number of runs or `-n` specifies the number of monte-carlo runs that you want wish to execute for each configuration file.

## Multiprocessing

To use multiprocessing you simply need to use the -p command with the number of cores you wish to use. This will run multiple simulations in parallel. If there are a large number of simulations to be ran please use this option. The multiprocessing module will batch process the simulations.

Example for system with 16 CPU Cores: `python runmanager.py -d "path/to/configdirectory" -pc 16`

---

## Output

The simulation output files will be created with a timestamp in your root directory. This will contain a simulation folder for each different parameter combination ran and sub folders for each monte-carlo run with those specific parameters.

If a configuration file has both a ground truth and metric manager, the following folders should appear in the directory

- `config.yaml` - Configuration file for this specific run.
- `detections.csv` - CSV file containing the detections.
- `groundtruth.csv` - CSV file containing the ground truth.
- `metrics.csv` - CSV file containing the metrics.
- `tracks.csv` - CSV file containing the tracks.
- `parameters.json` - Easy to view json file with the parameters which have changed in this specific run.

---

## Averaging metrics

Once all simulations have ran the runmanager will average all of the monte-carlo run metric files and collate them into a single metrics file per simulation. This will allow the user to compare results of different parameter combinations. The average is across all runs per simulation on a cell level in order to retain the timestamp.

The metrics averaging will only work with real ground truth samples or a ground truth simulator where there is a fixed seed as the metrics.csv files need to be of the same length.

Within each simulation folder a file named `average.csv` will appear. This is the average metric value of all monte-carlo runs for this simulation.

## Log file

The run manager will produce a `simulation.log` file at your root directory. This logs any errors which may occur in the runmanager.

## HPC/AWS functionality
Stonesoup RunManager slurm guide:

1. Running the RunManager locally:

Example commands:
- runmanager.py -c config.yaml -p param.json -g True -n 8 -pc 4

You may want to run the RunManager locally first with less runs or computer intensive parameters to test
your simulations first, in which case make sure to omit the '-s' flag or set it to False when running your command,
as this flag expects slurm scheduling to be used when it is set to True. In the case where this has been left in,
the simulation will fail and will output an error similar to:
''sbatch' is not recognized as an internal or external command, operable program or batch file.'
if slurm is not install on your local machine.
In another case where slurm is installed on your local machine and this flag is left as True, the simulation can still
run without error and the RunManager will execute on the available nodes only, which will just be the local machine.

2. Running the RunManager on a compute cluster with Slurm scheduling:

Example commands:
- runmanager.py -c config.yaml -p param.json -g True -n 8 -pc 4 -s True

When the '-s' flag is set to True, the RunManager will assume the user wishes to execute the command across a number
of jobs on compute nodes that are scheduled and managed by Slurm.
When the command is run with this flag as True, the RunManager will prompt the user to input how many compute nodes
they would like to use for the simulations. The RunManager will then only use this number of nodes during execution,
even if there are other available nodes. If the user inputs too many nodes than there are available, the RunManager will
only use the available nodes and slurm will automatically schedule the remaining jobs until more nodes are free.
The total number of runs intended to be ran will then be evenly divided across the number of compute nodes intended to
be used. For example, if the user wants to execute 80 runs across 4 nodes, each node will execute 20 runs. In cases where
there is not an even division, some nodes may do 1 more run that some of the others.
Here, the '-n' or '--nruns' flag substitutes the need for a user to set a job-array slurm command that would
define how many times the command will be run. It is important to remember '-n' is the TOTAL number of runs you wish to do,
not runs per node.
The RunManagerScheduler will then create n_node number of new RunManager instances to run on each node
the divided n number of times.
In order to organise the outputs of the slurm jobs, a new directory with the name pattern:
'runmanager-slurm_YYYY_MM_DD_hh_mm_ss'
which will contain the regular RunManager output directories for each node containing each simulation output for each run,
as well as the slurm.out output files where the RunManager command line logs are written to.
All of the logs for the simulations on all nodes can also be found in the 'simulation_info.log' file the same way as
local RunManager executions.

-- Example RunManager with Slurm workflow:
- Setup
1. Run run manager on a small set of runs locally to test the success of the simulations.
2. Once the execution has been run locally and the user is happy with the simulation runs, login to HPC/AWS:
- e.g using ssh
3. Make sure Stonesoup is installed with HPC ready version of Run Manager
4. Make sure all configuration/parameter/csv files needed for the RunManager are on the HPC storage
5. May want to check everything is okay by running the same local RunManager command on HPC/AWS (Optional)

- Execution
1. Run 'sinfo' command to see information of available nodes and their types on the HPC
2. Run the Run Manager from the top of the Stone-Soup directory with '-s / --slurm' flag set to True and '-n / --nruns' flag
set to the TOTAL number of runs you wish the Run Manager to execute. These runs will be split across the number of nodes
you wish to use.
- e.g 'python stonesoup/runmanager/runmanager.py -c config.yaml -p param.json -n 500 -s True'
3. The Run Manager will then ask the user for the number of nodes they wish to split the runs over. User must input a number.
4. The Run Manager will then run the 'sbatch' command n_node number of times to create a new instance for each node and run
the split simulations in each node.
5. All of the output for the executions across the nodes will be stored in a directory with the following pattern: 'runmanager-slurm_YYYY_MM_DD_hh_mm_ss',
including the node.out files, simulation and run output files and metrics, tracking information and averages across runs for each node.

---

## Known Issues

### Errors

The terminal and simulation will sometimes log ERROR with certain parameter combinations. This is likely due to a parameter combination that is generated in the monte-carlo runs which isn't compatible with the configuration of StoneSoup. Typically it shouldn't cause much of a problem it just means that these simulations can be ignored as they have invalid parameter combinations.

### Custom initiator

The current runmanager system will not work if the configuration file contains a custom initiator class.
3 changes: 3 additions & 0 deletions stonesoup/runmanager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .base import RunManager

__all__ = ['RunManager']
Loading