Welcome to the development guide for the InteractiveAI Assistant Platform. This guide provides an overview of the development process, including setting up the environment, running the application, and contributing to the project.
Before getting started with the development process, ensure that you have the following prerequisites:
The InteractiveAI Assistant Platform can be run in different modes, depending on your development needs. The initial setup mentioned in the README file remains mandatory anyway. If you encounter any issues, please refer to our troubleshooting guide.
To run the Recommendation Service on your local machine using docker:
- Navigate to Recommendation Service.
cd cab-assistant-platform/config/recommendation-service/
- Start the Recommendation Service using
docker-compose.bash
:
./docker-compose.bash
To run the Recommendation Service on your local machine:
- Create a python virtual env. For linux you can use these commands:
python3 -m venv <name_of_virtualenv>
source <name_of_virtualenv>/bin/activate
- Install python requirements.txt
cd backend/recommendation-service
pip install -r requirements.txt
-
If you usecase uses Owlready2, Install Java
-
Start the web service
- Option 1: Update envirement variables as felow: FLASK_APP="app:create_app('test')" FLASK_ENV="development" AUTH_DISABLED="True" DEFAULT_USE_CASE=YOUR_USE_CASE ("Railway", "PowerGrid", "ATM") then start service using command:
python -m flask run --host=0.0.0.0 --reload
- Option 2: Update start_service.bash and use it to run service
For the PowerGrid use case, the recommendation service utilizes the resources XD_silly_repo
and env_icaps_input_data_test
.
env_icaps_input_data_test
is a grid2op compliant scenarios' collection package.XD_silly_repo
is a compliant a grid2op compliant RL agent package.
If you wish to modify these, you must add your replacement folders in backend/recommendation-service/resources/PowerGrid/PowerGridgrid2op_poc_simulator
and update there in the file CONFIG_POWERGRID.toml
the followings parameter to match your new folders:
For the scenario collection integration:
env_name
: Name of the scenario folder. By default, it is set to"env_icaps_input_data_test"
at the moment.env_seed
: Seed to initialize the grid2op environment. By default, it is set to2118338672
at the moment.scenario_name
: Name of the scenario to be executed. By default, it is set to'jan_28_1'
at the moment.
For the RL agent integration:
assistant_name
: Name of the RL agent folder. By default, it is set to"XD_silly_repo"
at the moment.assistant_seed
: Seed to initialize the RL agent. By default it is set to1227139268
at the moment.
It is recommended to rebuild and restart the recommendation service for these changes to take effect.
To run all services on the dev server you can check the steps in the main README file
Contributions to the InteractiveAI Assistant Platform are welcome! To contribute please make sure to use developer guide
- Create a gitlab issue and use it to create your branch from develop branch
- Fetch new created branch
git fetch
. - Checkout you branch
git checkout 1-your-branch'
. - Commit your changes:
git commit -am 'Add your feature'
. - Push to the branch:
git push origin 1-your-branch
. - Create a pull request, explaining your changes and their purpose.
You can find more informations on how to contribute, modify and create new use cases in the specific frontend README
Every service have it's unittest with it. Here is an example of how you can run a service unittest.
- Create a python virtual env. For linux you can use these commands:
python3 -m venv <name_of_virtualenv>
source <name_of_virtualenv>/bin/activate
- Install requirements.txt.
pip install -r requirements.txt
- Run unittest and create a coverage report
pytest --cov=. --cov-report=html