Below is a truncated version that fits into the word limit of issue messages.
(nemotron) ➜ Nemotron git:(main) uv run pre-commit run --all-files
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook
Fixing use-case-examples/Data Science ML Agent/src/llm.py
Fixing use-case-examples/Data Science ML Agent/src/chat_agent.py
Fixing src/nemotron/recipes/embed/stage0_sdg/vendor/retriever-sdg/src/retriever_sdg/__init__.py
Fixing use-case-examples/Data Science ML Agent/src/tools/exp_store.py
Fixing src/nemotron/data_prep/packing/materialize.py
Fixing src/nemotron/recipes/embed/stage1_data_prep/scripts/convert_to_retriever_data.py
Fixing src/nemotron/data_prep/config.py
Fixing use-case-examples/Data Science ML Agent/extrapolation.py
Fixing src/nemotron/cli/commands/super3/rl/_base.py
Fixing src/nemotron/data_prep/packing/spool.py
Fixing src/nemo_runspec/config/loader.py
Fixing use-case-examples/nemotron-voice-rag-agent-example/nemotron_family_multimodal_rag_agent/__init__.py
Fixing use-case-examples/Data Science ML Agent/user_interface.py
Fixing src/nemotron/data_prep/packing/bin_assignment.py
Fixing use-case-examples/Data Science ML Agent/src/tools/gpu_tools.py
Fixing docs/conf.py
Fixing src/nemo_runspec/run.py
Fixing tests/kit/test_artifact.py
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing src/nemotron/recipes/data/sdg/long-document/05-visual-qa-sdg.py
Fixing use-case-examples/Data Science ML Agent/src/llm.py
Fixing use-case-examples/Data Science ML Agent/src/chat_agent.py
Fixing use-case-examples/Data Science ML Agent/src/tools/exp_store.py
Fixing tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py
Fixing src/nemotron/recipes/embed/stage1_data_prep/scripts/convert_to_retriever_data.py
Fixing src/nemotron/recipes/embed/stage0_sdg/vendor/retriever-sdg/src/retriever_sdg/deduplication.py
Fixing use-case-examples/Data Science ML Agent/user_interface.py
Fixing use-case-examples/Data Science ML Agent/src/tools/gpu_tools.py
Fixing src/nemotron/recipes/embed/stage0_sdg/vendor/retriever-sdg/src/retriever_sdg/pipeline.py
ruff.....................................................................Failed
- hook id: ruff
- exit code: 1
- files were modified by this hook
scripts/test_pack_memory.py:85:5: F841 Local variable `manifest` is assigned to but never used
|
83 | log_memory("After writing sequences")
84 |
85 | manifest = writer.finalize(extra_manifest={
| ^^^^^^^^ F841
86 | "shard_id": "test_shard",
87 | "shard_index": 0,
|
= help: Remove assignment to unused variable `manifest`
scripts/test_pack_memory.py:180:5: F841 Local variable `result` is assigned to but never used
|
178 | print("\n--- Running pack as Ray task ---")
179 | result_ref = pack_task.remote(spool_dir, output_dir, pack_size)
180 | result = ray.get(result_ref)
| ^^^^^^ F841
181 | log_memory("After ray.get() of pack task")
|
= help: Remove assignment to unused variable `result`
src/nemo_runspec/_pyproject.py:40:8: UP038 Use `X | Y` in `isinstance` call instead of `(X, Y)`
|
38 | if isinstance(value, bool):
39 | return "true" if value else "false"
40 | if isinstance(value, (int, float)):
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP038
41 | return str(value)
42 | if isinstance(value, list):
|
= help: Convert to `X | Y`
src/nemo_runspec/config/loader.py:197:9: N806 Variable `_RESOURCE_KEYS` in function should be lowercase
|
195 | # The recipe knows how many nodes/GPUs it needs; env.toml provides cluster
196 | # logistics (account, partition, tunnel, mounts) the recipe doesn't know about.
197 | _RESOURCE_KEYS = ("nodes", "gpus_per_node", "ntasks_per_node", "nproc_per_node")
| ^^^^^^^^^^^^^^ N806
198 | for key in _RESOURCE_KEYS:
199 | if key in existing_env:
|
...
tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py:101:120: E501 Line too long (148 > 119)
|
99 | …
100 | …
101 | …d state["output_tok_ids"][-1] in NEWLINE_TOKENS and not state["start_of_end"]:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
102 | …
|
tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py:124:120: E501 Line too long (2973 > 119)
|
122 | …
123 | …
124 | …Leesins World Championship comes to an end! \n\nThe tournament consisted of $n$ ($n \\ge 5$) teams around the world. Before the tournament starts, Bob has made a prediction of the rankings of each team, from $1$-st to $n$-th. After the final, he compared the prediction with the actual result and found out that the $i$-th team according to his prediction ended up at the $p_i$-th position ($1 \\le p_i \\le n$, all $p_i$ are unique). In other words, $p$ is a permutation of $1, 2, \\dots, n$.\n\nAs Bob's favorite League player is the famous \"3ga\", he decided to write down every $3$ consecutive elements of the permutation $p$. Formally, Bob created an array $q$ of $n-2$ triples, where $q_i = (p_i, p_{i+1}, p_{i+2})$ for each $1 \\le i \\le n-2$. Bob was very proud of his array, so he showed it to his friend Alice.\n\nAfter learning of Bob's array, Alice declared that she could retrieve the permutation $p$ even if Bob rearranges the elements of $q$ and the elements within each triple. Of course, Bob did not believe in such magic, so he did just the same as above to see Alice's respond.\n\nFor example, if $n = 5$ and $p = [1, 4, 2, 3, 5]$, then the original array $q$ will be $[(1, 4, 2), (4, 2, 3), (2, 3, 5)]$. Bob can then rearrange the numbers within each triple and the positions of the triples to get $[(4, 3, 2), (2, 3, 5), (4, 1, 2)]$. Note that $[(1, 4, 2), (4, 2, 2), (3, 3, 5)]$ is not a valid rearrangement of $q$, as Bob is not allowed to swap numbers belong to different triples.\n\nAs Alice's friend, you know for sure that Alice was just trying to show off, so you decided to save her some face by giving her any permutation $p$ that is consistent with the array $q$ she was given. \n\n\n-----Input-----\n\nThe first line contains a single integer $n$ ($5 \\le n \\le 10^5$) — the size of permutation $p$.\n\nThe $i$-th of the next $n-2$ lines contains $3$ integers $q_{i, 1}$, $q_{i, 2}$, $q_{i, 3}$ ($1 \\le q_{i, j} \\le n$) — the elements of the $i$-th triple of the rearranged (shuffled) array $q_i$, in random order. Remember, that the numbers within each triple can be rearranged and also the positions of the triples can be rearranged.\n\nIt is guaranteed that there is at least one permutation $p$ that is consistent with the input. \n\n\n-----Output-----\n\nPrint $n$ distinct integers $p_1, p_2, \\ldots, p_n$ ($1 \\le p_i \\le n$) such that $p$ is consistent with array $q$. \n\nIf there are multiple answers, print any. \n\n\n-----Example-----\nInput\n5\n4 3 2\n2 3 5\n4 1 2\n\nOutput\n1 4 2 3 5\n\n\nRead the inputs from stdin solve the problem and write the answer to stdout (do not directly test on the sample inputs). Enclose your code within delimiters as follows. Ensure that when the python program runs, it reads the inputs, runs the algorithm and writes output to STDOUT.\n```python\n# YOUR CODE HERE\n```"""
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^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ku about a cat"}]
|
tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py:126:120: E501 Line too long (142 > 119)
|
124 | …ns\", and today he celebrates as the League of Leesins World Championship comes to an end! \n\nThe tournament consisted of $n$ ($n \…
125 | …sistant. /think"},{"role": "user", "content": msg}]
126 | …sistant. /think"},{"role": "user", "content": "Write a haiku about a cat"}]
| ^^^^^^^^^^^^^^^^^^^^^^^ E501
127 | …
|
tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py:129:120: E501 Line too long (125 > 119)
|
127 | tokenizer = AutoTokenizer.from_pretrained(model)
128 |
129 | prompts = [tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, add_special_tokens=False),
| ^^^^^^ E501
130 | tokenizer.apply_chat_template(messages2, tokenize=False, add_generation_prompt=True, add_special_tokens=False)]
|
tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py:130:120: E501 Line too long (123 > 119)
|
129 | prompts = [tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, add_special_tokens=False),
130 | tokenizer.apply_chat_template(messages2, tokenize=False, add_generation_prompt=True, add_special_tokens=False)]
| ^^^^ E501
131 |
132 | sampling_params_list = [SamplingParams(temperature=0.6, max_tokens=1220, extra_args={"thinking_budget": 150, "thinking_budget_gra…
|
tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py:132:120: E501 Line too long (253 > 119)
|
130 | …s=False)]
131 | …
132 | …thinking_budget_grace_period": 30, "end_token_ids":[1871, 5565, 11483, 6139, 1046, 2259, 74045, 1062]}), # Reached thinking limit. </think>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
133 | …thinking_budget_grace_period": 20, "end_token_ids":[2259, 74045, 1062]})] # </think>
|
tools/budget/custom_logit_processors/v1/nano_v3_logit_processors.py:133:120: E501 Line too long (198 > 119)
|
132 | …ing_budget": 150, "thinking_budget_grace_period": 30, "end_token_ids":[1871, 5565, 11483, 6139, 1046, 2259, 74045, 1062]}), # Reache…
133 | …ing_budget": 120, "thinking_budget_grace_period": 20, "end_token_ids":[2259, 74045, 1062]})] # </think>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
134 | …
135 | …
|
Found 611 errors (326 fixed, 285 remaining).
No fixes available (24 hidden fixes can be enabled with the `--unsafe-fixes` option).
ruff.....................................................................Failed
- hook id: ruff
- files were modified by this hook
warning: Failed to lint check: No such file or directory (os error 2)
Found 3 errors (3 fixed, 0 remaining).
ruff-format..............................................................Failed
- hook id: ruff-format
- files were modified by this hook
173 files reformatted, 207 files left unchanged
Disallow '_' in Markdown filenames.......................................Failed
- hook id: no-underscore-md
- exit code: 1
[pre-commit] ERROR: Found Markdown files with underscores:
Describe the bug
When running the tests and pre-commit hooks (linting, etc.) I get a significant number of errors. Perhaps introducing CI checks before merge can prevent this kind of regression.
Steps/Code to reproduce bug
To run tests:
To run the pre-commit hooks:
Error logs
Error message I get when running tests
Error message I get when running pre-commit hooks
The full error message is attached here.
Below is a truncated version that fits into the word limit of issue messages.
Expected behavior
I expect the tests to pass and the pre-commit hooks to succeed as well.