From 2ae9bb776432726cc7fa9409f5c8e91cc7a1489e Mon Sep 17 00:00:00 2001 From: Isaac McFadyen Date: Sun, 2 Feb 2025 11:53:29 -0500 Subject: [PATCH] scripts: added inline script metadata per PEP 723 [no-ci] --- scripts/compare-llama-bench.py | 6 ++++++ scripts/gen-unicode-data.py | 6 ++++++ scripts/get_chat_template.py | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/scripts/compare-llama-bench.py b/scripts/compare-llama-bench.py index 239c458d8b958..28593c58b1295 100755 --- a/scripts/compare-llama-bench.py +++ b/scripts/compare-llama-bench.py @@ -1,4 +1,10 @@ #!/usr/bin/env python3 +# /// script +# dependencies = [ +# "GitPython", +# "tabulate", +# ] +# /// import logging import argparse diff --git a/scripts/gen-unicode-data.py b/scripts/gen-unicode-data.py index 2d9bde01c3ca7..1dfa1e3294acf 100644 --- a/scripts/gen-unicode-data.py +++ b/scripts/gen-unicode-data.py @@ -1,3 +1,9 @@ +# /// script +# dependencies = [ +# "requests", +# ] +# /// + from __future__ import annotations import array diff --git a/scripts/get_chat_template.py b/scripts/get_chat_template.py index e8982d11ad7ba..dee7a01c99903 100644 --- a/scripts/get_chat_template.py +++ b/scripts/get_chat_template.py @@ -1,4 +1,11 @@ #!/usr/bin/env python +# /// script +# dependencies = [ +# "huggingface_hub", +# "requests", +# ] +# /// + ''' Fetches the Jinja chat template of a HuggingFace model. If a model has multiple chat templates, you can specify the variant name.