Skip to content

Commit c709386

Browse files
committed
Improve doc
1 parent 8d38aa0 commit c709386

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

bayesflow/datasets/disk_dataset.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ def __init__(
6060
augmentations : dict of str to Callable or Callable, optional
6161
Dictionary of augmentation functions to apply to each corresponding key in the batch
6262
or a function to apply to the entire batch (possibly adding new keys).
63+
64+
If you provide a dictionary of functions, each function should accept one element
65+
of your output batch and return the corresponding transformed element. Otherwise,
66+
your function should accept the entire dictionary output and return a dictionary.
67+
6368
Note - augmentations are applied before the adapter is called and are generally
6469
transforms that you only want to apply during training.
6570
**kwargs

bayesflow/datasets/offline_dataset.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ def __init__(
4444
augmentations : dict of str to Callable or Callable, optional
4545
Dictionary of augmentation functions to apply to each corresponding key in the batch
4646
or a function to apply to the entire batch (possibly adding new keys).
47+
48+
If you provide a dictionary of functions, each function should accept one element
49+
of your output batch and return the corresponding transformed element. Otherwise,
50+
your function should accept the entire dictionary output and return a dictionary.
51+
4752
Note - augmentations are applied before the adapter is called and are generally
4853
transforms that you only want to apply during training.
4954
**kwargs

bayesflow/datasets/online_dataset.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ def __init__(
4141
augmentations : dict of str to Callable or Callable, optional
4242
Dictionary of augmentation functions to apply to each corresponding key in the batch
4343
or a function to apply to the entire batch (possibly adding new keys).
44+
45+
If you provide a dictionary of functions, each function should accept one element
46+
of your output batch and return the corresponding transformed element. Otherwise,
47+
your function should accept the entire dictionary output and return a dictionary.
48+
4449
Note - augmentations are applied before the adapter is called and are generally
4550
transforms that you only want to apply during training.
4651
**kwargs

0 commit comments

Comments
 (0)