You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`ds` is of the type `D4RLDataset` which consists of the entire dataset along with some other information about the dataset. `samples` are in the form of `SARTS` with batch_size 256.
20
20
#### RL Unplugged
21
21
```julia
22
22
using ReinforcementLearningDatasets
23
23
ds =rl_unplugged_atari_dataset("pong", 1, [1, 2])
24
-
samples =Iterators.take!(ds, 2)
24
+
samples =take!(ds, 2)
25
25
```
26
26
`ds` is a `Channel{RLTransition}` that returns batches of type `RLTransition` when `take!` is used.
Creates a dataset of enclosed in a D4RLDataSet type and other related metadata for the `dataset` that is passed.
41
-
The `D4RLDataSet` type is an iterable that fetches batches when used in a for loop for convenience during offline training.
42
-
43
-
`dataset`: Dict{Symbol, Any}, Name of the datset.
44
-
`repo`: Name of the repository of the dataset.
45
-
`style`: the style of the iterator and the Dict inside D4RLDataSet that is returned.
46
-
`rng`: StableRNG
47
-
`max_iters`: maximum number of iterations for the iterator.
48
-
`is_shuffle`: whether the dataset is shuffled or not. `true` by default.
49
-
`batch_size`: batch_size that is yielded by the iterator. Defaults to 256.
50
-
51
-
The returned type is an infinite iterator which can be called using `iterate` and will return batches as specified in the dataset.
40
+
dataset(dataset; <keyword arguments>)
41
+
42
+
Create a dataset enclosed in a [`D4RLDataSet`](@ref) `Iterable` type. Contain other related metadata
43
+
for the `dataset` that is passed. The returned type is an infinite or a finite `Iterator`
44
+
respectively depending upon whether `is_shuffle` is `true` or `false`. For more information regarding
45
+
the dataset, refer to [D4RL](https://github.com/rail-berkeley/d4rl).
46
+
47
+
# Arguments
48
+
- `dataset::String`: name of the datset.
49
+
- `repo::String="d4rl"`: name of the repository of the dataset.
50
+
- `style::Tuple{Symbol}=SARTS`: the style of the `Iterator` that is returned. can be [`SARTS`](@ref),
51
+
[`SART`](@ref) or [`SA`](@ref).
52
+
- `rng<:AbstractRNG=StableRNG(123)`.
53
+
- `is_shuffle::Bool=true`: determines if the dataset is shuffled or not.
54
+
- `batch_size::Int=256` batch_size that is yielded by the iterator.
55
+
56
+
!!! note
57
+
58
+
[`FLOW`](https://flow-project.github.io/) and [`CARLA`](https://github.com/rail-berkeley/d4rl/wiki/CARLA-Setup) supported by [D4RL](https://github.com/rail-berkeley/d4rl) have not
59
+
been tested in this package yet.
52
60
"""
53
-
functiondataset(dataset::String;
54
-
style=SARTS,
61
+
functiondataset(
62
+
dataset::String;
55
63
repo ="d4rl",
64
+
style=SARTS,
56
65
rng =StableRNG(123),
57
66
is_shuffle =true,
58
67
batch_size=256
@@ -139,4 +148,4 @@ function d4rl_verify(data::Dict{String, Any})
0 commit comments