lnccbrown / lnccbrown/LANfactory

Drift on pandas 3.x breaks Copy-on-Write in trainers

Open
#139 1 comment 0 reactions 1 assignee View on GitHub

@cpaniaguam is already working on this.

Since Sep 9, 2026.

  • #140 by @cpaniaguam — open
Dominant language
Python
Stars
16
Forks
4
Avg merge
3d 7h
Merged PRs (30d)
8

Description

pandas 3.0 enables Copy-on-Write by default, which marks possibly-shared numpy buffers read-only and makes mutation through `DataFrame.values` an error:

```
ValueError: assignment destination is read-only
src/lanfactory/trainers/jax_mlp.py:595
training_history.values[epoch, :] = [int(epoch), float(test_loss)]
```
Same pattern at `torch_mlp.py:823`. Writing through `.values` was never supported — it worked only because pandas returned a writable view. `test_jax_train_cli_smoke` fails; the torch smoke test has the identical bug.

Fix: use `.iloc[epoch]` in both trainers.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.