# Getting error running Linear Regression Example

**URL:** <https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143>\
**Category:** General\
**Created:** [April 11, 2025, 7:07pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143 "2025-04-11T19:07:14Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Collins.282](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Collins.282](https://discuss.bayesflow.org/u/Collins.282)\
**Post date:** [April 11, 2025, 7:07pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/1 "2025-04-11T19:07:14Z")

</div>

I am trying to become familiar with BayesFlow by going through the example scripts. I installed the latest version of Bayesflow and just tried to run the Linear\_Regression\_Starter example right from the Juypter notebook. All of the code up to the point where I try to run the approximate.fit command. However, when I try to run “approximator.fit” command in the example, I get an error. It seems like it starts running the function okay, but then runs into an issue.  
Again, I apologize if I am missing something simple.

```auto
history = approximator.fit(
    epochs=epochs,
    num_batches=num_batches,
    batch_size=batch_size,
    simulator=simulator,
)
INFO:bayesflow:Building dataset from simulator instance of SequentialSimulator.
INFO:bayesflow:Using 8 data loading workers.
INFO:bayesflow:Building on a test batch.

---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[76], line 1
----> 1 history = approximator.fit(
      2 epochs=epochs,
      3 num_batches=num_batches,
      4 batch_size=batch_size,
      5 simulator=simulator,
      6 )

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bayesflow/approximators/continuous_approximator.py:202, in ContinuousApproximator.fit(self, *args, **kwargs)
    150 def fit(self, *args, **kwargs):
    151 """
    152 Trains the approximator on the provided dataset or on-demand data generated from the given simulator.
    153 If `dataset` is not provided, a dataset is built from the `simulator`.
   (...) 200 If both `dataset` and `simulator` are provided or neither is provided.
    201 """
--> 202 return super().fit(*args, **kwargs, adapter=self.adapter)

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bayesflow/approximators/approximator.py:134, in Approximator.fit(self, dataset, simulator, **kwargs)
    132 mock_data = dataset[0]
    133 mock_data = keras.tree.map_structure(keras.ops.convert_to_tensor, mock_data)
--> 134 self.build_from_data(mock_data)
    136 return super().fit(dataset=dataset, **kwargs)
...
   1802 )
   1803 expected_call_arg = utils.removesuffix(name, "_shape")
   1804 if expected_call_arg not in call_spec.arguments_dict:

ValueError: For a `build()` method with more than one argument, all arguments should have a `_shape` suffix and match an argument from `call()`. E.g. `build(self, foo_shape, bar_shape)` For layer 'DeepSet', Received `build()` argument `self`, which does not end in `_shape`.
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

```

---

<div class="post-metadata">

**Author:** ![valentin](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.bayesflow.org/valentin/32/103_2.png) [@valentin](https://discuss.bayesflow.org/u/valentin)\
**Post date:** [April 12, 2025, 7:19am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/2 "2025-04-12T07:19:36Z")

</div>

Thanks for reaching out and welcome to the forum! I just tried it out, but cannot reproduce the error in my local setup. I would be grateful if you would help us to track this down.  
For this, it would be great if you update your installation to the latest version of the `main` branch, try to run the notebook for the three different backends (Jax, TensorFlow, PyTorch), and report if you see the error everywhere or only for one of them. In addition, details on your setup (operating system, CPU or GPU) might help as well.

---

<div class="post-metadata">

**Author:** ![Collins.282](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Collins.282](https://discuss.bayesflow.org/u/Collins.282)\
**Post date:** [April 13, 2025, 7:45pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/3 "2025-04-13T19:45:37Z")

</div>

Valentin

Thanks for your quick reply!

I went back and reinstalled Bayesflow 2.0 from Github, no issues.  
I then went through and ran the notebook using the three different backends. jax, TensorFlow, and torch. For each of the three backends, I got the same error as in my first post.

As for my setup, I am running the Bayesflow using Python 3.11.0 operating in Visual Studio.  
I am currently using a Mac Pro 16 GB (Graphics Intel HD Graphics 630 1536 MB), operating system BigSur.

Any suggestions you have would be greatly appreciated.

-Mike

---

<div class="post-metadata">

**Author:** ![valentin](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.bayesflow.org/valentin/32/103_2.png) [@valentin](https://discuss.bayesflow.org/u/valentin)\
**Post date:** [April 14, 2025, 8:20am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/4 "2025-04-14T08:20:41Z")

</div>

Thanks for the additional testing! This is really strange, as what it seems to be complaining about is [this method](https://github.com/bayesflow-org/bayesflow/blob/25e632c5555b13d440a4d368bd4fd8c4dc4747a9/bayesflow/networks/deep_set/deep_set.py#L122), which (except for `self`) only takes one argument. The error originates from [this code](https://github.com/keras-team/keras/blob/2111fbca07bd01a98c443f22d4117514fe82a367/keras/src/layers/layer.py#L1830) in the Keras `Layer` class, which seems to not properly exclude `self` from the list of arguments. I’m not sure why it is triggered here, and why it is triggered only for you and not for others. Which version of Keras do you have installed currently?  
I’ll also ask around if someone has similar hardware and can reproduce this.  
If you run one of the other notebooks (e.g., the `Two_Moons_Starter.ipynb`), do you encounter problems as well? Another thing to try is to replace the `DeepSet` with a `SetTransformer`, to see if this is specific to the `DeepSet` class. As the `SetTransformer` uses the same build pattern, I expect to see the same error there, though.

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://avatars.discourse-cdn.com/v4/letter/p/7c8e57/32.png) [@paul.buerkner](https://discuss.bayesflow.org/u/paul.buerkner)\
**Post date:** [April 14, 2025, 8:32am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/5 "2025-04-14T08:32:50Z")

</div>

I have just run it on my Mac (Sequoia 15.3.2) with Python 3.11.0 and it seems all fine. Perhaps an issue with Keras version as @valentin suggested?

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://avatars.discourse-cdn.com/v4/letter/p/7c8e57/32.png) [@paul.buerkner](https://discuss.bayesflow.org/u/paul.buerkner)\
**Post date:** [April 14, 2025, 9:05am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/6 "2025-04-14T09:05:09Z")

</div>

One more question, do you currently run bayesflow on CPU or GPU with your current setup? I am currently running on CPU only on my mac. Perhaps that explains it? Could try running on CPU and see if this fixes it. At least then we could know roughly the source of the problem.

---

<div class="post-metadata">

**Author:** ![Collins.282](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Collins.282](https://discuss.bayesflow.org/u/Collins.282)\
**Post date:** [April 17, 2025, 9:10pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/7 "2025-04-17T21:10:19Z")

</div>

Thanks again for your feedback. From some additional testing, I might have made some progress. I was running Keras version 3.9.0.  
Using Keras version 3.9.0 I ran the Two\_Moons\_Starter.ipynb example. I was not able to fully run the Two\_Moons\_Starter notebook, but I was able to run the notebook longer than the Linear\_Regression example. I got a new error once I tried running the consistency\_model\_workflow.fit\_offline function (error listed below).

```auto
history = consistency_model_workflow.fit_offline(
    training_data, 
    epochs=epochs, 
    batch_size=batch_size, 
    validation_data=validation_data
)

TypeError Traceback (most recent call last)
Cell In[13], line 1
----> 1 history = consistency_model_workflow.fit_offline(
      2 training_data, 
      3 epochs=epochs, 
      4 batch_size=batch_size, 
      5 validation_data=validation_data
      6 )

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bayesflow/workflows/basic_workflow.py:668, in BasicWorkflow.fit_offline(self, data, epochs, batch_size, keep_optimizer, validation_data, **kwargs)
    633 """
    634 Train the approximator offline using a fixed dataset. This approach will be faster than online training,
    635 since no computation time is spent in generating new data for each batch, but it assumes that simulations
   (...) 663 metric evolution over epochs.
    664 """
    666 dataset = OfflineDataset(data=data, batch_size=batch_size, adapter=self.adapter)
--> 668 return self._fit(
    669 dataset, epochs, strategy="online", keep_optimizer=keep_optimizer, validation_data=validation_data, **kwargs
    670 )

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bayesflow/workflows/basic_workflow.py:864, in BasicWorkflow._fit(self, dataset, epochs, strategy, keep_optimizer, validation_data, **kwargs)
    862 return self.history
    863 except Exception as err:
--> 864 raise err
...
    139 )
    141 loss = inference_metrics.get("loss", keras.ops.zeros(())) + summary_metrics.get("loss", keras.ops.zeros(()))
    143 inference_metrics = {f"{key}/inference_{key}": value for key, value in inference_metrics.items()}
TypeError: ConsistencyModel.compute_metrics() got an unexpected keyword argument 'sample_weight'
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

```

Afterwards, I updated keras to the latest version (3.9.2) and then tried to run both the linear\_regression\_example (using Jax, torch, and Tensofor flow) as well as the Two\_Moons\_Starter.ipynb notebook. Running the scripts with the updated keras I experienced the same error in the linear\_regression (initial post) and with the Two\_moons\_Starter notebook (shown above).

In case this information is helpful, here are the versions of the other packages that I am using.  
Keras: 3.9.2  
tensorFlow: 2.16.2  
jax:0.4.38  
torch:2.2.2

---

<div class="post-metadata">

**Author:** ![Collins.282](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Collins.282](https://discuss.bayesflow.org/u/Collins.282)\
**Post date:** [April 17, 2025, 9:12pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/8 "2025-04-17T21:12:01Z")

</div>

Paul

I am sorry for my ignorance, but I am not sure if I am running on my GPU or CPU. Python is not my primary language, and I don’t have a strong computer science background. If you have any resources to know if I am running on my GPU vs CPU, I would be happy to run the scripts on my CPU.

Also, thanks for checking the Bayesflows examples on your computer.

Thanks  
Mike

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://avatars.discourse-cdn.com/v4/letter/p/7c8e57/32.png) [@paul.buerkner](https://discuss.bayesflow.org/u/paul.buerkner)\
**Post date:** [April 18, 2025, 7:30am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/9 "2025-04-18T07:30:52Z")

</div>

That is very strange.

About the GPU question, which deep learning backend of the 3 are you currently using? You installed all 3 apparently, but I am not sure with which you run the notebooks.

---

<div class="post-metadata">

**Author:** ![luka](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@luka](https://discuss.bayesflow.org/u/luka)\
**Post date:** [May 6, 2025, 9:01am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/10 "2025-05-06T09:01:28Z")

</div>

Hi, in case it if of any help to anyone; I have the same issue where I get the following error when running `history = workflow.fit_online(epochs=50, batch_size=64, num_batches_per_epoch=200)` in `Linear_Regression_Starter.ipynb`.

```auto
ValueError: For a `build()` method with more than one argument, all arguments should have a `_shape` suffix and match an argument from `call()`. E.g. `build(self, foo_shape, bar_shape)` For layer 'SetTransformer', Received `build()` argument `self`, which does not end in `_shape`.

```

I am however able to run the entirety of the `Two_Moons_Starter.ipynb` on MacOS Sequoia 15.4. I installed `bayesflow==2.0.3` via the main branch with `keras==3.9.1`, and `Tensorflow==2.19.0` as the backend.

---

<div class="post-metadata">

**Author:** ![KLDivergence](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.bayesflow.org/kldivergence/32/15_2.png) [@KLDivergence](https://discuss.bayesflow.org/u/KLDivergence)\
**Post date:** [May 6, 2025, 1:42pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/11 "2025-05-06T13:42:24Z")

</div>

Hi all, I cannot reproduce the error on either backend using Windows or Linux. What could be amiss here?

---

<div class="post-metadata">

**Author:** ![valentin](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.bayesflow.org/valentin/32/103_2.png) [@valentin](https://discuss.bayesflow.org/u/valentin)\
**Post date:** [May 6, 2025, 1:43pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/12 "2025-05-06T13:43:41Z")

</div>

Hi luka,  
thanks a lot for sharing! Would you be willing to try a few things so that we can see whether we can fix this?

The issue is a bit weird, so I can only guess. The error message does not really make sense, but is related to the parameter names used in `call` and `build`. Usually, they should be some parameter name in call, e.g. `input` or `x`, and the same name with the suffix `_shape` in `build`, so `input_shape` or `x_shape`.  
If there is only one parameter, a mismatch does not pose a problem and is normally ignored. Here, it isn’t ignored (hence the error), but the error message highlights the `self` parameter and not the `input_set` parameter.  
In the `SetTransformer` class there is a mismatch. In `call` we have `input_set`, whereas in `build`, we have `input_shape` (inherited from `SummaryNetwork`). I have changed this in this branch:

> **[GitHub - bayesflow-org/bayesflow at fix-issue-mac-shape](https://github.com/bayesflow-org/bayesflow/tree/fix-issue-mac-shape)**
>
> fix-issue-mac-shape

You can use

```bash
pip install https://github.com/bayesflow-org/bayesflow.git@fix-issue-mac-shape

```

to try it out. It would be great if you let us know if this changes anything 🙂

@KLDivergence See the history of the thread, for now we only encounter the issue on Macs, but also not on all Macs. It is all a bit weird…

---

<div class="post-metadata">

**Author:** ![luka](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@luka](https://discuss.bayesflow.org/u/luka)\
**Post date:** [May 8, 2025, 12:14pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/13 "2025-05-08T12:14:02Z")

</div>

Hi valentin,

I have run the `Linear_Regression_Starter.ipynb` notebook again in a different environment using the `fix-issue-mac-shape` branch, but I get the same error as before. The `Two_Moons_Starter.ipynb` notebook still runs fine.  
I am happy to test anything else if it is of any help!

---

<div class="post-metadata">

**Author:** ![valentin](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.bayesflow.org/valentin/32/103_2.png) [@valentin](https://discuss.bayesflow.org/u/valentin)\
**Post date:** [May 8, 2025, 12:17pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/14 "2025-05-08T12:17:39Z")

</div>

Thanks a lot for trying it out! `Two_Moons_Starter.ipynb` working and `Linear_Regression_Starter.ipynb` failing indicates a problem with the summary network(s), the error message also goes into this direction. To narrow this down a bit, could you please replace the `SetTransformer` in the notebook with a `DeepSet`, and report if and which error message you get?

---

<div class="post-metadata">

**Author:** ![luka](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@luka](https://discuss.bayesflow.org/u/luka)\
**Post date:** [May 12, 2025, 12:26pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/15 "2025-05-12T12:26:30Z")

</div>

Hi Valentin,

Replacing `SetTransformer` with `DeepSet` gives me a similar error:

```auto

history = workflow.fit_online(epochs=50, batch_size=64, num_batches_per_epoch=200)

INFO:bayesflow:Fitting on dataset instance of OnlineDataset.
INFO:bayesflow:Building on a test batch.

---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[19], line 1
----> 1 history = workflow.fit_online(epochs=50, batch_size=64, num_batches_per_epoch=200)

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/bayesflow/workflows/basic_workflow.py:761, in BasicWorkflow.fit_online(self, epochs, num_batches_per_epoch, batch_size, keep_optimizer, validation_data, **kwargs)
    727 """
    728 Train the approximator using an online data-generating process. The dataset is dynamically generated during
    729 training, making this approach suitable for scenarios where generating new simulations is computationally cheap.
   (...) 754 metric evolution over epochs.
    755 """
    757 dataset = OnlineDataset(
    758 simulator=self.simulator, batch_size=batch_size, num_batches=num_batches_per_epoch, adapter=self.adapter
    759 )
--> 761 return self._fit(
    762 dataset, epochs, strategy="online", keep_optimizer=keep_optimizer, validation_data=validation_data, **kwargs
    763 )

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/bayesflow/workflows/basic_workflow.py:913, in BasicWorkflow._fit(self, dataset, epochs, strategy, keep_optimizer, validation_data, **kwargs)
    910 self.approximator.compile(optimizer=self.optimizer, metrics=kwargs.pop("metrics", None))
    912 try:
--> 913 self.history = self.approximator.fit(
    914 dataset=dataset, epochs=epochs, validation_data=validation_data, **kwargs
    915 )
    916 self._on_training_finished()
    917 return self.history

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/bayesflow/approximators/continuous_approximator.py:214, in ContinuousApproximator.fit(self, *args, **kwargs)
    162 def fit(self, *args, **kwargs):
    163 """
    164 Trains the approximator on the provided dataset or on-demand data generated from the given simulator.
    165 If `dataset` is not provided, a dataset is built from the `simulator`.
   (...) 212 If both `dataset` and `simulator` are provided or neither is provided.
    213 """
--> 214 return super().fit(*args, **kwargs, adapter=self.adapter)

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/bayesflow/approximators/approximator.py:137, in Approximator.fit(self, dataset, simulator, **kwargs)
    135 mock_data = dataset[0]
    136 mock_data = keras.tree.map_structure(keras.ops.convert_to_tensor, mock_data)
--> 137 self.build_from_data(mock_data)
    139 return super().fit(dataset=dataset, **kwargs)

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/bayesflow/approximators/approximator.py:26, in Approximator.build_from_data(self, data)
     25 def build_from_data(self, data: Mapping[str, any]) -> None:
---> 26 self.compute_metrics(**filter_kwargs(data, self.compute_metrics), stage="training")
     27 self.built = True

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/bayesflow/approximators/continuous_approximator.py:138, in ContinuousApproximator.compute_metrics(self, inference_variables, inference_conditions, summary_variables, sample_weight, stage)
    135 if summary_variables is None:
    136 raise ValueError("Summary variables are required when a summary network is present.")
--> 138 summary_metrics = self.summary_network.compute_metrics(summary_variables, stage=stage)
    139 summary_outputs = summary_metrics.pop("outputs")
    141 # append summary outputs to inference conditions

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/bayesflow/networks/summary_network.py:38, in SummaryNetwork.compute_metrics(self, x, stage, **kwargs)
     37 def compute_metrics(self, x: Tensor, stage: str = "training", **kwargs) -> dict[str, Tensor]:
---> 38 outputs = self(x, training=stage == "training")
     40 metrics = {"outputs": outputs}
     42 if self.base_distribution is not None:

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/keras/src/utils/traceback_utils.py:122, in filter_traceback.<locals>.error_handler(*args, **kwargs)
    119 filtered_tb = _process_traceback_frames(e. __traceback__ )
    120 # To get the full stack trace, call:
    121 # `keras.config.disable_traceback_filtering()`
--> 122 raise e.with_traceback(filtered_tb) from None
    123 finally:
    124 del filtered_tb

File /opt/anaconda3/envs/bfnnew/lib/python3.11/site-packages/keras/src/layers/layer.py:1805, in update_shapes_dict_for_target_fn(target_fn, shapes_dict, call_spec, class_name)
   1799 error_preamble = (
   1800 f"For a `{method_name}()` method with more than one argument, all "
   1801 "arguments should have a `_shape` suffix and match an argument "
   1802 f"from `call()`. E.g. `{method_name}(self, foo_shape, bar_shape)` "
   1803 )
   1804 if not name.endswith("_shape"):
-> 1805 raise ValueError(
   1806 f"{error_preamble} For layer '{class_name}', "
   1807 f"Received `{method_name}()` argument "
   1808 f"`{name}`, which does not end in `_shape`."
   1809 )
   1810 expected_call_arg = utils.removesuffix(name, "_shape")
   1811 if expected_call_arg not in call_spec.arguments_dict:

ValueError: For a `build()` method with more than one argument, all arguments should have a `_shape` suffix and match an argument from `call()`. E.g. `build(self, foo_shape, bar_shape)` For layer 'DeepSet', Received `build()` argument `self`, which does not end in `_shape`.

```

---

<div class="post-metadata">

**Author:** ![valentin](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.bayesflow.org/valentin/32/103_2.png) [@valentin](https://discuss.bayesflow.org/u/valentin)\
**Post date:** [May 14, 2025, 8:47am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/16 "2025-05-14T08:47:26Z")

</div>

Hi luka,  
thanks for trying it out. I think our best way forward is to try to construct a minimal reproducible example of the behavior, if possible in Keras 3 code without using BayesFlow, so that we can potentially file an issue with Keras. If we cannot achieve this, maybe the process gives us hints where the BayesFlow code does something unusual that causes the error.  
We will try to come up with something, but we are quite limited as we cannot reproduce the problem locally. If you have ideas in the meantime, feel free to experiment as well and let us know your results.

---

<div class="post-metadata">

**Author:** ![luka](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@luka](https://discuss.bayesflow.org/u/luka)\
**Post date:** [May 14, 2025, 9:05am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/17 "2025-05-14T09:05:07Z")

</div>

Hi valentin,

That makes sense, let me know if I can help again at a later time!

---

<div class="post-metadata">

**Author:** ![LarsKue](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.bayesflow.org/larskue/32/100_2.png) [@LarsKue](https://discuss.bayesflow.org/u/LarsKue)\
**Post date:** [May 14, 2025, 1:42pm UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/18 "2025-05-14T13:42:44Z")

</div>

Hi @luka and @Collins.282

Could you please provide a lockfile for a clean environment where you install BayesFlow? A pip log would also work, e.g. something like

```auto
conda create -n test python=3.11
conda activate test
pip install -U jax git+https://github.com/bayesflow-org/bayesflow.git@dev -v --log install_log.txt

```

---

<div class="post-metadata">

**Author:** ![luka](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@luka](https://discuss.bayesflow.org/u/luka)\
**Post date:** [June 10, 2025, 7:29am UTC](https://discuss.bayesflow.org/t/getting-error-running-linear-regression-example/143/19 "2025-06-10T07:29:42Z")

</div>

Hi LarsKue,

Apologies for the late reply. I created a clean environment today following your provided commands and I am able to run the Linear\_Regression\_Starter.ipynb now after all!  
Thanks for the help!
