google-research / google-research/tabfm

Examples not working, results in 'FileNotFoundError: Weights not found...' error

Open
#53 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.6k
Forks
270
Avg merge
1d 7h
Merged PRs (30d)
1

Description

Hi, I've installed using `uv pip install tabfm[pytorch]`

When running any of the examples in the example directory, I get an error about missing weights. Please let me know if I'm missing something really obvious. I've deleted the huggingface directory a few times, and it does download

```
(tabfm-test) mendhak@devmint:~/Projects/tabfm_test$ python3 tabarena_classification_example.py
Running TabFM classification on TabArena maternal_health_risk (fold 0)... (Note: compilation and model execution may take a few minutes on first run)
Fetching 8 files: 100%|██████████████████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 183357.55it/s]
Download complete: : 0.00B [00:00, ?B/s] Traceback (most recent call last): | 0/8 [00:00
scores = run_example()
File "/home/mendhak/Projects/tabfm_test/tabarena_classification_example.py", line 102, in run_example
model = tabfm.tabfm_v1_0_0_pytorch.load(model_type="classification")
File "/home/mendhak/Projects/tabfm_test/.venv/lib/python3.13/site-packages/tabfm/src/pytorch/tabfm_v1_0_0.py", line 116, in load
raise FileNotFoundError(f"Weights not found at: {checkpoint_file}")
FileNotFoundError: Weights not found at: /home/mendhak/.cache/huggingface/hub/models--google--tabfm-1.0.0-pytorch/snapshots/77cb9cc1b4fd3a9c77fbb9552c218200bb4dab83/classification/pytorch_model.bin

```

The only files in that mentioned directory are:

```
$ ls -lah /home/mendhak/.cache/huggingface/hub/models--google--tabfm-1.0.0-pytorch/snapshots/77cb9cc1b4fd3a9c77fbb9552c218200bb4dab83/classification/
total 12K
drwxrwxr-x 2 mendhak mendhak 4.0K Jul 4 22:21 .
drwxrwxr-x 4 mendhak mendhak 4.0K Jul 4 22:18 ..
lrwxrwxrwx 1 mendhak mendhak 55 Jul 4 22:18 config.json -> ../../../blobs/92473880ee9cccf321d9b010d5cf7fbb46ed583b
lrwxrwxrwx 1 mendhak mendhak 79 Jul 4 22:21 model.safetensors -> ../../../blobs/928cb350becdc77cdb7a9e8c36deda88917bfd14a3091894a2dc516db58a2085
```

Contributor guide

Open the contributing guide

Research direction

Start with tabarena_classification_example.py around line 102 and the installed tabfm/src/pytorch/tabfm_v1_0_0.py around line 116. Compare the checkpoint file the loader expects with the model.safetensors file present in the Hugging Face cache, then rerun the classification example; done means the example loads its weights and proceeds past the FileNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.