Commit Graph

2352 Commits

Author SHA1 Message Date
Nick Todd
3f94c40434 Fix logger inititialisation in agents 2025-01-22 10:49:42 +00:00
Marek Wolan
d2d09abcb1 Merged PR 590: Backport 3.3.1 fixes into Core
this was already reviewed as part of 3.3.1 release process
2025-01-21 14:42:05 +00:00
Marek Wolan
9263bbf80b Merged PR 589: Extensible Agents and Actions
## Summary
This PR is a follow-on from Charlie's two branches, one for agents and one for actions. This list of changes describes work done by both Charlie and myself

- Agents are now extensible
- Refactored observation manager, action manager, and reward function to inherit from BaseModel
- Added a config schema to observation manager, action manager, and reward function
- Streamlined the way agents are created from config
- Agent config no longer requires a dummy action space if the action space is empty, the same applies for observation space and reward function
- Actions are now extensible
- Actions now support a config schema, to allow yaml data validation and default parameter values
- Action parameters are no longer defined through IDs, instead meaningful data is expected directly in the action map
- Test and example YAMLs have been updated to match the new agent and action schemas, such as:
  - Removed empty action spaces, observation spaces, or reward spaces for agent which didn't use them
  - Relabeled action parameters to match the new action config schemas, and updated the values to no longer rely on indices
  - Removed action space options which were previously used for assigning meaning to action space IDs
- Updated tests that don't use YAMLs to still use the new action and agent schemas

- I haven't checked the notebooks run and there's a couple places where find-and-replace issues persist. I will fix but we can start review in the meantime if you're bored

## Test process
unit test

## Checklist
- [X] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2869, #2912
2025-01-21 14:39:56 +00:00
Marek Wolan
94ee16afa6 Remove todo comments that have been completed 2025-01-21 13:39:06 +00:00
Marek Wolan
dcce678045 update changelog 2025-01-21 13:20:19 +00:00
Marek Wolan
c30c5189be fixes based on PR suggestions 2025-01-21 13:17:42 +00:00
Marek Wolan
66daab3baf Backport 3.3.1 fixes into Core 2025-01-21 13:08:36 +00:00
Marek Wolan
4b79c88ae5 Fix typos and TODOs 2025-01-21 10:42:09 +00:00
Marek Wolan
18a665e562 Update actions and agents to get all tests passing post-refactor 2025-01-20 14:07:51 +00:00
Marek Wolan
c521528a0a Merge remote-tracking branch 'origin/4.0.0a1-dev' into feature/2869-Marek 2025-01-20 10:39:20 +00:00
Marek Wolan
4c0f87e8aa Fix configure actions that were accidentally combined 2025-01-20 10:23:13 +00:00
Nick Todd
8bf841cc62 Merged PR 584: Align core software with registry
## Summary
These changes align core software with the approach that support extensions.

