lnccbrown / lnccbrown/LANfactory
Drift on pandas 3.x breaks Copy-on-Write in trainers
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.