Commit Graph

485 Commits

Author SHA1 Message Date
Chris McCarthy
58048cd0e1 Dropped sphinx-pipeline 2023-08-15 13:28:02 +01:00
ARCD
eb70acf0c6 Create spinx-pipeline 2023-08-15 13:23:25 +01:00
Chris McCarthy
1a1c3c9344 Added sphinx docs build pipeline for GitHub pages on release 2023-08-15 11:26:15 +01:00
Chris McCarthy
01fb9e65fe Added the DSTL MIT license and updated the license in pyproject.toml 2023-08-15 11:14:23 +01:00
Chris McCarthy
fed65db7fc Updated the What is PrimAITE? section in index.rst. Dropped the use of sphinx-code-tabs in the docs as building the docs in pdf (make latexpdf) is suddenly complaining about the tab buttons. 2023-08-03 16:04:23 +01:00
jamesshort1
80ddf511dc Update README.md 2023-07-31 09:17:48 +01:00
jamesshort1
61fe8c2031 Update README.md 2023-07-31 09:16:24 +01:00
Chris McCarthy
0f8d31c72c #1711 - Last minute docs changes 2023-07-28 14:41:39 +01:00
Chris McCarthy
bb8b41a5ec #1711 - Removed the legacy bools from the RLlibAgent constructor in primaite_session.py 2023-07-28 14:02:17 +01:00
Chris McCarthy
0fb9268f44 #1711 - Fully Integrated the legacy training config and lay down config options into the CLI, run PrimaiteSession, and Agent classes. Made the ese test in test_full_legacy_config_session.py use this new integrated option to read the legacy file. 2023-07-28 13:49:26 +01:00
Chris McCarthy
baed7445c9 Merge remote-tracking branch 'github/dev' into github_dev 2023-07-28 12:54:58 +01:00
Chris McCarthy
7c843d3caa #1711 - Added the ability to load legacy lay down config files. Added extensive unit testing and end-to-end testing. Also added the ability to set exactly how many num_train_steps, num_eval_steps, num_train_episodes, and num_eval_episode and used when converting a legacy training config. 2023-07-28 12:53:49 +01:00
jamesshort1
e62846255f Update README.md 2023-07-28 09:41:29 +01:00
jamesshort1
546c66c542 Update README.md 2023-07-28 09:40:05 +01:00
jamesshort1
74e3dabae9 Update README.md 2023-07-28 09:39:05 +01:00
jamesshort1
378001ff68 Update README.md 2023-07-27 14:57:08 +01:00
Chris McCarthy
92671796a1 Added GFX license conditions. Included LICENSE file in build. Fixed a few character issues in README.md 2023-07-27 11:40:29 +01:00
Chris McCarthy
858396f3d6 Dropped MIT license until public release 2023-07-27 11:03:25 +01:00
jamesshort1
fde033b387 Update README.md 2023-07-27 08:59:43 +01:00
jamesshort1
bd30bab096 Update README.md 2023-07-27 08:59:24 +01:00
Chris McCarthy
c5a23fa035 Added run section with primaite session command in the README.md 2023-07-26 22:10:59 +01:00
Chris McCarthy
472e85cffb Added additional install instructions to the README.md 2023-07-26 21:49:36 +01:00
Chris McCarthy
499219eb40 Added project urls to pyproject.toml and a setup.cfg file for PyPi to pickup author and url 2023-07-26 21:11:15 +01:00
Chris McCarthy
efbb6ef8df Added a CONTRIBUTING.md and added a URL to the Yawning-Titan reference in index.rst 2023-07-26 20:17:29 +01:00
Chris McCarthy
1c4695d391 Dropped the ADF build files and updated the package name install step in python-package.yml. Added bug_report.md and feature_request.md files for GitHub 2023-07-26 20:05:44 +01:00
Chris McCarthy
5c5528bb94 Updated the README.md with developer install specific instructions 2023-07-26 19:49:24 +01:00
Chris McCarthy
1c35b109b1 Merge remote-tracking branch 'devops/main' into github_dev 2023-07-26 19:43:46 +01:00
Chris McCarthy
c6cbb5ae8d Create python-package.yml CI pipeline 2023-07-26 19:38:28 +01:00
Christopher McCarthy
db9aa3cdf0 Merged PR 142: v2.0.0
v2.0.0

