Torchrl

Latest version: v0.4.0

Safety actively analyzes 629765 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.0.2a

What's Changed
* [BugFix] Fixed compose which ignored inv_transforms of child by nicolas-dufour in https://github.com/facebookresearch/rl/pull/328
* [BugFix] functorch installation in CircleCI by vmoens in https://github.com/facebookresearch/rl/pull/336
* [Refactor] VecNorm inference API by vmoens in https://github.com/facebookresearch/rl/pull/337
* TransformedEnv sets added Transforms into eval mode by alexanderlobov in https://github.com/facebookresearch/rl/pull/331
* [Refactor] make to_tensordict() create a copy of the content by nicolas-dufour in https://github.com/facebookresearch/rl/pull/334
* [CircleCI] Fix dm_control rendering by vmoens in https://github.com/facebookresearch/rl/pull/339
* [BugFix]: joining processes when they're done by vmoens in https://github.com/facebookresearch/rl/pull/311
* [Test] pass the OS error in case the file isn't closed by tongbaojia in https://github.com/facebookresearch/rl/pull/344
* [Feature] Make default rollout tensordict contiguous by vmoens in https://github.com/facebookresearch/rl/pull/343
* [BugFix] Clone memmap tensors on regular tensors and other replay buffer improvements by vmoens in https://github.com/facebookresearch/rl/pull/340
* [CI] Using latest gym by vmoens in https://github.com/facebookresearch/rl/pull/346
* [Doc] Coding your first DDPG tutorial by vmoens in https://github.com/facebookresearch/rl/pull/345
* [Doc] Minor: typos in DDPG by vmoens in https://github.com/facebookresearch/rl/pull/354
* [Feature] Register lambda and gamma in buffers by vmoens in https://github.com/facebookresearch/rl/pull/353
* [Feature] Implement __eq__ for TensorSpec by omikad in https://github.com/facebookresearch/rl/pull/358
* [Doc] Multi-tasking tutorial by vmoens in https://github.com/facebookresearch/rl/pull/352
* [Feature] Env refactoring for model based RL by nicolas-dufour in https://github.com/facebookresearch/rl/pull/315
* [Feature]: Added support for TensorDictSequence module subsampling by nicolas-dufour in https://github.com/facebookresearch/rl/pull/332
* [BugFix] Add lock to vec norm transform by jaschmid-fb in https://github.com/facebookresearch/rl/pull/356
* [Perf]: Improve PPO training performance by vmoens in https://github.com/facebookresearch/rl/pull/297
* [BugFix] Functorch-Tensordict bug fixes by vmoens in https://github.com/facebookresearch/rl/pull/361
* Revert "[BugFix] Functorch-Tensordict bug fixes" by vmoens in https://github.com/facebookresearch/rl/pull/362
* [BugFix] Functorch-Tensordict bug fixes by vmoens in https://github.com/facebookresearch/rl/pull/363
* [Feature] CSVLogger (ABBANDONED) by vmoens in https://github.com/facebookresearch/rl/pull/371
* [Feature] Support tensor-based decay in TD-lambda by tcbegley in https://github.com/facebookresearch/rl/pull/360
* [Feature] CSVLogger by vmoens in https://github.com/facebookresearch/rl/pull/372
* [BugFix] Fewer env instantiations for better mujoco rendering by vmoens in https://github.com/facebookresearch/rl/pull/378
* [Feature] change imports of environment libraries (gym and dm_control) at lower levels by guabao in https://github.com/facebookresearch/rl/pull/379
* [BugFix] Representation of indexed nested tensordict by vmoens in https://github.com/facebookresearch/rl/pull/370
* [BugFix] In-place `__setitem__` for SubTensorDict by vmoens in https://github.com/facebookresearch/rl/pull/369
* [Feature] Add `ProbabilisticTensorDictModule` dist key mapping support by nicolas-dufour in https://github.com/facebookresearch/rl/pull/376
* [Feature]: R3M integration by vmoens in https://github.com/facebookresearch/rl/pull/321
* [Feature] static_seed flag for envs, vectorized envs and collectors by vmoens in https://github.com/facebookresearch/rl/pull/385
* [Feature] AdditiveGaussian exploration strategy by vmoens in https://github.com/facebookresearch/rl/pull/388
* [Feature] Multi-images R3M by vmoens in https://github.com/facebookresearch/rl/pull/389
* [Feature] Flatten multi-images in R3M by vmoens in https://github.com/facebookresearch/rl/pull/391
* [Quality] Code cleanup for fbsync by vmoens in https://github.com/facebookresearch/rl/pull/392
* [Feature] In-house functional modules for TorchRL using TensorDict by vmoens in https://github.com/facebookresearch/rl/pull/387
* [Quality] Code cleanup for fbsync by vmoens in https://github.com/facebookresearch/rl/pull/397
* [Doc] Add charts to examples by nicolas-dufour in https://github.com/facebookresearch/rl/pull/374
* [Feature] Vectorized GAE by vmoens in https://github.com/facebookresearch/rl/pull/365
* [BugFix] Temporarily fix gym to 0.25.1 to fix CI by vmoens in https://github.com/facebookresearch/rl/pull/411
* [Feature] Create a Squeeze transform and update Unsqueeze transform by reachsumit in https://github.com/facebookresearch/rl/pull/408
* [Naming] Recurse kwarg to match pytorch by matt-fff in https://github.com/facebookresearch/rl/pull/410
* [Feature] Add all implemented loggers to the init of loggers by flinder in https://github.com/facebookresearch/rl/pull/402
* [BugFix] Fix gym 0.26 compatibility by vmoens in https://github.com/facebookresearch/rl/pull/403
* [BugFix] Remove submodules by vmoens in https://github.com/facebookresearch/rl/pull/414
* [Feature] lock tensordict when calling `share_memory_()` by fdabek1 in https://github.com/facebookresearch/rl/pull/412
* [BugFix] Updated TensorDict.expand to work as Tensor.expand by AnshulSehgal in https://github.com/facebookresearch/rl/pull/409
* [BugFix] Looser check for test_recorder assertion by vmoens in https://github.com/facebookresearch/rl/pull/415
* [Feature] Allow spec to be passed directly to exploration wrappers by vmoens in https://github.com/facebookresearch/rl/pull/418
* [BugFix] Collector revert to default exploration mode if empty string is passed by vmoens in https://github.com/facebookresearch/rl/pull/421
* [Naming] Rename _TargetNetUpdate to TargetNetUpdater, making it public by yushiyangk in https://github.com/facebookresearch/rl/pull/422
* [Doc] Re-run tutorials by vmoens in https://github.com/facebookresearch/rl/pull/381
* Revert "[Doc] Re-run tutorials" (colab links broken) by vmoens in https://github.com/facebookresearch/rl/pull/423
* [Feature] Switch back to latest gym by vmoens in https://github.com/facebookresearch/rl/pull/425
* [Feature] TensorDict without device by tcbegley in https://github.com/facebookresearch/rl/pull/413
* Updated the README.md file by bashnick in https://github.com/facebookresearch/rl/pull/427
* [Feature] Adding support for initialising TensorDicts from nested dicts by zeenolife in https://github.com/facebookresearch/rl/pull/404
* [Features] Make image_size a cfg param by nicolas-dufour in https://github.com/facebookresearch/rl/pull/430
* Make TensorDict.expand accept Sequence arguments by nicolasgriffiths in https://github.com/facebookresearch/rl/pull/424
* [Doc] Readme revamp for efficiency/modularity display by vmoens in https://github.com/facebookresearch/rl/pull/382
* [Feature] New `biased_softplus` semantic to allow for minimum scale setting by nicolas-dufour in https://github.com/facebookresearch/rl/pull/428
* [Tutorial] Re-run tutos by vmoens in https://github.com/facebookresearch/rl/pull/434
* [BugFix] mixed device_safe vs device by vmoens in https://github.com/facebookresearch/rl/pull/429
* [BugFix] Explicit params and buffers by agrotov in https://github.com/facebookresearch/rl/pull/436
* [BugFix] Fixed Additive noise by nicolas-dufour in https://github.com/facebookresearch/rl/pull/441
* [Tests] Test loggers video saving by bashnick in https://github.com/facebookresearch/rl/pull/439
* Revert "[BugFix] Fixed Additive noise" by vmoens in https://github.com/facebookresearch/rl/pull/442
* [Refactor] Rename TensorDictSequence to TensorDictSequential by ronert in https://github.com/facebookresearch/rl/pull/440
* [Refactor] Refactoring `set*()` methods for `TensorDictBase` class by zeenolife in https://github.com/facebookresearch/rl/pull/438
* [Cleanup] Removing gym-retro interface by vmoens in https://github.com/facebookresearch/rl/pull/444
* [BugFix]: Fix additive noise by nicolas-dufour in https://github.com/facebookresearch/rl/pull/447
* [BugFix] CatTensors: Prepended `next_` to the out_key by ggimler3 in https://github.com/facebookresearch/rl/pull/449
* [BugFix] Fix AdditiveGaussian exploration tests by vmoens in https://github.com/facebookresearch/rl/pull/450
* [BugFix] Wrong call to `device_safe` in replay buffer code by vmoens in https://github.com/facebookresearch/rl/pull/454
* [BugFix] Add transform_observation_spec _R3MNet by ymwdalex in https://github.com/facebookresearch/rl/pull/443
* [Doc] Add a knowledge base by shagunsodhani in https://github.com/facebookresearch/rl/pull/375
* [Feature] Allow for actions and rewards to be in the reset tensordict by vmoens in https://github.com/facebookresearch/rl/pull/458
* [Doc] Readme for knowledge base by vmoens in https://github.com/facebookresearch/rl/pull/459
* [Feature] Added `batch_lock` attribute in EnvBase by nicolas-dufour in https://github.com/facebookresearch/rl/pull/399
* [BugFix] deepcopy specs before transforming by vmoens in https://github.com/facebookresearch/rl/pull/461
* [BugFix]: Fixed dm_control action type casting by nicolas-dufour in https://github.com/facebookresearch/rl/pull/463
* [Versioning] Version 0.0.2a0 by vmoens in https://github.com/facebookresearch/rl/pull/465