## Test process
Passes test suite.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2888
2025-01-20 09:41:45 +00:00
Marek Wolan
4481d073e4 Fix action config schemas and formrequest method for dos bot action 2025-01-20 08:35:11 +00:00
Marek Wolan
858406c4a3 update more tests to new actions schema 2025-01-17 14:38:59 +00:00
Nick Todd
c82865d630 #2888: Uncomment domain_mapping in test configs. 2025-01-16 16:52:49 +00:00
Nick Todd
dff976b336 #2888: Fix merge test failures. 2025-01-16 16:32:55 +00:00
Marek Wolan
03cab0fcec Update configs to new action naming schema and remove redundant agent config 2025-01-16 15:18:13 +00:00
Marek Wolan
504f4bd134 #2869 - Refactor agent and action config system 2025-01-16 15:17:42 +00:00
Marek Wolan
f8fb052dad #2869 - Make agent schema children work properly 2025-01-15 16:44:17 +00:00
Nick Todd
1fe0aea48d Merge remote-tracking branch 'origin/4.0.0a1-dev' into feature/2888_Align_core_software_with_registry 2025-01-15 14:53:46 +00:00
Marek Wolan
b4b6c16872 #2869 - Make observation and action managers use config schemas 2025-01-15 10:08:14 +00:00
Marek Wolan
40d052141c #2869 - Remove outdated parameters from actionmanager (action map achieves the same result) [skip ci] 2025-01-14 13:48:18 +00:00
Marek Wolan
fb5242bd78 Merge agents and actions branches + fix import / subclass errors 2025-01-14 11:34:01 +00:00
Marek Wolan
9f5e16dd85 #2869 - Edit test fixture to work with new agent system 2025-01-14 10:58:34 +00:00
Marek Wolan
e7cfeeafc0 Make data manipulation agent inherit from periodic agent & fix it a bit 2025-01-14 09:57:35 +00:00
Marek Wolan
a447c5f43c #2869 - Make periodic agent timing check stricter 2025-01-14 09:05:13 +00:00
Charlie Crane
1ac562ebc9 #2912 - Initial layout of extensible_actions documentation page 2025-01-13 17:09:03 +00:00
Charlie Crane
3528b712f1 #2912 - Correct instances of verb: str to verb: ClassVar[str] where the parent class uses ClassVar[str] 2025-01-13 16:35:08 +00:00
Charlie Crane
3cca3d4a5c #2912 - Actioning review comments. Identifiers have been removed from AbstractActions, _legacy folder has been deleted and correction to IPV4Address type hints 2025-01-13 16:12:16 +00:00
Charlie Crane
23736f7738 #2869 - Documentation changes 2025-01-13 15:59:10 +00:00
Nick Todd
ea9c13b5f4 #2888: self.X -> self.config.X 2025-01-13 15:38:11 +00:00
Charlie Crane
edd2668ea4 #2869 - Update type hints and ConfigSchema variables in some agent classes 2025-01-13 15:08:48 +00:00
Charlie Crane
32fc970cfe #2869 - Update Config for some agent classes to use pydantic.Field, amend some identifiers and agent_name variables 2025-01-13 10:51:30 +00:00
Charlie Crane
511abea59c #2869 - Actioning review comments 2025-01-13 10:26:48 +00:00
Charlie Crane
c16abdfd30 #2869 - Remove agent_name from ConfigSchema and replace with type 2025-01-10 14:39:03 +00:00
Charlie Crane
e3f4775acb #2869 - Updates to ConfigSchema declaration and addressing some review comments 2025-01-10 14:09:15 +00:00
Charlie Crane
7af9d3724f #2869 - Updates to address test failures. Updated YAML configs to remove redundant start_settings 2025-01-08 14:42:35 +00:00
Nick Todd
0203a8699a #2888: Fixed C2Beacon test failures. 2025-01-07 14:21:07 +00:00
Nick Todd
d0c357355c #2888: Update tests to use config.fixing_duration. 2025-01-07 10:27:41 +00:00
Nick Todd
cb4e10921e #2888: Use fixing_duration from ConfigSchema. 2025-01-06 16:33:57 +00:00
Charlie Crane
66d309871f #2869 - Minor changes trying to make pytest happy 2025-01-06 11:38:07 +00:00
Marek Wolan
695ebb5ec7 #2888 - fix test database class to use correct listener default 2025-01-06 10:13:27 +00:00
Marek Wolan
632201681b #2888 - fix software config issues 2025-01-06 10:08:32 +00:00
Marek Wolan
30d8f14251 #2888 - Put software configuration items in the ConfigSchema 2025-01-03 16:26:12 +00:00
Charlie Crane
a0a5f2ca38 #2912 - Review comment actions following commit revertions 2025-01-03 15:03:01 +00:00
Charlie Crane
0ee454b13e #2912 - Rename actions/config.py to actions/software.py 2025-01-03 14:53:54 +00:00
Charlie Crane
e653afaa4c #2912 - Merge in changes on target branch 2025-01-03 14:48:18 +00:00
Charlie Crane
ab2dd6ca27 Revert "#2912 - Actioning Review Comments"
This reverts commit b11678a128.
2025-01-03 14:41:45 +00:00
Charlie Crane
b11678a128 #2912 - Actioning Review Comments 2025-01-03 14:40:00 +00:00
Charlie Crane
505eab6ed9 #2869 - Changes following review discussion 2025-01-03 14:02:36 +00:00