Skip to content

Commit

Permalink
(v2.3.2) - Multi version documentation fix (#331)
Browse files Browse the repository at this point in the history
* Added some misspelled words to the dictionary

* Added clean compilation folder before compile sphinx-multiversion

* Added sphinxcontrib-jquery extra requires in order to solve bug

* Added Additional observation information section in environemnts in order to give more information about info return in Sinergym

* Updated Sinergym version from 2.3.1 to 2.3.2

* Fixed missed commas
  • Loading branch information
AlejandroCN7 authored Apr 18, 2023
1 parent 9b90bee commit ec37ed7
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/merge_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
pip install --upgrade requests
- name: Compile documentation
if: steps.verify-documentation-update.outputs.doc == 'true'
run: cd docs && sphinx-multiversion source compilation
run: cd docs && rm -R compilation/ && sphinx-multiversion source compilation
- name: Check sphinx spelling
if: steps.verify-documentation-update.outputs.doc == 'true'
run: cd docs && sphinx-build -M spelling source compilation
Expand Down
46 changes: 46 additions & 0 deletions docs/source/pages/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,52 @@ The next image shows that socket connection:

|
***********************************
Additional observation information
***********************************

In addition to the observations returned in the step and reset methods as you can see in the images above,
both return a Python dictionary with additional information:

- **Reset info:** This dictionary has the next keys:

.. code-block:: python
info = {
'eplus_working_dir': eplus_working_dir,
'episode_num': self._epi_num,
'socket_host': addr[0],
'socket_port': addr[1],
'init_year': time_info[0],
'init_month': time_info[1],
'init_day': time_info[2],
'init_hour': time_info[3],
'timestep': 0,
'time_elapsed': 0
}
Thus, we can get information about where episode output will be allocated, the episode num of the simulation,
socket information, when episode start and timestep and time elapsed (which is 0).

- **step info:** This dictionary has the next keys:

.. code-block:: python
info = {
'timestep': int(
curSimTim / self._eplus_run_stepsize),
'time_elapsed': int(curSimTim),
'year': time_info[0],
'month': time_info[1],
'day': time_info[2],
'hour': time_info[3],
'action': action,
'reward': reward,
# AND REWARD TERMS
}
The additional information we can obtain in a step is the timestep number, simulation time elapsed, step datetime,
action executed in simulator (which can be different to the step action parameter due to the transformations)
and reward terms. The keys of reward terms depends on the reward class it has been used in the environment.

**************************
Environments List
**************************
Expand Down
8 changes: 8 additions & 0 deletions docs/source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ backend
backpropagate
BaseReward
BaseSimulator
bcvtb
BCVTB
benchmarking
boolean
cancelled
Expand Down Expand Up @@ -42,11 +44,15 @@ dataloader
dataset
datasets
Datastore
Datetime
datetime
DatetimeWrapper
ddy
Deprecations
deserialized
dicts
dir
DiscreteIncrementalWrapper
Dockerfile
docstring
doesn
Expand Down Expand Up @@ -108,6 +114,7 @@ Khee
kwargs
lifecycle
LinearReward
Lisboa
LoggerCallback
LoggerEvalCallback
loggerwrapper
Expand Down Expand Up @@ -164,6 +171,7 @@ preprocessed
preprocessing
pretrain
pretrained
PreviousObservationWrapper
Ptolomy
py
Pyro
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'sphinx', # documentation
'sphinx-rtd-theme', # documentation theme
'sphinxcontrib-spelling', # documentation spelling
'sphinxcontrib-jquery==2.0.0',
# documentation versioning
'sphinx-multiversion @ git+https://github.com/Holzhaus/sphinx-multiversion#egg=sphinx-multiversion',
'sphinx-multitoc-numbering', # Section numbering
Expand All @@ -58,6 +59,7 @@
'sphinx',
'sphinx-rtd-theme',
'sphinxcontrib-spelling',
'sphinxcontrib-jquery==2.0.0',
'sphinx-multiversion @ git+https://github.com/Holzhaus/sphinx-multiversion#egg=sphinx-multiversion',
'sphinx-multitoc-numbering',
'pyenchant',
Expand Down
2 changes: 1 addition & 1 deletion sinergym/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.3.2

0 comments on commit ec37ed7

Please sign in to comment.