New Contributors
* alexanderlobov made their first contribution in https://github.com/facebookresearch/rl/pull/331
* tongbaojia made their first contribution in https://github.com/facebookresearch/rl/pull/344
* omikad made their first contribution in https://github.com/facebookresearch/rl/pull/358
* jaschmid-fb made their first contribution in https://github.com/facebookresearch/rl/pull/356
* tcbegley made their first contribution in https://github.com/facebookresearch/rl/pull/360
* guabao made their first contribution in https://github.com/facebookresearch/rl/pull/379
* reachsumit made their first contribution in https://github.com/facebookresearch/rl/pull/408
* matt-fff made their first contribution in https://github.com/facebookresearch/rl/pull/410
* flinder made their first contribution in https://github.com/facebookresearch/rl/pull/402
* fdabek1 made their first contribution in https://github.com/facebookresearch/rl/pull/412
* AnshulSehgal made their first contribution in https://github.com/facebookresearch/rl/pull/409
* yushiyangk made their first contribution in https://github.com/facebookresearch/rl/pull/422
* bashnick made their first contribution in https://github.com/facebookresearch/rl/pull/427
* zeenolife made their first contribution in https://github.com/facebookresearch/rl/pull/404
* nicolasgriffiths made their first contribution in https://github.com/facebookresearch/rl/pull/424
* agrotov made their first contribution in https://github.com/facebookresearch/rl/pull/436
* ronert made their first contribution in https://github.com/facebookresearch/rl/pull/440
* ggimler3 made their first contribution in https://github.com/facebookresearch/rl/pull/449
* ymwdalex made their first contribution in https://github.com/facebookresearch/rl/pull/443

