Skip to content

Commit 2abddc1

Browse files
committed
Merge branch 'dev' into finalize-test-example-nbs
2 parents cc287af + 6305870 commit 2abddc1

File tree

2 files changed

+13
-68
lines changed

2 files changed

+13
-68
lines changed

docsrc/source/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ More tutorials are always welcome! Please consider making a pull request if you
6464
6565
.. tab-item:: pip
6666
67-
The v2 version is not available on PyPI yet, please install from source.
67+
.. code-block:: bash
68+
69+
pip install bayesflow
6870
6971
.. tab-item:: source
7072
7173
.. code-block:: bash
7274
73-
pip install git+https://github.com/bayesflow-org/bayesflow.git
75+
pip install git+https://github.com/bayesflow-org/bayesflow.git@dev
7476
```
7577

7678
### Backend

examples/Linear_Regression_Starter.ipynb

Lines changed: 9 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,14 @@
2828
},
2929
{
3030
"cell_type": "code",
31-
"execution_count": 1,
31+
"execution_count": null,
3232
"metadata": {
3333
"ExecuteTime": {
3434
"end_time": "2025-02-14T10:51:27.573003Z",
3535
"start_time": "2025-02-14T10:51:27.568939Z"
3636
}
3737
},
38-
"outputs": [
39-
{
40-
"name": "stderr",
41-
"output_type": "stream",
42-
"text": [
43-
"WARNING:bayesflow:\n",
44-
"When using torch backend, we need to disable autograd by default to avoid excessive memory usage. Use\n",
45-
"\n",
46-
"with torch.enable_grad():\n",
47-
" ...\n",
48-
"\n",
49-
"in contexts where you need gradients (e.g. custom training loops).\n"
50-
]
51-
}
52-
],
38+
"outputs": [],
5339
"source": [
5440
"import numpy as np\n",
5541
"from pathlib import Path\n",
@@ -599,7 +585,7 @@
599585
},
600586
{
601587
"cell_type": "code",
602-
"execution_count": 19,
588+
"execution_count": null,
603589
"metadata": {
604590
"ExecuteTime": {
605591
"end_time": "2025-02-14T10:52:51.132695Z",
@@ -619,7 +605,7 @@
619605
}
620606
],
621607
"source": [
622-
"f = bf.diagnostics.plots.loss(history, )"
608+
"f = bf.diagnostics.plots.loss(history)"
623609
]
624610
},
625611
{
@@ -965,27 +951,9 @@
965951
},
966952
{
967953
"cell_type": "code",
968-
"execution_count": 30,
954+
"execution_count": null,
969955
"metadata": {},
970-
"outputs": [
971-
{
972-
"name": "stderr",
973-
"output_type": "stream",
974-
"text": [
975-
"2025-04-21 11:54:04.969579: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
976-
"2025-04-21 11:54:04.977366: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
977-
"WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
978-
"E0000 00:00:1745250844.984817 4140753 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
979-
"E0000 00:00:1745250844.987174 4140753 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
980-
"W0000 00:00:1745250844.993850 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
981-
"W0000 00:00:1745250844.993860 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
982-
"W0000 00:00:1745250844.993861 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
983-
"W0000 00:00:1745250844.993863 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
984-
"2025-04-21 11:54:04.996047: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
985-
"To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
986-
]
987-
}
988-
],
956+
"outputs": [],
989957
"source": [
990958
"# Recommended - full serialization (checkpoints folder must exist)\n",
991959
"filepath = Path(\"checkpoints\") / \"regression.keras\"\n",
@@ -1005,18 +973,9 @@
1005973
},
1006974
{
1007975
"cell_type": "code",
1008-
"execution_count": 31,
976+
"execution_count": null,
1009977
"metadata": {},
1010-
"outputs": [
1011-
{
1012-
"name": "stderr",
1013-
"output_type": "stream",
1014-
"text": [
1015-
"/home/radevs/anaconda3/envs/bf/lib/python3.11/site-packages/keras/src/saving/serialization_lib.py:734: UserWarning: `compile()` was not called as part of model loading because the model's `compile()` method is custom. All subclassed Models that have `compile()` overridden should also override `get_compile_config()` and `compile_from_config(config)`. Alternatively, you can call `compile()` manually after loading.\n",
1016-
" instance.compile_from_config(compile_config)\n"
1017-
]
1018-
}
1019-
],
978+
"outputs": [],
1020979
"source": [
1021980
"# Load approximator\n",
1022981
"approximator = keras.saving.load_model(filepath)"
@@ -1055,13 +1014,6 @@
10551014
" variable_names=par_names\n",
10561015
")"
10571016
]
1058-
},
1059-
{
1060-
"cell_type": "code",
1061-
"execution_count": null,
1062-
"metadata": {},
1063-
"outputs": [],
1064-
"source": []
10651017
}
10661018
],
10671019
"metadata": {
@@ -1076,16 +1028,7 @@
10761028
"name": "python3"
10771029
},
10781030
"language_info": {
1079-
"codemirror_mode": {
1080-
"name": "ipython",
1081-
"version": 3
1082-
},
1083-
"file_extension": ".py",
1084-
"mimetype": "text/x-python",
1085-
"name": "python",
1086-
"nbconvert_exporter": "python",
1087-
"pygments_lexer": "ipython3",
1088-
"version": "3.11.11"
1031+
"name": "python"
10891032
},
10901033
"widgets": {
10911034
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)