Commit Graph

508 Commits

Author SHA1 Message Date
Chris McCarthy
8785089a1c #1715 - Moved IPv4Address conversions to the NIC init. Mak wake_on_lan not optional. Ignored ANN002 and ANN003 in .flake8 so we don't get silly 'ANN002 Missing type annotation for *args' and 'ANN003 Missing type annotation for **kwargs' flake8 failures 2023-08-01 10:32:16 +01:00
Chris McCarthy
557caeaac4 #1715 - Added suppress-none-returning and suppress-dummy-args to .flake8 as flake8-annotations can get very annoying 2023-08-01 08:19:28 +01:00
Chris McCarthy
c05cb62aa9 Merge branch 'dev' into feature/1715_model_link 2023-08-01 08:12:39 +01:00
Marek Wolan
0f0c61642c Merged PR 151: Check type hints with pre-commit
## Summary
Added `flake8-annotations` to the pre-commit hooks. This ensures that we all write type hints for all new code.

There's also a minor unrelated addition to the pre-commit template.

## Test process
I tried adding a function with a parameter but no typehint. Git did not allow me to commit this.

## 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: #1721
2023-07-31 19:34:48 +00:00
Chris McCarthy
e4b6f266e8 #1715 - Added timestep int as a param to the apply_timestep function in core.py. Also added a reset_component_for_episode function. Updated docs with details of Link and NIC. 2023-07-31 20:05:36 +01:00
Marek Wolan
3324a8caae Apply suggestions from code review 2023-07-31 18:54:29 +00:00
Marek Wolan
c1bb6d8b7f Update the PR template 2023-07-31 17:09:38 +01:00
Marek Wolan
9cf5bfa1b2 Fix typehint issues 2023-07-31 17:07:56 +01:00
Marek Wolan
0a079832e9 Add self,cls to flake8-ann ignore list 2023-07-31 17:00:28 +01:00
Chris McCarthy
0532db960a #1715 - Added more tests. MAde use of the pydantic model_post_init function for proper ipv4 cofiguration checking. Added NetworkError to exceptions.py. 2023-07-31 16:55:45 +01:00
Marek Wolan
c4adc2f543 add flake8-annotations to pre-commits 2023-07-31 16:47:13 +01:00
Chris McCarthy
59394c3642 #1715 - Added Link class in physical_layer.py. Also added NIC class in physical_layer.py for #1672. Added attributes and public API functions. test_physical_layer.py ready to house the tests once logic has been implemented. 2023-07-31 15:55:22 +01:00
Marek Wolan
020682f546 Merged PR 149: Base class for Simulation Components
## Summary
This introduces a base class for all simulation components. The idea behind this is to formalise the way in which data is extracted from the simulator and the way actions are applied to the different aspects of the simulator.

The intention is that any class that simulates something will inherit from SimComponent (which inherits from pydantic BaseModel).

Actions enter the simulator as a list of strings that is intended to be peeled back as you go down the layers of the simulation. For example we could have an action of `["network", "nodes", "node3", "network_interface_card", "disable"]` This list is passed to the `apply_action()` function of the overall simulation controller. The simulation controller looks at the first word on the list, `network` and uses this to select a method that can apply the function. It passes the remainder of the list as an argument to that function. In this case it will be `["nodes", "node3", "network_interface_card", "disable"]`.

To the reviewers, please validate that you're happy with the implicit design choices I've made while implementing this. Especially the contract passing actions down the components tree.

(also I changed some mentions of agent to agent_abc in the docs as it was complaining and refusing to build.)

## Test process
I have written basic unit tests to check that the custom functionality added to SimComponent doesn't interfere with basic pydantic functionality.
I also started doc pages that explains these concepts to potential developers, although once there are subclasses of this core class, it will be easier to populate the docs with concrete examples.

## 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
- [x] I have **type hinted** all the code I changed.

Related work items: #1709
2023-07-31 12:43:07 +00:00
Marek Wolan
954026d3e0 Comment out RLLib support 2023-07-31 12:13:52 +01:00
Marek Wolan
a486780fba Add timestep function 2023-07-31 11:39:33 +01:00
Marek Wolan
fa2cdf853c Drop Ray 2023-07-31 11:27:16 +01:00
Marek Wolan
8e2ef1b695 Apply suggestions from code review 2023-07-31 10:25:29 +00:00
Christopher McCarthy
fd28475e83 Merged PR 148: 1711 Fix legacy config loading issues
## Summary
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.

## Test process
Full unit test and end-to-end test

## 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
- [ ] 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: #1711
2023-07-28 14:45:58 +00:00
Marek Wolan
3b4a01760b Rework apply_actions to make it more standard 2023-07-28 15:14:43 +01:00
Marek Wolan
c1bcc372b1 Merge remote-tracking branch 'origin/dev' into feature/1709-base-simulation-class 2023-07-28 14:49:56 +01:00
Marek Wolan
b129c4fc97 Add SimComponent core class 2023-07-28 14:49:21 +01:00
Chris McCarthy
77e7941510 #1711 - Last minute docs changes 2023-07-28 14:39:01 +01:00
Chris McCarthy
e8349a8ca3 Merge branch 'github_dev' into bugfix/1711_Fix_legacy_config_loading_issues 2023-07-28 14:13:37 +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
c276281a64 Merge branch 'github_dev' into bugfix/1711_Fix_legacy_config_loading_issues 2023-07-28 12:55:58 +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
Christopher McCarthy
2642cc97de Merged PR 146: Final sync with github v2.0.0 release 2023-07-27 16:24:17 +00:00
Chris McCarthy
3f34c76b3c Merge branch 'github_dev' into release/2.0.0 2023-07-27 17:22:17 +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
Christopher McCarthy
4baff171af Merged PR 144: v2.0.0 GitHub release sync
v2.0.0 GitHub release sync

Related work items: #901, #1523, #1574, #1594, #1595, #1597, #1623, #1626, #1629, #1631, #1632, #1635, #1637, #1638, #1639, #1640, #1641, #1647, #1648, #1650
2023-07-27 07:46:59 +00:00
Chris McCarthy
31e2af6db1 Merge branch 'github_dev' into release/2.0.0 2023-07-27 08:43:33 +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
6cf18e7808 Merge branch 'github_dev' into release/2.0.0 2023-07-26 22:08:19 +01:00
Chris McCarthy
472e85cffb Added additional install instructions to the README.md 2023-07-26 21:49:36 +01:00
Chris McCarthy
fce4e78933 Synced with the github repo release 2023-07-26 21:40:30 +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