Skip to content

Commit 6305870

Browse files
committed
Merge branch 'main' into dev
2 parents 8378ad3 + 6ab88a8 commit 6305870

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
"\n",
@@ -598,7 +584,7 @@
598584
},
599585
{
600586
"cell_type": "code",
601-
"execution_count": 19,
587+
"execution_count": null,
602588
"metadata": {
603589
"ExecuteTime": {
604590
"end_time": "2025-02-14T10:52:51.132695Z",
@@ -618,7 +604,7 @@
618604
}
619605
],
620606
"source": [
621-
"f = bf.diagnostics.plots.loss(history, )"
607+
"f = bf.diagnostics.plots.loss(history)"
622608
]
623609
},
624610
{
@@ -964,27 +950,9 @@
964950
},
965951
{
966952
"cell_type": "code",
967-
"execution_count": 30,
953+
"execution_count": null,
968954
"metadata": {},
969-
"outputs": [
970-
{
971-
"name": "stderr",
972-
"output_type": "stream",
973-
"text": [
974-
"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",
975-
"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",
976-
"WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
977-
"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",
978-
"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",
979-
"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",
980-
"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",
981-
"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",
982-
"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",
983-
"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",
984-
"To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
985-
]
986-
}
987-
],
955+
"outputs": [],
988956
"source": [
989957
"# Recommended - full serialization (checkpoints folder must exist)\n",
990958
"workflow.approximator.save(filepath=\"checkpoints/regression.keras\")\n",
@@ -1002,18 +970,9 @@
1002970
},
1003971
{
1004972
"cell_type": "code",
1005-
"execution_count": 31,
973+
"execution_count": null,
1006974
"metadata": {},
1007-
"outputs": [
1008-
{
1009-
"name": "stderr",
1010-
"output_type": "stream",
1011-
"text": [
1012-
"/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",
1013-
" instance.compile_from_config(compile_config)\n"
1014-
]
1015-
}
1016-
],
975+
"outputs": [],
1017976
"source": [
1018977
"# Load approximator\n",
1019978
"approximator = keras.saving.load_model(\"checkpoints/regression.keras\")"
@@ -1052,13 +1011,6 @@
10521011
" variable_names=par_names\n",
10531012
")"
10541013
]
1055-
},
1056-
{
1057-
"cell_type": "code",
1058-
"execution_count": null,
1059-
"metadata": {},
1060-
"outputs": [],
1061-
"source": []
10621014
}
10631015
],
10641016
"metadata": {
@@ -1073,16 +1025,7 @@
10731025
"name": "python3"
10741026
},
10751027
"language_info": {
1076-
"codemirror_mode": {
1077-
"name": "ipython",
1078-
"version": 3
1079-
},
1080-
"file_extension": ".py",
1081-
"mimetype": "text/x-python",
1082-
"name": "python",
1083-
"nbconvert_exporter": "python",
1084-
"pygments_lexer": "ipython3",
1085-
"version": "3.11.11"
1028+
"name": "python"
10861029
},
10871030
"widgets": {
10881031
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)