# Environment defect: the repo cannot be installed and run today

**Repo:** https://github.com/benben-cd/PT-Conformal-Prediction
**Paper:** arXiv 2601.21455 (ICML 2026)
**Found:** 2026-07-16, on a clean machine.

## Symptom

A fresh install following `requirements.txt` crashes on the `star` dataset:

```
File ".../pandas/core/arrays/string_.py", line 839, in _maybe_convert_setitem_value
    raise TypeError(
TypeError: Invalid value '0' for dtype 'str'. Value should be a string or missing value,
got 'int' instead.
```

## Cause

`datasets/datasets.py` (the `star` loader) assigns integers into string columns:

```python
df.loc[df['gender'] == 'female', 'gender'] = 0
df.loc[df['ethnicity'] == 'cauc', 'ethnicity'] = 0
```

On pandas 1.x/2.x these columns are `object` dtype and the assignment silently works.
**pandas 3.x enforces `str` dtype strictly and raises.**

`requirements.txt` pins:

```
pandas>=1.5
```

No upper bound. So a clean install in July 2026 resolves **pandas 3.0.3**, and the code
cannot run. `bike` and `concrete` survive only because their loaders never touch string
columns; `star` (and, by inspection, the MEPS loaders) do.

## Fix

```
pandas>=1.5,<3
```

Verified: with `pandas 2.3.3`, `star` loads cleanly — `X=(2161, 39)`, `y=(2161,)` — and
reproduces Table 3 to 0.01%.

## Why this matters more than it looks

This is the only one of the three defects we found that fails **loudly**. The other two
(wrong `bias` constants in Table 1 and Table 3) fail **silently**, returning plausible
numbers that are simply wrong. A reproducer hitting all three today would most likely
conclude the paper does not replicate.

It does. It replicates to four significant figures.