Related work items: #901, #1523, #1574, #1594, #1595, #1597, #1623, #1626, #1629, #1631, #1632, #1635, #1637, #1638, #1639, #1640, #1641, #1647, #1648, #1650
v2.0.0
2023-07-26 18:20:28 +00:00
Chris McCarthy
46b3ab0959 Ran final v2.0.0 benchmark and dropped the release candidate benchmarks 2023-07-26 18:19:11 +01:00
Chris McCarthy
38f851ab66 Bumped version to 2.0.0 2023-07-26 14:38:57 +01:00
Christopher McCarthy
9377553a22 Merged PR 139: Re-run the benchmarks for v2.0.0rc1 and v2.0.0rc2 using the same config file....
## Summary
Re-run the benchmarks for v2.0.0rc1 and v2.0.0rc2 using the same config file. As expected, the versions perform almost identically as there's no real logic changes that would affect the agent between the two release candidates

## Checklist
- [X] This PR is linked to a **work item**
- [X] I have performed **self-review** of the code
- [ ] I have written **tests** for any new functionality added with this PR
- [ ] I have updated the **documentation** if this PR changes or adds functionality
- [X] I have run **pre-commit** checks for code style

Related work items: #1574
2023-07-25 09:33:32 +00:00
Chris McCarthy
e5983d7d0e Merge remote-tracking branch 'origin/dev' into release/2.0.0rc1
# Conflicts:
#	.gitignore
#	benchmark/results/PrimAITE Versions Learning Benchmark.png
#	benchmark/results/v2.0.0rc1/PrimAITE v2.0.0rc1 Learning Benchmark.pdf
#	benchmark/results/v2.0.0rc1/PrimAITE v2.0.0rc1 Learning Benchmark.png
#	benchmark/results/v2.0.0rc1/v2.0.0rc1_benchmark_metadata.json
2023-07-24 22:50:34 +01:00
Chris McCarthy
b6c2120f22 RE-ran the benchmarks for v2.0.0rc1 and v2.0.0rc2 using the same config file. As expected, the versions perform almost identically as there's no real logic changes that would affect the agent between the two release candidates 2023-07-24 22:43:22 +01:00
Christopher McCarthy
19643287af Merged PR 137: #1650 - Turned on the test. Also updated some references to the old primaite...
## Summary
- Turned on the test. Also updated some references to the old primaite paths. Finally, pushed the deployment status classifier to Development Status :: 5 - Production/Stable

## Test process
Yes, turned on the test.

## Checklist
- [ ] This PR is linked to a **work item**
- [ ] I have performed **self-review** of the code
- [ ] I have written **tests** for any new functionality added with this PR
- [ ] I have updated the **documentation** if this PR changes or adds functionality
- [ ] I have run **pre-commit** checks for code style

#1650 - Turned on the test. Also updated some references to the old primaite paths. Finally, pushed the deployment status classifier to Development Status :: 5 - Production/Stable

Related work items: #1650
2023-07-24 11:11:17 +00:00
Chris McCarthy
1131663cde #1650 - Removed the commented out pytest.mark.skip statement now that the test does work. 2023-07-24 09:20:36 +01:00
Chris McCarthy
66d367aa94 #1650 - Turned on the test. Also updated some references to the old primaite paths. Finally, pushed the deployment status classifier to Development Status :: 5 - Production/Stable 2023-07-21 16:49:17 +01:00
Christopher McCarthy
b92145cfc7 Merged PR 135: #1648 - Updated file headers
## Summary
 - Updated file header from 'Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.' to '© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK'

## Checklist
- [ ] This PR is linked to a **work item**
- [ ] I have performed **self-review** of the code
- [ ] I have written **tests** for any new functionality added with this PR
- [ ] I have updated the **documentation** if this PR changes or adds functionality
- [ ] I have run **pre-commit** checks for code style

