Skip to content

[Feature Request] Add support for gymnasium.spaces.Text #1704

@jvasso

Description

@jvasso

🚀 Feature

Unless I'm mistaken, stable-baselines3 only supports Box, Discrete, MultiDiscrete, MultiBinary and Dict spaces from gymnasium.
It seems like a new fundamental space has been introduced in Gymnasium ( gymnasium.spaces.Text ), which seems to be a more natural way to deal with text data.

Motivation

This new support would ease the training of LLMs with RL.

Pitch

No response

Alternatives

One alternative is to use gymnasium.spaces.Box(low=0, high=vocab_size-1, dtype=np.int).
However this requires padding to support smaller texts.

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo
  • If I'm requesting a new feature, I have proposed alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    check the checklistYou have checked the required items in the checklist but you didn't do what is written...enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions