Note

Click here to download the full example code

# Pendulum: Writing your environment and transforms with TorchRL¶

**Author**: Vincent Moens

Creating an environment (a simulator or an interface to a physical control system) is an integrative part of reinforcement learning and control engineering.

TorchRL provides a set of tools to do this in multiple contexts. This tutorial demonstrates how to use PyTorch and TorchRL code a pendulum simulator from the ground up. It is freely inspired by the Pendulum-v1 implementation from OpenAI-Gym/Farama-Gymnasium control library.

Key learnings:

How to design an environment in TorchRL: - Writing specs (input, observation and reward); - Implementing behavior: seeding, reset and step.

Transforming your environment inputs and outputs, and writing your own transforms;

How to use

`TensorDict`

to carry arbitrary data structures through the`codebase`

.In the process, we will touch three crucial components of TorchRL:

To give a sense of what can be achieved with TorchRL’s environments, we will
be designing a *stateless* environment. While stateful environments keep track of
the latest physical state encountered and rely on this to simulate the state-to-state
transition, stateless environments expect the current state to be provided to
them at each step, along with the action undertaken. TorchRL supports both
types of environments, but stateless environments are more generic and hence
cover a broader range of features of the environment API in TorchRL.

Modeling stateless environments gives users full control over the input and outputs of the simulator: one can reset an experiment at any stage or actively modify the dynamics from the outside. However, it assumes that we have some control over a task, which may not always be the case: solving a problem where we cannot control the current state is more challenging but has a much wider set of applications.

Another advantage of stateless environments is that they can enable batched execution of transition simulations. If the backend and the implementation allow it, an algebraic operation can be executed seamlessly on scalars, vectors, or tensors. This tutorial gives such examples.

This tutorial will be structured as follows:

We will first get acquainted with the environment properties: its shape (

`batch_size`

), its methods (mainly`step()`

,`reset()`

and`set_seed()`

) and finally its specs.After having coded our simulator, we will demonstrate how it can be used during training with transforms.

We will explore new avenues that follow from the TorchRL’s API, including: the possibility of transforming inputs, the vectorized execution of the simulation and the possibility of backpropagation through the simulation graph.

Finally, we will train a simple policy to solve the system we implemented.

```
from collections import defaultdict
from typing import Optional
import numpy as np
import torch
import tqdm
from tensordict.nn import TensorDictModule
from tensordict.tensordict import TensorDict, TensorDictBase
from torch import nn
from torchrl.data import BoundedTensorSpec, CompositeSpec, UnboundedContinuousTensorSpec
from torchrl.envs import (
CatTensors,
EnvBase,
Transform,
TransformedEnv,
UnsqueezeTransform,
)
from torchrl.envs.transforms.transforms import _apply_to_composite
from torchrl.envs.utils import check_env_specs, step_mdp
DEFAULT_X = np.pi
DEFAULT_Y = 1.0
```

There are four things you must take care of when designing a new environment class:

`EnvBase._reset()`

, which codes for the resetting of the simulator at a (potentially random) initial state;`EnvBase._step()`