**Full Changelog**: https://github.com/facebookresearch/rl/compare/v0.0.1c...v0.0.2a

0.0.1

TorchRL Initial Alpha Release

TorchRL is the soon-to-be official RL domain library for PyTorch.
It contains primitives that are aimed at covering most of the modern RL research space.

Getting started with the library

Installation

The library can be installed through

$ pip install torchrl

Currently, torchrl wheels are provided for linux and macos (not M1) machines. For other architectures or for the latest features, refer to the [README.md](README.md) and [CONTRIBUTING.md](CONTRIBUTING.md) files for advanced installation instructions.

Environments

TorchRL currently supports gym and dm_control out-of-the-box. To create a gym wrapped environment, simply use
python
from torchrl.envs import GymEnv, GymWrapper
env = GymEnv("Pendulum-v1")
similarly
env = GymWrapper(gym.make("Pendulum-v1"))

Environment can be transformed using the `torchrl.envs.transforms` module. See the [environment tutorial](tutorials/envs.ipynb) for more information.
The [`ParallelEnv`](torchrl/envs/vec_env.py) allows to run multiple environments in parallel.

Policy and modules

TorchRL modules interacts using `TensorDict`, a new data carrier class. Although it is not necessary to use it and one can find workarounds for it, we advise to use the [`TensorDictModule`](torchrl/modules/tensordict_module) class to read tensordicts:
python
from torchrl.modules import TensorDictModule
>>> policy_module = nn.Linear(n_obs, n_act)
>>> policy = TensorDictModule(policy_module,
... in_keys=["observation"], keys to be read for the module input
... out_keys=["action"], keys to be written with the module output
)
>>> tensordict = env.reset()
>>> tensordict = policy(tensordict)
>>> action = tensordict["action"]


