From 45241df2babaa7cd22a114f846fe1eddb7c36f71 Mon Sep 17 00:00:00 2001 From: GitHub Contributor Bot Date: Sat, 11 Jul 2026 20:03:01 +0530 Subject: [PATCH 1/5] fix: Fix: Add README notice about non-commercial license for pretrained weights --- README.md | 39 ++++++++++++++++++++++++++---- tests/test_readme_documentation.py | 27 +++++++++++++++++++++ 2 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 tests/test_readme_documentation.py diff --git a/README.md b/README.md index 0fcffd5..5f88cc7 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,21 @@ For a complete list of pinned dependencies and versions, please see [requirement --- -## Quick Start (TabFM v1.0.0) +## License notice for pretrained weights + +> **Important:** The TabFM source code in this repository is licensed under +> Apache-2.0. However, the default Quick Start calls `tabfm_v1_0_0.load()`, +> which automatically downloads pretrained weights from Hugging Face. Those +> pretrained weights are distributed under the separate +> `tabfm-non-commercial-v1.0` license and are restricted to non-commercial, +> non-production use. Commercial or production use of the default pretrained +> weights is **not permitted**. + +--- -We provide pre-trained weights for the **TabFM v1.0.0** release. The library handles downloading and loading these weights automatically. You can choose to load the model using either the JAX or PyTorch backend. +## Quick Start (TabFM v1.0.0) +We provide pre-trained weights for the **TabFM v1.0.0** release. The library handles downloading and loading these weights automatically from Hugging Face. These default weights are governed by the separate `tabfm-non-commercial-v1.0` license described above. ### 1. Classification Example ```python @@ -156,14 +167,32 @@ Our model evaluation results can be found in [results/](results/). --- +## FAQ + +### Is there a maximum table size for TabFM inputs? + +TabFM uses in-context learning over a bounded context window, so very large +tables should be sampled or split before inference. The scikit-learn estimators +expose the main practical limits through `max_num_features` and `max_num_rows` +(defaults are 500 features and 100 context rows), plus `n_estimators` for +ensembling over multiple sampled contexts and `inference_batch_size` for memory +control. If your dataset is larger than these limits, TabFM will work with the +sampled/context rows rather than consuming the full table at once. + +### Is there a TabFM technical report or paper? + +A technical report is not included in this repository at this time. If a report +or paper describing the architecture, training pipeline, datasets, and evaluation +methodology is released, this README will be updated with a link. + +--- ## Running Tests You can run the unit tests directly using Python's `unittest` module: ```bash -# Run all tests (requires both JAX and PyTorch installed) -PYTHONPATH=. python3 -m unittest discover -s tabfm/src/ -p "*_test.py" - +(defaults are 500 features and no fixed row cap), plus `n_estimators` for +ensembling over multiple sampled contexts and `batch_size` for memory control. # Or run specific test files: PYTHONPATH=. python3 -m unittest tabfm/src/pytorch/model_test.py PYTHONPATH=. python3 -m unittest tabfm/src/classifier_and_regressor_pytorch_test.py diff --git a/tests/test_readme_documentation.py b/tests/test_readme_documentation.py new file mode 100644 index 0000000..0a39a6b --- /dev/null +++ b/tests/test_readme_documentation.py @@ -0,0 +1,27 @@ +from pathlib import Path + + +README = Path(__file__).resolve().parents[1] / "README.md" + + +def _readme_text() -> str: + return README.read_text(encoding="utf-8") + + +def test_readme_warns_about_default_weight_license(): + text = _readme_text() + + assert "Apache-2.0" in text + assert "tabfm-non-commercial-v1.0" in text + assert "Commercial or production use" in text + assert "not permitted" in text + assert "Hugging Face" in text + + +def test_readme_answers_grouped_documentation_faqs(): + text = _readme_text() + + assert "Is there a maximum table size" in text + assert "max_num_features" in text + assert "max_num_rows" in text + assert "Is there a TabFM technical report or paper?" in text From 2e6e6383b366cb5a52756cf71803ee838d800317 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 24 Jul 2026 01:04:38 +0530 Subject: [PATCH 2/5] Deleted tests/test_readme_documentation.py --- tests/test_readme_documentation.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 tests/test_readme_documentation.py diff --git a/tests/test_readme_documentation.py b/tests/test_readme_documentation.py deleted file mode 100644 index 0a39a6b..0000000 --- a/tests/test_readme_documentation.py +++ /dev/null @@ -1,27 +0,0 @@ -from pathlib import Path - - -README = Path(__file__).resolve().parents[1] / "README.md" - - -def _readme_text() -> str: - return README.read_text(encoding="utf-8") - - -def test_readme_warns_about_default_weight_license(): - text = _readme_text() - - assert "Apache-2.0" in text - assert "tabfm-non-commercial-v1.0" in text - assert "Commercial or production use" in text - assert "not permitted" in text - assert "Hugging Face" in text - - -def test_readme_answers_grouped_documentation_faqs(): - text = _readme_text() - - assert "Is there a maximum table size" in text - assert "max_num_features" in text - assert "max_num_rows" in text - assert "Is there a TabFM technical report or paper?" in text From 2fac10b3cc8829d97eec3d1cbb63653ed80b87c2 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 24 Jul 2026 01:37:12 +0530 Subject: [PATCH 3/5] Fix README running tests section Removed duplicated README text from the Running Tests section. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 5f88cc7..a9f075d 100644 --- a/README.md +++ b/README.md @@ -191,8 +191,6 @@ methodology is released, this README will be updated with a link. You can run the unit tests directly using Python's `unittest` module: ```bash -(defaults are 500 features and no fixed row cap), plus `n_estimators` for -ensembling over multiple sampled contexts and `batch_size` for memory control. # Or run specific test files: PYTHONPATH=. python3 -m unittest tabfm/src/pytorch/model_test.py PYTHONPATH=. python3 -m unittest tabfm/src/classifier_and_regressor_pytorch_test.py From 6f1e3dd9df0d1765608cc49eb5cb92262d5648a2 Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 27 Jul 2026 11:07:13 +0530 Subject: [PATCH 4/5] Restore README test command Restore the unittest discovery command while keeping the duplicated README text removed. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a9f075d..49de62b 100644 --- a/README.md +++ b/README.md @@ -191,12 +191,16 @@ methodology is released, this README will be updated with a link. You can run the unit tests directly using Python's `unittest` module: ```bash +# Run all tests (requires both JAX and PyTorch installed) +PYTHONPATH=. python3 -m unittest discover -s tabfm/src/ -p "*_test.py" + # Or run specific test files: PYTHONPATH=. python3 -m unittest tabfm/src/pytorch/model_test.py PYTHONPATH=. python3 -m unittest tabfm/src/classifier_and_regressor_pytorch_test.py ``` Alternatively, if you have Bazel installed, you can run tests with: + ```bash bazel test //... ``` From b5b7bc3d6347f02a00021781dd24c68da102b617 Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 27 Jul 2026 11:09:25 +0530 Subject: [PATCH 5/5] Restore README test command Restore the unittest discovery command while keeping the duplicated README text removed.