Commit Graph

1822 Commits

Author SHA1 Message Date
Czar Echavez
eee7a68f28 Merged PR 440: #2620: add nbmake and pytest xdist to run the notebooks as part of pieline
![image.png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/440/attachments/image.png)
![image (2).png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/440/attachments/image%20%282%29.png)

## Summary
Added nbmake so that the pytest can be used to run the notebooks in primaite as part of the pipeline

## Test process
n/a

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [ ] 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

#2620: add nbmake and pytest xdist to run the notebooks as part of pieline

Related work items: #2620
2024-07-02 08:21:29 +00:00
Czar Echavez
e2429df220 #2620: remove div zero from notebook 2024-07-02 02:52:08 +01:00
Czar Echavez
a5a93fe850 #2620: commit a div zero to check that the pipeline fails 2024-07-02 02:10:40 +01:00
Czar Echavez
12a6aa5e7f #2620: make the windows script work 2024-07-02 01:31:59 +01:00
Czar Echavez
88ab3c3ca1 #2620: remove shell 2024-07-02 00:45:24 +01:00
Czar Echavez
1faacc8d7c #2620: fix indentation 2024-07-02 00:28:59 +01:00
Czar Echavez
918eba2217 #2620: fix indentation 2024-07-02 00:25:30 +01:00
Czar Echavez
8097884ae2 #2620: modify script 2024-07-02 00:00:20 +01:00
Czar Echavez
ab3e84b8b9 #2620: remove irrelevant change 2024-07-01 17:03:14 +01:00
Czar Echavez
afcb844501 #2620: remove cell that fails on purpose 2024-07-01 16:45:28 +01:00
Czar Echavez
9c568b0ff3 Merged PR 439: #2641: Added a check for software health state in db service + tests
## Summary
Added a check in the database service process_sql method that checks if the Database Service is in a GOOD state (mainly so that the database service being in a fixed state returns an error)

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/439?_a=files&path=/tests/integration_tests/system/test_database_on_node.py

https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/439?_a=files&path=/tests/integration_tests/system/test_web_client_server_and_database.py

## 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

#2641: Added a check for software health state in db service + tests

Related work items: #2641
2024-07-01 15:22:22 +00:00
Czar Echavez
a47a14b86e #2620: Going around azure dev ops to fail the script 2024-07-01 15:57:15 +01:00
Czar Echavez
4dd50be11a #2620: run notebooks after test so that the results can be published 2024-07-01 14:31:58 +01:00
Charlie Crane
96f62a3229 Merged PR 436: 2656 - Implement Optional Negative Reward
## Summary
This PR implements an "ActionPenalty" Reward class, that can be used for penalising an agent when it carries out an action other than DONOTHING.

The value for this can be configured within the scenario YAML file.

## Test process
I've written unit tests to check that the action penalty is correctly calculated and applied, another to check that the config is read correctly and loads into PrimaiteGymEnv correctly.

## 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: #2656
2024-07-01 13:25:05 +00:00
Czar Echavez
cb61756e43 #2620: attempting to fail pipeline if notebook fails 2024-07-01 12:21:05 +01:00
Czar Echavez
ee4e152f13 #2620: publish result of test and checking if pipeline fails 2024-07-01 12:00:17 +01:00
Czar Echavez
7ac503794d Merge remote-tracking branch 'origin/dev' into feature/2641-prevent-databaseservice-interactions-from-occurring-in-fixing-state 2024-06-28 16:46:52 +01:00
Czar Echavez
ce58f3960c #2620: downgrade pytest-xdist version 2024-06-28 16:43:10 +01:00
Czar Echavez
a4424608dd #2620: add nbmake and pytest xdist to run the notebooks as part of pieline 2024-06-28 16:33:24 +01:00
Czar Echavez
3ac97f8c3f #2641: Added a check for software health state in db service + tests 2024-06-28 13:07:57 +01:00
Christopher McCarthy
e7fc01781e Merged PR 437: Automate Benchmarking Process with Scheduled and Release Triggers
## Summary

This pull request introduces an Azure DevOps pipeline that automates the benchmarking process for our project. The pipeline is designed to run under specific conditions and ensures that the benchmarking results are committed and published as artifacts. Additionally, the pipeline generates detailed benchmark reports in markdown format.

**Key Features:**

1.  **Triggering Conditions:**

    -   Triggered on creation of branches matching `refs/heads/release/*`.
    -   Runs automatically at 2 AM every weekday for the `dev` branch.
2.  **Version Handling:**

    -   Updates the version number with a `+dev.YYYYMMDD` suffix for the `dev` branch.
3.  **Dependency Installation:**

    -   Sets up Python 3.11 and installs project dependencies, including development and reinforcement learning extras.
4.  **Benchmark Execution:**

    -   Runs the benchmarking script and stores results in a version-based directory structure.
    -   Generates detailed markdown reports for benchmark results.
5.  **Commit and Push Results:**

    -   Commits and pushes benchmark results for release branches.
6.  **Artifact Preparation and Publishing:**

    -   Packages benchmark results into a tarball and publishes it as a pipeline artifact.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [ ] 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: #2648
