The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
total_episodes: int64
total_steps: int64
data_format: string
jpeg_encoding: bool
observation_space: string
action_space: string
env_spec: string
dataset_size: double
dataset_id: string
code_permalink: string
author: list<item: string>
child 0, item: string
algorithm_name: string
description: string
minari_version: string
eval_env_spec: string
requirements: list<item: string>
child 0, item: string
datasets: list<item: string>
child 0, item: string
namespaces: list<item: string>
child 0, item: string
to
{'namespaces': List(Value('string')), 'datasets': List(Value('string'))}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 151, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 274, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 131, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 574, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3074, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2578, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2603, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 577, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 373, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2394, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2322, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
total_episodes: int64
total_steps: int64
data_format: string
jpeg_encoding: bool
observation_space: string
action_space: string
env_spec: string
dataset_size: double
dataset_id: string
code_permalink: string
author: list<item: string>
child 0, item: string
algorithm_name: string
description: string
minari_version: string
eval_env_spec: string
requirements: list<item: string>
child 0, item: string
datasets: list<item: string>
child 0, item: string
namespaces: list<item: string>
child 0, item: string
to
{'namespaces': List(Value('string')), 'datasets': List(Value('string'))}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Tradefloor offline RL datasets
Minari datasets from Tradefloor/Portfolio-v0, a portfolio environment
from tradefloor. Each episode is 20 trading days in a
simulated market of 8 stocks, each with its own limit order book. The markets are simulated, not
drawn from real prices.
| dataset id | acted by | episodes | steps | median return % | mean return % | mean turnover |
|---|---|---|---|---|---|---|
tradefloor/portfolio/random-v0 |
random actions | 1,000 | 120,000 | -6.137 | -6.293 | 70.41 |
tradefloor/portfolio/equal-weight-v0 |
equal weight | 1,000 | 120,000 | 0.932 | 0.956 | 1.36 |
tradefloor/portfolio/ppo-v0 |
PPO, policy seed 0 | 1,000 | 120,000 | -0.973 | -1.101 | 41.15 |
Returns are per episode, after trading costs. Turnover is traded value over starting net worth, per episode.
Every dataset uses the same 1,000 markets, seeds 256 to 1255, so the three policies can be compared
market by market. None of the markets is in tradefloor.gym.HELD_OUT_SEEDS, which is kept for
evaluation. The PPO policy is seed 0 from
tradefloordev/ppo-portfolio-study,
which trained on seeds 0 to 255.
Loading
import os
os.environ["MINARI_REMOTE"] = "hf://tradefloordev"
import minari
dataset = minari.load_dataset("tradefloor/portfolio/equal-weight-v0", download=True)
env = dataset.recover_environment() # needs: pip install "tradefloor[rl]==0.12.0"
for episode in dataset.iterate_episodes():
episode.observations, episode.actions, episode.rewards, episode.infos
Install with pip install "minari[hdf5]" pillow "tradefloor[rl]==0.12.0" (Minari 0.6 needs Pillow to read HDF5 datasets but does not install it). Each episode replays exactly with
env.reset(seed=s) under tradefloor 0.12.0; each dataset's description gives the seed range.
Spaces
- Observation: 17 floats. Entries 0 to 7 are each stock's log return since the previous step, 8 to 15 each holding as a fraction of net worth, and 16 cash as a fraction of net worth.
- Action: 9 floats in [0, 1], one per stock and a last one for cash, divided by their sum to give target weights. There is no shorting.
- Reward: the step's log return of net worth, after trading costs.
- Infos, per step:
net_worth,cash,pnl,return,drawdown,leverage,turnover,trading_cost,rejected,scaledandstep. They describe the account only, nothing about the market ahead.
The full description of the environment is in tradefloor's RL guide.
How they were made
With tradefloor.rl.collect_dataset from tradefloor 0.12.0, preset pt-v22, using the environment's
default settings. The collection script is in this repository as collect.py.
- Downloads last month
- 53