By using `TensorDict` and `TensorDictModule`, you can make sure that your algorithm is robust to changes in configuration (e.g. usage of an RNN for the policy, exploration strategies etc.) `TensorDict` instances can be reshaped in several ways, cast to device, updated, shared among processes, stacked, concatenated etc.

Some specialized `TensorDictModule` are implemented for convenience: `Actor`, `ProbabilisticActor`, `ValueOperator`, `ActorCriticOperator`, `ActorCriticWrapper` and `QValueActor` can be found in [actors.py](torchrl/modules/tensordict_module/actors.py).

Collecting data

[DataColllectors](torchrl/collectors/collectors.py) is the TorchRL data loading class family. We provide single process, sync and async multiprocess loaders. We also provide [`ReplayBuffers`](torchrl/data/replay_buffers) that can be stored in memory or on disk using the various [storage](torchrl/data/replay_buffers/storages.py) options.

Loss modules and advantage computation

[Loss modules](torchrl/objectives/costs) are provided for each algorithm class independently. They are accompanied by efficient implementations of [value and advantage computation](https://github.com/facebookresearch/rl/tree/main/torchrl/objectives/returns) functions.
TorchRL is devoted to be fully compatible with [functorch](https://github.com/pytorch/functorch), the functional programming PyTorch library.

Examples

A bunch of examples are provided as well. Check the [`examples`](examples) directory to learn more about exploration strategies, loss modules etc.

0.0.1c

What's Changed
* Adding additional checks to `TensorDict.view` to remove unnecessary `ViewedTensorDict` object creation by bamaxw in https://github.com/facebookresearch/rl/pull/319
* [BugFix]: Safe state normalization when std=0 by vmoens in https://github.com/facebookresearch/rl/pull/323
* [BugFix]: gradient propagation in advantage estimates by vmoens in https://github.com/facebookresearch/rl/pull/322
* [BugFix]: make training example gracefully exit by vmoens in https://github.com/facebookresearch/rl/pull/326
* [Setup]: Exclude tutorials from wheels by vmoens in https://github.com/facebookresearch/rl/pull/325
* [BugFix]: Tensor map for subtensordict.set_ by vmoens in https://github.com/facebookresearch/rl/pull/324
* [Release]: Wheels v0.0.1c by vmoens in https://github.com/facebookresearch/rl/pull/327

New Contributors
* bamaxw made their first contribution in https://github.com/facebookresearch/rl/pull/319

**Full Changelog**: https://github.com/facebookresearch/rl/compare/v0.0.1b...v0.0.1c

0.0.1b

Highlights
**Supports nested tensordicts**:
* [Feature] Nested tensordicts by vmoens in https://github.com/facebookresearch/rl/pull/256
* [Feature]: Index nested tensordicts using tuples by vmoens in https://github.com/facebookresearch/rl/pull/262
* [Feature]: flatten nested tensordicts by vmoens in https://github.com/facebookresearch/rl/pull/264

**Padding for tensordicts**:
* [Feature] Implement padding for tensordicts by ajhinsvark in https://github.com/facebookresearch/rl/pull/257

**Speed improvements**:
* [Feature]: faster meta-tensor API for TensorDict by vmoens in https://github.com/facebookresearch/rl/pull/272
* [Feature]: faster safetanh transform via C++ bindings by vmoens in https://github.com/facebookresearch/rl/pull/289
* [Feature]: Improving training efficiency by vmoens in https://github.com/facebookresearch/rl/pull/293

**Logging capabilities**:
* [Feature]: Refactored logging to be able to support other loggers easily by nicolas-dufour in https://github.com/facebookresearch/rl/pull/270
* [Feature] Wandb logger by nicolas-dufour in https://github.com/facebookresearch/rl/pull/274

**Doc**
* [Doc]: TorchRL demo by vmoens in https://github.com/facebookresearch/rl/pull/284
* [Doc] Added TensorDict tutorial by nicolas-dufour in https://github.com/facebookresearch/rl/pull/255
* [Doc] Tensordictmodule tutorial by nicolas-dufour in https://github.com/facebookresearch/rl/pull/267

What's Changed
* MacOs versioning and release bugfix by vmoens in https://github.com/facebookresearch/rl/pull/247
* Setup metadata by vmoens in https://github.com/facebookresearch/rl/pull/248
* Fix setup instructions by vmoens in https://github.com/facebookresearch/rl/pull/250
* Fix a bug when segment_tree size is exactly 2^N by xiaomengy in https://github.com/facebookresearch/rl/pull/251
* Added test for RewardRescale transform by nicolas-dufour in https://github.com/facebookresearch/rl/pull/252
* Empty TensorDict population in loops by vmoens in https://github.com/facebookresearch/rl/pull/253
* Memmap del bugfix by vmoens in https://github.com/facebookresearch/rl/pull/254
* [BugFix]: recursion error when calling `permute(...).to_tensordict()` by vmoens in https://github.com/facebookresearch/rl/pull/260
* Differentiable PPOLoss for IRL by vmoens in https://github.com/facebookresearch/rl/pull/240
* [BugFix]: avoid deleting true in_keys in TensorDictSequence by vmoens in https://github.com/facebookresearch/rl/pull/261
* [Feature] Add issue and pull request template by Benjamin-eecs in https://github.com/facebookresearch/rl/pull/263
* [Test]: test nested CompositeSpec by vmoens in https://github.com/facebookresearch/rl/pull/265
* [Test]: test squeezed TensorDict by vmoens in https://github.com/facebookresearch/rl/pull/269
* [Test]: TensorDict: test tensordict created on cuda and sub-tensordict indexed along 2nd dimension by vmoens in https://github.com/facebookresearch/rl/pull/268
* Refactor the `torch.stack` with destination by khmigor in https://github.com/facebookresearch/rl/pull/245
* Small tweaks to make the replay buffer code more consistent by shagunsodhani in https://github.com/facebookresearch/rl/pull/275
* [BugFix]: Minor bugs in docstrings by vmoens in https://github.com/facebookresearch/rl/pull/276
* [BugFix]: update wrong links in issue and pull request template by Benjamin-eecs in https://github.com/facebookresearch/rl/pull/286
* [BugFix]: quickfix: force gym 0.24 installation until issue with rendering is resolved by vmoens in https://github.com/facebookresearch/rl/pull/283
* [Doc]: remove pip install from CONTRIBUTING.md by vmoens in https://github.com/facebookresearch/rl/pull/288
* [BugFix]: fix GLFW3 error when installing dm_control by vmoens in https://github.com/facebookresearch/rl/pull/291
* [BugFix]: Fix examples by vmoens in https://github.com/facebookresearch/rl/pull/290
* [Doc] Simplify PR template by vmoens in https://github.com/facebookresearch/rl/pull/292
* [BugFix]: Replay buffer bugfixes by vmoens in https://github.com/facebookresearch/rl/pull/294
* [Doc] MacOs M1 troubleshooting by ramonmedel in https://github.com/facebookresearch/rl/pull/296
* [QuickFix]: update issue and pr template by Benjamin-eecs in https://github.com/facebookresearch/rl/pull/303
* [Test] tests for `BinarizeReward` by srikanthmg85 in https://github.com/facebookresearch/rl/pull/302
* [BugFix]: L2-priority for PRB by vmoens in https://github.com/facebookresearch/rl/pull/305
* [Feature] Transforms: `Compose.insert` and `TransformedEnv.insert_transform` by rmartimov in https://github.com/facebookresearch/rl/pull/304
* [BugFix] Fix flaky test by waiting for procs instead of sleep by nairbv in https://github.com/facebookresearch/rl/pull/306
* [BugFix] Fix a build warning, setuptools/distutils import order by nairbv in https://github.com/facebookresearch/rl/pull/307
* ufmt issue if imports in order requested by distutils by nairbv in https://github.com/facebookresearch/rl/pull/308
* [BugFix]: Conda to pip for circleci by vmoens in https://github.com/facebookresearch/rl/pull/310
* [BugFix] Support list-based boolean masks for TensorDict by benoitdescamps in https://github.com/facebookresearch/rl/pull/299
* [Feature] Truly invertible tensordict permutation of dimensions by ramonmedel in https://github.com/facebookresearch/rl/pull/295
* [Feature] Rename _TensorDict into TensorDictBase by yoavnavon in https://github.com/facebookresearch/rl/pull/316

New Contributors
* nicolas-dufour made their first contribution in https://github.com/facebookresearch/rl/pull/252
* ajhinsvark made their first contribution in https://github.com/facebookresearch/rl/pull/257
* ramonmedel made their first contribution in https://github.com/facebookresearch/rl/pull/296
* srikanthmg85 made their first contribution in https://github.com/facebookresearch/rl/pull/302
* rmartimov made their first contribution in https://github.com/facebookresearch/rl/pull/304
* nairbv made their first contribution in https://github.com/facebookresearch/rl/pull/306
* benoitdescamps made their first contribution in https://github.com/facebookresearch/rl/pull/299
* yoavnavon made their first contribution in https://github.com/facebookresearch/rl/pull/316

**Full Changelog**: https://github.com/facebookresearch/rl/compare/v0.0.1...v0.0.1b

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.