which codes for the state transition dynamic;`EnvBase._set_seed`()`

which implements the seeding mechanism;the environment specs.

Let us first describe the problem at hand: we would like to model a simple pendulum over which we can control the torque applied on its fixed point. Our goal is to place the pendulum in upward position (angular position at 0 by convention) and having it standing still in that position. To design our dynamic system, we need to define two equations: the motion equation following an action (the torque applied) and the reward equation that will constitute our objective function.

For the motion equation, we will update the angular velocity following:

where \(\dot{\theta}\) is the angular velocity in rad/sec, \(g\) is the gravitational force, \(L\) is the pendulum length, \(m\) is its mass, \(\theta\) is its angular position and \(u\) is the torque. The angular position is then updated according to

We define our reward as

which will be maximized when the angle is close to 0 (pendulum in upward position), the angular velocity is close to 0 (no motion) and the torque is 0 too.

## Coding the effect of an action: `_step()`

¶

The step method is the first thing to consider, as it will encode
the simulation that is of interest to us. In TorchRL, the
`EnvBase`

class has a `EnvBase.step()`

method that receives a `tensordict.TensorDict`

instance with an `"action"`

entry indicating what action is to be taken.

To facilitate the reading and writing from that `tensordict`

and to make sure
that the keys are consistent with what’s expected from the library, the
simulation part has been delegated to a private abstract method `_step()`

which reads input data from a `tensordict`

, and writes a *new* `tensordict`

with the output data.

The `_step()`

method should do the following:

Read the input keys (such as

`"action"`

) and execute the simulation based on these;Retrieve observations, done state and reward;

Write the set of observation values along with the reward and done state at the corresponding entries in a new

`TensorDict`

.

Next, the `step()`

method will merge the output
of `step()`

in the input `tensordict`

to enforce
input/output consistency.

Typically, for stateful environments, this will look like this:

```
>>> policy(env.reset())
>>> print(tensordict)
TensorDict(
fields={
action: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
observation: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=cpu,
is_shared=False)
>>> env.step(tensordict)
>>> print(tensordict)
TensorDict(
fields={
action: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
next: TensorDict(
fields={
done: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
observation: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
reward: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=cpu,
is_shared=False),
observation: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=cpu,
is_shared=False)
```

Notice that the root `tensordict`

has not changed, the only modification is the
appearance of a new `"next"`

entry that contains the new information.

In the Pendulum example, our `_step()`

method will read the relevant
entries from the input `tensordict`

and compute the position and velocity of
the pendulum after the force encoded by the `"action"`

key has been applied
onto it. We compute the new angular position of the pendulum
`"new_th"`

as the result of the previous position `"th"`

plus the new
velocity `"new_thdot"`

over a time interval `dt`

.

Since our goal is to turn the pendulum up and maintain it still in that
position, our `cost`

(negative reward) function is lower for positions
close to the target and low speeds.
Indeed, we want to discourage positions that are far from being “upward”
and/or speeds that are far from 0.

In our example, `EnvBase._step()`

is encoded as a static method since our
environment is stateless. In stateful settings, the `self`

argument is
needed as the state needs to be read from the environment.

```
def _step(tensordict):
th, thdot = tensordict["th"], tensordict["thdot"] # th := theta
g_force = tensordict["params", "g"]
mass = tensordict["params", "m"]
length = tensordict["params", "l"]
dt = tensordict["params", "dt"]
u = tensordict["action"].squeeze(-1)
u = u.clamp(-tensordict["params", "max_torque"], tensordict["params", "max_torque"])
costs = angle_normalize(th) ** 2 + 0.1 * thdot**2 + 0.001 * (u**2)
new_thdot = (
thdot
+ (3 * g_force / (2 * length) * th.sin() + 3.0 / (mass * length**2) * u) * dt
)
new_thdot = new_thdot.clamp(
-tensordict["params", "max_speed"], tensordict["params", "max_speed"]
)
new_th = th + new_thdot * dt
reward = -costs.view(*tensordict.shape, 1)
done = torch.zeros_like(reward, dtype=torch.bool)
out = TensorDict(
{
"th": new_th,
"thdot": new_thdot,
"params": tensordict["params"],
"reward": reward,
"done": done,
},
tensordict.shape,
)
return out
def angle_normalize(x):
return ((x + torch.pi) % (2 * torch.pi)) - torch.pi
```

## Resetting the simulator: `_reset()`

¶

The second method we need to care about is the
`_reset()`

method. Like
`_step()`

, it should write the observation entries
and possibly a done state in the `tensordict`

it outputs (if the done state is
omitted, it will be filled as `False`

by the parent method
`reset()`

). In some contexts, it is required that
the `_reset`

method receives a command from the function that called
it (for example, in multi-agent settings we may want to indicate which agents need
to be reset). This is why the `_reset()`

method
also expects a `tensordict`

as input, albeit it may perfectly be empty or
`None`

.

The parent `EnvBase.reset()`

does some simple checks like the
`EnvBase.step()`

does, such as making sure that a `"done"`

state
is returned in the output `tensordict`

and that the shapes match what is
expected from the specs.

For us, the only important thing to consider is whether
`EnvBase._reset()`

contains all the expected observations. Once more,
since we are working with a stateless environment, we pass the configuration
of the pendulum in a nested `tensordict`

named `"params"`

.

In this example, we do not pass a done state as this is not mandatory
for `_reset()`

and our environment is non-terminating, so we always
expect it to be `False`

.

```
def _reset(self, tensordict):
if tensordict is None or tensordict.is_empty():
# if no ``tensordict`` is passed, we generate a single set of hyperparameters
# Otherwise, we assume that the input ``tensordict`` contains all the relevant
# parameters to get started.
tensordict = self.gen_params(batch_size=self.batch_size)
high_th = torch.tensor(DEFAULT_X, device=self.device)
high_thdot = torch.tensor(DEFAULT_Y, device=self.device)
low_th = -high_th
low_thdot = -high_thdot
# for non batch-locked environments, the input ``tensordict`` shape dictates the number
# of simulators run simultaneously. In other contexts, the initial
# random state's shape will depend upon the environment batch-size instead.
th = (
torch.rand(tensordict.shape, generator=self.rng, device=self.device)
* (high_th - low_th)
+ low_th
)
thdot = (
torch.rand(tensordict.shape, generator=self.rng, device=self.device)
* (high_thdot - low_thdot)
+ low_thdot
)
out = TensorDict(
{
"th": th,
"thdot": thdot,
"params": tensordict["params"],
},
batch_size=tensordict.shape,
)
return out
```

## Environment metadata: `env.*_spec`

¶

The specs define the input and output domain of the environment. It is important that the specs accurately define the tensors that will be received at runtime, as they are often used to carry information about environments in multiprocessing and distributed settings. They can also be used to instantiate lazily defined neural networks and test scripts without actually querying the environment (which can be costly with real-world physical systems for instance).

There are four specs that we must code in our environment:

`EnvBase.observation_spec`

: This will be a`CompositeSpec`

instance where each key is an observation (a`CompositeSpec`

can be viewed as a dictionary of specs).`EnvBase.action_spec`

: It can be any type of spec, but it is required that it corresponds to the`"action"`

entry in the input`tensordict`

;`EnvBase.reward_spec`

: provides information about the reward space;`EnvBase.done_spec`

: provides information about the space of the done flag.

TorchRL specs are organized in two general containers: `input_spec`

which
contains the specs of the information that the step function reads (divided
between `action_spec`

containing the action and `state_spec`

containing
all the rest), and `output_spec`

which encodes the specs that the
step outputs (`observation_spec`

, `reward_spec`

and `done_spec`

).
In general, you should not interact directly with `output_spec`

and
`input_spec`

but only with their content: `observation_spec`

,
`reward_spec`

, `done_spec`

, `action_spec`

and `state_spec`

.
The reason if that the specs are organized in a non-trivial way
within `output_spec`

and
`input_spec`

and neither of these should be directly modified.

In other words, the `observation_spec`

and related properties are
convenient shortcuts to the content of the output and input spec containers.

TorchRL offers multiple `TensorSpec`

subclasses to
encode the environment’s input and output characteristics.

### Specs shape¶

The environment specs leading dimensions must match the environment batch-size. This is done to enforce that every component of an environment (including its transforms) have an accurate representation of the expected input and output shapes. This is something that should be accurately coded in stateful settings.

For non batch-locked environments, such as the one in our example (see below), this is irrelevant as the environment batch size will most likely be empty.

```
def _make_spec(self, td_params):
# Under the hood, this will populate self.output_spec["observation"]
self.observation_spec = CompositeSpec(
th=BoundedTensorSpec(
low=-torch.pi,
high=torch.pi,
shape=(),
dtype=torch.float32,
),
thdot=BoundedTensorSpec(
low=-td_params["params", "max_speed"],
high=td_params["params", "max_speed"],
shape=(),
dtype=torch.float32,
),
# we need to add the ``params`` to the observation specs, as we want
# to pass it at each step during a rollout
params=make_composite_from_td(td_params["params"]),
shape=(),
)
# since the environment is stateless, we expect the previous output as input.
# For this, ``EnvBase`` expects some state_spec to be available
self.state_spec = self.observation_spec.clone()
# action-spec will be automatically wrapped in input_spec when
# `self.action_spec = spec` will be called supported
self.action_spec = BoundedTensorSpec(
low=-td_params["params", "max_torque"],
high=td_params["params", "max_torque"],
shape=(1,),
dtype=torch.float32,
)
self.reward_spec = UnboundedContinuousTensorSpec(shape=(*td_params.shape, 1))
def make_composite_from_td(td):
# custom function to convert a ``tensordict`` in a similar spec structure
# of unbounded values.
composite = CompositeSpec(
{
key: make_composite_from_td(tensor)
if isinstance(tensor, TensorDictBase)
else UnboundedContinuousTensorSpec(
dtype=tensor.dtype, device=tensor.device, shape=tensor.shape
)
for key, tensor in td.items()
},
shape=td.shape,
)
return composite
```

## Reproducible experiments: seeding¶

Seeding an environment is a common operation when initializing an experiment.
The only goal of `EnvBase._set_seed()`

is to set the seed of the contained
simulator. If possible, this operation should not call `reset()`

or interact
with the environment execution. The parent `EnvBase.set_seed()`

method
incorporates a mechanism that allows seeding multiple environments with a
different pseudo-random and reproducible seed.

```
def _set_seed(self, seed: Optional[int]):
rng = torch.manual_seed(seed)
self.rng = rng
```

## Wrapping things together: the `EnvBase`

class¶

We can finally put together the pieces and design our environment class.
The specs initialization needs to be performed during the environment
construction, so we must take care of calling the `_make_spec()`

method
within `PendulumEnv.__init__()`

.

We add a static method `PendulumEnv.gen_params()`

which deterministically
generates a set of hyperparameters to be used during execution:

```
def gen_params(g=10.0, batch_size=None) -> TensorDictBase:
"""Returns a ``tensordict`` containing the physical parameters such as gravitational force and torque or speed limits."""
if batch_size is None:
batch_size = []
td = TensorDict(
{
"params": TensorDict(
{
"max_speed": 8,
"max_torque": 2.0,
"dt": 0.05,
"g": g,
"m": 1.0,
"l": 1.0,
},
[],
)
},
[],
)
if batch_size:
td = td.expand(batch_size).contiguous()
return td
```

We define the environment as non-`batch_locked`

by turning the `homonymous`

attribute to `False`

. This means that we will **not** enforce the input
`tensordict`

to have a `batch-size`

that matches the one of the environment.

The following code will just put together the pieces we have coded above.

```
class PendulumEnv(EnvBase):
metadata = {
"render_modes": ["human", "rgb_array"],
"render_fps": 30,
}
batch_locked = False
def __init__(self, td_params=None, seed=None, device="cpu"):
if td_params is None:
td_params = self.gen_params()
super().__init__(device=device, batch_size=[])
self._make_spec(td_params)
if seed is None:
seed = torch.empty((), dtype=torch.int64).random_().item()
self.set_seed(seed)
# Helpers: _make_step and gen_params
gen_params = staticmethod(gen_params)
_make_spec = _make_spec
# Mandatory methods: _step, _reset and _set_seed
_reset = _reset
_step = staticmethod(_step)
_set_seed = _set_seed
```

## Testing our environment¶

TorchRL provides a simple function `check_env_specs()`

to check that a (transformed) environment has an input/output structure that
matches the one dictated by its specs.
Let us try it out:

```
env = PendulumEnv()
check_env_specs(env)
```

```
check_env_specs succeeded!
```

We can have a look at our specs to have a visual representation of the environment signature:

```
print("observation_spec:", env.observation_spec)
print("state_spec:", env.state_spec)
print("reward_spec:", env.reward_spec)
```

```
observation_spec: CompositeSpec(
th: BoundedTensorSpec(
shape=torch.Size([]),
space=ContinuousBox(
low=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True),
high=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True)),
device=cpu,
dtype=torch.float32,
domain=continuous),
thdot: BoundedTensorSpec(
shape=torch.Size([]),
space=ContinuousBox(
low=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True),
high=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True)),
device=cpu,
dtype=torch.float32,
domain=continuous),
params: CompositeSpec(
max_speed: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.int64,
domain=continuous),
max_torque: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
dt: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
g: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
m: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
l: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous), device=cpu, shape=torch.Size([])), device=cpu, shape=torch.Size([]))
state_spec: CompositeSpec(
th: BoundedTensorSpec(
shape=torch.Size([]),
space=ContinuousBox(
low=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True),
high=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True)),
device=cpu,
dtype=torch.float32,
domain=continuous),
thdot: BoundedTensorSpec(
shape=torch.Size([]),
space=ContinuousBox(
low=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True),
high=Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, contiguous=True)),
device=cpu,
dtype=torch.float32,
domain=continuous),
params: CompositeSpec(
max_speed: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.int64,
domain=continuous),
max_torque: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
dt: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
g: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
m: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous),
l: UnboundedContinuousTensorSpec(
shape=torch.Size([]),
space=None,
device=cpu,
dtype=torch.float32,
domain=continuous), device=cpu, shape=torch.Size([])), device=cpu, shape=torch.Size([]))
reward_spec: UnboundedContinuousTensorSpec(
shape=torch.Size([1]),
space=ContinuousBox(
low=Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.float32, contiguous=True),
high=Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.float32, contiguous=True)),
device=cpu,
dtype=torch.float32,
domain=continuous)
```

We can execute a couple of commands too to check that the output structure matches what is expected.

```
td = env.reset()
print("reset tensordict", td)
```

```
reset tensordict TensorDict(
fields={
done: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=None,
is_shared=False),
terminated: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=None,
is_shared=False)
```

We can run the `env.rand_step()`

to generate
an action randomly from the `action_spec`

domain. A `tensordict`

containing
the hyperparameters and the current state **must** be passed since our
environment is stateless. In stateful contexts, `env.rand_step()`

works
perfectly too.

```
td = env.rand_step(td)
print("random step tensordict", td)
```

```
random step tensordict TensorDict(
fields={
action: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
next: TensorDict(
fields={
done: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=None,
is_shared=False),
reward: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=None,
is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=None,
is_shared=False),
terminated: Tensor(shape=torch.Size([1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([]),
device=None,
is_shared=False)
```

## Transforming an environment¶

Writing environment transforms for stateless simulators is slightly more
complicated than for stateful ones: transforming an output entry that needs
to be read at the following iteration requires to apply the inverse transform
before calling `meth.step()`

at the next step.
This is an ideal scenario to showcase all the features of TorchRL’s
transforms!

For instance, in the following transformed environment we `unsqueeze`

the entries
`["th", "thdot"]`

to be able to stack them along the last
dimension. We also pass them as `in_keys_inv`

to squeeze them back to their
original shape once they are passed as input in the next iteration.

```
env = TransformedEnv(
env,
# ``Unsqueeze`` the observations that we will concatenate
UnsqueezeTransform(
unsqueeze_dim=-1,
in_keys=["th", "thdot"],
in_keys_inv=["th", "thdot"],
),
)
```

### Writing custom transforms¶

TorchRL’s transforms may not cover all the operations one wants to execute after an environment has been executed. Writing a transform does not require much effort. As for the environment design, there are two steps in writing a transform:

Getting the dynamics right (forward and inverse);

Adapting the environment specs.

A transform can be used in two settings: on its own, it can be used as a
`Module`

. It can also be used appended to a
`TransformedEnv`

. The structure of the class allows to
customize the behavior in the different contexts.

A `Transform`

skeleton can be summarized as follows:

```
class Transform(nn.Module):
def forward(self, tensordict):
...
def _apply_transform(self, tensordict):
...
def _step(self, tensordict):
...
def _call(self, tensordict):
...
def inv(self, tensordict):
...
def _inv_apply_transform(self, tensordict):
...
```

There are three entry points (`forward()`

, `_step()`

and `inv()`

)
which all receive `tensordict.TensorDict`

instances. The first two
will eventually go through the keys indicated by `in_keys`

and call `_apply_transform()`

to each of these. The results will
be written in the entries pointed by `Transform.out_keys`

if provided
(if not the `in_keys`

will be updated with the transformed values).
If inverse transforms need to be executed, a similar data flow will be
executed but with the `Transform.inv()`

and
`Transform._inv_apply_transform()`

methods and across the `in_keys_inv`

and `out_keys_inv`

list of keys.
The following figure summarized this flow for environments and replay
buffers.

Transform API

In some cases, a transform will not work on a subset of keys in a unitary
manner, but will execute some operation on the parent environment or
work with the entire input `tensordict`

.
In those cases, the `_call()`

and `forward()`

methods should be
re-written, and the `_apply_transform()`

method can be skipped.

Let us code new transforms that will compute the `sine`

and `cosine`

values of the position angle, as these values are more useful to us to learn
a policy than the raw angle value:

```
class SinTransform(Transform):
def _apply_transform(self, obs: torch.Tensor) -> None:
return obs.sin()
# The transform must also modify the data at reset time
def _reset(
self, tensordict: TensorDictBase, tensordict_reset: TensorDictBase
) -> TensorDictBase:
return self._call(tensordict_reset)
# _apply_to_composite will execute the observation spec transform across all
# in_keys/out_keys pairs and write the result in the observation_spec which
# is of type ``Composite``
@_apply_to_composite
def transform_observation_spec(self, observation_spec):
return BoundedTensorSpec(
low=-1,
high=1,
shape=observation_spec.shape,
dtype=observation_spec.dtype,
device=observation_spec.device,
)
class CosTransform(Transform):
def _apply_transform(self, obs: torch.Tensor) -> None:
return obs.cos()
# The transform must also modify the data at reset time
def _reset(
self, tensordict: TensorDictBase, tensordict_reset: TensorDictBase
) -> TensorDictBase:
return self._call(tensordict_reset)
# _apply_to_composite will execute the observation spec transform across all
# in_keys/out_keys pairs and write the result in the observation_spec which
# is of type ``Composite``
@_apply_to_composite
def transform_observation_spec(self, observation_spec):
return BoundedTensorSpec(
low=-1,
high=1,
shape=observation_spec.shape,
dtype=observation_spec.dtype,
device=observation_spec.device,
)
t_sin = SinTransform(in_keys=["th"], out_keys=["sin"])
t_cos = CosTransform(in_keys=["th"], out_keys=["cos"])
env.append_transform(t_sin)
env.append_transform(t_cos)
```

Concatenates the observations onto an “observation” entry.
`del_keys=False`

ensures that we keep these values for the next
iteration.

```
cat_transform = CatTensors(
in_keys=["sin", "cos", "thdot"], dim=-1, out_key="observation", del_keys=False
)
env.append_transform(cat_transform)
```

Once more, let us check that our environment specs match what is received:

```
check_env_specs succeeded!
```

## Executing a rollout¶

Executing a rollout is a succession of simple steps:

reset the environment

while some condition is not met:

compute an action given a policy

execute a step given this action

collect the data

make a

`MDP`

step

gather the data and return

These operations have been conveniently wrapped in the `rollout()`

method, from which we provide a simplified version here below.

```
def simple_rollout(steps=100):
# preallocate:
data = TensorDict({}, [steps])
# reset
_data = env.reset()
for i in range(steps):
_data["action"] = env.action_spec.rand()
_data = env.step(_data)
data[i] = _data
_data = step_mdp(_data, keep_other=True)
return data
print("data from rollout:", simple_rollout(100))
```

```
data from rollout: TensorDict(
fields={
action: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
cos: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.bool, is_shared=False),
next: TensorDict(
fields={
cos: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.bool, is_shared=False),
observation: Tensor(shape=torch.Size([100, 3]), device=cpu, dtype=torch.float32, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([100]),
device=None,
is_shared=False),
reward: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
sin: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([100]),
device=None,
is_shared=False),
observation: Tensor(shape=torch.Size([100, 3]), device=cpu, dtype=torch.float32, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([100]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([100]),
device=None,
is_shared=False),
sin: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([100, 1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([100]),
device=None,
is_shared=False)
```

## Batching computations¶

The last unexplored end of our tutorial is the ability that we have to batch computations in TorchRL. Because our environment does not make any assumptions regarding the input data shape, we can seamlessly execute it over batches of data. Even better: for non-batch-locked environments such as our Pendulum, we can change the batch size on the fly without recreating the environment. To do this, we just generate parameters with the desired shape.

```
batch_size = 10 # number of environments to be executed in batch
td = env.reset(env.gen_params(batch_size=[batch_size]))
print("reset (batch size of 10)", td)
td = env.rand_step(td)
print("rand step (batch size of 10)", td)
```

```
reset (batch size of 10) TensorDict(
fields={
cos: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.bool, is_shared=False),
observation: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10]),
device=None,
is_shared=False),
sin: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10]),
device=None,
is_shared=False)
rand step (batch size of 10) TensorDict(
fields={
action: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
cos: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.bool, is_shared=False),
next: TensorDict(
fields={
cos: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.bool, is_shared=False),
observation: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10]),
device=None,
is_shared=False),
reward: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
sin: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10]),
device=None,
is_shared=False),
observation: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([10]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10]),
device=None,
is_shared=False),
sin: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([10, 1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10]),
device=None,
is_shared=False)
```

Executing a rollout with a batch of data requires us to reset the environment
out of the rollout function, since we need to define the batch_size
dynamically and this is not supported by `rollout()`

:

```
rollout = env.rollout(
3,
auto_reset=False, # we're executing the reset out of the ``rollout`` call
tensordict=env.reset(env.gen_params(batch_size=[batch_size])),
)
print("rollout of len 3 (batch size of 10):", rollout)
```

```
rollout of len 3 (batch size of 10): TensorDict(
fields={
action: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
cos: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.bool, is_shared=False),
next: TensorDict(
fields={
cos: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
done: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.bool, is_shared=False),
observation: Tensor(shape=torch.Size([10, 3, 3]), device=cpu, dtype=torch.float32, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10, 3]),
device=None,
is_shared=False),
reward: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
sin: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10, 3]),
device=None,
is_shared=False),
observation: Tensor(shape=torch.Size([10, 3, 3]), device=cpu, dtype=torch.float32, is_shared=False),
params: TensorDict(
fields={
dt: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
g: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
l: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
m: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False),
max_speed: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.int64, is_shared=False),
max_torque: Tensor(shape=torch.Size([10, 3]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10, 3]),
device=None,
is_shared=False),
sin: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
terminated: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.bool, is_shared=False),
th: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False),
thdot: Tensor(shape=torch.Size([10, 3, 1]), device=cpu, dtype=torch.float32, is_shared=False)},
batch_size=torch.Size([10, 3]),
device=None,
is_shared=False)
```

## Training a simple policy¶

In this example, we will train a simple policy using the reward as a differentiable objective, such as a negative loss. We will take advantage of the fact that our dynamic system is fully differentiable to backpropagate through the trajectory return and adjust the weights of our policy to maximize this value directly. Of course, in many settings many of the assumptions we make do not hold, such as differentiable system and full access to the underlying mechanics.

Still, this is a very simple example that showcases how a training loop can be coded with a custom environment in TorchRL.

Let us first write the policy network:

```
torch.manual_seed(0)
env.set_seed(0)
net = nn.Sequential(
nn.LazyLinear(64),
nn.Tanh(),
nn.LazyLinear(64),
nn.Tanh(),
nn.LazyLinear(64),
nn.Tanh(),
nn.LazyLinear(1),
)
policy = TensorDictModule(
net,
in_keys=["observation"],
out_keys=["action"],
)
```

```
/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/nn/modules/lazy.py:180: UserWarning:
Lazy modules are a new feature under heavy development so changes to the API or functionality can happen at any moment.
```

and our optimizer:

```
optim = torch.optim.Adam(policy.parameters(), lr=2e-3)
```

### Training loop¶

We will successively:

generate a trajectory

sum the rewards

backpropagate through the graph defined by these operations

clip the gradient norm and make an optimization step

repeat

At the end of the training loop, we should have a final reward close to 0 which demonstrates that the pendulum is upward and still as desired.

```
batch_size = 32
pbar = tqdm.tqdm(range(20_000 // batch_size))
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optim, 20_000)
logs = defaultdict(list)
for _ in pbar:
init_td = env.reset(env.gen_params(batch_size=[batch_size]))
rollout = env.rollout(100, policy, tensordict=init_td, auto_reset=False)
traj_return = rollout["next", "reward"].mean()
(-traj_return).backward()
gn = torch.nn.utils.clip_grad_norm_(net.parameters(), 1.0)
optim.step()
optim.zero_grad()
pbar.set_description(
f"reward: {traj_return: 4.4f}, "
f"last reward: {rollout[..., -1]['next', 'reward'].mean(): 4.4f}, gradient norm: {gn: 4.4}"
)
logs["return"].append(traj_return.item())
logs["last_reward"].append(rollout[..., -1]["next", "reward"].mean().item())
scheduler.step()
def plot():
import matplotlib
from matplotlib import pyplot as plt
is_ipython = "inline" in matplotlib.get_backend()
if is_ipython:
from IPython import display
with plt.ion():
plt.figure(figsize=(10, 5))
plt.subplot(1, 2, 1)
plt.plot(logs["return"])
plt.title("returns")
plt.xlabel("iteration")
plt.subplot(1, 2, 2)
plt.plot(logs["last_reward"])
plt.title("last reward")
plt.xlabel("iteration")
if is_ipython:
display.display(plt.gcf())
display.clear_output(wait=True)
plt.show()
plot()
```

```
0%| | 0/625 [00:00<?, ?it/s]
reward: -6.0488, last reward: -5.0748, gradient norm: 8.518: 0%| | 0/625 [00:00<?, ?it/s]
reward: -6.0488, last reward: -5.0748, gradient norm: 8.518: 0%| | 1/625 [00:00<02:11, 4.75it/s]
reward: -7.0499, last reward: -7.4472, gradient norm: 5.073: 0%| | 1/625 [00:00<02:11, 4.75it/s]
reward: -7.0499, last reward: -7.4472, gradient norm: 5.073: 0%| | 2/625 [00:00<02:13, 4.68it/s]
reward: -7.0685, last reward: -7.0408, gradient norm: 5.552: 0%| | 2/625 [00:00<02:13, 4.68it/s]
reward: -7.0685, last reward: -7.0408, gradient norm: 5.552: 0%| | 3/625 [00:00<02:13, 4.67it/s]
reward: -6.5154, last reward: -5.9086, gradient norm: 2.526: 0%| | 3/625 [00:00<02:13, 4.67it/s]
reward: -6.5154, last reward: -5.9086, gradient norm: 2.526: 1%| | 4/625 [00:00<02:12, 4.68it/s]
reward: -6.2004, last reward: -5.9401, gradient norm: 7.964: 1%| | 4/625 [00:01<02:12, 4.68it/s]
reward: -6.2004, last reward: -5.9401, gradient norm: 7.964: 1%| | 5/625 [00:01<02:12, 4.68it/s]
reward: -6.2566, last reward: -5.4981, gradient norm: 4.446: 1%| | 5/625 [00:01<02:12, 4.68it/s]
reward: -6.2566, last reward: -5.4981, gradient norm: 4.446: 1%| | 6/625 [00:01<02:12, 4.67it/s]
reward: -5.8926, last reward: -8.4134, gradient norm: 2.108: 1%| | 6/625 [00:01<02:12, 4.67it/s]
reward: -5.8926, last reward: -8.4134, gradient norm: 2.108: 1%|1 | 7/625 [00:01<02:12, 4.67it/s]
reward: -6.3541, last reward: -9.1257, gradient norm: 2.045: 1%|1 | 7/625 [00:01<02:12, 4.67it/s]
reward: -6.3541, last reward: -9.1257, gradient norm: 2.045: 1%|1 | 8/625 [00:01<02:11, 4.68it/s]
reward: -6.2071, last reward: -8.8872, gradient norm: 11.97: 1%|1 | 8/625 [00:01<02:11, 4.68it/s]
reward: -6.2071, last reward: -8.8872, gradient norm: 11.97: 1%|1 | 9/625 [00:01<02:11, 4.69it/s]
reward: -6.5838, last reward: -9.2693, gradient norm: 3.34: 1%|1 | 9/625 [00:02<02:11, 4.69it/s]
reward: -6.5838, last reward: -9.2693, gradient norm: 3.34: 2%|1 | 10/625 [00:02<02:11, 4.67it/s]
reward: -6.2601, last reward: -9.0436, gradient norm: 4.874: 2%|1 | 10/625 [00:02<02:11, 4.67it/s]
reward: -6.2601, last reward: -9.0436, gradient norm: 4.874: 2%|1 | 11/625 [00:02<02:11, 4.66it/s]
reward: -6.3676, last reward: -8.2883, gradient norm: 2.542: 2%|1 | 11/625 [00:02<02:11, 4.66it/s]
reward: -6.3676, last reward: -8.2883, gradient norm: 2.542: 2%|1 | 12/625 [00:02<02:11, 4.66it/s]
reward: -5.9768, last reward: -8.4551, gradient norm: 2.931: 2%|1 | 12/625 [00:02<02:11, 4.66it/s]
reward: -5.9768, last reward: -8.4551, gradient norm: 2.931: 2%|2 | 13/625 [00:02<02:11, 4.66it/s]
reward: -5.9597, last reward: -8.0172, gradient norm: 5.493: 2%|2 | 13/625 [00:02<02:11, 4.66it/s]
reward: -5.9597, last reward: -8.0172, gradient norm: 5.493: 2%|2 | 14/625 [00:02<02:10, 4.67it/s]
reward: -6.0045, last reward: -6.3726, gradient norm: 1.216: 2%|2 | 14/625 [00:03<02:10, 4.67it/s]
reward: -6.0045, last reward: -6.3726, gradient norm: 1.216: 2%|2 | 15/625 [00:03<02:10, 4.67it/s]
reward: -6.0157, last reward: -7.4454, gradient norm: 4.614: 2%|2 | 15/625 [00:03<02:10, 4.67it/s]
reward: -6.0157, last reward: -7.4454, gradient norm: 4.614: 3%|2 | 16/625 [00:03<02:10, 4.68it/s]
reward: -5.7248, last reward: -4.7793, gradient norm: 11.7: 3%|2 | 16/625 [00:03<02:10, 4.68it/s]
reward: -5.7248, last reward: -4.7793, gradient norm: 11.7: 3%|2 | 17/625 [00:03<02:09, 4.69it/s]
reward: -5.8783, last reward: -3.7558, gradient norm: 7.704: 3%|2 | 17/625 [00:03<02:09, 4.69it/s]
reward: -5.8783, last reward: -3.7558, gradient norm: 7.704: 3%|2 | 18/625 [00:03<02:09, 4.69it/s]
reward: -6.0913, last reward: -6.0003, gradient norm: 17.23: 3%|2 | 18/625 [00:04<02:09, 4.69it/s]
reward: -6.0913, last reward: -6.0003, gradient norm: 17.23: 3%|3 | 19/625 [00:04<02:09, 4.69it/s]
reward: -5.9328, last reward: -5.2019, gradient norm: 3.004: 3%|3 | 19/625 [00:04<02:09, 4.69it/s]
reward: -5.9328, last reward: -5.2019, gradient norm: 3.004: 3%|3 | 20/625 [00:04<02:08, 4.69it/s]
reward: -6.1899, last reward: -6.5583, gradient norm: 8.905: 3%|3 | 20/625 [00:04<02:08, 4.69it/s]
reward: -6.1899, last reward: -6.5583, gradient norm: 8.905: 3%|3 | 21/625 [00:04<02:08, 4.70it/s]
reward: -5.8776, last reward: -6.3394, gradient norm: 86.04: 3%|3 | 21/625 [00:04<02:08, 4.70it/s]
reward: -5.8776, last reward: -6.3394, gradient norm: 86.04: 4%|3 | 22/625 [00:04<02:08, 4.70it/s]
reward: -6.3972, last reward: -6.5765, gradient norm: 20.42: 4%|3 | 22/625 [00:04<02:08, 4.70it/s]
reward: -6.3972, last reward: -6.5765, gradient norm: 20.42: 4%|3 | 23/625 [00:04<02:08, 4.70it/s]
reward: -6.3652, last reward: -5.7013, gradient norm: 4.733: 4%|3 | 23/625 [00:05<02:08, 4.70it/s]
reward: -6.3652, last reward: -5.7013, gradient norm: 4.733: 4%|3 | 24/625 [00:05<02:08, 4.69it/s]
reward: -5.5586, last reward: -6.3572, gradient norm: 7.792: 4%|3 | 24/625 [00:05<02:08, 4.69it/s]
reward: -5.5586, last reward: -6.3572, gradient norm: 7.792: 4%|4 | 25/625 [00:05<02:07, 4.69it/s]
reward: -5.4795, last reward: -4.5168, gradient norm: 1.692: 4%|4 | 25/625 [00:05<02:07, 4.69it/s]
reward: -5.4795, last reward: -4.5168, gradient norm: 1.692: 4%|4 | 26/625 [00:05<02:10, 4.58it/s]
reward: -5.5407, last reward: -7.0325, gradient norm: 773.3: 4%|4 | 26/625 [00:05<02:10, 4.58it/s]
reward: -5.5407, last reward: -7.0325, gradient norm: 773.3: 4%|4 | 27/625 [00:05<02:09, 4.62it/s]
reward: -5.7399, last reward: -6.0130, gradient norm: 2.865: 4%|4 | 27/625 [00:05<02:09, 4.62it/s]
reward: -5.7399, last reward: -6.0130, gradient norm: 2.865: 4%|4 | 28/625 [00:05<02:08, 4.64it/s]
reward: -6.0738, last reward: -6.5728, gradient norm: 2.833: 4%|4 | 28/625 [00:06<02:08, 4.64it/s]
reward: -6.0738, last reward: -6.5728, gradient norm: 2.833: 5%|4 | 29/625 [00:06<02:08, 4.65it/s]
reward: -6.0101, last reward: -6.4175, gradient norm: 6.212: 5%|4 | 29/625 [00:06<02:08, 4.65it/s]
reward: -6.0101, last reward: -6.4175, gradient norm: 6.212: 5%|4 | 30/625 [00:06<02:07, 4.66it/s]
reward: -5.9955, last reward: -4.7723, gradient norm: 3.158: 5%|4 | 30/625 [00:06<02:07, 4.66it/s]
reward: -5.9955, last reward: -4.7723, gradient norm: 3.158: 5%|4 | 31/625 [00:06<02:07, 4.66it/s]
reward: -5.6103, last reward: -3.8313, gradient norm: 5.422: 5%|4 | 31/625 [00:06<02:07, 4.66it/s]
reward: -5.6103, last reward: -3.8313, gradient norm: 5.422: 5%|5 | 32/625 [00:06<02:07, 4.66it/s]
reward: -5.6042, last reward: -3.8542, gradient norm: 5.069: 5%|5 | 32/625 [00:07<02:07, 4.66it/s]
reward: -5.6042, last reward: -3.8542, gradient norm: 5.069: 5%|5 | 33/625 [00:07<02:06, 4.67it/s]
reward: -5.5265, last reward: -4.3386, gradient norm: 2.368: 5%|5 | 33/625 [00:07<02:06, 4.67it/s]
reward: -5.5265, last reward: -4.3386, gradient norm: 2.368: 5%|5 | 34/625 [00:07<02:06, 4.67it/s]
reward: -5.6277, last reward: -5.1658, gradient norm: 25.25: 5%|5 | 34/625 [00:07<02:06, 4.67it/s]
reward: -5.6277, last reward: -5.1658, gradient norm: 25.25: 6%|5 | 35/625 [00:07<02:06, 4.67it/s]
reward: -5.6876, last reward: -5.1197, gradient norm: 110.2: 6%|5 | 35/625 [00:07<02:06, 4.67it/s]
reward: -5.6876, last reward: -5.1197, gradient norm: 110.2: 6%|5 | 36/625 [00:07<02:05, 4.68it/s]
reward: -6.0015, last reward: -4.9656, gradient norm: 1.3: 6%|5 | 36/625 [00:07<02:05, 4.68it/s]
reward: -6.0015, last reward: -4.9656, gradient norm: 1.3: 6%|5 | 37/625 [00:07<02:05, 4.67it/s]
reward: -5.6628, last reward: -6.0784, gradient norm: 10.63: 6%|5 | 37/625 [00:08<02:05, 4.67it/s]
reward: -5.6628, last reward: -6.0784, gradient norm: 10.63: 6%|6 | 38/625 [00:08<02:05, 4.67it/s]
reward: -5.8188, last reward: -5.3053, gradient norm: 20.95: 6%|6 | 38/625 [00:08<02:05, 4.67it/s]
reward: -5.8188, last reward: -5.3053, gradient norm: 20.95: 6%|6 | 39/625 [00:08<02:05, 4.66it/s]
reward: -5.5934, last reward: -5.4250, gradient norm: 2.52: 6%|6 | 39/625 [00:08<02:05, 4.66it/s]
reward: -5.5934, last reward: -5.4250, gradient norm: 2.52: 6%|6 | 40/625 [00:08<02:05, 4.65it/s]
reward: -5.4317, last reward: -5.2191, gradient norm: 11.53: 6%|6 | 40/625 [00:08<02:05, 4.65it/s]
reward: -5.4317, last reward: -5.2191, gradient norm: 11.53: 7%|6 | 41/625 [00:08<02:05, 4.64it/s]
reward: -5.8227, last reward: -5.2263, gradient norm: 5.554: 7%|6 | 41/625 [00:09<02:05, 4.64it/s]
reward: -5.8227, last reward: -5.2263, gradient norm: 5.554: 7%|6 | 42/625 [00:09<02:05, 4.63it/s]
reward: -5.6086, last reward: -3.3930, gradient norm: 13.2: 7%|6 | 42/625 [00:09<02:05, 4.63it/s]
reward: -5.6086, last reward: -3.3930, gradient norm: 13.2: 7%|6 | 43/625 [00:09<02:05, 4.63it/s]
reward: -5.5969, last reward: -4.8821, gradient norm: 2.538: 7%|6 | 43/625 [00:09<02:05, 4.63it/s]
reward: -5.5969, last reward: -4.8821, gradient norm: 2.538: 7%|7 | 44/625 [00:09<02:05, 4.64it/s]
reward: -5.5018, last reward: -4.3099, gradient norm: 3.416: 7%|7 | 44/625 [00:09<02:05, 4.64it/s]
reward: -5.5018, last reward: -4.3099, gradient norm: 3.416: 7%|7 | 45/625 [00:09<02:04, 4.64it/s]
reward: -5.6813, last reward: -5.1515, gradient norm: 19.79: 7%|7 | 45/625 [00:09<02:04, 4.64it/s]
reward: -5.6813, last reward: -5.1515, gradient norm: 19.79: 7%|7 | 46/625 [00:09<02:04, 4.64it/s]
reward: -5.8823, last reward: -5.6010, gradient norm: 12.73: 7%|7 | 46/625 [00:10<02:04, 4.64it/s]
reward: -5.8823, last reward: -5.6010, gradient norm: 12.73: 8%|7 | 47/625 [00:10<02:04, 4.64it/s]
reward: -5.2582, last reward: -6.6556, gradient norm: 6.568: 8%|7 | 47/625 [00:10<02:04, 4.64it/s]
reward: -5.2582, last reward: -6.6556, gradient norm: 6.568: 8%|7 | 48/625 [00:10<02:04, 4.64it/s]
reward: -5.6368, last reward: -6.3310, gradient norm: 8.046: 8%|7 | 48/625 [00:10<02:04, 4.64it/s]
reward: -5.6368, last reward: -6.3310, gradient norm: 8.046: 8%|7 | 49/625 [00:10<02:03, 4.65it/s]
reward: -5.6776, last reward: -6.1928, gradient norm: 4.976: 8%|7 | 49/625 [00:10<02:03, 4.65it/s]
reward: -5.6776, last reward: -6.1928, gradient norm: 4.976: 8%|8 | 50/625 [00:10<02:03, 4.65it/s]
reward: -5.6418, last reward: -4.5608, gradient norm: 2.355: 8%|8 | 50/625 [00:10<02:03, 4.65it/s]
reward: -5.6418, last reward: -4.5608, gradient norm: 2.355: 8%|8 | 51/625 [00:10<02:03, 4.65it/s]
reward: -5.4142, last reward: -4.4533, gradient norm: 3.903: 8%|8 | 51/625 [00:11<02:03, 4.65it/s]
reward: -5.4142, last reward: -4.4533, gradient norm: 3.903: 8%|8 | 52/625 [00:11<02:02, 4.66it/s]
reward: -5.3920, last reward: -3.6933, gradient norm: 5.534: 8%|8 | 52/625 [00:11<02:02, 4.66it/s]
reward: -5.3920, last reward: -3.6933, gradient norm: 5.534: 8%|8 | 53/625 [00:11<02:02, 4.66it/s]
reward: -5.3322, last reward: -3.1984, gradient norm: 4.058: 8%|8 | 53/625 [00:11<02:02, 4.66it/s]
reward: -5.3322, last reward: -3.1984, gradient norm: 4.058: 9%|8 | 54/625 [00:11<02:02, 4.65it/s]
reward: -5.3709, last reward: -4.5488, gradient norm: 37.33: 9%|8 | 54/625 [00:11<02:02, 4.65it/s]
reward: -5.3709, last reward: -4.5488, gradient norm: 37.33: 9%|8 | 55/625 [00:11<02:02, 4.65it/s]
reward: -5.4076, last reward: -3.1880, gradient norm: 1.395: 9%|8 | 55/625 [00:12<02:02, 4.65it/s]
reward: -5.4076, last reward: -3.1880, gradient norm: 1.395: 9%|8 | 56/625 [00:12<02:02, 4.65it/s]
reward: -5.3727, last reward: -2.1695, gradient norm: 2.613: 9%|8 | 56/625 [00:12<02:02, 4.65it/s]
reward: -5.3727, last reward: -2.1695, gradient norm: 2.613: 9%|9 | 57/625 [00:12<02:01, 4.66it/s]
reward: -5.6188, last reward: -2.7869, gradient norm: 1.464: 9%|9 | 57/625 [00:12<02:01, 4.66it/s]
reward: -5.6188, last reward: -2.7869, gradient norm: 1.464: 9%|9 | 58/625 [00:12<02:01, 4.66it/s]
reward: -5.4788, last reward: -5.2309, gradient norm: 12.19: 9%|9 | 58/625 [00:12<02:01, 4.66it/s]
reward: -5.4788, last reward: -5.2309, gradient norm: 12.19: 9%|9 | 59/625 [00:12<02:01, 4.65it/s]
reward: -5.1972, last reward: -5.1203, gradient norm: 67.95: 9%|9 | 59/625 [00:12<02:01, 4.65it/s]
reward: -5.1972, last reward: -5.1203, gradient norm: 67.95: 10%|9 | 60/625 [00:12<02:01, 4.64it/s]
reward: -5.4977, last reward: -4.8712, gradient norm: 4.688: 10%|9 | 60/625 [00:13<02:01, 4.64it/s]
reward: -5.4977, last reward: -4.8712, gradient norm: 4.688: 10%|9 | 61/625 [00:13<02:01, 4.66it/s]
reward: -5.4804, last reward: -6.0890, gradient norm: 3.287: 10%|9 | 61/625 [00:13<02:01, 4.66it/s]
reward: -5.4804, last reward: -6.0890, gradient norm: 3.287: 10%|9 | 62/625 [00:13<02:00, 4.66it/s]
reward: -5.3051, last reward: -4.3689, gradient norm: 64.25: 10%|9 | 62/625 [00:13<02:00, 4.66it/s]
reward: -5.3051, last reward: -4.3689, gradient norm: 64.25: 10%|# | 63/625 [00:13<02:00, 4.66it/s]
reward: -5.3228, last reward: -4.2780, gradient norm: 9.055: 10%|# | 63/625 [00:13<02:00, 4.66it/s]
reward: -5.3228, last reward: -4.2780, gradient norm: 9.055: 10%|# | 64/625 [00:13<02:00, 4.67it/s]
reward: -5.1394, last reward: -4.0425, gradient norm: 9.393: 10%|# | 64/625 [00:13<02:00, 4.67it/s]
reward: -5.1394, last reward: -4.0425, gradient norm: 9.393: 10%|# | 65/625 [00:13<01:59, 4.68it/s]
reward: -5.2673, last reward: -4.0022, gradient norm: 8.597: 10%|# | 65/625 [00:14<01:59, 4.68it/s]
reward: -5.2673, last reward: -4.0022, gradient norm: 8.597: 11%|# | 66/625 [00:14<01:59, 4.67it/s]
reward: -5.1040, last reward: -4.5461, gradient norm: 18.81: 11%|# | 66/625 [00:14<01:59, 4.67it/s]
reward: -5.1040, last reward: -4.5461, gradient norm: 18.81: 11%|# | 67/625 [00:14<01:59, 4.67it/s]
reward: -5.3599, last reward: -4.0312, gradient norm: 34.25: 11%|# | 67/625 [00:14<01:59, 4.67it/s]
reward: -5.3599, last reward: -4.0312, gradient norm: 34.25: 11%|# | 68/625 [00:14<01:59, 4.67it/s]
reward: -5.3867, last reward: -6.7588, gradient norm: 4.311: 11%|# | 68/625 [00:14<01:59, 4.67it/s]
reward: -5.3867, last reward: -6.7588, gradient norm: 4.311: 11%|#1 | 69/625 [00:14<01:59, 4.67it/s]
reward: -5.3548, last reward: -8.1878, gradient norm: 44.19: 11%|#1 | 69/625 [00:15<01:59, 4.67it/s]
reward: -5.3548, last reward: -8.1878, gradient norm: 44.19: 11%|#1 | 70/625 [00:15<01:58, 4.67it/s]
reward: -5.3264, last reward: -6.2046, gradient norm: 6.25: 11%|#1 | 70/625 [00:15<01:58, 4.67it/s]
reward: -5.3264, last reward: -6.2046, gradient norm: 6.25: 11%|#1 | 71/625 [00:15<01:58, 4.66it/s]
reward: -5.3723, last reward: -5.9680, gradient norm: 11.1: 11%|#1 | 71/625 [00:15<01:58, 4.66it/s]
reward: -5.3723, last reward: -5.9680, gradient norm: 11.1: 12%|#1 | 72/625 [00:15<01:59, 4.64it/s]
reward: -5.4553, last reward: -8.7529, gradient norm: 5.467e+03: 12%|#1 | 72/625 [00:15<01:59, 4.64it/s]
reward: -5.4553, last reward: -8.7529, gradient norm: 5.467e+03: 12%|#1 | 73/625 [00:15<01:58, 4.65it/s]
reward: -5.2810, last reward: -6.6992, gradient norm: 16.69: 12%|#1 | 73/625 [00:15<01:58, 4.65it/s]
reward: -5.2810, last reward: -6.6992, gradient norm: 16.69: 12%|#1 | 74/625 [00:15<01:58, 4.64it/s]
reward: -5.1003, last reward: -3.6720, gradient norm: 29.73: 12%|#1 | 74/625 [00:16<01:58, 4.64it/s]
reward: -5.1003, last reward: -3.6720, gradient norm: 29.73: 12%|#2 | 75/625 [00:16<01:58, 4.64it/s]
reward: -5.1695, last reward: -3.8946, gradient norm: 4.696: 12%|#2 | 75/625 [00:16<01:58, 4.64it/s]
reward: -5.1695, last reward: -3.8946, gradient norm: 4.696: 12%|#2 | 76/625 [00:16<01:58, 4.64it/s]
reward: -5.1159, last reward: -2.7013, gradient norm: 4.186: 12%|#2 | 76/625 [00:16<01:58, 4.64it/s]
reward: -5.1159, last reward: -2.7013, gradient norm: 4.186: 12%|#2 | 77/625 [00:16<01:58, 4.64it/s]
reward: -4.7542, last reward: -5.4035, gradient norm: 14.31: 12%|#2 | 77/625 [00:16<01:58, 4.64it/s]
reward: -4.7542, last reward: -5.4035, gradient norm: 14.31: 12%|#2 | 78/625 [00:16<01:58, 4.63it/s]
reward: -4.6120, last reward: -3.3341, gradient norm: 13.5: 12%|#2 | 78/625 [00:16<01:58, 4.63it/s]
reward: -4.6120, last reward: -3.3341, gradient norm: 13.5: 13%|#2 | 79/625 [00:16<01:57, 4.63it/s]
reward: -4.6865, last reward: -3.5685, gradient norm: 20.59: 13%|#2 | 79/625 [00:17<01:57, 4.63it/s]
reward: -4.6865, last reward: -3.5685, gradient norm: 20.59: 13%|#2 | 80/625 [00:17<01:57, 4.63it/s]
reward: -4.8009, last reward: -2.9444, gradient norm: 22.82: 13%|#2 | 80/625 [00:17<01:57, 4.63it/s]
reward: -4.8009, last reward: -2.9444, gradient norm: 22.82: 13%|#2 | 81/625 [00:17<01:57, 4.63it/s]
reward: -4.4331, last reward: -6.6584, gradient norm: 24.0: 13%|#2 | 81/625 [00:17<01:57, 4.63it/s]
reward: -4.4331, last reward: -6.6584, gradient norm: 24.0: 13%|#3 | 82/625 [00:17<01:57, 4.64it/s]
reward: -4.3101, last reward: -4.8604, gradient norm: 84.3: 13%|#3 | 82/625 [00:17<01:57, 4.64it/s]
reward: -4.3101, last reward: -4.8604, gradient norm: 84.3: 13%|#3 | 83/625 [00:17<01:56, 4.64it/s]
reward: -4.3911, last reward: -5.9177, gradient norm: 33.68: 13%|#3 | 83/625 [00:18<01:56, 4.64it/s]
reward: -4.3911, last reward: -5.9177, gradient norm: 33.68: 13%|#3 | 84/625 [00:18<01:56, 4.64it/s]
reward: -4.3120, last reward: -4.3226, gradient norm: 14.59: 13%|#3 | 84/625 [00:18<01:56, 4.64it/s]
reward: -4.3120, last reward: -4.3226, gradient norm: 14.59: 14%|#3 | 85/625 [00:18<01:56, 4.63it/s]
reward: -4.8105, last reward: -3.6376, gradient norm: 14.5: 14%|#3 | 85/625 [00:18<01:56, 4.63it/s]
reward: -4.8105, last reward: -3.6376, gradient norm: 14.5: 14%|#3 | 86/625 [00:18<01:57, 4.61it/s]
reward: -4.9230, last reward: -4.3841, gradient norm: 9.824: 14%|#3 | 86/625 [00:18<01:57, 4.61it/s]
reward: -4.9230, last reward: -4.3841, gradient norm: 9.824: 14%|#3 | 87/625 [00:18<01:57, 4.59it/s]
reward: -4.8194, last reward: -4.1662, gradient norm: 7.437: 14%|#3 | 87/625 [00:18<01:57, 4.59it/s]
reward: -4.8194, last reward: -4.1662, gradient norm: 7.437: 14%|#4 | 88/625 [00:18<01:56, 4.60it/s]
reward: -4.7953, last reward: -3.1891, gradient norm: 10.98: 14%|#4 | 88/625 [00:19<01:56, 4.60it/s]
reward: -4.7953, last reward: -3.1891, gradient norm: 10.98: 14%|#4 | 89/625 [00:19<01:56, 4.59it/s]
reward: -4.6044, last reward: -3.7215, gradient norm: 16.86: 14%|#4 | 89/625 [00:19<01:56, 4.59it/s]
reward: -4.6044, last reward: -3.7215, gradient norm: 16.86: 14%|#4 | 90/625 [00:19<01:56, 4.60it/s]
reward: -4.4864, last reward: -3.6935, gradient norm: 4.582: 14%|#4 | 90/625 [00:19<01:56, 4.60it/s]
reward: -4.4864, last reward: -3.6935, gradient norm: 4.582: 15%|#4 | 91/625 [00:19<01:56, 4.59it/s]
reward: -4.9917, last reward: -6.2376, gradient norm: 10.84: 15%|#4 | 91/625 [00:19<01:56, 4.59it/s]
reward: -4.9917, last reward: -6.2376, gradient norm: 10.84: 15%|#4 | 92/625 [00:19<01:56, 4.58it/s]
reward: -5.1924, last reward: -4.5869, gradient norm: 9.519: 15%|#4 | 92/625 [00:19<01:56, 4.58it/s]
reward: -5.1924, last reward: -4.5869, gradient norm: 9.519: 15%|#4 | 93/625 [00:19<01:56, 4.58it/s]
reward: -5.2141, last reward: -4.0464, gradient norm: 100.7: 15%|#4 | 93/625 [00:20<01:56, 4.58it/s]
reward: -5.2141, last reward: -4.0464, gradient norm: 100.7: 15%|#5 | 94/625 [00:20<01:55, 4.58it/s]
reward: -5.4691, last reward: -5.5953, gradient norm: 15.69: 15%|#5 | 94/625 [00:20<01:55, 4.58it/s]
reward: -5.4691, last reward: -5.5953, gradient norm: 15.69: 15%|#5 | 95/625 [00:20<01:55, 4.59it/s]
reward: -5.5281, last reward: -5.6450, gradient norm: 13.49: 15%|#5 | 95/625 [00:20<01:55, 4.59it/s]
reward: -5.5281, last reward: -5.6450, gradient norm: 13.49: 15%|#5 | 96/625 [00:20<01:55, 4.58it/s]
reward: -5.3477, last reward: -3.2685, gradient norm: 3.964: 15%|#5 | 96/625 [00:20<01:55, 4.58it/s]
reward: -5.3477, last reward: -3.2685, gradient norm: 3.964: 16%|#5 | 97/625 [00:20<01:55, 4.58it/s]
reward: -5.1301, last reward: -3.8980, gradient norm: 7.745: 16%|#5 | 97/625 [00:21<01:55, 4.58it/s]
reward: -5.1301, last reward: -3.8980, gradient norm: 7.745: 16%|#5 | 98/625 [00:21<01:54, 4.59it/s]
reward: -4.9302, last reward: -5.9561, gradient norm: 4.516: 16%|#5 | 98/625 [00:21<01:54, 4.59it/s]
reward: -4.9302, last reward: -5.9561, gradient norm: 4.516: 16%|#5 | 99/625 [00:21<01:54, 4.59it/s]
reward: -4.5159, last reward: -5.3678, gradient norm: 117.1: 16%|#5 | 99/625 [00:21<01:54, 4.59it/s]
reward: -4.5159, last reward: -5.3678, gradient norm: 117.1: 16%|#6 | 100/625 [00:21<01:54, 4.59it/s]
reward: -4.6621, last reward: -4.9552, gradient norm: 12.84: 16%|#6 | 100/625 [00:21<01:54, 4.59it/s]
reward: -4.6621, last reward: -4.9552, gradient norm: 12.84: 16%|#6 | 101/625 [00:21<01:54, 4.57it/s]
reward: -4.2516, last reward: -4.8690, gradient norm: 70.18: 16%|#6 | 101/625 [00:21<01:54, 4.57it/s]
reward: -4.2516, last reward: -4.8690, gradient norm: 70.18: 16%|#6 | 102/625 [00:21<01:54, 4.56it/s]
reward: -4.5293, last reward: -6.6803, gradient norm: 16.77: 16%|#6 | 102/625 [00:22<01:54, 4.56it/s]
reward: -4.5293, last reward: -6.6803, gradient norm: 16.77: 16%|#6 | 103/625 [00:22<01:54, 4.56it/s]
reward: -4.2941, last reward: -4.5458, gradient norm: 8.563: 16%|#6 | 103/625 [00:22<01:54, 4.56it/s]
reward: -4.2941, last reward: -4.5458, gradient norm: 8.563: 17%|#6 | 104/625 [00:22<01:53, 4.58it/s]
reward: -4.2757, last reward: -3.6780, gradient norm: 24.65: 17%|#6 | 104/625 [00:22<01:53, 4.58it/s]
reward: -4.2757, last reward: -3.6780, gradient norm: 24.65: 17%|#6 | 105/625 [00:22<01:53, 4.58it/s]
reward: -4.3846, last reward: -3.6976, gradient norm: 10.5: 17%|#6 | 105/625 [00:22<01:53, 4.58it/s]
reward: -4.3846, last reward: -3.6976, gradient norm: 10.5: 17%|#6 | 106/625 [00:22<01:53, 4.58it/s]
reward: -4.0445, last reward: -3.0922, gradient norm: 75.72: 17%|#6 | 106/625 [00:23<01:53, 4.58it/s]
reward: -4.0445, last reward: -3.0922, gradient norm: 75.72: 17%|#7 | 107/625 [00:23<01:53, 4.58it/s]
reward: -4.1962, last reward: -5.2472, gradient norm: 61.74: 17%|#7 | 107/625 [00:23<01:53, 4.58it/s]
reward: -4.1962, last reward: -5.2472, gradient norm: 61.74: 17%|#7 | 108/625 [00:23<01:52, 4.58it/s]
reward: -4.4367, last reward: -3.4687, gradient norm: 38.27: 17%|#7 | 108/625 [00:23<01:52, 4.58it/s]
reward: -4.4367, last reward: -3.4687, gradient norm: 38.27: 17%|#7 | 109/625 [00:23<01:52, 4.58it/s]
reward: -5.0137, last reward: -5.0348, gradient norm: 14.86: 17%|#7 | 109/625 [00:23<01:52, 4.58it/s]
reward: -5.0137, last reward: -5.0348, gradient norm: 14.86: 18%|#7 | 110/625 [00:23<01:52, 4.59it/s]
reward: -4.7627, last reward: -3.7840, gradient norm: 5.199: 18%|#7 | 110/625 [00:23<01:52, 4.59it/s]
reward: -4.7627, last reward: -3.7840, gradient norm: 5.199: 18%|#7 | 111/625 [00:23<01:55, 4.46it/s]
reward: -4.6061, last reward: -5.0167, gradient norm: 5.217: 18%|#7 | 111/625 [00:24<01:55, 4.46it/s]
reward: -4.6061, last reward: -5.0167, gradient norm: 5.217: 18%|#7 | 112/625 [00:24<01:53, 4.51it/s]
reward: -4.4901, last reward: -5.4416, gradient norm: 23.71: 18%|#7 | 112/625 [00:24<01:53, 4.51it/s]
reward: -4.4901, last reward: -5.4416, gradient norm: 23.71: 18%|#8 | 113/625 [00:24<01:52, 4.54it/s]
reward: -4.3286, last reward: -3.4930, gradient norm: 31.71: 18%|#8 | 113/625 [00:24<01:52, 4.54it/s]
reward: -4.3286, last reward: -3.4930, gradient norm: 31.71: 18%|#8 | 114/625 [00:24<01:52, 4.56it/s]
reward: -4.0708, last reward: -3.7125, gradient norm: 35.89: 18%|#8 | 114/625 [00:24<01:52, 4.56it/s]
reward: -4.0708, last reward: -3.7125, gradient norm: 35.89: 18%|#8 | 115/625 [00:24<01:51, 4.56it/s]
reward: -4.0411, last reward: -1.9154, gradient norm: 61.48: 18%|#8 | 115/625 [00:25<01:51, 4.56it/s]
reward: -4.0411, last reward: -1.9154, gradient norm: 61.48: 19%|#8 | 116/625 [00:25<01:52, 4.54it/s]
reward: -4.1892, last reward: -4.4897, gradient norm: 29.53: 19%|#8 | 116/625 [00:25<01:52, 4.54it/s]
reward: -4.1892, last reward: -4.4897, gradient norm: 29.53: 19%|#8 | 117/625 [00:25<01:51, 4.54it/s]
reward: -4.1807, last reward: -4.7621, gradient norm: 17.97: 19%|#8 | 117/625 [00:25<01:51, 4.54it/s]
reward: -4.1807, last reward: -4.7621, gradient norm: 17.97: 19%|#8 | 118/625 [00:25<01:52, 4.51it/s]
reward: -3.9383, last reward: -3.5267, gradient norm: 809.4: 19%|#8 | 118/625 [00:25<01:52, 4.51it/s]
reward: -3.9383, last reward: -3.5267, gradient norm: 809.4: 19%|#9 | 119/625 [00:25<01:51, 4.53it/s]
reward: -4.3996, last reward: -3.7498, gradient norm: 45.88: 19%|#9 | 119/625 [00:25<01:51, 4.53it/s]
reward: -4.3996, last reward: -3.7498, gradient norm: 45.88: 19%|#9 | 120/625 [00:25<01:51, 4.55it/s]
reward: -4.6461, last reward: -4.4549, gradient norm: 22.13: 19%|#9 | 120/625 [00:26<01:51, 4.55it/s]
reward: -4.6461, last reward: -4.4549, gradient norm: 22.13: 19%|#9 | 121/625 [00:26<01:50, 4.56it/s]
reward: -4.3351, last reward: -3.4514, gradient norm: 17.68: 19%|#9 | 121/625 [00:26<01:50, 4.56it/s]
reward: -4.3351, last reward: -3.4514, gradient norm: 17.68: 20%|#9 | 122/625 [00:26<01:49, 4.57it/s]
reward: -4.2913, last reward: -4.4266, gradient norm: 20.08: 20%|#9 | 122/625 [00:26<01:49, 4.57it/s]
reward: -4.2913, last reward: -4.4266, gradient norm: 20.08: 20%|#9 | 123/625 [00:26<01:52, 4.46it/s]
reward: -4.6148, last reward: -6.2101, gradient norm: 17.22: 20%|#9 | 123/625 [00:26<01:52, 4.46it/s]
reward: -4.6148, last reward: -6.2101, gradient norm: 17.22: 20%|#9 | 124/625 [00:26<01:54, 4.38it/s]
reward: -4.6301, last reward: -4.2307, gradient norm: 13.15: 20%|#9 | 124/625 [00:27<01:54, 4.38it/s]
reward: -4.6301, last reward: -4.2307, gradient norm: 13.15: 20%|## | 125/625 [00:27<01:56, 4.28it/s]
reward: -4.7774, last reward: -4.2578, gradient norm: 19.42: 20%|## | 125/625 [00:27<01:56, 4.28it/s]
reward: -4.7774, last reward: -4.2578, gradient norm: 19.42: 20%|## | 126/625 [00:27<01:53, 4.38it/s]
reward: -4.6632, last reward: -6.2185, gradient norm: 25.8: 20%|## | 126/625 [00:27<01:53, 4.38it/s]
reward: -4.6632, last reward: -6.2185, gradient norm: 25.8: 20%|## | 127/625 [00:27<01:52, 4.44it/s]
reward: -4.5178, last reward: -8.3438, gradient norm: 23.73: 20%|## | 127/625 [00:27<01:52, 4.44it/s]
reward: -4.5178, last reward: -8.3438, gradient norm: 23.73: 20%|## | 128/625 [00:27<01:51, 4.47it/s]
reward: -4.5030, last reward: -5.0313, gradient norm: 37.37: 20%|## | 128/625 [00:27<01:51, 4.47it/s]
reward: -4.5030, last reward: -5.0313, gradient norm: 37.37: 21%|## | 129/625 [00:27<01:50, 4.49it/s]
reward: -4.6885, last reward: -3.9286, gradient norm: 10.98: 21%|## | 129/625 [00:28<01:50, 4.49it/s]
reward: -4.6885, last reward: -3.9286, gradient norm: 10.98: 21%|## | 130/625 [00:28<01:49, 4.51it/s]
reward: -4.5603, last reward: -4.9910, gradient norm: 15.59: 21%|## | 130/625 [00:28<01:49, 4.51it/s]
reward: -4.5603, last reward: -4.9910, gradient norm: 15.59: 21%|## | 131/625 [00:28<01:49, 4.52it/s]
reward: -4.6188, last reward: -4.3920, gradient norm: 12.78: 21%|## | 131/625 [00:28<01:49, 4.52it/s]
reward: -4.6188, last reward: -4.3920, gradient norm: 12.78: 21%|##1 | 132/625 [00:28<01:49, 4.52it/s]
reward: -4.1776, last reward: -2.4445, gradient norm: 150.2: 21%|##1 | 132/625 [00:28<01:49, 4.52it/s]
reward: -4.1776, last reward: -2.4445, gradient norm: 150.2: 21%|##1 | 133/625 [00:28<01:48, 4.51it/s]
reward: -4.7363, last reward: -4.4510, gradient norm: 16.33: 21%|##1 | 133/625 [00:29<01:48, 4.51it/s]
reward: -4.7363, last reward: -4.4510, gradient norm: 16.33: 21%|##1 | 134/625 [00:29<01:48, 4.53it/s]
reward: -4.8925, last reward: -5.1866, gradient norm: 13.1: 21%|##1 | 134/625 [00:29<01:48, 4.53it/s]
reward: -4.8925, last reward: -5.1866, gradient norm: 13.1: 22%|##1 | 135/625 [00:29<01:47, 4.55it/s]
reward: -4.9447, last reward: -4.1781, gradient norm: 9.337: 22%|##1 | 135/625 [00:29<01:47, 4.55it/s]
reward: -4.9447, last reward: -4.1781, gradient norm: 9.337: 22%|##1 | 136/625 [00:29<01:46, 4.57it/s]
reward: -4.7601, last reward: -4.1448, gradient norm: 10.08: 22%|##1 | 136/625 [00:29<01:46, 4.57it/s]
reward: -4.7601, last reward: -4.1448, gradient norm: 10.08: 22%|##1 | 137/625 [00:29<01:46, 4.60it/s]
reward: -4.5036, last reward: -6.5016, gradient norm: 26.26: 22%|##1 | 137/625 [00:29<01:46, 4.60it/s]
reward: -4.5036, last reward: -6.5016, gradient norm: 26.26: 22%|##2 | 138/625 [00:29<01:45, 4.62it/s]
reward: -4.3046, last reward: -6.4704, gradient norm: 124.5: 22%|##2 | 138/625 [00:30<01:45, 4.62it/s]
reward: -4.3046, last reward: -6.4704, gradient norm: 124.5: 22%|##2 | 139/625 [00:30<01:45, 4.63it/s]
reward: -4.3979, last reward: -7.0583, gradient norm: 31.51: 22%|##2 | 139/625 [00:30<01:45, 4.63it/s]
reward: -4.3979, last reward: -7.0583, gradient norm: 31.51: 22%|##2 | 140/625 [00:30<01:44, 4.63it/s]
reward: -4.1486, last reward: -3.1807, gradient norm: 8.759: 22%|##2 | 140/625 [00:30<01:44, 4.63it/s]
reward: -4.1486, last reward: -3.1807, gradient norm: 8.759: 23%|##2 | 141/625 [00:30<01:44, 4.62it/s]
reward: -4.0038, last reward: -2.6469, gradient norm: 52.88: 23%|##2 | 141/625 [00:30<01:44, 4.62it/s]
reward: -4.0038, last reward: -2.6469, gradient norm: 52.88: 23%|##2 | 142/625 [00:30<01:44, 4.61it/s]
reward: -4.1143, last reward: -3.2219, gradient norm: 14.66: 23%|##2 | 142/625 [00:31<01:44, 4.61it/s]
reward: -4.1143, last reward: -3.2219, gradient norm: 14.66: 23%|##2 | 143/625 [00:31<01:44, 4.59it/s]
reward: -4.4691, last reward: -5.6267, gradient norm: 12.81: 23%|##2 | 143/625 [00:31<01:44, 4.59it/s]
reward: -4.4691, last reward: -5.6267, gradient norm: 12.81: 23%|##3 | 144/625 [00:31<01:44, 4.60it/s]
reward: -4.6693, last reward: -7.1816, gradient norm: 12.68: 23%|##3 | 144/625 [00:31<01:44, 4.60it/s]
reward: -4.6693, last reward: -7.1816, gradient norm: 12.68: 23%|##3 | 145/625 [00:31<01:44, 4.61it/s]
reward: -4.6230, last reward: -7.0896, gradient norm: 31.55: 23%|##3 | 145/625 [00:31<01:44, 4.61it/s]
reward: -4.6230, last reward: -7.0896, gradient norm: 31.55: 23%|##3 | 146/625 [00:31<01:43, 4.61it/s]
reward: -4.4261, last reward: -4.8018, gradient norm: 13.77: 23%|##3 | 146/625 [00:31<01:43, 4.61it/s]
reward: -4.4261, last reward: -4.8018, gradient norm: 13.77: 24%|##3 | 147/625 [00:31<01:43, 4.61it/s]
reward: -4.1135, last reward: -3.8337, gradient norm: 146.3: 24%|##3 | 147/625 [00:32<01:43, 4.61it/s]
reward: -4.1135, last reward: -3.8337, gradient norm: 146.3: 24%|##3 | 148/625 [00:32<01:43, 4.61it/s]
reward: -4.0454, last reward: -4.4808, gradient norm: 5.899: 24%|##3 | 148/625 [00:32<01:43, 4.61it/s]
reward: -4.0454, last reward: -4.4808, gradient norm: 5.899: 24%|##3 | 149/625 [00:32<01:42, 4.63it/s]
reward: -4.6143, last reward: -4.3272, gradient norm: 14.99: 24%|##3 | 149/625 [00:32<01:42, 4.63it/s]
reward: -4.6143, last reward: -4.3272, gradient norm: 14.99: 24%|##4 | 150/625 [00:32<01:42, 4.64it/s]
reward: -4.8160, last reward: -4.1231, gradient norm: 11.61: 24%|##4 | 150/625 [00:32<01:42, 4.64it/s]
reward: -4.8160, last reward: -4.1231, gradient norm: 11.61: 24%|##4 | 151/625 [00:32<01:41, 4.65it/s]
reward: -4.6391, last reward: -4.7216, gradient norm: 16.22: 24%|##4 | 151/625 [00:32<01:41, 4.65it/s]
reward: -4.6391, last reward: -4.7216, gradient norm: 16.22: 24%|##4 | 152/625 [00:32<01:41, 4.66it/s]
reward: -4.4861, last reward: -4.6906, gradient norm: 20.81: 24%|##4 | 152/625 [00:33<01:41, 4.66it/s]
reward: -4.4861, last reward: -4.6906, gradient norm: 20.81: 24%|##4 | 153/625 [00:33<01:41, 4.66it/s]
reward: -3.8481, last reward: -4.4216, gradient norm: 168.4: 24%|##4 | 153/625 [00:33<01:41, 4.66it/s]
reward: -3.8481, last reward: -4.4216, gradient norm: 168.4: 25%|##4 | 154/625 [00:33<01:40, 4.66it/s]
reward: -4.0919, last reward: -3.7133, gradient norm: 75.84: 25%|##4 | 154/625 [00:33<01:40, 4.66it/s]
reward: -4.0919, last reward: -3.7133, gradient norm: 75.84: 25%|##4 | 155/625 [00:33<01:40, 4.67it/s]
reward: -3.9551, last reward: -2.8327, gradient norm: 20.9: 25%|##4 | 155/625 [00:33<01:40, 4.67it/s]
reward: -3.9551, last reward: -2.8327, gradient norm: 20.9: 25%|##4 | 156/625 [00:33<01:40, 4.68it/s]
reward: -3.8905, last reward: -2.3660, gradient norm: 5.453: 25%|##4 | 156/625 [00:34<01:40, 4.68it/s]
reward: -3.8905, last reward: -2.3660, gradient norm: 5.453: 25%|##5 | 157/625 [00:34<01:39, 4.68it/s]
reward: -3.9252, last reward: -3.7613, gradient norm: 49.53: 25%|##5 | 157/625 [00:34<01:39, 4.68it/s]
reward: -3.9252, last reward: -3.7613, gradient norm: 49.53: 25%|##5 | 158/625 [00:34<01:39, 4.68it/s]
reward: -3.8933, last reward: -3.4216, gradient norm: 34.93: 25%|##5 | 158/625 [00:34<01:39, 4.68it/s]
reward: -3.8933, last reward: -3.4216, gradient norm: 34.93: 25%|##5 | 159/625 [00:34<01:39, 4.68it/s]
reward: -4.0332, last reward: -3.2486, gradient norm: 83.6: 25%|##5 | 159/625 [00:34<01:39, 4.68it/s]
reward: -4.0332, last reward: -3.2486, gradient norm: 83.6: 26%|##5 | 160/625 [00:34<01:39, 4.68it/s]
reward: -3.8746, last reward: -2.6447, gradient norm: 47.26: 26%|##5 | 160/625 [00:34<01:39, 4.68it/s]
reward: -3.8746, last reward: -2.6447, gradient norm: 47.26: 26%|##5 | 161/625 [00:34<01:39, 4.66it/s]
reward: -4.0109, last reward: -3.0080, gradient norm: 2.703: 26%|##5 | 161/625 [00:35<01:39, 4.66it/s]
reward: -4.0109, last reward: -3.0080, gradient norm: 2.703: 26%|##5 | 162/625 [00:35<01:39, 4.65it/s]
reward: -4.1091, last reward: -3.1931, gradient norm: 10.33: 26%|##5 | 162/625 [00:35<01:39, 4.65it/s]
reward: -4.1091, last reward: -3.1931, gradient norm: 10.33: 26%|##6 | 163/625 [00:35<01:39, 4.64it/s]
reward: -4.1041, last reward: -2.0432, gradient norm: 32.49: 26%|##6 | 163/625 [00:35<01:39, 4.64it/s]
reward: -4.1041, last reward: -2.0432, gradient norm: 32.49: 26%|##6 | 164/625 [00:35<01:39, 4.65it/s]
reward: -4.0237, last reward: -1.1576, gradient norm: 10.28: 26%|##6 | 164/625 [00:35<01:39, 4.65it/s]
reward: -4.0237, last reward: -1.1576, gradient norm: 10.28: 26%|##6 | 165/625 [00:35<01:38, 4.67it/s]
reward: -4.1219, last reward: -1.8796, gradient norm: 16.14: 26%|##6 | 165/625 [00:35<01:38, 4.67it/s]
reward: -4.1219, last reward: -1.8796, gradient norm: 16.14: 27%|##6 | 166/625 [00:35<01:38, 4.65it/s]
reward: -3.9088, last reward: -2.7064, gradient norm: 31.15: 27%|##6 | 166/625 [00:36<01:38, 4.65it/s]
reward: -3.9088, last reward: -2.7064, gradient norm: 31.15: 27%|##6 | 167/625 [00:36<01:38, 4.64it/s]
reward: -4.0692, last reward: -2.0838, gradient norm: 21.97: 27%|##6 | 167/625 [00:36<01:38, 4.64it/s]
reward: -4.0692, last reward: -2.0838, gradient norm: 21.97: 27%|##6 | 168/625 [00:36<01:38, 4.66it/s]
reward: -4.2574, last reward: -3.9748, gradient norm: 24.98: 27%|##6 | 168/625 [00:36<01:38, 4.66it/s]
reward: -4.2574, last reward: -3.9748, gradient norm: 24.98: 27%|##7 | 169/625 [00:36<01:37, 4.66it/s]
reward: -4.4186, last reward: -3.7320, gradient norm: 26.63: 27%|##7 | 169/625 [00:36<01:37, 4.66it/s]
reward: -4.4186, last reward: -3.7320, gradient norm: 26.63: 27%|##7 | 170/625 [00:36<01:37, 4.65it/s]
reward: -4.3639, last reward: -4.4383, gradient norm: 44.47: 27%|##7 | 170/625 [00:37<01:37, 4.65it/s]
reward: -4.3639, last reward: -4.4383, gradient norm: 44.47: 27%|##7 | 171/625 [00:37<01:37, 4.66it/s]
reward: -4.0634, last reward: -2.9971, gradient norm: 14.53: 27%|##7 | 171/625 [00:37<01:37, 4.66it/s]
reward: -4.0634, last reward: -2.9971, gradient norm: 14.53: 28%|##7 | 172/625 [00:37<01:36, 4.67it/s]
reward: -3.9817, last reward: -4.7611, gradient norm: 28.03: 28%|##7 | 172/625 [00:37<01:36, 4.67it/s]
reward: -3.9817, last reward: -4.7611, gradient norm: 28.03: 28%|##7 | 173/625 [00:37<01:36, 4.67it/s]
reward: -3.8745, last reward: -3.0192, gradient norm: 13.46: 28%|##7 | 173/625 [00:37<01:36, 4.67it/s]
reward: -3.8745, last reward: -3.0192, gradient norm: 13.46: 28%|##7 | 174/625 [00:37<01:36, 4.67it/s]
reward: -4.2198, last reward: -3.1847, gradient norm: 18.45: 28%|##7 | 174/625 [00:37<01:36, 4.67it/s]
reward: -4.2198, last reward: -3.1847, gradient norm: 18.45: 28%|##8 | 175/625 [00:37<01:36, 4.68it/s]
reward: -4.2329, last reward: -4.5482, gradient norm: 25.21: 28%|##8 | 175/625 [00:38<01:36, 4.68it/s]
reward: -4.2329, last reward: -4.5482, gradient norm: 25.21: 28%|##8 | 176/625 [00:38<01:35, 4.68it/s]
reward: -4.1020, last reward: -3.9854, gradient norm: 27.27: 28%|##8 | 176/625 [00:38<01:35, 4.68it/s]
reward: -4.1020, last reward: -3.9854, gradient norm: 27.27: 28%|##8 | 177/625 [00:38<01:35, 4.68it/s]
reward: -3.9086, last reward: -2.5777, gradient norm: 4.32: 28%|##8 | 177/625 [00:38<01:35, 4.68it/s]
reward: -3.9086, last reward: -2.5777, gradient norm: 4.32: 28%|##8 | 178/625 [00:38<01:35, 4.68it/s]
reward: -4.3170, last reward: -4.6734, gradient norm: 14.94: 28%|##8 | 178/625 [00:38<01:35, 4.68it/s]
reward: -4.3170, last reward: -4.6734, gradient norm: 14.94: 29%|##8 | 179/625 [00:38<01:35, 4.69it/s]
reward: -4.3887, last reward: -4.6026, gradient norm: 38.94: 29%|##8 | 179/625 [00:38<01:35, 4.69it/s]
reward: -4.3887, last reward: -4.6026, gradient norm: 38.94: 29%|##8 | 180/625 [00:38<01:34, 4.69it/s]
reward: -4.5713, last reward: -3.7558, gradient norm: 40.76: 29%|##8 | 180/625 [00:39<01:34, 4.69it/s]
reward: -4.5713, last reward: -3.7558, gradient norm: 40.76: 29%|##8 | 181/625 [00:39<01:34, 4.69it/s]
reward: -4.3708, last reward: -6.8988, gradient norm: 38.59: 29%|##8 | 181/625 [00:39<01:34, 4.69it/s]
reward: -4.3708, last reward: -6.8988, gradient norm: 38.59: 29%|##9 | 182/625 [00:39<01:34, 4.70it/s]
reward: -4.3369, last reward: -3.3873, gradient norm: 9.557: 29%|##9 | 182/625 [00:39<01:34, 4.70it/s]
reward: -4.3369, last reward: -3.3873, gradient norm: 9.557: 29%|##9 | 183/625 [00:39<01:34, 4.68it/s]
reward: -4.0059, last reward: -3.6585, gradient norm: 32.59: 29%|##9 | 183/625 [00:39<01:34, 4.68it/s]
reward: -4.0059, last reward: -3.6585, gradient norm: 32.59: 29%|##9 | 184/625 [00:39<01:34, 4.67it/s]
reward: -3.9074, last reward: -5.6974, gradient norm: 49.47: 29%|##9 | 184/625 [00:40<01:34, 4.67it/s]
reward: -3.9074, last reward: -5.6974, gradient norm: 49.47: 30%|##9 | 185/625 [00:40<01:34, 4.67it/s]
reward: -4.2288, last reward: -3.3191, gradient norm: 33.49: 30%|##9 | 185/625 [00:40<01:34, 4.67it/s]
reward: -4.2288, last reward: -3.3191, gradient norm: 33.49: 30%|##9 | 186/625 [00:40<01:34, 4.67it/s]
reward: -4.1197, last reward: -4.3105, gradient norm: 42.06: 30%|##9 | 186/625 [00:40<01:34, 4.67it/s]
reward: -4.1197, last reward: -4.3105, gradient norm: 42.06: 30%|##9 | 187/625 [00:40<01:33, 4.68it/s]
reward: -3.9638, last reward: -5.1343, gradient norm: 7.524: 30%|##9 | 187/625 [00:40<01:33, 4.68it/s]
reward: -3.9638, last reward: -5.1343, gradient norm: 7.524: 30%|### | 188/625 [00:40<01:33, 4.69it/s]
reward: -4.0636, last reward: -3.6553, gradient norm: 45.86: 30%|### | 188/625 [00:40<01:33, 4.69it/s]
reward: -4.0636, last reward: -3.6553, gradient norm: 45.86: 30%|### | 189/625 [00:40<01:33, 4.69it/s]
reward: -4.0357, last reward: -4.5972, gradient norm: 43.34: 30%|### | 189/625 [00:41<01:33, 4.69it/s]
reward: -4.0357, last reward: -4.5972, gradient norm: 43.34: 30%|### | 190/625 [00:41<01:32, 4.69it/s]
reward: -3.7493, last reward: -4.1890, gradient norm: 80.17: 30%|### | 190/625 [00:41<01:32, 4.69it/s]
reward: -3.7493, last reward: -4.1890, gradient norm: 80.17: 31%|### | 191/625 [00:41<01:32, 4.68it/s]
reward: -3.8468, last reward: -3.5652, gradient norm: 69.5: 31%|### | 191/625 [00:41<01:32, 4.68it/s]
reward: -3.8468, last reward: -3.5652, gradient norm: 69.5: 31%|### | 192/625 [00:41<01:32, 4.69it/s]
reward: -3.6491, last reward: -3.4879, gradient norm: 34.42: 31%|### | 192/625 [00:41<01:32, 4.69it/s]
reward: -3.6491, last reward: -3.4879, gradient norm: 34.42: 31%|### | 193/625 [00:41<01:32, 4.67it/s]
reward: -3.8576, last reward: -3.7805, gradient norm: 52.48: 31%|### | 193/625 [00:41<01:32, 4.67it/s]
reward: -3.8576, last reward: -3.7805, gradient norm: 52.48: 31%|###1 | 194/625 [00:41<01:32, 4.67it/s]
reward: -4.0271, last reward: -5.0831, gradient norm: 8.246: 31%|###1 | 194/625 [00:42<01:32, 4.67it/s]
reward: -4.0271, last reward: -5.0831, gradient norm: 8.246: 31%|###1 | 195/625 [00:42<01:31, 4.68it/s]
reward: -4.0899, last reward: -4.2954, gradient norm: 4.899: 31%|###1 | 195/625 [00:42<01:31, 4.68it/s]
reward: -4.0899, last reward: -4.2954, gradient norm: 4.899: 31%|###1 | 196/625 [00:42<01:31, 4.68it/s]
reward: -3.8713, last reward: -4.4178, gradient norm: 52.89: 31%|###1 | 196/625 [00:42<01:31, 4.68it/s]
reward: -3.8713, last reward: -4.4178, gradient norm: 52.89: 32%|###1 | 197/625 [00:42<01:31, 4.68it/s]
reward: -4.1304, last reward: -4.6133, gradient norm: 18.86: 32%|###1 | 197/625 [00:42<01:31, 4.68it/s]
reward: -4.1304, last reward: -4.6133, gradient norm: 18.86: 32%|###1 | 198/625 [00:42<01:31, 4.67it/s]
reward: -4.0593, last reward: -3.9649, gradient norm: 12.98: 32%|###1 | 198/625 [00:42<01:31, 4.67it/s]
reward: -4.0593, last reward: -3.9649, gradient norm: 12.98: 32%|###1 | 199/625 [00:43<01:31, 4.66it/s]
reward: -3.9747, last reward: -3.3543, gradient norm: 27.8: 32%|###1 | 199/625 [00:43<01:31, 4.66it/s]
reward: -3.9747, last reward: -3.3543, gradient norm: 27.8: 32%|###2 | 200/625 [00:43<01:31, 4.67it/s]
reward: -3.8325, last reward: -2.8250, gradient norm: 3.379: 32%|###2 | 200/625 [00:43<01:31, 4.67it/s]
reward: -3.8325, last reward: -2.8250, gradient norm: 3.379: 32%|###2 | 201/625 [00:43<01:30, 4.67it/s]
reward: -3.7482, last reward: -2.9768, gradient norm: 120.6: 32%|###2 | 201/625 [00:43<01:30, 4.67it/s]
reward: -3.7482, last reward: -2.9768, gradient norm: 120.6: 32%|###2 | 202/625 [00:43<01:30, 4.66it/s]
reward: -3.6965, last reward: -2.2167, gradient norm: 35.95: 32%|###2 | 202/625 [00:43<01:30, 4.66it/s]
reward: -3.6965, last reward: -2.2167, gradient norm: 35.95: 32%|###2 | 203/625 [00:43<01:30, 4.64it/s]
reward: -3.6892, last reward: -3.0087, gradient norm: 15.39: 32%|###2 | 203/625 [00:44<01:30, 4.64it/s]
reward: -3.6892, last reward: -3.0087, gradient norm: 15.39: 33%|###2 | 204/625 [00:44<01:30, 4.63it/s]
reward: -3.7826, last reward: -3.4080, gradient norm: 76.45: 33%|###2 | 204/625 [00:44<01:30, 4.63it/s]
reward: -3.7826, last reward: -3.4080, gradient norm: 76.45: 33%|###2 | 205/625 [00:44<01:30, 4.64it/s]
reward: -3.7127, last reward: -1.9761, gradient norm: 41.24: 33%|###2 | 205/625 [00:44<01:30, 4.64it/s]
reward: -3.7127, last reward: -1.9761, gradient norm: 41.24: 33%|###2 | 206/625 [00:44<01:30, 4.65it/s]
reward: -3.4390, last reward: -1.6515, gradient norm: 24.6: 33%|###2 | 206/625 [00:44<01:30, 4.65it/s]
reward: -3.4390, last reward: -1.6515, gradient norm: 24.6: 33%|###3 | 207/625 [00:44<01:29, 4.66it/s]
reward: -3.6199, last reward: -3.6112, gradient norm: 34.32: 33%|###3 | 207/625 [00:44<01:29, 4.66it/s]
reward: -3.6199, last reward: -3.6112, gradient norm: 34.32: 33%|###3 | 208/625 [00:44<01:29, 4.67it/s]
reward: -3.5588, last reward: -2.7928, gradient norm: 40.32: 33%|###3 | 208/625 [00:45<01:29, 4.67it/s]
reward: -3.5588, last reward: -2.7928, gradient norm: 40.32: 33%|###3 | 209/625 [00:45<01:28, 4.68it/s]
reward: -3.5637, last reward: -2.7941, gradient norm: 180.7: 33%|###3 | 209/625 [00:45<01:28, 4.68it/s]
reward: -3.5637, last reward: -2.7941, gradient norm: 180.7: 34%|###3 | 210/625 [00:45<01:28, 4.68it/s]
reward: -3.4179, last reward: -2.3754, gradient norm: 7.943: 34%|###3 | 210/625 [00:45<01:28, 4.68it/s]
reward: -3.4179, last reward: -2.3754, gradient norm: 7.943: 34%|###3 | 211/625 [00:45<01:28, 4.69it/s]
reward: -3.2743, last reward: -0.9107, gradient norm: 140.4: 34%|###3 | 211/625 [00:45<01:28, 4.69it/s]
reward: -3.2743, last reward: -0.9107, gradient norm: 140.4: 34%|###3 | 212/625 [00:45<01:28, 4.69it/s]
reward: -3.6794, last reward: -2.2813, gradient norm: 42.13: 34%|###3 | 212/625 [00:45<01:28, 4.69it/s]
reward: -3.6794, last reward: -2.2813, gradient norm: 42.13: 34%|###4 | 213/625 [00:46<01:27, 4.68it/s]
reward: -4.1157, last reward: -3.5407, gradient norm: 23.73: 34%|###4 | 213/625 [00:46<01:27, 4.68it/s]
reward: -4.1157, last reward: -3.5407, gradient norm: 23.73: 34%|###4 | 214/625 [00:46<01:27, 4.68it/s]
reward: -3.9308, last reward: -2.5314, gradient norm: 20.59: 34%|###4 | 214/625 [00:46<01:27, 4.68it/s]
reward: -3.9308, last reward: -2.5314, gradient norm: 20.59: 34%|###4 | 215/625 [00:46<01:27, 4.67it/s]
reward: -4.1636, last reward: -4.3585, gradient norm: 33.0: 34%|###4 | 215/625 [00:46<01:27, 4.67it/s]
reward: -4.1636, last reward: -4.3585, gradient norm: 33.0: 35%|###4 | 216/625 [00:46<01:27, 4.66it/s]
reward: -4.1833, last reward: -5.3171, gradient norm: 42.97: 35%|###4 | 216/625 [00:46<01:27, 4.66it/s]
reward: -4.1833, last reward: -5.3171, gradient norm: 42.97: 35%|###4 | 217/625 [00:46<01:27, 4.65it/s]
reward: -4.1965, last reward: -3.6858, gradient norm: 28.97: 35%|###4 | 217/625 [00:47<01:27, 4.65it/s]
reward: -4.1965, last reward: -3.6858, gradient norm: 28.97: 35%|###4 | 218/625 [00:47<01:27, 4.65it/s]
reward: -3.9217, last reward: -3.5547, gradient norm: 21.4: 35%|###4 | 218/625 [00:47<01:27, 4.65it/s]
reward: -3.9217, last reward: -3.5547, gradient norm: 21.4: 35%|###5 | 219/625 [00:47<01:27, 4.65it/s]
reward: -3.8924, last reward: -3.4835, gradient norm: 11.24: 35%|###5 | 219/625 [00:47<01:27, 4.65it/s]
reward: -3.8924, last reward: -3.4835, gradient norm: 11.24: 35%|###5 | 220/625 [00:47<01:27, 4.64it/s]
reward: -4.2404, last reward: -2.9496, gradient norm: 14.05: 35%|###5 | 220/625 [00:47<01:27, 4.64it/s]
reward: -4.2404, last reward: -2.9496, gradient norm: 14.05: 35%|###5 | 221/625 [00:47<01:27, 4.64it/s]
reward: -4.0629, last reward: -3.3711, gradient norm: 12.06: 35%|###5 | 221/625 [00:47<01:27, 4.64it/s]
reward: -4.0629, last reward: -3.3711, gradient norm: 12.06: 36%|###5 | 222/625 [00:47<01:26, 4.64it/s]
reward: -4.0722, last reward: -2.8614, gradient norm: 14.82: 36%|###5 | 222/625 [00:48<01:26, 4.64it/s]
reward: -4.0722, last reward: -2.8614, gradient norm: 14.82: 36%|###5 | 223/625 [00:48<01:26, 4.64it/s]
reward: -3.7592, last reward: -3.5156, gradient norm: 53.11: 36%|###5 | 223/625 [00:48<01:26, 4.64it/s]
reward: -3.7592, last reward: -3.5156, gradient norm: 53.11: 36%|###5 | 224/625 [00:48<01:26, 4.64it/s]
reward: -4.6125, last reward: -4.6482, gradient norm: 18.14: 36%|###5 | 224/625 [00:48<01:26, 4.64it/s]
reward: -4.6125, last reward: -4.6482, gradient norm: 18.14: 36%|###6 | 225/625 [00:48<01:26, 4.64it/s]
reward: -4.6257, last reward: -6.3221, gradient norm: 17.48: 36%|###6 | 225/625 [00:48<01:26, 4.64it/s]
reward: -4.6257, last reward: -6.3221, gradient norm: 17.48: 36%|###6 | 226/625 [00:48<01:25, 4.64it/s]
reward: -4.7812, last reward: -5.8455, gradient norm: 18.23: 36%|###6 | 226/625 [00:49<01:25, 4.64it/s]
reward: -4.7812, last reward: -5.8455, gradient norm: 18.23: 36%|###6 | 227/625 [00:49<01:25, 4.63it/s]
reward: -4.4830, last reward: -6.4353, gradient norm: 26.15: 36%|###6 | 227/625 [00:49<01:25, 4.63it/s]
reward: -4.4830, last reward: -6.4353, gradient norm: 26.15: 36%|###6 | 228/625 [00:49<01:25, 4.63it/s]
reward: -3.7580, last reward: -1.5694, gradient norm: 14.95: 36%|###6 | 228/625 [00:49<01:25, 4.63it/s]
reward: -3.7580, last reward: -1.5694, gradient norm: 14.95: 37%|###6 | 229/625 [00:49<01:25, 4.62it/s]
reward: -3.8931, last reward: -2.8276, gradient norm: 10.44: 37%|###6 | 229/625 [00:49<01:25, 4.62it/s]
reward: -3.8931, last reward: -2.8276, gradient norm: 10.44: 37%|###6 | 230/625 [00:49<01:25, 4.63it/s]
reward: -3.9819, last reward: -2.7655, gradient norm: 177.3: 37%|###6 | 230/625 [00:49<01:25, 4.63it/s]
reward: -3.9819, last reward: -2.7655, gradient norm: 177.3: 37%|###6 | 231/625 [00:49<01:25, 4.62it/s]
reward: -4.2398, last reward: -5.0598, gradient norm: 13.2: 37%|###6 | 231/625 [00:50<01:25, 4.62it/s]
reward: -4.2398, last reward: -5.0598, gradient norm: 13.2: 37%|###7 | 232/625 [00:50<01:25, 4.61it/s]
reward: -4.7040, last reward: -5.3955, gradient norm: 22.18: 37%|###7 | 232/625 [00:50<01:25, 4.61it/s]
reward: -4.7040, last reward: -5.3955, gradient norm: 22.18: 37%|###7 | 233/625 [00:50<01:24, 4.61it/s]
reward: -4.8215, last reward: -5.1860, gradient norm: 19.37: 37%|###7 | 233/625 [00:50<01:24, 4.61it/s]
reward: -4.8215, last reward: -5.1860, gradient norm: 19.37: 37%|###7 | 234/625 [00:50<01:24, 4.62it/s]
reward: -4.7507, last reward: -6.2476, gradient norm: 22.16: 37%|###7 | 234/625 [00:50<01:24, 4.62it/s]
reward: -4.7507, last reward: -6.2476, gradient norm: 22.16: 38%|###7 | 235/625 [00:50<01:24, 4.60it/s]
reward: -4.6494, last reward: -6.1368, gradient norm: 24.55: 38%|###7 | 235/625 [00:50<01:24, 4.60it/s]
reward: -4.6494, last reward: -6.1368, gradient norm: 24.55: 38%|###7 | 236/625 [00:50<01:24, 4.59it/s]
reward: -4.2301, last reward: -5.0665, gradient norm: 23.69: 38%|###7 | 236/625 [00:51<01:24, 4.59it/s]
reward: -4.2301, last reward: -5.0665, gradient norm: 23.69: 38%|###7 | 237/625 [00:51<01:24, 4.61it/s]
reward: -3.8930, last reward: -4.3479, gradient norm: 37.74: 38%|###7 | 237/625 [00:51<01:24, 4.61it/s]
reward: -3.8930, last reward: -4.3479, gradient norm: 37.74: 38%|###8 | 238/625 [00:51<01:23, 4.62it/s]
reward: -3.5537, last reward: -2.2049, gradient norm: 81.96: 38%|###8 | 238/625 [00:51<01:23, 4.62it/s]
reward: -3.5537, last reward: -2.2049, gradient norm: 81.96: 38%|###8 | 239/625 [00:51<01:42, 3.78it/s]
reward: -4.0166, last reward: -2.4677, gradient norm: 13.67: 38%|###8 | 239/625 [00:51<01:42, 3.78it/s]
reward: -4.0166, last reward: -2.4677, gradient norm: 13.67: 38%|###8 | 240/625 [00:51<01:35, 4.01it/s]
reward: -4.3269, last reward: -4.0309, gradient norm: 17.32: 38%|###8 | 240/625 [00:52<01:35, 4.01it/s]
reward: -4.3269, last reward: -4.0309, gradient norm: 17.32: 39%|###8 | 241/625 [00:52<01:31, 4.19it/s]
reward: -4.2600, last reward: -3.9936, gradient norm: 26.81: 39%|###8 | 241/625 [00:52<01:31, 4.19it/s]
reward: -4.2600, last reward: -3.9936, gradient norm: 26.81: 39%|###8 | 242/625 [00:52<01:28, 4.33it/s]
reward: -3.4097, last reward: -4.1251, gradient norm: 124.7: 39%|###8 | 242/625 [00:52<01:28, 4.33it/s]
reward: -3.4097, last reward: -4.1251, gradient norm: 124.7: 39%|###8 | 243/625 [00:52<01:26, 4.44it/s]
reward: -3.8573, last reward: -3.4068, gradient norm: 98.74: 39%|###8 | 243/625 [00:52<01:26, 4.44it/s]
reward: -3.8573, last reward: -3.4068, gradient norm: 98.74: 39%|###9 | 244/625 [00:52<01:24, 4.50it/s]
reward: -3.9369, last reward: -2.7992, gradient norm: 25.18: 39%|###9 | 244/625 [00:53<01:24, 4.50it/s]
reward: -3.9369, last reward: -2.7992, gradient norm: 25.18: 39%|###9 | 245/625 [00:53<01:23, 4.55it/s]
reward: -4.3955, last reward: -3.8863, gradient norm: 46.06: 39%|###9 | 245/625 [00:53<01:23, 4.55it/s]
reward: -4.3955, last reward: -3.8863, gradient norm: 46.06: 39%|###9 | 246/625 [00:53<01:22, 4.59it/s]
reward: -4.1470, last reward: -5.4684, gradient norm: 45.89: 39%|###9 | 246/625 [00:53<01:22, 4.59it/s]
reward: -4.1470, last reward: -5.4684, gradient norm: 45.89: 40%|###9 | 247/625 [00:53<01:21, 4.62it/s]
reward: -3.8880, last reward: -4.2010, gradient norm: 72.05: 40%|###9 | 247/625 [00:53<01:21, 4.62it/s]
reward: -3.8880, last reward: -4.2010, gradient norm: 72.05: 40%|###9 | 248/625 [00:53<01:21, 4.65it/s]
reward: -3.9990, last reward: -3.8233, gradient norm: 27.2: 40%|###9 | 248/625 [00:53<01:21, 4.65it/s]
reward: -3.9990, last reward: -3.8233, gradient norm: 27.2: 40%|###9 | 249/625 [00:53<01:21, 4.64it/s]
reward: -3.6335, last reward: -4.5086, gradient norm: 41.16: 40%|###9 | 249/625 [00:54<01:21, 4.64it/s]
reward: -3.6335, last reward: -4.5086, gradient norm: 41.16: 40%|#### | 250/625 [00:54<01:20, 4.64it/s]
reward: -4.1616, last reward: -2.5775, gradient norm: 18.69: 40%|#### | 250/625 [00:54<01:20, 4.64it/s]
reward: -4.1616, last reward: -2.5775, gradient norm: 18.69: 40%|#### | 251/625 [00:54<01:20, 4.64it/s]
reward: -4.1605, last reward: -2.9955, gradient norm: 15.9: 40%|#### | 251/625 [00:54<01:20, 4.64it/s]
reward: -4.1605, last reward: -2.9955, gradient norm: 15.9: 40%|#### | 252/625 [00:54<01:20, 4.63it/s]
reward: -3.9717, last reward: -2.8231, gradient norm: 36.74: 40%|#### | 252/625 [00:54<01:20, 4.63it/s]
reward: -3.9717, last reward: -2.8231, gradient norm: 36.74: 40%|#### | 253/625 [00:54<01:20, 4.64it/s]
reward: -4.4039, last reward: -3.9236, gradient norm: 31.57: 40%|#### | 253/625 [00:54<01:20, 4.64it/s]
reward: -4.4039, last reward: -3.9236, gradient norm: 31.57: 41%|#### | 254/625 [00:54<01:20, 4.62it/s]
reward: -4.5261, last reward: -5.2729, gradient norm: 20.61: 41%|#### | 254/625 [00:55<01:20, 4.62it/s]
reward: -4.5261, last reward: -5.2729, gradient norm: 20.61: 41%|#### | 255/625 [00:55<01:20, 4.61it/s]
reward: -4.1928, last reward: -4.3217, gradient norm: 553.9: 41%|#### | 255/625 [00:55<01:20, 4.61it/s]
reward: -4.1928, last reward: -4.3217, gradient norm: 553.9: 41%|#### | 256/625 [00:55<01:19, 4.62it/s]
reward: -3.8302, last reward: -2.6122, gradient norm: 77.43: 41%|#### | 256/625 [00:55<01:19, 4.62it/s]
reward: -3.8302, last reward: -2.6122, gradient norm: 77.43: 41%|####1 | 257/625 [00:55<01:19, 4.62it/s]
reward: -4.0836, last reward: -3.4043, gradient norm: 12.81: 41%|####1 | 257/625 [00:55<01:19, 4.62it/s]
reward: -4.0836, last reward: -3.4043, gradient norm: 12.81: 41%|####1 | 258/625 [00:55<01:19, 4.64it/s]
reward: -4.1704, last reward: -2.3705, gradient norm: 9.274: 41%|####1 | 258/625 [00:56<01:19, 4.64it/s]
reward: -4.1704, last reward: -2.3705, gradient norm: 9.274: 41%|####1 | 259/625 [00:56<01:18, 4.66it/s]
reward: -4.2096, last reward: -2.7481, gradient norm: 17.09: 41%|####1 | 259/625 [00:56<01:18, 4.66it/s]
reward: -4.2096, last reward: -2.7481, gradient norm: 17.09: 42%|####1 | 260/625 [00:56<01:18, 4.68it/s]
reward: -4.0902, last reward: -2.6018, gradient norm: 12.54: 42%|####1 | 260/625 [00:56<01:18, 4.68it/s]
reward: -4.0902, last reward: -2.6018, gradient norm: 12.54: 42%|####1 | 261/625 [00:56<01:17, 4.69it/s]
reward: -3.8632, last reward: -3.5148, gradient norm: 68.5: 42%|####1 | 261/625 [00:56<01:17, 4.69it/s]
reward: -3.8632, last reward: -3.5148, gradient norm: 68.5: 42%|####1 | 262/625 [00:56<01:17, 4.69it/s]
reward: -3.6922, last reward: -3.0408, gradient norm: 175.4: 42%|####1 | 262/625 [00:56<01:17, 4.69it/s]
reward: -3.6922, last reward: -3.0408, gradient norm: 175.4: 42%|####2 | 263/625 [00:56<01:17, 4.69it/s]
reward: -3.8171, last reward: -4.4168, gradient norm: 58.78: 42%|####2 | 263/625 [00:57<01:17, 4.69it/s]
reward: -3.8171, last reward: -4.4168, gradient norm: 58.78: 42%|####2 | 264/625 [00:57<01:16, 4.70it/s]
reward: -3.7134, last reward: -2.6365, gradient norm: 84.24: 42%|####2 | 264/625 [00:57<01:16, 4.70it/s]
reward: -3.7134, last reward: -2.6365, gradient norm: 84.24: 42%|####2 | 265/625 [00:57<01:16, 4.70it/s]
reward: -3.8527, last reward: -2.6593, gradient norm: 27.18: 42%|####2 | 265/625 [00:57<01:16, 4.70it/s]
reward: -3.8527, last reward: -2.6593, gradient norm: 27.18: 43%|####2 | 266/625 [00:57<01:16, 4.69it/s]
reward: -3.7538, last reward: -3.0815, gradient norm: 116.6: 43%|####2 | 266/625 [00:57<01:16, 4.69it/s]
reward: -3.7538, last reward: -3.0815, gradient norm: 116.6: 43%|####2 | 267/625 [00:57<01:16, 4.69it/s]
reward: -3.7960, last reward: -2.9647, gradient norm: 51.46: 43%|####2 | 267/625 [00:57<01:16, 4.69it/s]
reward: -3.7960, last reward: -2.9647, gradient norm: 51.46: 43%|####2 | 268/625 [00:57<01:15, 4.70it/s]
reward: -3.5485, last reward: -2.6421, gradient norm: 229.8: 43%|####2 | 268/625 [00:58<01:15, 4.70it/s]
reward: -3.5485, last reward: -2.6421, gradient norm: 229.8: 43%|####3 | 269/625 [00:58<01:16, 4.68it/s]
reward: -3.6767, last reward: -2.1558, gradient norm: 30.58: 43%|####3 | 269/625 [00:58<01:16, 4.68it/s]
reward: -3.6767, last reward: -2.1558, gradient norm: 30.58: 43%|####3 | 270/625 [00:58<01:16, 4.66it/s]
reward: -3.4104, last reward: -1.8572, gradient norm: 34.07: 43%|####3 | 270/625 [00:58<01:16, 4.66it/s]
reward: -3.4104, last reward: -1.8572, gradient norm: 34.07: 43%|####3 | 271/625 [00:58<01:15, 4.66it/s]
reward: -3.7386, last reward: -2.5830, gradient norm: 4.662: 43%|####3 | 271/625 [00:58<01:15, 4.66it/s]
reward: -3.7386, last reward: -2.5830, gradient norm: 4.662: 44%|####3 | 272/625 [00:58<01:16, 4.64it/s]
reward: -3.7995, last reward: -3.5659, gradient norm: 24.4: 44%|####3 | 272/625 [00:59<01:16, 4.64it/s]
reward: -3.7995, last reward: -3.5659, gradient norm: 24.4: 44%|####3 | 273/625 [00:59<01:16, 4.61it/s]
reward: -3.8526, last reward: -4.3222, gradient norm: 30.28: 44%|####3 | 273/625 [00:59<01:16, 4.61it/s]
reward: -3.8526, last reward: -4.3222, gradient norm: 30.28: 44%|####3 | 274/625 [00:59<01:16, 4.60it/s]
reward: -2.9974, last reward: -2.3456, gradient norm: 20.62: 44%|####3 | 274/625 [00:59<01:16, 4.60it/s]
reward: -2.9974, last reward: -2.3456, gradient norm: 20.62: 44%|####4 | 275/625 [00:59<01:16, 4.60it/s]
reward: -3.6579, last reward: -3.2051, gradient norm: 116.5: 44%|####4 | 275/625 [00:59<01:16, 4.60it/s]
reward: -3.6579, last reward: -3.2051, gradient norm: 116.5: 44%|####4 | 276/625 [00:59<01:15, 4.62it/s]
reward: -4.0731, last reward: -2.9540, gradient norm: 34.46: 44%|####4 | 276/625 [00:59<01:15, 4.62it/s]
reward: -4.0731, last reward: -2.9540, gradient norm: 34.46: 44%|####4 | 277/625 [00:59<01:16, 4.55it/s]
reward: -3.7590, last reward: -1.9036, gradient norm: 29.47: 44%|####4 | 277/625 [01:00<01:16, 4.55it/s]
reward: -3.7590, last reward: -1.9036, gradient norm: 29.47: 44%|####4 | 278/625 [01:00<01:15, 4.58it/s]
reward: -3.2802, last reward: -1.7976, gradient norm: 11.65: 44%|####4 | 278/625 [01:00<01:15, 4.58it/s]
reward: -3.2802, last reward: -1.7976, gradient norm: 11.65: 45%|####4 | 279/625 [01:00<01:15, 4.59it/s]
reward: -3.0515, last reward: -2.5588, gradient norm: 19.5: 45%|####4 | 279/625 [01:00<01:15, 4.59it/s]
reward: -3.0515, last reward: -2.5588, gradient norm: 19.5: 45%|####4 | 280/625 [01:00<01:14, 4.63it/s]
reward: -3.0877, last reward: -2.3163, gradient norm: 19.94: 45%|####4 | 280/625 [01:00<01:14, 4.63it/s]
reward: -3.0877, last reward: -2.3163, gradient norm: 19.94: 45%|####4 | 281/625 [01:00<01:13, 4.65it/s]
reward: -3.6197, last reward: -1.5537, gradient norm: 26.17: 45%|####4 | 281/625 [01:01<01:13, 4.65it/s]
reward: -3.6197, last reward: -1.5537, gradient norm: 26.17: 45%|####5 | 282/625 [01:01<01:13, 4.67it/s]
reward: -3.9365, last reward: -2.0852, gradient norm: 52.29: 45%|####5 | 282/625 [01:01<01:13, 4.67it/s]
reward: -3.9365, last reward: -2.0852, gradient norm: 52.29: 45%|####5 | 283/625 [01:01<01:12, 4.69it/s]
reward: -2.9147, last reward: -1.1833, gradient norm: 3.244: 45%|####5 | 283/625 [01:01<01:12, 4.69it/s]
reward: -2.9147, last reward: -1.1833, gradient norm: 3.244: 45%|####5 | 284/625 [01:01<01:12, 4.71it/s]
reward: -3.1289, last reward: -1.3957, gradient norm: 6.259: 45%|####5 | 284/625 [01:01<01:12, 4.71it/s]
reward: -3.1289, last reward: -1.3957, gradient norm: 6.259: 46%|####5 | 285/625 [01:01<01:12, 4.72it/s]
reward: -2.8570, last reward: -2.3471, gradient norm: 70.03: 46%|####5 | 285/625 [01:01<01:12, 4.72it/s]
reward: -2.8570, last reward: -2.3471, gradient norm: 70.03: 46%|####5 | 286/625 [01:01<01:11, 4.73it/s]
reward: -3.2665, last reward: -4.3491, gradient norm: 62.19: 46%|####5 | 286/625 [01:02<01:11, 4.73it/s]
reward: -3.2665, last reward: -4.3491, gradient norm: 62.19: 46%|####5 | 287/625 [01:02<01:11, 4.73it/s]
reward: -3.1239, last reward: -4.9956, gradient norm: 42.3: 46%|####5 | 287/625 [01:02<01:11, 4.73it/s]
reward: -3.1239, last reward: -4.9956, gradient norm: 42.3: 46%|####6 | 288/625 [01:02<01:11, 4.73it/s]
reward: -3.0128, last reward: -2.6064, gradient norm: 89.99: 46%|####6 | 288/625 [01:02<01:11, 4.73it/s]
reward: -3.0128, last reward: -2.6064, gradient norm: 89.99: 46%|####6 | 289/625 [01:02<01:11, 4.73it/s]
reward: -3.1216, last reward: -1.7508, gradient norm: 12.86: 46%|####6 | 289/625 [01:02<01:11, 4.73it/s]
reward: -3.1216, last reward: -1.7508, gradient norm: 12.86: 46%|####6 | 290/625 [01:02<01:10, 4.74it/s]
reward: -3.9157, last reward: -3.5463, gradient norm: 59.93: 46%|####6 | 290/625 [01:02<01:10, 4.74it/s]
reward: -3.9157, last reward: -3.5463, gradient norm: 59.93: 47%|####6 | 291/625 [01:02<01:11, 4.70it/s]
reward: -3.9221, last reward: -1.8365, gradient norm: 16.18: 47%|####6 | 291/625 [01:03<01:11, 4.70it/s]
reward: -3.9221, last reward: -1.8365, gradient norm: 16.18: 47%|####6 | 292/625 [01:03<01:10, 4.69it/s]
reward: -3.2045, last reward: -1.1108, gradient norm: 99.94: 47%|####6 | 292/625 [01:03<01:10, 4.69it/s]
reward: -3.2045, last reward: -1.1108, gradient norm: 99.94: 47%|####6 | 293/625 [01:03<01:10, 4.70it/s]
reward: -2.9230, last reward: -2.4004, gradient norm: 15.94: 47%|####6 | 293/625 [01:03<01:10, 4.70it/s]
reward: -2.9230, last reward: -2.4004, gradient norm: 15.94: 47%|####7 | 294/625 [01:03<01:10, 4.68it/s]
reward: -2.7480, last reward: -1.4274, gradient norm: 141.7: 47%|####7 | 294/625 [01:03<01:10, 4.68it/s]
reward: -2.7480, last reward: -1.4274, gradient norm: 141.7: 47%|####7 | 295/625 [01:03<01:10, 4.69it/s]
reward: -3.2647, last reward: -2.4508, gradient norm: 7.398: 47%|####7 | 295/625 [01:03<01:10, 4.69it/s]
reward: -3.2647, last reward: -2.4508, gradient norm: 7.398: 47%|####7 | 296/625 [01:03<01:10, 4.68it/s]
reward: -3.2711, last reward: -1.5824, gradient norm: 7.885: 47%|####7 | 296/625 [01:04<01:10, 4.68it/s]
reward: -3.2711, last reward: -1.5824, gradient norm: 7.885: 48%|####7 | 297/625 [01:04<01:10, 4.68it/s]
reward: -3.7127, last reward: -2.0844, gradient norm: 5.945: 48%|####7 | 297/625 [01:04<01:10, 4.68it/s]
reward: -3.7127, last reward: -2.0844, gradient norm: 5.945: 48%|####7 | 298/625 [01:04<01:09, 4.68it/s]
reward: -3.3205, last reward: -2.1062, gradient norm: 10.78: 48%|####7 | 298/625 [01:04<01:09, 4.68it/s]
reward: -3.3205, last reward: -2.1062, gradient norm: 10.78: 48%|####7 | 299/625 [01:04<01:09, 4.68it/s]
reward: -3.5278, last reward: -2.0099, gradient norm: 14.79: 48%|####7 | 299/625 [01:04<01:09, 4.68it/s]
reward: -3.5278, last reward: -2.0099, gradient norm: 14.79: 48%|####8 | 300/625 [01:04<01:09, 4.68it/s]
reward: -3.0065, last reward: -2.7674, gradient norm: 328.3: 48%|####8 | 300/625 [01:05<01:09, 4.68it/s]
reward: -3.0065, last reward: -2.7674, gradient norm: 328.3: 48%|####8 | 301/625 [01:05<01:09, 4.67it/s]
reward: -3.4388, last reward: -4.0222, gradient norm: 34.25: 48%|####8 | 301/625 [01:05<01:09, 4.67it/s]
reward: -3.4388, last reward: -4.0222, gradient norm: 34.25: 48%|####8 | 302/625 [01:05<01:09, 4.65it/s]
reward: -2.1141, last reward: -0.0837, gradient norm: 1.377: 48%|####8 | 302/625 [01:05<01:09, 4.65it/s]
reward: -2.1141, last reward: -0.0837, gradient norm: 1.377: 48%|####8 | 303/625 [01:05<01:09, 4.64it/s]
reward: -2.2986, last reward: -0.0361, gradient norm: 2.214: 48%|####8 | 303/625 [01:05<01:09, 4.64it/s]
reward: -2.2986, last reward: -0.0361, gradient norm: 2.214: 49%|####8 | 304/625 [01:05<01:09, 4.63it/s]
reward: -2.1854, last reward: -0.3263, gradient norm: 13.36: 49%|####8 | 304/625 [01:05<01:09, 4.63it/s]
reward: -2.1854, last reward: -0.3263, gradient norm: 13.36: 49%|####8 | 305/625 [01:05<01:09, 4.63it/s]
reward: -2.6637, last reward: -0.3229, gradient norm: 10.63: 49%|####8 | 305/625 [01:06<01:09, 4.63it/s]
reward: -2.6637, last reward: -0.3229, gradient norm: 10.63: 49%|####8 | 306/625 [01:06<01:08, 4.64it/s]
reward: -2.3178, last reward: -1.5013, gradient norm: 29.97: 49%|####8 | 306/625 [01:06<01:08, 4.64it/s]
reward: -2.3178, last reward: -1.5013, gradient norm: 29.97: 49%|####9 | 307/625 [01:06<01:08, 4.65it/s]
reward: -2.0060, last reward: -0.7199, gradient norm: 13.81: 49%|####9 | 307/625 [01:06<01:08, 4.65it/s]
reward: -2.0060, last reward: -0.7199, gradient norm: 13.81: 49%|####9 | 308/625 [01:06<01:23, 3.81it/s]
reward: -2.3462, last reward: -0.5571, gradient norm: 30.98: 49%|####9 | 308/625 [01:06<01:23, 3.81it/s]
reward: -2.3462, last reward: -0.5571, gradient norm: 30.98: 49%|####9 | 309/625 [01:06<01:18, 4.03it/s]
reward: -1.6198, last reward: -0.0123, gradient norm: 10.87: 49%|####9 | 309/625 [01:07<01:18, 4.03it/s]
reward: -1.6198, last reward: -0.0123, gradient norm: 10.87: 50%|####9 | 310/625 [01:07<01:15, 4.18it/s]
reward: -1.9721, last reward: -0.3445, gradient norm: 7.582: 50%|####9 | 310/625 [01:07<01:15, 4.18it/s]
reward: -1.9721, last reward: -0.3445, gradient norm: 7.582: 50%|####9 | 311/625 [01:07<01:13, 4.29it/s]
reward: -1.8556, last reward: -0.1216, gradient norm: 3.982: 50%|####9 | 311/625 [01:07<01:13, 4.29it/s]
reward: -1.8556, last reward: -0.1216, gradient norm: 3.982: 50%|####9 | 312/625 [01:07<01:11, 4.38it/s]
reward: -1.4898, last reward: -0.0725, gradient norm: 2.955: 50%|####9 | 312/625 [01:07<01:11, 4.38it/s]
reward: -1.4898, last reward: -0.0725, gradient norm: 2.955: 50%|##### | 313/625 [01:07<01:09, 4.46it/s]
reward: -1.5016, last reward: -0.0497, gradient norm: 2.87: 50%|##### | 313/625 [01:08<01:09, 4.46it/s]
reward: -1.5016, last reward: -0.0497, gradient norm: 2.87: 50%|##### | 314/625 [01:08<01:08, 4.52it/s]
reward: -1.7670, last reward: -0.0072, gradient norm: 0.6644: 50%|##### | 314/625 [01:08<01:08, 4.52it/s]
reward: -1.7670, last reward: -0.0072, gradient norm: 0.6644: 50%|##### | 315/625 [01:08<01:07, 4.58it/s]
reward: -1.5835, last reward: -0.0192, gradient norm: 1.624: 50%|##### | 315/625 [01:08<01:07, 4.58it/s]
reward: -1.5835, last reward: -0.0192, gradient norm: 1.624: 51%|##### | 316/625 [01:08<01:07, 4.61it/s]
reward: -2.1447, last reward: -0.2058, gradient norm: 47.93: 51%|##### | 316/625 [01:08<01:07, 4.61it/s]
reward: -2.1447, last reward: -0.2058, gradient norm: 47.93: 51%|##### | 317/625 [01:08<01:06, 4.64it/s]
reward: -1.5491, last reward: -0.7486, gradient norm: 33.28: 51%|##### | 317/625 [01:08<01:06, 4.64it/s]
reward: -1.5491, last reward: -0.7486, gradient norm: 33.28: 51%|##### | 318/625 [01:08<01:06, 4.62it/s]
reward: -1.7463, last reward: -0.2809, gradient norm: 19.73: 51%|##### | 318/625 [01:09<01:06, 4.62it/s]
reward: -1.7463, last reward: -0.2809, gradient norm: 19.73: 51%|#####1 | 319/625 [01:09<01:06, 4.61it/s]
reward: -1.5898, last reward: -0.0103, gradient norm: 1.546: 51%|#####1 | 319/625 [01:09<01:06, 4.61it/s]
reward: -1.5898, last reward: -0.0103, gradient norm: 1.546: 51%|#####1 | 320/625 [01:09<01:05, 4.63it/s]
reward: -1.4613, last reward: -0.0105, gradient norm: 1.959: 51%|#####1 | 320/625 [01:09<01:05, 4.63it/s]
reward: -1.4613, last reward: -0.0105, gradient norm: 1.959: 51%|#####1 | 321/625 [01:09<01:05, 4.64it/s]
reward: -1.4744, last reward: -0.0491, gradient norm: 2.733: 51%|#####1 | 321/625 [01:09<01:05, 4.64it/s]
reward: -1.4744, last reward: -0.0491, gradient norm: 2.733: 52%|#####1 | 322/625 [01:09<01:05, 4.62it/s]
reward: -1.9383, last reward: -0.0410, gradient norm: 2.085: 52%|#####1 | 322/625 [01:09<01:05, 4.62it/s]
reward: -1.9383, last reward: -0.0410, gradient norm: 2.085: 52%|#####1 | 323/625 [01:09<01:05, 4.63it/s]
reward: -1.5573, last reward: -0.0775, gradient norm: 3.855: 52%|#####1 | 323/625 [01:10<01:05, 4.63it/s]
reward: -1.5573, last reward: -0.0775, gradient norm: 3.855: 52%|#####1 | 324/625 [01:10<01:04, 4.64it/s]
reward: -2.2845, last reward: -0.4220, gradient norm: 20.72: 52%|#####1 | 324/625 [01:10<01:04, 4.64it/s]
reward: -2.2845, last reward: -0.4220, gradient norm: 20.72: 52%|#####2 | 325/625 [01:10<01:04, 4.63it/s]
reward: -1.6364, last reward: -0.0138, gradient norm: 1.836: 52%|#####2 | 325/625 [01:10<01:04, 4.63it/s]
reward: -1.6364, last reward: -0.0138, gradient norm: 1.836: 52%|#####2 | 326/625 [01:10<01:04, 4.62it/s]
reward: -1.8928, last reward: -0.0004, gradient norm: 0.4997: 52%|#####2 | 326/625 [01:10<01:04, 4.62it/s]
reward: -1.8928, last reward: -0.0004, gradient norm: 0.4997: 52%|#####2 | 327/625 [01:10<01:04, 4.61it/s]
reward: -1.9184, last reward: -0.1358, gradient norm: 57.44: 52%|#####2 | 327/625 [01:11<01:04, 4.61it/s]
reward: -1.9184, last reward: -0.1358, gradient norm: 57.44: 52%|#####2 | 328/625 [01:11<01:04, 4.59it/s]
reward: -2.1396, last reward: -0.3194, gradient norm: 28.33: 52%|#####2 | 328/625 [01:11<01:04, 4.59it/s]
reward: -2.1396, last reward: -0.3194, gradient norm: 28.33: 53%|#####2 | 329/625 [01:11<01:04, 4.59it/s]
reward: -1.8544, last reward: -0.0533, gradient norm: 5.102: 53%|#####2 | 329/625 [01:11<01:04, 4.59it/s]
reward: -1.8544, last reward: -0.0533, gradient norm: 5.102: 53%|#####2 | 330/625 [01:11<01:04, 4.58it/s]
reward: -1.8175, last reward: -0.1841, gradient norm: 13.75: 53%|#####2 | 330/625 [01:11<01:04, 4.58it/s]
reward: -1.8175, last reward: -0.1841, gradient norm: 13.75: 53%|#####2 | 331/625 [01:11<01:04, 4.59it/s]
reward: -1.6237, last reward: -0.0454, gradient norm: 8.433: 53%|#####2 | 331/625 [01:11<01:04, 4.59it/s]
reward: -1.6237, last reward: -0.0454, gradient norm: 8.433: 53%|#####3 | 332/625 [01:11<01:04, 4.56it/s]
reward: -1.8367, last reward: -0.0279, gradient norm: 1.658: 53%|#####3 | 332/625 [01:12<01:04, 4.56it/s]
reward: -1.8367, last reward: -0.0279, gradient norm: 1.658: 53%|#####3 | 333/625 [01:12<01:03, 4.56it/s]
reward: -1.8421, last reward: -0.0033, gradient norm: 0.9439: 53%|#####3 | 333/625 [01:12<01:03, 4.56it/s]
reward: -1.8421, last reward: -0.0033, gradient norm: 0.9439: 53%|#####3 | 334/625 [01:12<01:03, 4.58it/s]
reward: -1.9224, last reward: -1.7660, gradient norm: 50.72: 53%|#####3 | 334/625 [01:12<01:03, 4.58it/s]
reward: -1.9224, last reward: -1.7660, gradient norm: 50.72: 54%|#####3 | 335/625 [01:12<01:03, 4.59it/s]
reward: -1.7279, last reward: -0.1535, gradient norm: 9.397: 54%|#####3 | 335/625 [01:12<01:03, 4.59it/s]
reward: -1.7279, last reward: -0.1535, gradient norm: 9.397: 54%|#####3 | 336/625 [01:12<01:02, 4.62it/s]
reward: -1.6629, last reward: -0.0216, gradient norm: 1.73: 54%|#####3 | 336/625 [01:13<01:02, 4.62it/s]
reward: -1.6629, last reward: -0.0216, gradient norm: 1.73: 54%|#####3 | 337/625 [01:13<01:02, 4.64it/s]
reward: -1.5335, last reward: -0.0032, gradient norm: 0.864: 54%|#####3 | 337/625 [01:13<01:02, 4.64it/s]
reward: -1.5335, last reward: -0.0032, gradient norm: 0.864: 54%|#####4 | 338/625 [01:13<01:01, 4.65it/s]
reward: -1.8004, last reward: -0.0252, gradient norm: 1.678: 54%|#####4 | 338/625 [01:13<01:01, 4.65it/s]
reward: -1.8004, last reward: -0.0252, gradient norm: 1.678: 54%|#####4 | 339/625 [01:13<01:01, 4.67it/s]
reward: -1.7456, last reward: -0.0070, gradient norm: 1.96: 54%|#####4 | 339/625 [01:13<01:01, 4.67it/s]
reward: -1.7456, last reward: -0.0070, gradient norm: 1.96: 54%|#####4 | 340/625 [01:13<01:00, 4.68it/s]
reward: -1.5424, last reward: -0.0032, gradient norm: 0.9583: 54%|#####4 | 340/625 [01:13<01:00, 4.68it/s]
reward: -1.5424, last reward: -0.0032, gradient norm: 0.9583: 55%|#####4 | 341/625 [01:13<01:00, 4.67it/s]
reward: -1.9707, last reward: -0.0026, gradient norm: 0.8016: 55%|#####4 | 341/625 [01:14<01:00, 4.67it/s]
reward: -1.9707, last reward: -0.0026, gradient norm: 0.8016: 55%|#####4 | 342/625 [01:14<01:00, 4.67it/s]
reward: -1.8548, last reward: -0.0256, gradient norm: 2.428: 55%|#####4 | 342/625 [01:14<01:00, 4.67it/s]
reward: -1.8548, last reward: -0.0256, gradient norm: 2.428: 55%|#####4 | 343/625 [01:14<01:00, 4.68it/s]
reward: -1.6776, last reward: -0.0171, gradient norm: 1.923: 55%|#####4 | 343/625 [01:14<01:00, 4.68it/s]
reward: -1.6776, last reward: -0.0171, gradient norm: 1.923: 55%|#####5 | 344/625 [01:14<01:00, 4.67it/s]
reward: -1.8326, last reward: -0.0392, gradient norm: 4.221: 55%|#####5 | 344/625 [01:14<01:00, 4.67it/s]
reward: -1.8326, last reward: -0.0392, gradient norm: 4.221: 55%|#####5 | 345/625 [01:14<00:59, 4.68it/s]
reward: -1.5356, last reward: -0.0246, gradient norm: 4.273: 55%|#####5 | 345/625 [01:14<00:59, 4.68it/s]
reward: -1.5356, last reward: -0.0246, gradient norm: 4.273: 55%|#####5 | 346/625 [01:14<00:59, 4.68it/s]
reward: -1.9085, last reward: -0.5641, gradient norm: 25.87: 55%|#####5 | 346/625 [01:15<00:59, 4.68it/s]
reward: -1.9085, last reward: -0.5641, gradient norm: 25.87: 56%|#####5 | 347/625 [01:15<00:59, 4.69it/s]
reward: -1.8895, last reward: -2.9111, gradient norm: 107.7: 56%|#####5 | 347/625 [01:15<00:59, 4.69it/s]
reward: -1.8895, last reward: -2.9111, gradient norm: 107.7: 56%|#####5 | 348/625 [01:15<00:59, 4.69it/s]
reward: -1.5600, last reward: -0.0301, gradient norm: 2.218: 56%|#####5 | 348/625 [01:15<00:59, 4.69it/s]
reward: -1.5600, last reward: -0.0301, gradient norm: 2.218: 56%|#####5 | 349/625 [01:15<00:58, 4.69it/s]
reward: -1.7251, last reward: -0.5537, gradient norm: 79.24: 56%|#####5 | 349/625 [01:15<00:58, 4.69it/s]
reward: -1.7251, last reward: -0.5537, gradient norm: 79.24: 56%|#####6 | 350/625 [01:15<00:58, 4.69it/s]
reward: -1.5847, last reward: -0.0042, gradient norm: 1.21: 56%|#####6 | 350/625 [01:15<00:58, 4.69it/s]
reward: -1.5847, last reward: -0.0042, gradient norm: 1.21: 56%|#####6 | 351/625 [01:15<00:58, 4.70it/s]
reward: -1.7402, last reward: -1.1149, gradient norm: 85.86: 56%|#####6 | 351/625 [01:16<00:58, 4.70it/s]
reward: -1.7402, last reward: -1.1149, gradient norm: 85.86: 56%|#####6 | 352/625 [01:16<00:58, 4.68it/s]
reward: -1.4471, last reward: -1.3297, gradient norm: 116.5: 56%|#####6 | 352/625 [01:16<00:58, 4.68it/s]
reward: -1.4471, last reward: -1.3297, gradient norm: 116.5: 56%|#####6 | 353/625 [01:16<00:57, 4.69it/s]
reward: -1.7735, last reward: -0.0160, gradient norm: 1.822: 56%|#####6 | 353/625 [01:16<00:57, 4.69it/s]
reward: -1.7735, last reward: -0.0160, gradient norm: 1.822: 57%|#####6 | 354/625 [01:16<00:57, 4.69it/s]
reward: -1.7306, last reward: -0.0297, gradient norm: 5.558: 57%|#####6 | 354/625 [01:16<00:57, 4.69it/s]
reward: -1.7306, last reward: -0.0297, gradient norm: 5.558: 57%|#####6 | 355/625 [01:16<00:57, 4.68it/s]
reward: -1.6342, last reward: -0.0989, gradient norm: 4.514: 57%|#####6 | 355/625 [01:17<00:57, 4.68it/s]
reward: -1.6342, last reward: -0.0989, gradient norm: 4.514: 57%|#####6 | 356/625 [01:17<00:57, 4.67it/s]
reward: -1.8741, last reward: -0.0544, gradient norm: 2.673: 57%|#####6 | 356/625 [01:17<00:57, 4.67it/s]
reward: -1.8741, last reward: -0.0544, gradient norm: 2.673: 57%|#####7 | 357/625 [01:17<00:57, 4.68it/s]
reward: -1.3142, last reward: -0.0028, gradient norm: 0.8623: 57%|#####7 | 357/625 [01:17<00:57, 4.68it/s]
reward: -1.3142, last reward: -0.0028, gradient norm: 0.8623: 57%|#####7 | 358/625 [01:17<00:56, 4.70it/s]
reward: -1.6683, last reward: -0.0221, gradient norm: 1.069: 57%|#####7 | 358/625 [01:17<00:56, 4.70it/s]
reward: -1.6683, last reward: -0.0221, gradient norm: 1.069: 57%|#####7 | 359/625 [01:17<00:56, 4.71it/s]
reward: -1.6748, last reward: -0.0445, gradient norm: 1.776: 57%|#####7 | 359/625 [01:17<00:56, 4.71it/s]
reward: -1.6748, last reward: -0.0445, gradient norm: 1.776: 58%|#####7 | 360/625 [01:17<00:56, 4.72it/s]
reward: -1.7093, last reward: -0.0251, gradient norm: 1.189: 58%|#####7 | 360/625 [01:18<00:56, 4.72it/s]
reward: -1.7093, last reward: -0.0251, gradient norm: 1.189: 58%|#####7 | 361/625 [01:18<00:55, 4.72it/s]
reward: -1.7359, last reward: -0.0003, gradient norm: 0.3803: 58%|#####7 | 361/625 [01:18<00:55, 4.72it/s]
reward: -1.7359, last reward: -0.0003, gradient norm: 0.3803: 58%|#####7 | 362/625 [01:18<00:56, 4.69it/s]
reward: -1.8574, last reward: -0.0144, gradient norm: 1.241: 58%|#####7 | 362/625 [01:18<00:56, 4.69it/s]
reward: -1.8574, last reward: -0.0144, gradient norm: 1.241: 58%|#####8 | 363/625 [01:18<00:55, 4.69it/s]
reward: -1.4602, last reward: -0.0195, gradient norm: 1.71: 58%|#####8 | 363/625 [01:18<00:55, 4.69it/s]
reward: -1.4602, last reward: -0.0195, gradient norm: 1.71: 58%|#####8 | 364/625 [01:18<00:55, 4.68it/s]
reward: -1.6131, last reward: -0.0025, gradient norm: 0.7175: 58%|#####8 | 364/625 [01:18<00:55, 4.68it/s]
reward: -1.6131, last reward: -0.0025, gradient norm: 0.7175: 58%|#####8 | 365/625 [01:18<00:55, 4.69it/s]
reward: -1.7943, last reward: -0.0099, gradient norm: 1.164: 58%|#####8 | 365/625 [01:19<00:55, 4.69it/s]
reward: -1.7943, last reward: -0.0099, gradient norm: 1.164: 59%|#####8 | 366/625 [01:19<00:55, 4.69it/s]
reward: -1.6531, last reward: -0.0294, gradient norm: 1.681: 59%|#####8 | 366/625 [01:19<00:55, 4.69it/s]
reward: -1.6531, last reward: -0.0294, gradient norm: 1.681: 59%|#####8 | 367/625 [01:19<00:54, 4.69it/s]
reward: -1.5533, last reward: -0.0157, gradient norm: 1.134: 59%|#####8 | 367/625 [01:19<00:54, 4.69it/s]
reward: -1.5533, last reward: -0.0157, gradient norm: 1.134: 59%|#####8 | 368/625 [01:19<00:54, 4.68it/s]
reward: -1.9115, last reward: -0.0029, gradient norm: 1.042: 59%|#####8 | 368/625 [01:19<00:54, 4.68it/s]
reward: -1.9115, last reward: -0.0029, gradient norm: 1.042: 59%|#####9 | 369/625 [01:19<00:54, 4.70it/s]
reward: -1.1716, last reward: -0.0229, gradient norm: 2.404: 59%|#####9 | 369/625 [01:20<00:54, 4.70it/s]
reward: -1.1716, last reward: -0.0229, gradient norm: 2.404: 59%|#####9 | 370/625 [01:20<00:54, 4.69it/s]
reward: -1.5291, last reward: -0.0056, gradient norm: 2.314: 59%|#####9 | 370/625 [01:20<00:54, 4.69it/s]
reward: -1.5291, last reward: -0.0056, gradient norm: 2.314: 59%|#####9 | 371/625 [01:20<00:54, 4.68it/s]
reward: -1.2985, last reward: -0.0036, gradient norm: 0.5588: 59%|#####9 | 371/625 [01:20<00:54, 4.68it/s]
reward: -1.2985, last reward: -0.0036, gradient norm: 0.5588: 60%|#####9 | 372/625 [01:20<00:53, 4.69it/s]
reward: -1.5669, last reward: -0.0116, gradient norm: 5.583: 60%|#####9 | 372/625 [01:20<00:53, 4.69it/s]
reward: -1.5669, last reward: -0.0116, gradient norm: 5.583: 60%|#####9 | 373/625 [01:20<00:53, 4.70it/s]
reward: -1.6198, last reward: -0.0146, gradient norm: 1.875: 60%|#####9 | 373/625 [01:20<00:53, 4.70it/s]
reward: -1.6198, last reward: -0.0146, gradient norm: 1.875: 60%|#####9 | 374/625 [01:20<00:53, 4.70it/s]
reward: -1.8944, last reward: -0.0326, gradient norm: 2.637: 60%|#####9 | 374/625 [01:21<00:53, 4.70it/s]
reward: -1.8944, last reward: -0.0326, gradient norm: 2.637: 60%|###### | 375/625 [01:21<00:53, 4.70it/s]
reward: -1.6721, last reward: -0.0668, gradient norm: 2.859: 60%|###### | 375/625 [01:21<00:53, 4.70it/s]
reward: -1.6721, last reward: -0.0668, gradient norm: 2.859: 60%|###### | 376/625 [01:21<00:53, 4.70it/s]
reward: -1.5347, last reward: -0.0077, gradient norm: 0.4588: 60%|###### | 376/625 [01:21<00:53, 4.70it/s]
reward: -1.5347, last reward: -0.0077, gradient norm: 0.4588: 60%|###### | 377/625 [01:21<00:52, 4.70it/s]
reward: -2.3007, last reward: -1.8932, gradient norm: 155.2: 60%|###### | 377/625 [01:21<00:52, 4.70it/s]
reward: -2.3007, last reward: -1.8932, gradient norm: 155.2: 60%|###### | 378/625 [01:21<00:52, 4.69it/s]
reward: -1.8112, last reward: -0.8907, gradient norm: 141.6: 60%|###### | 378/625 [01:21<00:52, 4.69it/s]
reward: -1.8112, last reward: -0.8907, gradient norm: 141.6: 61%|###### | 379/625 [01:21<00:52, 4.69it/s]
reward: -1.7125, last reward: -0.3342, gradient norm: 15.16: 61%|###### | 379/625 [01:22<00:52, 4.69it/s]
reward: -1.7125, last reward: -0.3342, gradient norm: 15.16: 61%|###### | 380/625 [01:22<00:52, 4.69it/s]
reward: -1.5495, last reward: -0.4883, gradient norm: 34.48: 61%|###### | 380/625 [01:22<00:52, 4.69it/s]
reward: -1.5495, last reward: -0.4883, gradient norm: 34.48: 61%|###### | 381/625 [01:22<00:52, 4.69it/s]
reward: -1.5932, last reward: -2.5894, gradient norm: 235.4: 61%|###### | 381/625 [01:22<00:52, 4.69it/s]
reward: -1.5932, last reward: -2.5894, gradient norm: 235.4: 61%|######1 | 382/625 [01:22<00:52, 4.67it/s]
reward: -1.2909, last reward: -0.0687, gradient norm: 6.679: 61%|######1 | 382/625 [01:22<00:52, 4.67it/s]
reward: -1.2909, last reward: -0.0687, gradient norm: 6.679: 61%|######1 | 383/625 [01:22<00:51, 4.68it/s]
reward: -1.1632, last reward: -0.0053, gradient norm: 0.951: 61%|######1 | 383/625 [01:23<00:51, 4.68it/s]
reward: -1.1632, last reward: -0.0053, gradient norm: 0.951: 61%|######1 | 384/625 [01:23<01:02, 3.84it/s]
reward: -1.6505, last reward: -0.0037, gradient norm: 19.98: 61%|######1 | 384/625 [01:23<01:02, 3.84it/s]
reward: -1.6505, last reward: -0.0037, gradient norm: 19.98: 62%|######1 | 385/625 [01:23<00:59, 4.06it/s]
reward: -1.6624, last reward: -0.0007, gradient norm: 0.937: 62%|######1 | 385/625 [01:23<00:59, 4.06it/s]
reward: -1.6624, last reward: -0.0007, gradient norm: 0.937: 62%|######1 | 386/625 [01:23<00:56, 4.22it/s]
reward: -1.7032, last reward: -0.0008, gradient norm: 0.5093: 62%|######1 | 386/625 [01:23<00:56, 4.22it/s]
reward: -1.7032, last reward: -0.0008, gradient norm: 0.5093: 62%|######1 | 387/625 [01:23<00:54, 4.35it/s]
reward: -1.5093, last reward: -0.0004, gradient norm: 0.2745: 62%|######1 | 387/625 [01:24<00:54, 4.35it/s]
reward: -1.5093, last reward: -0.0004, gradient norm: 0.2745: 62%|######2 | 388/625 [01:24<00:53, 4.46it/s]
reward: -1.4884, last reward: -0.0014, gradient norm: 0.5418: 62%|######2 | 388/625 [01:24<00:53, 4.46it/s]
reward: -1.4884, last reward: -0.0014, gradient norm: 0.5418: 62%|######2 | 389/625 [01:24<00:52, 4.52it/s]
reward: -1.6994, last reward: -0.0008, gradient norm: 1.155: 62%|######2 | 389/625 [01:24<00:52, 4.52it/s]
reward: -1.6994, last reward: -0.0008, gradient norm: 1.155: 62%|######2 | 390/625 [01:24<00:51, 4.57it/s]
reward: -1.3727, last reward: -0.0004, gradient norm: 0.3424: 62%|######2 | 390/625 [01:24<00:51, 4.57it/s]
reward: -1.3727, last reward: -0.0004, gradient norm: 0.3424: 63%|######2 | 391/625 [01:24<00:50, 4.61it/s]
reward: -1.3023, last reward: -0.0005, gradient norm: 0.2207: 63%|######2 | 391/625 [01:24<00:50, 4.61it/s]
reward: -1.3023, last reward: -0.0005, gradient norm: 0.2207: 63%|######2 | 392/625 [01:24<00:50, 4.64it/s]
reward: -1.5339, last reward: -0.0011, gradient norm: 1.042: 63%|######2 | 392/625 [01:25<00:50, 4.64it/s]
reward: -1.5339, last reward: -0.0011, gradient norm: 1.042: 63%|######2 | 393/625 [01:25<00:49, 4.65it/s]
reward: -1.5881, last reward: -0.0077, gradient norm: 2.806: 63%|######2 | 393/625 [01:25<00:49, 4.65it/s]
reward: -1.5881, last reward: -0.0077, gradient norm: 2.806: 63%|######3 | 394/625 [01:25<00:49, 4.66it/s]
reward: -1.4203, last reward: -0.0143, gradient norm: 1.709: 63%|######3 | 394/625 [01:25<00:49, 4.66it/s]
reward: -1.4203, last reward: -0.0143, gradient norm: 1.709: 63%|######3 | 395/625 [01:25<00:49, 4.63it/s]
reward: -1.7187, last reward: -0.0012, gradient norm: 0.8341: 63%|######3 | 395/625 [01:25<00:49, 4.63it/s]
reward: -1.7187, last reward: -0.0012, gradient norm: 0.8341: 63%|######3 | 396/625 [01:25<00:49, 4.61it/s]
reward: -1.6921, last reward: -0.0073, gradient norm: 2.281: 63%|######3 | 396/625 [01:25<00:49, 4.61it/s]
reward: -1.6921, last reward: -0.0073, gradient norm: 2.281: 64%|######3 | 397/625 [01:25<00:49, 4.61it/s]
reward: -1.9230, last reward: -1.6310, gradient norm: 73.2: 64%|######3 | 397/625 [01:26<00:49, 4.61it/s]
reward: -1.9230, last reward: -1.6310, gradient norm: 73.2: 64%|######3 | 398/625 [01:26<00:49, 4.61it/s]
reward: -1.8281, last reward: -1.4022, gradient norm: 118.1: 64%|######3 | 398/625 [01:26<00:49, 4.61it/s]
reward: -1.8281, last reward: -1.4022, gradient norm: 118.1: 64%|######3 | 399/625 [01:26<00:48, 4.62it/s]
reward: -1.4757, last reward: -0.0104, gradient norm: 5.669: 64%|######3 | 399/625 [01:26<00:48, 4.62it/s]
reward: -1.4757, last reward: -0.0104, gradient norm: 5.669: 64%|######4 | 400/625 [01:26<00:48, 4.62it/s]
reward: -1.5044, last reward: -0.0060, gradient norm: 15.93: 64%|######4 | 400/625 [01:26<00:48, 4.62it/s]
reward: -1.5044, last reward: -0.0060, gradient norm: 15.93: 64%|######4 | 401/625 [01:26<00:48, 4.62it/s]
reward: -1.3720, last reward: -0.0159, gradient norm: 2.022: 64%|######4 | 401/625 [01:27<00:48, 4.62it/s]
reward: -1.3720, last reward: -0.0159, gradient norm: 2.022: 64%|######4 | 402/625 [01:27<00:48, 4.63it/s]
reward: -1.5112, last reward: -0.0009, gradient norm: 0.9434: 64%|######4 | 402/625 [01:27<00:48, 4.63it/s]
reward: -1.5112, last reward: -0.0009, gradient norm: 0.9434: 64%|######4 | 403/625 [01:27<00:47, 4.64it/s]
reward: -1.4578, last reward: -0.0001, gradient norm: 0.5974: 64%|######4 | 403/625 [01:27<00:47, 4.64it/s]
reward: -1.4578, last reward: -0.0001, gradient norm: 0.5974: 65%|######4 | 404/625 [01:27<00:47, 4.65it/s]
reward: -1.3730, last reward: -0.0007, gradient norm: 0.2986: 65%|######4 | 404/625 [01:27<00:47, 4.65it/s]
reward: -1.3730, last reward: -0.0007, gradient norm: 0.2986: 65%|######4 | 405/625 [01:27<00:47, 4.65it/s]
reward: -1.3626, last reward: -0.0001, gradient norm: 0.2114: 65%|######4 | 405/625 [01:27<00:47, 4.65it/s]
reward: -1.3626, last reward: -0.0001, gradient norm: 0.2114: 65%|######4 | 406/625 [01:27<00:47, 4.65it/s]
reward: -1.6432, last reward: -0.2341, gradient norm: 0.4365: 65%|######4 | 406/625 [01:28<00:47, 4.65it/s]
reward: -1.6432, last reward: -0.2341, gradient norm: 0.4365: 65%|######5 | 407/625 [01:28<00:46, 4.65it/s]
reward: -1.2308, last reward: -0.0005, gradient norm: 0.3743: 65%|######5 | 407/625 [01:28<00:46, 4.65it/s]
reward: -1.2308, last reward: -0.0005, gradient norm: 0.3743: 65%|######5 | 408/625 [01:28<00:46, 4.67it/s]
reward: -1.5764, last reward: -0.0021, gradient norm: 0.5815: 65%|######5 | 408/625 [01:28<00:46, 4.67it/s]
reward: -1.5764, last reward: -0.0021, gradient norm: 0.5815: 65%|######5 | 409/625 [01:28<00:46, 4.67it/s]
reward: -1.4319, last reward: -0.0000, gradient norm: 0.1681: 65%|######5 | 409/625 [01:28<00:46, 4.67it/s]
reward: -1.4319, last reward: -0.0000, gradient norm: 0.1681: 66%|######5 | 410/625 [01:28<00:45, 4.68it/s]
reward: -1.6992, last reward: -0.0016, gradient norm: 0.5186: 66%|######5 | 410/625 [01:28<00:45, 4.68it/s]
reward: -1.6992, last reward: -0.0016, gradient norm: 0.5186: 66%|######5 | 411/625 [01:28<00:45, 4.68it/s]
reward: -1.6617, last reward: -0.0001, gradient norm: 0.4305: 66%|######5 | 411/625 [01:29<00:45, 4.68it/s]
reward: -1.6617, last reward: -0.0001, gradient norm: 0.4305: 66%|######5 | 412/625 [01:29<00:45, 4.68it/s]
reward: -1.4947, last reward: -0.0002, gradient norm: 1.255: 66%|######5 | 412/625 [01:29<00:45, 4.68it/s]
reward: -1.4947, last reward: -0.0002, gradient norm: 1.255: 66%|######6 | 413/625 [01:29<00:45, 4.69it/s]
reward: -1.5021, last reward: -0.0022, gradient norm: 0.7673: 66%|######6 | 413/625 [01:29<00:45, 4.69it/s]
reward: -1.5021, last reward: -0.0022, gradient norm: 0.7673: 66%|######6 | 414/625 [01:29<00:44, 4.69it/s]
reward: -1.4885, last reward: -0.0032, gradient norm: 0.9689: 66%|######6 | 414/625 [01:29<00:44, 4.69it/s]
reward: -1.4885, last reward: -0.0032, gradient norm: 0.9689: 66%|######6 | 415/625 [01:29<00:44, 4.71it/s]
reward: -1.4654, last reward: -0.0040, gradient norm: 1.532: 66%|######6 | 415/625 [01:30<00:44, 4.71it/s]
reward: -1.4654, last reward: -0.0040, gradient norm: 1.532: 67%|######6 | 416/625 [01:30<00:44, 4.72it/s]
reward: -1.2302, last reward: -0.0030, gradient norm: 0.8157: 67%|######6 | 416/625 [01:30<00:44, 4.72it/s]
reward: -1.2302, last reward: -0.0030, gradient norm: 0.8157: 67%|######6 | 417/625 [01:30<00:44, 4.70it/s]
reward: -1.7434, last reward: -0.0017, gradient norm: 1.243: 67%|######6 | 417/625 [01:30<00:44, 4.70it/s]
reward: -1.7434, last reward: -0.0017, gradient norm: 1.243: 67%|######6 | 418/625 [01:30<00:44, 4.70it/s]
reward: -1.4113, last reward: -0.0194, gradient norm: 3.283: 67%|######6 | 418/625 [01:30<00:44, 4.70it/s]
reward: -1.4113, last reward: -0.0194, gradient norm: 3.283: 67%|######7 | 419/625 [01:30<00:43, 4.70it/s]
reward: -1.4460, last reward: -0.0011, gradient norm: 2.258: 67%|######7 | 419/625 [01:30<00:43, 4.70it/s]
reward: -1.4460, last reward: -0.0011, gradient norm: 2.258: 67%|######7 | 420/625 [01:30<00:43, 4.70it/s]
reward: -2.0839, last reward: -3.5504, gradient norm: 199.9: 67%|######7 | 420/625 [01:31<00:43, 4.70it/s]
reward: -2.0839, last reward: -3.5504, gradient norm: 199.9: 67%|######7 | 421/625 [01:31<00:43, 4.70it/s]
reward: -2.1982, last reward: -2.8964, gradient norm: 118.3: 67%|######7 | 421/625 [01:31<00:43, 4.70it/s]
reward: -2.1982, last reward: -2.8964, gradient norm: 118.3: 68%|######7 | 422/625 [01:31<00:43, 4.70it/s]
reward: -1.2666, last reward: -0.0095, gradient norm: 1.44: 68%|######7 | 422/625 [01:31<00:43, 4.70it/s]
reward: -1.2666, last reward: -0.0095, gradient norm: 1.44: 68%|######7 | 423/625 [01:31<00:42, 4.70it/s]
reward: -1.1791, last reward: -0.0603, gradient norm: 6.826: 68%|######7 | 423/625 [01:31<00:42, 4.70it/s]
reward: -1.1791, last reward: -0.0603, gradient norm: 6.826: 68%|######7 | 424/625 [01:31<00:42, 4.71it/s]
reward: -1.8326, last reward: -0.1098, gradient norm: 7.525: 68%|######7 | 424/625 [01:31<00:42, 4.71it/s]
reward: -1.8326, last reward: -0.1098, gradient norm: 7.525: 68%|######8 | 425/625 [01:31<00:42, 4.72it/s]
reward: -1.4695, last reward: -0.0470, gradient norm: 3.198: 68%|######8 | 425/625 [01:32<00:42, 4.72it/s]
reward: -1.4695, last reward: -0.0470, gradient norm: 3.198: 68%|######8 | 426/625 [01:32<00:42, 4.72it/s]
reward: -1.5614, last reward: -0.0002, gradient norm: 1.017: 68%|######8 | 426/625 [01:32<00:42, 4.72it/s]
reward: -1.5614, last reward: -0.0002, gradient norm: 1.017: 68%|######8 | 427/625 [01:32<00:42, 4.70it/s]
reward: -1.9240, last reward: -0.0116, gradient norm: 2.609: 68%|######8 | 427/625 [01:32<00:42, 4.70it/s]
reward: -1.9240, last reward: -0.0116, gradient norm: 2.609: 68%|######8 | 428/625 [01:32<00:41, 4.70it/s]
reward: -1.3869, last reward: -0.0119, gradient norm: 1.631: 68%|######8 | 428/625 [01:32<00:41, 4.70it/s]
reward: -1.3869, last reward: -0.0119, gradient norm: 1.631: 69%|######8 | 429/625 [01:32<00:41, 4.68it/s]
reward: -1.4093, last reward: -0.0001, gradient norm: 0.449: 69%|######8 | 429/625 [01:33<00:41, 4.68it/s]
reward: -1.4093, last reward: -0.0001, gradient norm: 0.449: 69%|######8 | 430/625 [01:33<00:41, 4.68it/s]
reward: -1.2777, last reward: -0.0025, gradient norm: 1.535: 69%|######8 | 430/625 [01:33<00:41, 4.68it/s]
reward: -1.2777, last reward: -0.0025, gradient norm: 1.535: 69%|######8 | 431/625 [01:33<00:41, 4.68it/s]
reward: -1.4379, last reward: -0.0014, gradient norm: 0.8076: 69%|######8 | 431/625 [01:33<00:41, 4.68it/s]
reward: -1.4379, last reward: -0.0014, gradient norm: 0.8076: 69%|######9 | 432/625 [01:33<00:41, 4.69it/s]
reward: -1.5205, last reward: -0.0012, gradient norm: 0.3251: 69%|######9 | 432/625 [01:33<00:41, 4.69it/s]
reward: -1.5205, last reward: -0.0012, gradient norm: 0.3251: 69%|######9 | 433/625 [01:33<00:40, 4.69it/s]
reward: -1.5520, last reward: -0.0083, gradient norm: 0.8056: 69%|######9 | 433/625 [01:33<00:40, 4.69it/s]
reward: -1.5520, last reward: -0.0083, gradient norm: 0.8056: 69%|######9 | 434/625 [01:33<00:40, 4.70it/s]
reward: -1.3351, last reward: -0.0048, gradient norm: 0.5822: 69%|######9 | 434/625 [01:34<00:40, 4.70it/s]
reward: -1.3351, last reward: -0.0048, gradient norm: 0.5822: 70%|######9 | 435/625 [01:34<00:40, 4.71it/s]
reward: -1.5745, last reward: -0.0000, gradient norm: 0.227: 70%|######9 | 435/625 [01:34<00:40, 4.71it/s]
reward: -1.5745, last reward: -0.0000, gradient norm: 0.227: 70%|######9 | 436/625 [01:34<00:40, 4.72it/s]
reward: -1.4506, last reward: -0.0026, gradient norm: 0.639: 70%|######9 | 436/625 [01:34<00:40, 4.72it/s]
reward: -1.4506, last reward: -0.0026, gradient norm: 0.639: 70%|######9 | 437/625 [01:34<00:39, 4.71it/s]
reward: -1.7225, last reward: -0.0023, gradient norm: 0.5663: 70%|######9 | 437/625 [01:34<00:39, 4.71it/s]
reward: -1.7225, last reward: -0.0023, gradient norm: 0.5663: 70%|####### | 438/625 [01:34<00:39, 4.71it/s]
reward: -1.2565, last reward: -0.0000, gradient norm: 0.2317: 70%|####### | 438/625 [01:34<00:39, 4.71it/s]
reward: -1.2565, last reward: -0.0000, gradient norm: 0.2317: 70%|####### | 439/625 [01:34<00:39, 4.70it/s]
reward: -1.5819, last reward: -0.0037, gradient norm: 0.6664: 70%|####### | 439/625 [01:35<00:39, 4.70it/s]
reward: -1.5819, last reward: -0.0037, gradient norm: 0.6664: 70%|####### | 440/625 [01:35<00:39, 4.69it/s]
reward: -1.5609, last reward: -0.0035, gradient norm: 0.6732: 70%|####### | 440/625 [01:35<00:39, 4.69it/s]
reward: -1.5609, last reward: -0.0035, gradient norm: 0.6732: 71%|####### | 441/625 [01:35<00:39, 4.70it/s]
reward: -1.6137, last reward: -0.0000, gradient norm: 1.808: 71%|####### | 441/625 [01:35<00:39, 4.70it/s]
reward: -1.6137, last reward: -0.0000, gradient norm: 1.808: 71%|####### | 442/625 [01:35<00:38, 4.70it/s]
reward: -1.5905, last reward: -0.0055, gradient norm: 0.8675: 71%|####### | 442/625 [01:35<00:38, 4.70it/s]
reward: -1.5905, last reward: -0.0055, gradient norm: 0.8675: 71%|####### | 443/625 [01:35<00:38, 4.71it/s]
reward: -1.6261, last reward: -0.0022, gradient norm: 0.59: 71%|####### | 443/625 [01:35<00:38, 4.71it/s]
reward: -1.6261, last reward: -0.0022, gradient norm: 0.59: 71%|#######1 | 444/625 [01:35<00:38, 4.72it/s]
reward: -1.6577, last reward: -0.0023, gradient norm: 0.4645: 71%|#######1 | 444/625 [01:36<00:38, 4.72it/s]
reward: -1.6577, last reward: -0.0023, gradient norm: 0.4645: 71%|#######1 | 445/625 [01:36<00:38, 4.72it/s]
reward: -1.7289, last reward: -0.0087, gradient norm: 2.809: 71%|#######1 | 445/625 [01:36<00:38, 4.72it/s]
reward: -1.7289, last reward: -0.0087, gradient norm: 2.809: 71%|#######1 | 446/625 [01:36<00:37, 4.72it/s]
reward: -1.5872, last reward: -0.0098, gradient norm: 1.311: 71%|#######1 | 446/625 [01:36<00:37, 4.72it/s]
reward: -1.5872, last reward: -0.0098, gradient norm: 1.311: 72%|#######1 | 447/625 [01:36<00:37, 4.71it/s]
reward: -1.5591, last reward: -0.0030, gradient norm: 1.196: 72%|#######1 | 447/625 [01:36<00:37, 4.71it/s]
reward: -1.5591, last reward: -0.0030, gradient norm: 1.196: 72%|#######1 | 448/625 [01:36<00:37, 4.70it/s]
reward: -1.6123, last reward: -0.0037, gradient norm: 1.6: 72%|#######1 | 448/625 [01:37<00:37, 4.70it/s]
reward: -1.6123, last reward: -0.0037, gradient norm: 1.6: 72%|#######1 | 449/625 [01:37<00:37, 4.69it/s]
reward: -1.5526, last reward: -0.0160, gradient norm: 2.141: 72%|#######1 | 449/625 [01:37<00:37, 4.69it/s]
reward: -1.5526, last reward: -0.0160, gradient norm: 2.141: 72%|#######2 | 450/625 [01:37<00:37, 4.68it/s]
reward: -1.6889, last reward: -0.0092, gradient norm: 23.41: 72%|#######2 | 450/625 [01:37<00:37, 4.68it/s]
reward: -1.6889, last reward: -0.0092, gradient norm: 23.41: 72%|#######2 | 451/625 [01:37<00:37, 4.67it/s]
reward: -1.4475, last reward: -0.0289, gradient norm: 3.768: 72%|#######2 | 451/625 [01:37<00:37, 4.67it/s]
reward: -1.4475, last reward: -0.0289, gradient norm: 3.768: 72%|#######2 | 452/625 [01:37<00:37, 4.67it/s]
reward: -1.1548, last reward: -0.0313, gradient norm: 4.48: 72%|#######2 | 452/625 [01:37<00:37, 4.67it/s]
reward: -1.1548, last reward: -0.0313, gradient norm: 4.48: 72%|#######2 | 453/625 [01:37<00:36, 4.66it/s]
reward: -1.1888, last reward: -0.0032, gradient norm: 1.15: 72%|#######2 | 453/625 [01:38<00:36, 4.66it/s]
reward: -1.1888, last reward: -0.0032, gradient norm: 1.15: 73%|#######2 | 454/625 [01:38<00:36, 4.66it/s]
reward: -1.4562, last reward: -0.0036, gradient norm: 1.547: 73%|#######2 | 454/625 [01:38<00:36, 4.66it/s]
reward: -1.4562, last reward: -0.0036, gradient norm: 1.547: 73%|#######2 | 455/625 [01:38<00:36, 4.69it/s]
reward: -1.3280, last reward: -0.0092, gradient norm: 1.753: 73%|#######2 | 455/625 [01:38<00:36, 4.69it/s]
reward: -1.3280, last reward: -0.0092, gradient norm: 1.753: 73%|#######2 | 456/625 [01:38<00:36, 4.68it/s]
reward: -1.5343, last reward: -0.0012, gradient norm: 1.206: 73%|#######2 | 456/625 [01:38<00:36, 4.68it/s]
reward: -1.5343, last reward: -0.0012, gradient norm: 1.206: 73%|#######3 | 457/625 [01:38<00:35, 4.68it/s]
reward: -1.4145, last reward: -0.0197, gradient norm: 2.325: 73%|#######3 | 457/625 [01:38<00:35, 4.68it/s]
reward: -1.4145, last reward: -0.0197, gradient norm: 2.325: 73%|#######3 | 458/625 [01:38<00:35, 4.69it/s]
reward: -1.5966, last reward: -0.0124, gradient norm: 1.405: 73%|#######3 | 458/625 [01:39<00:35, 4.69it/s]
reward: -1.5966, last reward: -0.0124, gradient norm: 1.405: 73%|#######3 | 459/625 [01:39<00:35, 4.70it/s]
reward: -1.0541, last reward: -0.0016, gradient norm: 1.498: 73%|#######3 | 459/625 [01:39<00:35, 4.70it/s]
reward: -1.0541, last reward: -0.0016, gradient norm: 1.498: 74%|#######3 | 460/625 [01:39<00:35, 4.71it/s]
reward: -1.3095, last reward: -0.0026, gradient norm: 1.249: 74%|#######3 | 460/625 [01:39<00:35, 4.71it/s]
reward: -1.3095, last reward: -0.0026, gradient norm: 1.249: 74%|#######3 | 461/625 [01:39<00:34, 4.70it/s]
reward: -1.2685, last reward: -0.0027, gradient norm: 1.252: 74%|#######3 | 461/625 [01:39<00:34, 4.70it/s]
reward: -1.2685, last reward: -0.0027, gradient norm: 1.252: 74%|#######3 | 462/625 [01:39<00:34, 4.70it/s]
reward: -1.4529, last reward: -0.0061, gradient norm: 0.7985: 74%|#######3 | 462/625 [01:40<00:34, 4.70it/s]
reward: -1.4529, last reward: -0.0061, gradient norm: 0.7985: 74%|#######4 | 463/625 [01:40<00:34, 4.71it/s]
reward: -1.3977, last reward: -0.0001, gradient norm: 0.2221: 74%|#######4 | 463/625 [01:40<00:34, 4.71it/s]
reward: -1.3977, last reward: -0.0001, gradient norm: 0.2221: 74%|#######4 | 464/625 [01:40<00:34, 4.72it/s]
reward: -1.4589, last reward: -0.0025, gradient norm: 0.5544: 74%|#######4 | 464/625 [01:40<00:34, 4.72it/s]
reward: -1.4589, last reward: -0.0025, gradient norm: 0.5544: 74%|#######4 | 465/625 [01:40<00:33, 4.71it/s]
reward: -1.3277, last reward: -0.0022, gradient norm: 0.5298: 74%|#######4 | 465/625 [01:40<00:33, 4.71it/s]
reward: -1.3277, last reward: -0.0022, gradient norm: 0.5298: 75%|#######4 | 466/625 [01:40<00:33, 4.70it/s]
reward: -1.5211, last reward: -0.0001, gradient norm: 0.398: 75%|#######4 | 466/625 [01:40<00:33, 4.70it/s]
reward: -1.5211, last reward: -0.0001, gradient norm: 0.398: 75%|#######4 | 467/625 [01:40<00:33, 4.70it/s]
reward: -1.4884, last reward: -0.0008, gradient norm: 0.3063: 75%|#######4 | 467/625 [01:41<00:33, 4.70it/s]
reward: -1.4884, last reward: -0.0008, gradient norm: 0.3063: 75%|#######4 | 468/625 [01:41<00:33, 4.69it/s]
reward: -1.4400, last reward: -0.0007, gradient norm: 0.3281: 75%|#######4 | 468/625 [01:41<00:33, 4.69it/s]
reward: -1.4400, last reward: -0.0007, gradient norm: 0.3281: 75%|#######5 | 469/625 [01:41<00:33, 4.69it/s]
reward: -1.4361, last reward: -0.0000, gradient norm: 0.1585: 75%|#######5 | 469/625 [01:41<00:33, 4.69it/s]
reward: -1.4361, last reward: -0.0000, gradient norm: 0.1585: 75%|#######5 | 470/625 [01:41<00:33, 4.69it/s]
reward: -1.4534, last reward: -0.0002, gradient norm: 0.3085: 75%|#######5 | 470/625 [01:41<00:33, 4.69it/s]
reward: -1.4534, last reward: -0.0002, gradient norm: 0.3085: 75%|#######5 | 471/625 [01:41<00:32, 4.68it/s]
reward: -1.2973, last reward: -0.0001, gradient norm: 0.1739: 75%|#######5 | 471/625 [01:41<00:32, 4.68it/s]
reward: -1.2973, last reward: -0.0001, gradient norm: 0.1739: 76%|#######5 | 472/625 [01:41<00:32, 4.68it/s]
reward: -1.7402, last reward: -0.0012, gradient norm: 0.3267: 76%|#######5 | 472/625 [01:42<00:32, 4.68it/s]
reward: -1.7402, last reward: -0.0012, gradient norm: 0.3267: 76%|#######5 | 473/625 [01:42<00:32, 4.67it/s]
reward: -1.5496, last reward: -0.0010, gradient norm: 0.302: 76%|#######5 | 473/625 [01:42<00:32, 4.67it/s]
reward: -1.5496, last reward: -0.0010, gradient norm: 0.302: 76%|#######5 | 474/625 [01:42<00:32, 4.68it/s]
reward: -1.4540, last reward: -0.0001, gradient norm: 0.6475: 76%|#######5 | 474/625 [01:42<00:32, 4.68it/s]
reward: -1.4540, last reward: -0.0001, gradient norm: 0.6475: 76%|#######6 | 475/625 [01:42<00:32, 4.67it/s]
reward: -1.3286, last reward: -0.0002, gradient norm: 0.338: 76%|#######6 | 475/625 [01:42<00:32, 4.67it/s]
reward: -1.3286, last reward: -0.0002, gradient norm: 0.338: 76%|#######6 | 476/625 [01:42<00:31, 4.68it/s]
reward: -1.6167, last reward: -0.0013, gradient norm: 0.8368: 76%|#######6 | 476/625 [01:43<00:31, 4.68it/s]
reward: -1.6167, last reward: -0.0013, gradient norm: 0.8368: 76%|#######6 | 477/625 [01:43<00:31, 4.67it/s]
reward: -1.2881, last reward: -0.0023, gradient norm: 0.9596: 76%|#######6 | 477/625 [01:43<00:31, 4.67it/s]
reward: -1.2881, last reward: -0.0023, gradient norm: 0.9596: 76%|#######6 | 478/625 [01:43<00:31, 4.67it/s]
reward: -1.4493, last reward: -0.0022, gradient norm: 1.031: 76%|#######6 | 478/625 [01:43<00:31, 4.67it/s]
reward: -1.4493, last reward: -0.0022, gradient norm: 1.031: 77%|#######6 | 479/625 [01:43<00:31, 4.66it/s]
reward: -1.4837, last reward: -0.0030, gradient norm: 1.228: 77%|#######6 | 479/625 [01:43<00:31, 4.66it/s]
reward: -1.4837, last reward: -0.0030, gradient norm: 1.228: 77%|#######6 | 480/625 [01:43<00:31, 4.67it/s]
reward: -1.7082, last reward: -0.0029, gradient norm: 0.8823: 77%|#######6 | 480/625 [01:43<00:31, 4.67it/s]
reward: -1.7082, last reward: -0.0029, gradient norm: 0.8823: 77%|#######6 | 481/625 [01:43<00:30, 4.67it/s]
reward: -1.5423, last reward: -0.0008, gradient norm: 0.7685: 77%|#######6 | 481/625 [01:44<00:30, 4.67it/s]
reward: -1.5423, last reward: -0.0008, gradient norm: 0.7685: 77%|#######7 | 482/625 [01:44<00:30, 4.67it/s]
reward: -1.2845, last reward: -0.0018, gradient norm: 0.8603: 77%|#######7 | 482/625 [01:44<00:30, 4.67it/s]
reward: -1.2845, last reward: -0.0018, gradient norm: 0.8603: 77%|#######7 | 483/625 [01:44<00:30, 4.65it/s]
reward: -1.2145, last reward: -0.0098, gradient norm: 2.554: 77%|#######7 | 483/625 [01:44<00:30, 4.65it/s]
reward: -1.2145, last reward: -0.0098, gradient norm: 2.554: 77%|#######7 | 484/625 [01:44<00:30, 4.66it/s]
reward: -1.2176, last reward: -0.0019, gradient norm: 1.948: 77%|#######7 | 484/625 [01:44<00:30, 4.66it/s]
reward: -1.2176, last reward: -0.0019, gradient norm: 1.948: 78%|#######7 | 485/625 [01:44<00:30, 4.66it/s]
reward: -1.5756, last reward: -0.0102, gradient norm: 1.966: 78%|#######7 | 485/625 [01:44<00:30, 4.66it/s]
reward: -1.5756, last reward: -0.0102, gradient norm: 1.966: 78%|#######7 | 486/625 [01:44<00:29, 4.66it/s]
reward: -1.6738, last reward: -0.0490, gradient norm: 23.37: 78%|#######7 | 486/625 [01:45<00:29, 4.66it/s]
reward: -1.6738, last reward: -0.0490, gradient norm: 23.37: 78%|#######7 | 487/625 [01:45<00:29, 4.67it/s]
reward: -1.5572, last reward: -0.0064, gradient norm: 1.638: 78%|#######7 | 487/625 [01:45<00:29, 4.67it/s]
reward: -1.5572, last reward: -0.0064, gradient norm: 1.638: 78%|#######8 | 488/625 [01:45<00:29, 4.66it/s]
reward: -1.6137, last reward: -0.0020, gradient norm: 1.071: 78%|#######8 | 488/625 [01:45<00:29, 4.66it/s]
reward: -1.6137, last reward: -0.0020, gradient norm: 1.071: 78%|#######8 | 489/625 [01:45<00:29, 4.65it/s]
reward: -1.7103, last reward: -0.0032, gradient norm: 2.9: 78%|#######8 | 489/625 [01:45<00:29, 4.65it/s]
reward: -1.7103, last reward: -0.0032, gradient norm: 2.9: 78%|#######8 | 490/625 [01:45<00:29, 4.64it/s]
reward: -1.6047, last reward: -0.0024, gradient norm: 0.9261: 78%|#######8 | 490/625 [01:46<00:29, 4.64it/s]
reward: -1.6047, last reward: -0.0024, gradient norm: 0.9261: 79%|#######8 | 491/625 [01:46<00:28, 4.63it/s]
reward: -1.3480, last reward: -0.0142, gradient norm: 2.556: 79%|#######8 | 491/625 [01:46<00:28, 4.63it/s]
reward: -1.3480, last reward: -0.0142, gradient norm: 2.556: 79%|#######8 | 492/625 [01:46<00:28, 4.62it/s]
reward: -1.4914, last reward: -0.0045, gradient norm: 1.001: 79%|#######8 | 492/625 [01:46<00:28, 4.62it/s]
reward: -1.4914, last reward: -0.0045, gradient norm: 1.001: 79%|#######8 | 493/625 [01:46<00:28, 4.62it/s]
reward: -1.4439, last reward: -0.0156, gradient norm: 2.566: 79%|#######8 | 493/625 [01:46<00:28, 4.62it/s]
reward: -1.4439, last reward: -0.0156, gradient norm: 2.566: 79%|#######9 | 494/625 [01:46<00:28, 4.63it/s]
reward: -1.7894, last reward: -0.0170, gradient norm: 2.266: 79%|#######9 | 494/625 [01:47<00:28, 4.63it/s]
reward: -1.7894, last reward: -0.0170, gradient norm: 2.266: 79%|#######9 | 495/625 [01:47<00:34, 3.80it/s]
reward: -1.4893, last reward: -0.0001, gradient norm: 0.1574: 79%|#######9 | 495/625 [01:47<00:34, 3.80it/s]
reward: -1.4893, last reward: -0.0001, gradient norm: 0.1574: 79%|#######9 | 496/625 [01:47<00:31, 4.03it/s]
reward: -1.2133, last reward: -0.0227, gradient norm: 2.788: 79%|#######9 | 496/625 [01:47<00:31, 4.03it/s]
reward: -1.2133, last reward: -0.0227, gradient norm: 2.788: 80%|#######9 | 497/625 [01:47<00:30, 4.22it/s]
reward: -1.4833, last reward: -0.0126, gradient norm: 1.781: 80%|#######9 | 497/625 [01:47<00:30, 4.22it/s]
reward: -1.4833, last reward: -0.0126, gradient norm: 1.781: 80%|#######9 | 498/625 [01:47<00:29, 4.36it/s]
reward: -1.8810, last reward: -0.0020, gradient norm: 0.644: 80%|#######9 | 498/625 [01:47<00:29, 4.36it/s]
reward: -1.8810, last reward: -0.0020, gradient norm: 0.644: 80%|#######9 | 499/625 [01:47<00:28, 4.47it/s]
reward: -1.4102, last reward: -0.0091, gradient norm: 1.477: 80%|#######9 | 499/625 [01:48<00:28, 4.47it/s]
reward: -1.4102, last reward: -0.0091, gradient norm: 1.477: 80%|######## | 500/625 [01:48<00:27, 4.54it/s]
reward: -1.2115, last reward: -0.0004, gradient norm: 0.3672: 80%|######## | 500/625 [01:48<00:27, 4.54it/s]
reward: -1.2115, last reward: -0.0004, gradient norm: 0.3672: 80%|######## | 501/625 [01:48<00:27, 4.58it/s]
reward: -1.3322, last reward: -0.0078, gradient norm: 1.117: 80%|######## | 501/625 [01:48<00:27, 4.58it/s]
reward: -1.3322, last reward: -0.0078, gradient norm: 1.117: 80%|######## | 502/625 [01:48<00:26, 4.62it/s]
reward: -1.6753, last reward: -0.0037, gradient norm: 0.6945: 80%|######## | 502/625 [01:48<00:26, 4.62it/s]
reward: -1.6753, last reward: -0.0037, gradient norm: 0.6945: 80%|######## | 503/625 [01:48<00:26, 4.64it/s]
reward: -1.5069, last reward: -0.0014, gradient norm: 0.6049: 80%|######## | 503/625 [01:48<00:26, 4.64it/s]
reward: -1.5069, last reward: -0.0014, gradient norm: 0.6049: 81%|######## | 504/625 [01:48<00:25, 4.66it/s]
reward: -1.5693, last reward: -0.0034, gradient norm: 0.8317: 81%|######## | 504/625 [01:49<00:25, 4.66it/s]
reward: -1.5693, last reward: -0.0034, gradient norm: 0.8317: 81%|######## | 505/625 [01:49<00:25, 4.63it/s]
reward: -1.2720, last reward: -0.0003, gradient norm: 0.1631: 81%|######## | 505/625 [01:49<00:25, 4.63it/s]
reward: -1.2720, last reward: -0.0003, gradient norm: 0.1631: 81%|######## | 506/625 [01:49<00:25, 4.63it/s]
reward: -1.3261, last reward: -0.0049, gradient norm: 0.9394: 81%|######## | 506/625 [01:49<00:25, 4.63it/s]
reward: -1.3261, last reward: -0.0049, gradient norm: 0.9394: 81%|########1 | 507/625 [01:49<00:25, 4.64it/s]
reward: -1.3569, last reward: -0.0001, gradient norm: 0.1566: 81%|########1 | 507/625 [01:49<00:25, 4.64it/s]
reward: -1.3569, last reward: -0.0001, gradient norm: 0.1566: 81%|########1 | 508/625 [01:49<00:25, 4.64it/s]
reward: -1.4137, last reward: -0.0021, gradient norm: 0.813: 81%|########1 | 508/625 [01:50<00:25, 4.64it/s]
reward: -1.4137, last reward: -0.0021, gradient norm: 0.813: 81%|########1 | 509/625 [01:50<00:25, 4.64it/s]
reward: -1.3788, last reward: -0.0000, gradient norm: 0.2122: 81%|########1 | 509/625 [01:50<00:25, 4.64it/s]
reward: -1.3788, last reward: -0.0000, gradient norm: 0.2122: 82%|########1 | 510/625 [01:50<00:24, 4.66it/s]
reward: -1.2391, last reward: -0.0044, gradient norm: 1.195: 82%|########1 | 510/625 [01:50<00:24, 4.66it/s]
reward: -1.2391, last reward: -0.0044, gradient norm: 1.195: 82%|########1 | 511/625 [01:50<00:24, 4.69it/s]
reward: -1.6381, last reward: -0.0000, gradient norm: 0.1186: 82%|########1 | 511/625 [01:50<00:24, 4.69it/s]
reward: -1.6381, last reward: -0.0000, gradient norm: 0.1186: 82%|########1 | 512/625 [01:50<00:24, 4.68it/s]
reward: -1.5293, last reward: -0.0034, gradient norm: 0.9467: 82%|########1 | 512/625 [01:50<00:24, 4.68it/s]
reward: -1.5293, last reward: -0.0034, gradient norm: 0.9467: 82%|########2 | 513/625 [01:50<00:23, 4.69it/s]
reward: -1.3986, last reward: -0.0004, gradient norm: 0.565: 82%|########2 | 513/625 [01:51<00:23, 4.69it/s]
reward: -1.3986, last reward: -0.0004, gradient norm: 0.565: 82%|########2 | 514/625 [01:51<00:23, 4.70it/s]
reward: -1.4558, last reward: -0.0008, gradient norm: 0.5271: 82%|########2 | 514/625 [01:51<00:23, 4.70it/s]
reward: -1.4558, last reward: -0.0008, gradient norm: 0.5271: 82%|########2 | 515/625 [01:51<00:23, 4.71it/s]
reward: -1.5310, last reward: -0.0013, gradient norm: 0.56: 82%|########2 | 515/625 [01:51<00:23, 4.71it/s]
reward: -1.5310, last reward: -0.0013, gradient norm: 0.56: 83%|########2 | 516/625 [01:51<00:23, 4.70it/s]
reward: -1.5912, last reward: -0.0001, gradient norm: 0.475: 83%|########2 | 516/625 [01:51<00:23, 4.70it/s]
reward: -1.5912, last reward: -0.0001, gradient norm: 0.475: 83%|########2 | 517/625 [01:51<00:22, 4.71it/s]
reward: -1.3495, last reward: -0.0024, gradient norm: 0.9632: 83%|########2 | 517/625 [01:51<00:22, 4.71it/s]
reward: -1.3495, last reward: -0.0024, gradient norm: 0.9632: 83%|########2 | 518/625 [01:51<00:22, 4.70it/s]
reward: -1.5113, last reward: -0.0061, gradient norm: 1.582: 83%|########2 | 518/625 [01:52<00:22, 4.70it/s]
reward: -1.5113, last reward: -0.0061, gradient norm: 1.582: 83%|########3 | 519/625 [01:52<00:22, 4.69it/s]
reward: -1.3365, last reward: -0.0000, gradient norm: 1.721: 83%|########3 | 519/625 [01:52<00:22, 4.69it/s]
reward: -1.3365, last reward: -0.0000, gradient norm: 1.721: 83%|########3 | 520/625 [01:52<00:22, 4.69it/s]
reward: -2.6718, last reward: -1.7394, gradient norm: 50.81: 83%|########3 | 520/625 [01:52<00:22, 4.69it/s]
reward: -2.6718, last reward: -1.7394, gradient norm: 50.81: 83%|########3 | 521/625 [01:52<00:22, 4.69it/s]
reward: -2.6775, last reward: -1.0681, gradient norm: 39.69: 83%|########3 | 521/625 [01:52<00:22, 4.69it/s]
reward: -2.6775, last reward: -1.0681, gradient norm: 39.69: 84%|########3 | 522/625 [01:52<00:21, 4.68it/s]
reward: -2.2930, last reward: -2.4070, gradient norm: 269.9: 84%|########3 | 522/625 [01:53<00:21, 4.68it/s]
reward: -2.2930, last reward: -2.4070, gradient norm: 269.9: 84%|########3 | 523/625 [01:53<00:21, 4.68it/s]
reward: -1.4284, last reward: -0.0481, gradient norm: 13.25: 84%|########3 | 523/625 [01:53<00:21, 4.68it/s]
reward: -1.4284, last reward: -0.0481, gradient norm: 13.25: 84%|########3 | 524/625 [01:53<00:21, 4.67it/s]
reward: -2.4437, last reward: -2.4721, gradient norm: 203.6: 84%|########3 | 524/625 [01:53<00:21, 4.67it/s]
reward: -2.4437, last reward: -2.4721, gradient norm: 203.6: 84%|########4 | 525/625 [01:53<00:21, 4.67it/s]
reward: -1.5122, last reward: -0.0237, gradient norm: 3.422: 84%|########4 | 525/625 [01:53<00:21, 4.67it/s]
reward: -1.5122, last reward: -0.0237, gradient norm: 3.422: 84%|########4 | 526/625 [01:53<00:21, 4.67it/s]
reward: -1.2592, last reward: -0.0252, gradient norm: 6.415: 84%|########4 | 526/625 [01:53<00:21, 4.67it/s]
reward: -1.2592, last reward: -0.0252, gradient norm: 6.415: 84%|########4 | 527/625 [01:53<00:20, 4.68it/s]
reward: -2.9662, last reward: -3.3465, gradient norm: 70.2: 84%|########4 | 527/625 [01:54<00:20, 4.68it/s]
reward: -2.9662, last reward: -3.3465, gradient norm: 70.2: 84%|########4 | 528/625 [01:54<00:20, 4.68it/s]
reward: -2.9313, last reward: -1.7319, gradient norm: 23.75: 84%|########4 | 528/625 [01:54<00:20, 4.68it/s]
reward: -2.9313, last reward: -1.7319, gradient norm: 23.75: 85%|########4 | 529/625 [01:54<00:20, 4.68it/s]
reward: -2.8559, last reward: -7.2582, gradient norm: 122.6: 85%|########4 | 529/625 [01:54<00:20, 4.68it/s]
reward: -2.8559, last reward: -7.2582, gradient norm: 122.6: 85%|########4 | 530/625 [01:54<00:20, 4.69it/s]
reward: -2.2604, last reward: -0.6696, gradient norm: 47.03: 85%|########4 | 530/625 [01:54<00:20, 4.69it/s]
reward: -2.2604, last reward: -0.6696, gradient norm: 47.03: 85%|########4 | 531/625 [01:54<00:20, 4.69it/s]
reward: -4.4392, last reward: -4.0101, gradient norm: 36.15: 85%|########4 | 531/625 [01:54<00:20, 4.69it/s]
reward: -4.4392, last reward: -4.0101, gradient norm: 36.15: 85%|########5 | 532/625 [01:54<00:19, 4.69it/s]
reward: -4.2545, last reward: -4.3687, gradient norm: 27.32: 85%|########5 | 532/625 [01:55<00:19, 4.69it/s]
reward: -4.2545, last reward: -4.3687, gradient norm: 27.32: 85%|########5 | 533/625 [01:55<00:19, 4.69it/s]
reward: -3.5550, last reward: -5.4037, gradient norm: 31.69: 85%|########5 | 533/625 [01:55<00:19, 4.69it/s]
reward: -3.5550, last reward: -5.4037, gradient norm: 31.69: 85%|########5 | 534/625 [01:55<00:19, 4.69it/s]
reward: -3.6321, last reward: -3.1819, gradient norm: 47.84: 85%|########5 | 534/625 [01:55<00:19, 4.69it/s]
reward: -3.6321, last reward: -3.1819, gradient norm: 47.84: 86%|########5 | 535/625 [01:55<00:19, 4.69it/s]
reward: -1.6529, last reward: -0.1094, gradient norm: 3.408: 86%|########5 | 535/625 [01:55<00:19, 4.69it/s]
reward: -1.6529, last reward: -0.1094, gradient norm: 3.408: 86%|########5 | 536/625 [01:55<00:18, 4.70it/s]
reward: -1.5287, last reward: -0.0577, gradient norm: 1.88: 86%|########5 | 536/625 [01:56<00:18, 4.70it/s]
reward: -1.5287, last reward: -0.0577, gradient norm: 1.88: 86%|########5 | 537/625 [01:56<00:18, 4.70it/s]
reward: -1.6724, last reward: -0.0190, gradient norm: 0.9097: 86%|########5 | 537/625 [01:56<00:18, 4.70it/s]
reward: -1.6724, last reward: -0.0190, gradient norm: 0.9097: 86%|########6 | 538/625 [01:56<00:18, 4.69it/s]
reward: -1.6326, last reward: -0.0008, gradient norm: 0.3263: 86%|########6 | 538/625 [01:56<00:18, 4.69it/s]
reward: -1.6326, last reward: -0.0008, gradient norm: 0.3263: 86%|########6 | 539/625 [01:56<00:18, 4.68it/s]
reward: -1.3365, last reward: -0.0047, gradient norm: 0.6231: 86%|########6 | 539/625 [01:56<00:18, 4.68it/s]
reward: -1.3365, last reward: -0.0047, gradient norm: 0.6231: 86%|########6 | 540/625 [01:56<00:18, 4.68it/s]
reward: -1.3546, last reward: -0.0171, gradient norm: 1.151: 86%|########6 | 540/625 [01:56<00:18, 4.68it/s]
reward: -1.3546, last reward: -0.0171, gradient norm: 1.151: 87%|########6 | 541/625 [01:56<00:17, 4.68it/s]
reward: -1.6043, last reward: -0.0214, gradient norm: 1.237: 87%|########6 | 541/625 [01:57<00:17, 4.68it/s]
reward: -1.6043, last reward: -0.0214, gradient norm: 1.237: 87%|########6 | 542/625 [01:57<00:17, 4.67it/s]
reward: -1.4964, last reward: -0.0156, gradient norm: 0.9178: 87%|########6 | 542/625 [01:57<00:17, 4.67it/s]
reward: -1.4964, last reward: -0.0156, gradient norm: 0.9178: 87%|########6 | 543/625 [01:57<00:17, 4.67it/s]
reward: -1.3551, last reward: -0.0063, gradient norm: 0.505: 87%|########6 | 543/625 [01:57<00:17, 4.67it/s]
reward: -1.3551, last reward: -0.0063, gradient norm: 0.505: 87%|########7 | 544/625 [01:57<00:17, 4.67it/s]
reward: -1.4494, last reward: -0.0008, gradient norm: 0.3497: 87%|########7 | 544/625 [01:57<00:17, 4.67it/s]
reward: -1.4494, last reward: -0.0008, gradient norm: 0.3497: 87%|########7 | 545/625 [01:57<00:17, 4.65it/s]
reward: -1.7332, last reward: -0.0004, gradient norm: 0.2226: 87%|########7 | 545/625 [01:57<00:17, 4.65it/s]
reward: -1.7332, last reward: -0.0004, gradient norm: 0.2226: 87%|########7 | 546/625 [01:57<00:16, 4.65it/s]
reward: -1.3614, last reward: -0.0034, gradient norm: 0.2812: 87%|########7 | 546/625 [01:58<00:16, 4.65it/s]
reward: -1.3614, last reward: -0.0034, gradient norm: 0.2812: 88%|########7 | 547/625 [01:58<00:16, 4.64it/s]
reward: -1.4365, last reward: -0.0070, gradient norm: 0.3947: 88%|########7 | 547/625 [01:58<00:16, 4.64it/s]
reward: -1.4365, last reward: -0.0070, gradient norm: 0.3947: 88%|########7 | 548/625 [01:58<00:16, 4.63it/s]
reward: -1.5960, last reward: -0.0091, gradient norm: 76.72: 88%|########7 | 548/625 [01:58<00:16, 4.63it/s]
reward: -1.5960, last reward: -0.0091, gradient norm: 76.72: 88%|########7 | 549/625 [01:58<00:16, 4.62it/s]
reward: -1.4885, last reward: -0.0122, gradient norm: 0.5172: 88%|########7 | 549/625 [01:58<00:16, 4.62it/s]
reward: -1.4885, last reward: -0.0122, gradient norm: 0.5172: 88%|########8 | 550/625 [01:58<00:16, 4.61it/s]
reward: -0.9886, last reward: -0.0119, gradient norm: 0.5381: 88%|########8 | 550/625 [01:59<00:16, 4.61it/s]
reward: -0.9886, last reward: -0.0119, gradient norm: 0.5381: 88%|########8 | 551/625 [01:59<00:16, 4.60it/s]
reward: -1.1152, last reward: -0.0082, gradient norm: 0.4465: 88%|########8 | 551/625 [01:59<00:16, 4.60it/s]
reward: -1.1152, last reward: -0.0082, gradient norm: 0.4465: 88%|########8 | 552/625 [01:59<00:15, 4.60it/s]
reward: -1.4958, last reward: -0.0035, gradient norm: 0.3251: 88%|########8 | 552/625 [01:59<00:15, 4.60it/s]
reward: -1.4958, last reward: -0.0035, gradient norm: 0.3251: 88%|########8 | 553/625 [01:59<00:15, 4.61it/s]
reward: -1.4651, last reward: -0.0005, gradient norm: 0.2104: 88%|########8 | 553/625 [01:59<00:15, 4.61it/s]
reward: -1.4651, last reward: -0.0005, gradient norm: 0.2104: 89%|########8 | 554/625 [01:59<00:15, 4.63it/s]
reward: -1.4831, last reward: -0.0004, gradient norm: 0.118: 89%|########8 | 554/625 [01:59<00:15, 4.63it/s]
reward: -1.4831, last reward: -0.0004, gradient norm: 0.118: 89%|########8 | 555/625 [01:59<00:15, 4.65it/s]
reward: -1.4630, last reward: -0.0030, gradient norm: 0.2993: 89%|########8 | 555/625 [02:00<00:15, 4.65it/s]
reward: -1.4630, last reward: -0.0030, gradient norm: 0.2993: 89%|########8 | 556/625 [02:00<00:14, 4.64it/s]
reward: -1.6808, last reward: -0.0062, gradient norm: 0.4941: 89%|########8 | 556/625 [02:00<00:14, 4.64it/s]
reward: -1.6808, last reward: -0.0062, gradient norm: 0.4941: 89%|########9 | 557/625 [02:00<00:14, 4.64it/s]
reward: -1.4104, last reward: -0.0071, gradient norm: 0.4698: 89%|########9 | 557/625 [02:00<00:14, 4.64it/s]
reward: -1.4104, last reward: -0.0071, gradient norm: 0.4698: 89%|########9 | 558/625 [02:00<00:14, 4.64it/s]
reward: -1.3829, last reward: -0.0052, gradient norm: 0.4055: 89%|########9 | 558/625 [02:00<00:14, 4.64it/s]
reward: -1.3829, last reward: -0.0052, gradient norm: 0.4055: 89%|########9 | 559/625 [02:00<00:14, 4.64it/s]
reward: -1.4626, last reward: -0.0020, gradient norm: 0.2701: 89%|########9 | 559/625 [02:00<00:14, 4.64it/s]
reward: -1.4626, last reward: -0.0020, gradient norm: 0.2701: 90%|########9 | 560/625 [02:00<00:13, 4.67it/s]
reward: -1.4948, last reward: -0.0001, gradient norm: 0.1465: 90%|########9 | 560/625 [02:01<00:13, 4.67it/s]
reward: -1.4948, last reward: -0.0001, gradient norm: 0.1465: 90%|########9 | 561/625 [02:01<00:13, 4.67it/s]
reward: -1.3113, last reward: -0.0006, gradient norm: 0.167: 90%|########9 | 561/625 [02:01<00:13, 4.67it/s]
reward: -1.3113, last reward: -0.0006, gradient norm: 0.167: 90%|########9 | 562/625 [02:01<00:13, 4.68it/s]
reward: -1.2608, last reward: -0.0026, gradient norm: 0.3484: 90%|########9 | 562/625 [02:01<00:13, 4.68it/s]
reward: -1.2608, last reward: -0.0026, gradient norm: 0.3484: 90%|######### | 563/625 [02:01<00:13, 4.69it/s]
reward: -1.4841, last reward: -0.0038, gradient norm: 0.4293: 90%|######### | 563/625 [02:01<00:13, 4.69it/s]
reward: -1.4841, last reward: -0.0038, gradient norm: 0.4293: 90%|######### | 564/625 [02:01<00:12, 4.71it/s]
reward: -1.5925, last reward: -0.0028, gradient norm: 0.3709: 90%|######### | 564/625 [02:02<00:12, 4.71it/s]
reward: -1.5925, last reward: -0.0028, gradient norm: 0.3709: 90%|######### | 565/625 [02:02<00:12, 4.71it/s]
reward: -1.5252, last reward: -0.0008, gradient norm: 1.115: 90%|######### | 565/625 [02:02<00:12, 4.71it/s]
reward: -1.5252, last reward: -0.0008, gradient norm: 1.115: 91%|######### | 566/625 [02:02<00:12, 4.71it/s]
reward: -1.3271, last reward: -0.0004, gradient norm: 1.282: 91%|######### | 566/625 [02:02<00:12, 4.71it/s]
reward: -1.3271, last reward: -0.0004, gradient norm: 1.282: 91%|######### | 567/625 [02:02<00:12, 4.71it/s]
reward: -1.6467, last reward: -0.0023, gradient norm: 0.3944: 91%|######### | 567/625 [02:02<00:12, 4.71it/s]
reward: -1.6467, last reward: -0.0023, gradient norm: 0.3944: 91%|######### | 568/625 [02:02<00:12, 4.73it/s]
reward: -1.7208, last reward: -0.0035, gradient norm: 4.711: 91%|######### | 568/625 [02:02<00:12, 4.73it/s]
reward: -1.7208, last reward: -0.0035, gradient norm: 4.711: 91%|#########1| 569/625 [02:02<00:11, 4.73it/s]
reward: -1.5728, last reward: -0.0019, gradient norm: 0.2899: 91%|#########1| 569/625 [02:03<00:11, 4.73it/s]
reward: -1.5728, last reward: -0.0019, gradient norm: 0.2899: 91%|#########1| 570/625 [02:03<00:11, 4.74it/s]
reward: -1.2038, last reward: -0.0002, gradient norm: 1.836: 91%|#########1| 570/625 [02:03<00:11, 4.74it/s]
reward: -1.2038, last reward: -0.0002, gradient norm: 1.836: 91%|#########1| 571/625 [02:03<00:11, 4.74it/s]
reward: -1.3848, last reward: -0.0020, gradient norm: 0.3744: 91%|#########1| 571/625 [02:03<00:11, 4.74it/s]
reward: -1.3848, last reward: -0.0020, gradient norm: 0.3744: 92%|#########1| 572/625 [02:03<00:11, 4.73it/s]
reward: -1.5348, last reward: -0.0059, gradient norm: 0.9902: 92%|#########1| 572/625 [02:03<00:11, 4.73it/s]
reward: -1.5348, last reward: -0.0059, gradient norm: 0.9902: 92%|#########1| 573/625 [02:03<00:11, 4.73it/s]
reward: -1.1259, last reward: -0.0061, gradient norm: 0.8873: 92%|#########1| 573/625 [02:03<00:11, 4.73it/s]
reward: -1.1259, last reward: -0.0061, gradient norm: 0.8873: 92%|#########1| 574/625 [02:03<00:10, 4.72it/s]
reward: -1.5421, last reward: -0.0003, gradient norm: 1.149: 92%|#########1| 574/625 [02:04<00:10, 4.72it/s]
reward: -1.5421, last reward: -0.0003, gradient norm: 1.149: 92%|#########2| 575/625 [02:04<00:10, 4.71it/s]
reward: -1.5642, last reward: -0.0065, gradient norm: 1.069: 92%|#########2| 575/625 [02:04<00:10, 4.71it/s]
reward: -1.5642, last reward: -0.0065, gradient norm: 1.069: 92%|#########2| 576/625 [02:04<00:10, 4.70it/s]
reward: -1.3171, last reward: -0.0205, gradient norm: 1.774: 92%|#########2| 576/625 [02:04<00:10, 4.70it/s]
reward: -1.3171, last reward: -0.0205, gradient norm: 1.774: 92%|#########2| 577/625 [02:04<00:10, 4.70it/s]
reward: -1.5270, last reward: -0.0114, gradient norm: 1.085: 92%|#########2| 577/625 [02:04<00:10, 4.70it/s]
reward: -1.5270, last reward: -0.0114, gradient norm: 1.085: 92%|#########2| 578/625 [02:04<00:09, 4.71it/s]
reward: -1.3121, last reward: -0.0000, gradient norm: 0.2903: 92%|#########2| 578/625 [02:05<00:09, 4.71it/s]
reward: -1.3121, last reward: -0.0000, gradient norm: 0.2903: 93%|#########2| 579/625 [02:05<00:09, 4.71it/s]
reward: -1.5393, last reward: -0.0059, gradient norm: 0.7705: 93%|#########2| 579/625 [02:05<00:09, 4.71it/s]
reward: -1.5393, last reward: -0.0059, gradient norm: 0.7705: 93%|#########2| 580/625 [02:05<00:09, 4.69it/s]
reward: -1.5170, last reward: -0.0085, gradient norm: 0.9108: 93%|#########2| 580/625 [02:05<00:09, 4.69it/s]
reward: -1.5170, last reward: -0.0085, gradient norm: 0.9108: 93%|#########2| 581/625 [02:05<00:09, 4.67it/s]
reward: -1.4137, last reward: -0.0014, gradient norm: 3.647: 93%|#########2| 581/625 [02:05<00:09, 4.67it/s]
reward: -1.4137, last reward: -0.0014, gradient norm: 3.647: 93%|#########3| 582/625 [02:05<00:09, 4.68it/s]
reward: -1.5612, last reward: -0.0015, gradient norm: 1.167: 93%|#########3| 582/625 [02:05<00:09, 4.68it/s]
reward: -1.5612, last reward: -0.0015, gradient norm: 1.167: 93%|#########3| 583/625 [02:05<00:08, 4.67it/s]
reward: -2.1321, last reward: -0.4806, gradient norm: 85.64: 93%|#########3| 583/625 [02:06<00:08, 4.67it/s]
reward: -2.1321, last reward: -0.4806, gradient norm: 85.64: 93%|#########3| 584/625 [02:06<00:08, 4.65it/s]
reward: -2.3775, last reward: -0.4793, gradient norm: 1.406e+03: 93%|#########3| 584/625 [02:06<00:08, 4.65it/s]
reward: -2.3775, last reward: -0.4793, gradient norm: 1.406e+03: 94%|#########3| 585/625 [02:06<00:08, 4.66it/s]
reward: -2.8310, last reward: -1.0567, gradient norm: 11.95: 94%|#########3| 585/625 [02:06<00:08, 4.66it/s]
reward: -2.8310, last reward: -1.0567, gradient norm: 11.95: 94%|#########3| 586/625 [02:06<00:08, 4.69it/s]
reward: -2.9790, last reward: -3.2674, gradient norm: 41.73: 94%|#########3| 586/625 [02:06<00:08, 4.69it/s]
reward: -2.9790, last reward: -3.2674, gradient norm: 41.73: 94%|#########3| 587/625 [02:06<00:08, 4.71it/s]
reward: -2.8322, last reward: -2.1411, gradient norm: 17.38: 94%|#########3| 587/625 [02:06<00:08, 4.71it/s]
reward: -2.8322, last reward: -2.1411, gradient norm: 17.38: 94%|#########4| 588/625 [02:06<00:07, 4.71it/s]
reward: -2.2070, last reward: -2.8774, gradient norm: 72.41: 94%|#########4| 588/625 [02:07<00:07, 4.71it/s]
reward: -2.2070, last reward: -2.8774, gradient norm: 72.41: 94%|#########4| 589/625 [02:07<00:07, 4.70it/s]
reward: -1.6291, last reward: -0.1402, gradient norm: 3.553: 94%|#########4| 589/625 [02:07<00:07, 4.70it/s]
reward: -1.6291, last reward: -0.1402, gradient norm: 3.553: 94%|#########4| 590/625 [02:07<00:07, 4.70it/s]
reward: -1.8414, last reward: -0.0124, gradient norm: 67.06: 94%|#########4| 590/625 [02:07<00:07, 4.70it/s]
reward: -1.8414, last reward: -0.0124, gradient norm: 67.06: 95%|#########4| 591/625 [02:07<00:07, 4.70it/s]
reward: -1.6018, last reward: -0.0135, gradient norm: 6.259: 95%|#########4| 591/625 [02:07<00:07, 4.70it/s]
reward: -1.6018, last reward: -0.0135, gradient norm: 6.259: 95%|#########4| 592/625 [02:07<00:07, 4.70it/s]
reward: -1.4717, last reward: -0.0313, gradient norm: 1.753: 95%|#########4| 592/625 [02:07<00:07, 4.70it/s]
reward: -1.4717, last reward: -0.0313, gradient norm: 1.753: 95%|#########4| 593/625 [02:07<00:06, 4.70it/s]
reward: -1.5673, last reward: -0.0314, gradient norm: 1.339: 95%|#########4| 593/625 [02:08<00:06, 4.70it/s]
reward: -1.5673, last reward: -0.0314, gradient norm: 1.339: 95%|#########5| 594/625 [02:08<00:06, 4.70it/s]
reward: -1.5801, last reward: -0.0161, gradient norm: 0.8394: 95%|#########5| 594/625 [02:08<00:06, 4.70it/s]
reward: -1.5801, last reward: -0.0161, gradient norm: 0.8394: 95%|#########5| 595/625 [02:08<00:06, 4.68it/s]
reward: -1.4143, last reward: -0.0029, gradient norm: 0.3932: 95%|#########5| 595/625 [02:08<00:06, 4.68it/s]
reward: -1.4143, last reward: -0.0029, gradient norm: 0.3932: 95%|#########5| 596/625 [02:08<00:06, 4.68it/s]
reward: -1.3775, last reward: -0.0005, gradient norm: 0.5399: 95%|#########5| 596/625 [02:08<00:06, 4.68it/s]
reward: -1.3775, last reward: -0.0005, gradient norm: 0.5399: 96%|#########5| 597/625 [02:08<00:05, 4.68it/s]
reward: -1.6790, last reward: -0.0057, gradient norm: 4.565: 96%|#########5| 597/625 [02:09<00:05, 4.68it/s]
reward: -1.6790, last reward: -0.0057, gradient norm: 4.565: 96%|#########5| 598/625 [02:09<00:05, 4.67it/s]
reward: -1.6199, last reward: -0.0180, gradient norm: 3.141: 96%|#########5| 598/625 [02:09<00:05, 4.67it/s]
reward: -1.6199, last reward: -0.0180, gradient norm: 3.141: 96%|#########5| 599/625 [02:09<00:05, 4.65it/s]
reward: -2.0561, last reward: -0.0377, gradient norm: 1.409: 96%|#########5| 599/625 [02:09<00:05, 4.65it/s]
reward: -2.0561, last reward: -0.0377, gradient norm: 1.409: 96%|#########6| 600/625 [02:09<00:05, 4.64it/s]
reward: -2.3842, last reward: -0.0518, gradient norm: 1.474: 96%|#########6| 600/625 [02:09<00:05, 4.64it/s]
reward: -2.3842, last reward: -0.0518, gradient norm: 1.474: 96%|#########6| 601/625 [02:09<00:05, 4.63it/s]
reward: -1.9344, last reward: -0.0644, gradient norm: 1.209: 96%|#########6| 601/625 [02:09<00:05, 4.63it/s]
reward: -1.9344, last reward: -0.0644, gradient norm: 1.209: 96%|#########6| 602/625 [02:09<00:04, 4.62it/s]
reward: -2.2790, last reward: -0.0592, gradient norm: 11.22: 96%|#########6| 602/625 [02:10<00:04, 4.62it/s]
reward: -2.2790, last reward: -0.0592, gradient norm: 11.22: 96%|#########6| 603/625 [02:10<00:04, 4.62it/s]
reward: -4.0883, last reward: -4.8339, gradient norm: 83.16: 96%|#########6| 603/625 [02:10<00:04, 4.62it/s]
reward: -4.0883, last reward: -4.8339, gradient norm: 83.16: 97%|#########6| 604/625 [02:10<00:04, 4.63it/s]
reward: -4.0485, last reward: -5.1066, gradient norm: 76.72: 97%|#########6| 604/625 [02:10<00:04, 4.63it/s]
reward: -4.0485, last reward: -5.1066, gradient norm: 76.72: 97%|#########6| 605/625 [02:10<00:04, 4.64it/s]
reward: -2.2202, last reward: -0.0572, gradient norm: 2.018: 97%|#########6| 605/625 [02:10<00:04, 4.64it/s]
reward: -2.2202, last reward: -0.0572, gradient norm: 2.018: 97%|#########6| 606/625 [02:10<00:04, 4.64it/s]
reward: -2.0732, last reward: -0.0390, gradient norm: 0.9306: 97%|#########6| 606/625 [02:11<00:04, 4.64it/s]
reward: -2.0732, last reward: -0.0390, gradient norm: 0.9306: 97%|#########7| 607/625 [02:11<00:03, 4.64it/s]
reward: -1.9484, last reward: -0.0287, gradient norm: 0.7666: 97%|#########7| 607/625 [02:11<00:03, 4.64it/s]
reward: -1.9484, last reward: -0.0287, gradient norm: 0.7666: 97%|#########7| 608/625 [02:11<00:03, 4.63it/s]
reward: -1.9244, last reward: -0.0137, gradient norm: 0.6317: 97%|#########7| 608/625 [02:11<00:03, 4.63it/s]
reward: -1.9244, last reward: -0.0137, gradient norm: 0.6317: 97%|#########7| 609/625 [02:11<00:03, 4.63it/s]
reward: -1.7053, last reward: -0.0037, gradient norm: 0.4835: 97%|#########7| 609/625 [02:11<00:03, 4.63it/s]
reward: -1.7053, last reward: -0.0037, gradient norm: 0.4835: 98%|#########7| 610/625 [02:11<00:03, 4.64it/s]
reward: -1.9095, last reward: -0.0001, gradient norm: 0.3136: 98%|#########7| 610/625 [02:11<00:03, 4.64it/s]
reward: -1.9095, last reward: -0.0001, gradient norm: 0.3136: 98%|#########7| 611/625 [02:11<00:03, 4.66it/s]
reward: -2.0986, last reward: -0.0010, gradient norm: 0.3817: 98%|#########7| 611/625 [02:12<00:03, 4.66it/s]
reward: -2.0986, last reward: -0.0010, gradient norm: 0.3817: 98%|#########7| 612/625 [02:12<00:02, 4.69it/s]
reward: -2.1120, last reward: -0.0039, gradient norm: 0.3962: 98%|#########7| 612/625 [02:12<00:02, 4.69it/s]
reward: -2.1120, last reward: -0.0039, gradient norm: 0.3962: 98%|#########8| 613/625 [02:12<00:02, 4.70it/s]
reward: -1.8352, last reward: -0.0047, gradient norm: 0.4498: 98%|#########8| 613/625 [02:12<00:02, 4.70it/s]
reward: -1.8352, last reward: -0.0047, gradient norm: 0.4498: 98%|#########8| 614/625 [02:12<00:02, 4.69it/s]
reward: -2.4487, last reward: -0.0528, gradient norm: 0.5442: 98%|#########8| 614/625 [02:12<00:02, 4.69it/s]
reward: -2.4487, last reward: -0.0528, gradient norm: 0.5442: 98%|#########8| 615/625 [02:12<00:02, 4.69it/s]
reward: -1.6304, last reward: -0.0213, gradient norm: 6.058: 98%|#########8| 615/625 [02:12<00:02, 4.69it/s]
reward: -1.6304, last reward: -0.0213, gradient norm: 6.058: 99%|#########8| 616/625 [02:12<00:01, 4.70it/s]
reward: -2.0107, last reward: -0.0030, gradient norm: 0.454: 99%|#########8| 616/625 [02:13<00:01, 4.70it/s]
reward: -2.0107, last reward: -0.0030, gradient norm: 0.454: 99%|#########8| 617/625 [02:13<00:01, 4.70it/s]
reward: -2.3691, last reward: -0.0040, gradient norm: 0.3565: 99%|#########8| 617/625 [02:13<00:01, 4.70it/s]
reward: -2.3691, last reward: -0.0040, gradient norm: 0.3565: 99%|#########8| 618/625 [02:13<00:01, 4.70it/s]
reward: -1.7825, last reward: -0.0012, gradient norm: 0.4371: 99%|#########8| 618/625 [02:13<00:01, 4.70it/s]
reward: -1.7825, last reward: -0.0012, gradient norm: 0.4371: 99%|#########9| 619/625 [02:13<00:01, 4.69it/s]
reward: -2.0245, last reward: -0.0656, gradient norm: 2.131: 99%|#########9| 619/625 [02:13<00:01, 4.69it/s]
reward: -2.0245, last reward: -0.0656, gradient norm: 2.131: 99%|#########9| 620/625 [02:13<00:01, 4.71it/s]
reward: -2.4611, last reward: -0.0079, gradient norm: 1.089: 99%|#########9| 620/625 [02:13<00:01, 4.71it/s]
reward: -2.4611, last reward: -0.0079, gradient norm: 1.089: 99%|#########9| 621/625 [02:13<00:00, 4.72it/s]
reward: -2.0722, last reward: -0.2891, gradient norm: 8.633: 99%|#########9| 621/625 [02:14<00:00, 4.72it/s]
reward: -2.0722, last reward: -0.2891, gradient norm: 8.633: 100%|#########9| 622/625 [02:14<00:00, 4.73it/s]
reward: -2.3904, last reward: -0.0202, gradient norm: 1.177: 100%|#########9| 622/625 [02:14<00:00, 4.73it/s]
reward: -2.3904, last reward: -0.0202, gradient norm: 1.177: 100%|#########9| 623/625 [02:14<00:00, 4.74it/s]
reward: -2.2466, last reward: -0.0135, gradient norm: 0.5292: 100%|#########9| 623/625 [02:14<00:00, 4.74it/s]
reward: -2.2466, last reward: -0.0135, gradient norm: 0.5292: 100%|#########9| 624/625 [02:14<00:00, 4.73it/s]
reward: -2.0926, last reward: -0.0780, gradient norm: 0.7732: 100%|#########9| 624/625 [02:14<00:00, 4.73it/s]
reward: -2.0926, last reward: -0.0780, gradient norm: 0.7732: 100%|##########| 625/625 [02:14<00:00, 4.72it/s]
reward: -2.0926, last reward: -0.0780, gradient norm: 0.7732: 100%|##########| 625/625 [02:14<00:00, 4.64it/s]
```

## Conclusion¶

In this tutorial, we have learned how to code a stateless environment from scratch. We touched the subjects of:

The four essential components that need to be taken care of when coding an environment (

`step`

,`reset`

, seeding and building specs). We saw how these methods and classes interact with the`TensorDict`

class;How to test that an environment is properly coded using

`check_env_specs()`

;How to append transforms in the context of stateless environments and how to write custom transformations;

How to train a policy on a fully differentiable simulator.

**Total running time of the script:** ( 2 minutes 15.185 seconds)