#1648 - Updated file header from 'Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.' to '© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK'

Related work items: #1648
2023-07-21 14:08:09 +00:00
Chris McCarthy
1c6ceaa95b #1648 - Reverted benchmark sessions and episodes numbers 2023-07-21 15:07:21 +01:00
Chris McCarthy
4bb4850681 #1648 - Added header to benchmark files 2023-07-21 15:06:05 +01:00
Chris McCarthy
b9ae82310c #1648 - Reverted the benchmark files 2023-07-21 15:01:51 +01:00
Chris McCarthy
1dc23e11f2 #1648 - Updated file header from 'Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.' to '© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK' 2023-07-21 14:54:09 +01:00
Christopher McCarthy
2bccfc8df8 Merged PR 134: PrimAITE app and user dirs are version specific
## Summary
- Added _PrimaitePaths class that manages all the primaite locations using PlayformDirs. This class now creates new primaite locations for each version of primaite.
- Rolled the _PrimaitePaths class out throughout the code base.
- Updated the docs to reference the new version paths.
- Updated the author from qinetiq to dstl
- Bumped version number to 2.0.0rc2

## Test process
- Manual checks. Tough to test the install paths.

## Checklist
- [ ] This PR is linked to a **work item**
- [ ] I have performed **self-review** of the code
- [ ] I have written **tests** for any new functionality added with this PR
- [ ] I have updated the **documentation** if this PR changes or adds functionality
- [ ] I have run **pre-commit** checks for code style

Related work items: #1647
2023-07-21 13:50:56 +00:00
Chris McCarthy
92eae6c7d7 Merge branch 'dev' into feature/1647_Append_version_number_to_the_primaite_root_dir 2023-07-21 14:01:45 +01:00
Chris McCarthy
534c066170 #1647 - Added _PrimaitePaths class that manages all the primaite locations using PlayformDirs. This class now creates new primaite locations for each version of primaite.
- Rolled the _PrimaitePaths class out throughout the code base.
- Updated the docs to reference the new version paths.
- Updated the author from qinetiq to dstl
- Bumped version number to 2.0.0rc2
2023-07-21 14:00:50 +01:00
Czar Echavez
034ea831c3 Merged PR 130: #1595: load session double run
## Summary
- Fixed the bug where session gets run twice when loading a session via CLI
- Added a test for the CLI run - xskipped while the bugfix for load session acting odd is tbd
- Fixed a minor bug in PrimAITE session where session_path is overwritten

## Test process
Added a new test for CLI, but xskipped while a different bug is tbd

Ran it locally and no longer runs another session after the loaded session
```
(venv) PS D:\Projects\ARCD\PrimAITE\PrimAITE> primaite session --load [REDACTED for security]\primaite\sessions\2023-07-20\2023-07-20_15-01-11
2023-07-20 15:04:21,320: Using: AgentFramework.SB3, AgentIdentifier.PPO, ActionType.NODE, observation_space=NODE_LINK_TABLE, Training: 5 episodes @ 256 stepsEvaluation: 5 episodes @ 256 steps
2023-07-20 15:04:21,335: Environment configuration loaded
Environment configuration loaded
2023-07-20 15:04:21,775: Welcome to the Primary-level AI Training Environment (PrimAITE) (version: 2.0.0rc1)
2023-07-20 15:04:21,775: The output directory for this session is: C:\Users\czar.echavez\primaite\sessions\2023-07-20\2023-07-20_15-04-21
2023-07-20 15:04:21,779: Beginning learning for 10 episodes @ 256 time steps...
2023-07-20 15:04:22,379: Episode: 1, Average Reward: -0.0020839843750000003
2023-07-20 15:04:23,137: Episode: 2, Average Reward: -0.0021933593750000004
2023-07-20 15:04:23,831: Episode: 3, Average Reward: -0.0022617187500000003
2023-07-20 15:04:24,486: Episode: 4, Average Reward: -0.002373046874999999
2023-07-20 15:04:25,125: Episode: 5, Average Reward: -0.0018066406250000014
2023-07-20 15:04:25,791: Episode: 6, Average Reward: -0.0017597656250000013
2023-07-20 15:04:26,415: Episode: 7, Average Reward: -0.0018437500000000014
2023-07-20 15:04:27,053: Episode: 8, Average Reward: -0.0019101562500000015
2023-07-20 15:04:27,715: Episode: 9, Average Reward: -0.0016777343750000013
2023-07-20 15:04:28,359: Episode: 10, Average Reward: -0.0015976562500000012
2023-07-20 15:04:28,550: Finished learning
2023-07-20 15:04:30,851: Beginning deterministic evaluation for 5 episodes @ 256 time steps...
2023-07-20 15:04:31,243: Episode: 1, Average Reward: -0.0018515625000000014
2023-07-20 15:04:31,663: Episode: 2, Average Reward: -0.0018515625000000014
2023-07-20 15:04:32,112: Episode: 3, Average Reward: -0.0018515625000000014
2023-07-20 15:04:32,505: Episode: 4, Average Reward: -0.0018515625000000014
2023-07-20 15:04:32,904: Episode: 5, Average Reward: -0.0018515625000000014
2023-07-20 15:04:32,998: Finished evaluation

```

