Skip to content

Commit

Permalink
more edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistobaan committed Feb 11, 2023
1 parent f49a6d9 commit 9146e8b
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 46 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
gendoc:
docker build -t trlxgendocs -f docker/docs/Dockerfile .
run:
docker run --rm -it \
-p 8000:8000 \
--entrypoint python trlxgendocs -m http.server 8000 --directory build/html

sh:
docker run --rm -it -v ${PWD}:/build \
-p 8000:8000 \
--entrypoint /bin/bash trlxgendocs
17 changes: 17 additions & 0 deletions docker/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.8-slim

# pip install -r docs/requirements.txt
# sphinx-build -b html docs docs/build/html -j auto
# sphinx-build -b html -D nb_execution_mode=off docs docs/build/html -j auto

RUN python -m pip install --upgrade --no-cache-dir pip
ADD docs/requirements.txt /tmp/requirements.txt
RUN python -m pip install --exists-action=w --no-cache-dir -r /tmp/requirements.txt
RUN apt-get update && apt-get install make -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /build
WORKDIR /build/
ADD docs .
RUN make html
ENTRYPOINT [ "python", "-m", "http.server", "8000" ]
4 changes: 3 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ help:

.PHONY: help Makefile

prepare:
cp ../examples/notebooks/*.ipynb .
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
%: Makefile prepare
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
9 changes: 3 additions & 6 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import url("theme.css");

:root {
--block-bg-opacity: .5;
--block-bg-opacity: 0.5;
}

.wy-side-nav-search {
Expand All @@ -20,7 +18,6 @@
background-color: rgba(171, 0, 182, var(--block-bg-opacity));
}

.key-ideas
{
border: 0px
.key-ideas {
border: 0px;
}
14 changes: 9 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ Installation
.. toctree::
:maxdepth: 2
:maxdepth: 1
:caption: Contents:

index
data
models
orchestrator
configs
pipeline
trainer
examples

.. toctree::
:hidden:
:maxdepth: 1
:caption: Examples

trlx_simulacra.ipynb
trlx_sentiments.ipynb

.. toctree::
:hidden:
Expand Down
1 change: 0 additions & 1 deletion docs/models.md

This file was deleted.

23 changes: 0 additions & 23 deletions docs/orchestrator.rst

This file was deleted.

23 changes: 13 additions & 10 deletions docs/pipeline.md → docs/pipeline.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
# Pipelines and Rollout Store
.. _pipeline:

## Pipelines
Pipelines and Rollout Store
***************************

Pipelines in trlX provide a way to read from a dataset. They are used to fetch data from the dataset and feed it to the models for training or inference. The pipelines allow for efficient processing of the data and ensure that the models have access to the data they need for their tasks.

## Rollout Stores
*Pipelines*

Rollout stores in trlX are used to store experiences created for the models by the orchestrator. The experiences in the rollout stores serve as the training data for the models. The models use the experiences stored in their rollout stores to learn and improve their behavior. The rollout stores provide a convenient and efficient way for the models to access the experiences they need for training.

## General
Pipelines in trlX provide a way to read from a dataset. They are used to fetch data from the dataset and feed it to the models for training or inference. The pipelines allow for efficient processing of the data and ensure that the models have access to the data they need for their tasks.

.. autoclass:: trlx.pipeline.BasePipeline
:members:

.. autoclass:: trlx.pipeline.BaseRolloutStore
:members:

## PPO

*Rollout Stores*

Rollout stores in trlX are used to store experiences created for the models by the orchestrator. The experiences in the rollout stores serve as the training data for the models. The models use the experiences stored in their rollout stores to learn and improve their behavior. The rollout stores provide a convenient and efficient way for the models to access the experiences they need for training.


**PPO**

.. autoclass:: trlx.pipeline.ppo_pipeline.PPORolloutStorage
:members:

## ILQL
**ILQL**

.. autoclass:: trlx.pipeline.offline_pipeline.PromptPipeline
:members:
Expand Down

0 comments on commit 9146e8b

Please sign in to comment.