From 8d56874c6dd938fde7b420a21cbba66eb8e609ce Mon Sep 17 00:00:00 2001 From: Marius Arvinte Date: Fri, 9 Oct 2026 14:30:48 -0700 Subject: [PATCH 1/2] Downgrade OSSF scorecard --- .github/workflows/scorecard.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 4baaaf0..20c3493 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -33,7 +33,8 @@ jobs: ref: main - name: "Run analysis" - uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4 + # v2.4.4 hangs on requirements.txt resolution (https://github.com/ossf/scorecard/issues/5234) + uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 with: results_file: results.sarif results_format: sarif From 5588a2c74b9efd6f8d5e5f4798586d8a25e20f63 Mon Sep 17 00:00:00 2001 From: Marius Arvinte Date: Fri, 9 Oct 2026 14:37:49 -0700 Subject: [PATCH 2/2] Drop ntlk as permanent dependency --- examples/fact_checking/Makefile | 16 ++++++++++++---- examples/fact_checking/README.md | 11 +++-------- examples/fact_checking/requirements.txt | 1 - 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/examples/fact_checking/Makefile b/examples/fact_checking/Makefile index 02e226b..6de90bb 100644 --- a/examples/fact_checking/Makefile +++ b/examples/fact_checking/Makefile @@ -8,11 +8,19 @@ include ../../preamble.mk num_steps=2 args=--num_steps $(num_steps) +nltk=nltk==3.10.3 all: run -run: -> $(RUN_GPU) --with-requirements requirements.txt claim.py $(args) -> $(RUN_GPU) --with-requirements requirements.txt document.py $(args) +nltk_data: +> uv run --isolated --no-project --with $(nltk) -m nltk.downloader punkt_tab -.PHONY: all run +claim: nltk_data +> $(RUN_GPU) --with-requirements requirements.txt --with $(nltk) claim.py $(args) + +document: nltk_data +> $(RUN_GPU) --with-requirements requirements.txt --with $(nltk) document.py $(args) + +run: claim document + +.PHONY: all nltk_data claim document run diff --git a/examples/fact_checking/README.md b/examples/fact_checking/README.md index 4c5115d..7a9bedc 100644 --- a/examples/fact_checking/README.md +++ b/examples/fact_checking/README.md @@ -1,11 +1,6 @@ # Basics and requirements Install `uv` and `llmart`, and download/navigate to this folder. -If this is the first time running this example on a machine and an error related to `ntlk` occurs, it can be resolved by manually running: -```bash -uv run --with nltk==3.9.1 -m nltk.downloader "punkt_tab" -``` - ## White-box attacks with `llmart` The attacks run end-to-end adversarial optimization on the fact-checking task used by the MiniCheck framework. @@ -13,10 +8,10 @@ The attacks run end-to-end adversarial optimization on the fact-checking task us MiniCheck paper: https://arxiv.org/abs/2404.10774 \ MiniCheck repository: https://github.com/Liyan06/MiniCheck -Given a claim and a document, appending adversarial suffixes for either can be run using the commands: +Given a claim and a document, appending adversarial suffixes for either can be run using the command below, which also downloads the required NLTK `punkt_tab` tokenizer data: ```bash -uv run --with-requirements requirements.txt document.py -uv run --with-requirements requirements.txt claim.py +make document num_steps=1000 +make claim num_steps=1000 ``` > [!NOTE] diff --git a/examples/fact_checking/requirements.txt b/examples/fact_checking/requirements.txt index 8e041a9..5e16fac 100644 --- a/examples/fact_checking/requirements.txt +++ b/examples/fact_checking/requirements.txt @@ -1,2 +1 @@ fire==0.7.0 -nltk==3.9.1