e1a396981ae19d1c1425a231835c06647f771524
## 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...
#1355 - Carried out full renaming in node.py, active_node.py, passive_node.py, and service_node.py to make params and variable names explicit.
PrimAITE
Getting Started with PrimAITE
Pre-Requisites
In order to get PrimAITE installed, you will need to have the following installed:
python3.8+python3-pipvirtualenv
PrimAITE is designed to be OS-agnostic, and thus should work on most variations/distros of Linux, Windows, and MacOS.
Installation from source
1. Navigate to the PrimAITE folder and create a new python virtual environment (venv)
python3 -m venv <name_of_venv>
2. Activate the venv
Unix
source <name_of_venv>/bin/activate
Windows
.\<name_of_venv>\Scripts\activate
3. Install primaite into the venv along with all of it's dependencies
python3 -m pip install -e .
Development Installation
To install the development dependencies, postfix the command in step 3 above with the [dev] extra. Example:
python3 -m pip install -e .[dev]
Building documentation
The PrimAITE documentation can be built with the following commands:
Unix
cd docs
make html
Windows
cd docs
.\make.bat html
This will build the documentation as a collection of HTML files which uses the Read The Docs sphinx theme. Other build options are available but may require additional dependencies such as LaTeX and PDF. Please refer to the Sphinx documentation for your specific output requirements.
Description
Languages
Python
80.2%
Jupyter Notebook
19.8%