Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lectures/back_prop.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ In addition to what's included in base Anaconda, we need to install the followin

```{code-cell} ipython3
:tags: [hide-output]

!pip install kaleido
!conda install -y -c plotly plotly plotly-orca retrying
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message=".*os.fork.*")
!pip install kaleido
!conda install -y -c plotly plotly plotly-orca retrying
```

```{note}
Expand Down
15 changes: 12 additions & 3 deletions lectures/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,20 @@ These lectures are built on `linux` instances through `github actions`.
These lectures are using the following python version

```{code-cell} ipython
!python --version
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message=".*os.fork.*")
!python --version
```

and the following package versions

```{code-cell} ipython
:tags: [hide-output]
!conda list
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message=".*os.fork.*")
!conda list
```

You can check the backend used by JAX using:
Expand All @@ -44,5 +50,8 @@ print(f"JAX backend: {jax.devices()[0].platform}")
and this lecture series also has access to the following GPU

```{code-cell} ipython
!nvidia-smi
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message=".*os.fork.*")
!nvidia-smi
```
9 changes: 9 additions & 0 deletions lectures/two_auctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ def evaluate_largest(v_hat, array, order=1):
array_conditional=array_residual[:,index].copy()

array_conditional=np.sort(array_conditional, axis=0)

# Handle empty array case to avoid "Mean of empty slice" warning
if array_conditional.shape[1] == 0:
return np.nan

return array_conditional[-order,:].mean()
```

Expand Down Expand Up @@ -561,6 +566,10 @@ class bid_price_solution:

array_conditional=np.sort(array_conditional, axis=0)

# Handle empty array case to avoid "Mean of empty slice" warning
if array_conditional.shape[1] == 0:
return np.nan

return array_conditional[-order,:].mean()

def compute_optimal_bid_FPSB(self):
Expand Down