Also fixed the xskipped tests, since the double running seems to have caused the issue of rewards not matching.

Added a test that runs the PrimAITE in CLI

## Checklist
- [x] This PR is linked to a **work item**
- [x] I have performed **self-review** of the code
- [x] I have written **tests** for any new functionality added with this PR
- [x] I have updated the **documentation** if this PR changes or adds functionality
- [x] I have run **pre-commit** checks for code style

#1595:
- Fixed the...
2023-07-21 11:32:32 +00:00
Christopher McCarthy
de8f847afd Merged PR 132: #1594 - Managed to get the evaluation of rllib agents working. A test has bee...
## Summary
Managed to get the evaluation of rllib agents working. A test has been added to test_primaite_session.py that now tests the full RLlib agent from end-to-end. I've also updated the tests in here to check that the mean reward per episode plot is created for both too. This will need a bit of a re-design further down the line, but for now, it works. Added a custom exception for RLlib eval only error.

Is this a hack? Yes. Does it work? Yes. we'll make this better later.

## Test process
Both a SB3 and Ray RLlib agent is tested now in the test_primaite_session.py module.

## Checklist
- [X] This PR is linked to a **work item**
- [X] I have performed **self-review** of the code
- [X] I have written **tests** for any new functionality added with this PR
- [X] I have updated the **documentation** if this PR changes or adds functionality
- [X] I have run **pre-commit** checks for code style

Related work items: #1594
2023-07-21 10:26:31 +00:00
Chris McCarthy
e9b90760dd #1594 - Added docstrings and fixed training type. Added a clean-up of the unpacked agent in eval dir. 2023-07-21 10:33:22 +01:00
Christopher McCarthy
b4d05e7b3e Merged PR 131: #1639 - Added CHANGELOG.md and backfilled it with v1.1.0 and v1.1.1 release n...
## Summary
Added changelog and backfilled with v1.1.0 and v1.1.0 release notes.

Check what's written against notes in: https://nscuk.sharepoint.com/:f:/r/sites/SSE32-ARCDTrainingEnvironments/Shared%20Documents/General/01%20PrimAITE/01.01%20Releases/Release%20Notes?csf=1&web=1&e=uwPsyM

## Test process
N/A

## Checklist
- [ ] This PR is linked to a **work item**
- [ ] I have performed **self-review** of the code
- [ ] I have written **tests** for any new functionality added with this PR
- [ ] I have updated the **documentation** if this PR changes or adds functionality
- [ ] I have run **pre-commit** checks for code style

#1639 - Added CHANGELOG.md and backfilled it with v1.1.0 and v1.1.1 release notes.

Related work items: #1639
2023-07-21 09:28:28 +00:00
Czar Echavez
720a326537 #1595: refactor variable name 2023-07-21 09:31:37 +01:00