2024-06-27 12:58:33 +00:00
Marek Wolan
7a680678aa #2656 - Make action penalty more configurable 2024-06-27 12:01:32 +01:00
Charlie Crane
e204afff6f #2656 - Removing the change to Data_Manipulation.yaml as this isn't necessary 2024-06-26 20:58:52 +01:00
Chris McCarthy
7f0a0c562f #2648 - changed av_reward_per_episode to total_reward_per_episode in primaite_benchmark.py and report.py 2024-06-26 13:26:18 +01:00
Chris McCarthy
e7f979b78e #2648 - reverted temp changes to benchmark durations and branch names for testing purposes 2024-06-26 12:52:29 +01:00
Charlie Crane
7a833afe2d #2656 - Unit tests for new ActionPenalty reward component, testing yaml and some minor changes to the implementation. Need to update Documentation to detail how this is added 2024-06-26 12:20:28 +01:00
Chris McCarthy
795b5a80fb #2648 - testing the new benchmark artifact name 2024-06-26 12:00:56 +01:00
Chris McCarthy
20c9719f1e #2648 - added full branch name reference for push 2024-06-26 11:32:17 +01:00
Chris McCarthy
3b118fa0ad #2648 - now testing the release benchmark auto commit and push 2024-06-26 10:52:23 +01:00
Chris McCarthy
08ca4d8889 #2648 - now testing the release benchmark auto commit and push 2024-06-26 10:50:05 +01:00
Chris McCarthy
112f116a89 #2648 - fixed error whereby VERSION variable isn't set before setting the dev build version in the VERSION file 2024-06-26 09:46:05 +01:00
Chris McCarthy
2192516c9a #2648 - reordered steps so that dev version is set first before version variables are set 2024-06-26 09:40:16 +01:00
Chris McCarthy
ad2b132a10 #2648 - added dev and rl extras to the pip install step 2024-06-26 09:13:55 +01:00
Chris McCarthy
0ee243a242 #2648 - trying to fix the artifacts publish stage. currently creating tar.gz and publishing that 2024-06-26 09:09:16 +01:00
Chris McCarthy
4249314672 #2648 - reduced the benchmark sessions and episodes for fail-fast speed while testing 2024-06-25 17:28:05 +01:00
Chris McCarthy
a7731c94e3 Merge remote-tracking branch 'origin/feature/2648_Automate-the-benchmarking-process' into feature/2648_Automate-the-benchmarking-process 2024-06-25 17:25:23 +01:00
Chris McCarthy
55d69d6568 #2648 - updated benchmark run command 2024-06-25 17:23:04 +01:00
Christopher McCarthy
1033e696cd Set up CI with Azure Pipelines
[skip ci]
2024-06-25 16:01:18 +00:00
Chris McCarthy
824729276e #2648 - updated benchmark process to output markdown file instead of LaTeX. Added pipeline that runs benchmarking at 2am on a weekday and automatically upon creation of release branch 2024-06-25 16:58:39 +01:00
Charlie Crane
5ad16fdb7e #2656 - Corrected from_config() for ActionPenalty so that it can pull the negative reward value from YAML and apply, defaulting to 0 still if not found/not configured.
Currerntly prints to terminal when a negative reward is being applied, though this is for implementation and troubleshooting. To be removed before PR is pushed out of draft
2024-06-25 15:36:47 +01:00
Marek Wolan
bf5f443604 Merged PR 433: Bump version to 3.1 2024-06-25 12:05:13 +00:00
Charlie Crane
db27bea4ec #2656 - Committing current state before lunch. New ActionPenalty reward added. Basic implementation returns a -1 reward if last_action_response.action isn't DONOTHING. Minor change in data_manipulation so I can see it working in the data_manipulation notebook. Need to use configured values but so far, promising?. Looks to result in a better average reward than without which is good, I think. 2024-06-25 12:29:01 +01:00
Marek Wolan
e915d5e090 Updated VERSION 2024-06-25 10:44:15 +00:00
Marek Wolan
9b195ea0f4 Merged PR 431: #2682 Backport changes to core PrimAITE
Related work items: #2682
2024-06-25 10:32:10 +00:00
Marek Wolan
a861ccb1ee Fix typo in log message 2024-06-25 10:31:28 +00:00
Marek Wolan
28dabad66b #2682 Backport changes to core PrimAITE 2024-06-25 11:04:52 +01:00
Marek Wolan
4a81dc3b2c Merged PR 424: fix infini-ARP bug when pinging broadcast/network address
Related work items: #2661
2024-06-19 11:09:52 +00:00
Chris McCarthy
636ec0cdd4 #26661 - Added tests for testing arp doesn't work but also doesn't crash the network if attempting to resolve a broadcast or network address 2024-06-19 11:31:13 +01:00
Marek Wolan
7375bb383a #2661 Improve style on ARP check code to be more concise 2024-06-18 10:09:06 +01:00
Marek Wolan
c90c059411 fix infini-ARP bug when pinging broadcast/network address 2024-06-14 14:48:28 +00:00