Skip to content

Commit 5bb7b1e

Browse files
committed
Remove high-level imports
1 parent 190b187 commit 5bb7b1e

File tree

2 files changed

+3
-29
lines changed

2 files changed

+3
-29
lines changed

bayesflow/__init__.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +0,0 @@
1-
# Copyright (c) 2022 The BayesFlow Developers
2-
3-
# Permission is hereby granted, free of charge, to any person obtaining a copy
4-
# of this software and associated documentation files (the "Software"), to deal
5-
# in the Software without restriction, including without limitation the rights
6-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7-
# copies of the Software, and to permit persons to whom the Software is
8-
# furnished to do so, subject to the following conditions:
9-
10-
# The above copyright notice and this permission notice shall be included in all
11-
# copies or substantial portions of the Software.
12-
13-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19-
# SOFTWARE.
20-
21-
"""Imports bayesflow core interface modules."""
22-
from bayesflow import simulation
23-
from bayesflow import networks
24-
from bayesflow import amortizers
25-
from bayesflow import diagnostics
26-
from bayesflow import trainers

bayesflow/trainers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,9 @@ def train_from_presimulation(self, presimulation_path, max_epochs=None, save_che
566566

567567
def train_experience_replay(self, epochs, iterations_per_epoch, batch_size,
568568
capacity_in_batches=1000, save_checkpoint=True, **kwargs):
569-
"""Trains the network(s) via experience replay using a memory replay buffer.
569+
"""Trains the network(s) via experience replay using a memory replay buffer, as utilized
570+
in reinforcement learning. Additional keyword arguments are passed to the generative mode,
571+
configurator, and amortizer. Read below for signature.
570572
571573
Parameters
572574
----------
@@ -580,9 +582,7 @@ def train_experience_replay(self, epochs, iterations_per_epoch, batch_size,
580582
Max number of batches to store in buffer. For instance, if `batch_size=32`
581583
and `capacity_in_batches=1000`, then the buffer will hold a maximum of
582584
32 * 1000 = 32000 simulations. Be careful with memory!
583-
584585
Important! Argument will be ignored if buffer has previously been initialized!
585-
586586
save_checkpoint : bool (default - True)
587587
A flag to decide whether to save checkpoints after each epoch,
588588
if a checkpoint_path provided during initialization, otherwise ignored.

0 commit comments

Comments
 (0)