Skip to content

Commit 045df8e

Browse files
committed
Simplify warning
1 parent 69e2387 commit 045df8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bayesflow/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def setup():
4040
torch.autograd.set_grad_enabled(False)
4141

4242
logging.warning(
43-
"When using torch backend, we need to disable autograd by default to avoid excessive memory usage. Use\n"
44-
"with torch.enable_grad():\n"
45-
"in contexts where you need gradients (e.g. custom training loops)."
43+
"Autograd is disabled by default to avoid excessive memory usage. "
44+
"If you need gradients (e.g., custom training loops), use\n"
45+
"with torch.enable_grad():"
4646
)
4747

4848

0 commit comments

Comments
 (0)