From 122b5c182d7ecdd814d1776e864a724b4ba3b912 Mon Sep 17 00:00:00 2001 From: Kan Cheung Date: Mon, 26 Aug 2024 16:46:28 +0800 Subject: [PATCH 1/3] try fix pip not found in jupyter --- air_llm/setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/air_llm/setup.py b/air_llm/setup.py index 378272a..2a1516c 100644 --- a/air_llm/setup.py +++ b/air_llm/setup.py @@ -1,3 +1,4 @@ +import sys import setuptools from setuptools.command.install import install import subprocess @@ -6,7 +7,10 @@ import subprocess class PostInstallCommand(install): def run(self): install.run(self) - subprocess.check_call(["pip", "install", "--upgrade", "transformers"]) + try: + subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "transformers"]) + except subprocess.CalledProcessError: + print("警告:無法升級 transformers 套件。請手動升級。") # Windows uses a different default encoding (use a consistent encoding) with open("README.md", "r", encoding="utf-8") as fh: From 9bb61fa60047fde1943ed5b865ad96737b707bc8 Mon Sep 17 00:00:00 2001 From: Kan Cheung Date: Mon, 26 Aug 2024 17:05:59 +0800 Subject: [PATCH 2/3] updated to english warning --- air_llm/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/air_llm/setup.py b/air_llm/setup.py index 2a1516c..57d06ac 100644 --- a/air_llm/setup.py +++ b/air_llm/setup.py @@ -10,7 +10,7 @@ class PostInstallCommand(install): try: subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "transformers"]) except subprocess.CalledProcessError: - print("警告:無法升級 transformers 套件。請手動升級。") + print("Warning: Unable to upgrade transformers package. Please upgrade manually.") # Windows uses a different default encoding (use a consistent encoding) with open("README.md", "r", encoding="utf-8") as fh: From 6195bb4fc184463a2fb873c24dcd40fce7d4a9dd Mon Sep 17 00:00:00 2001 From: Gavin Li Date: Thu, 5 Sep 2024 09:05:24 -0500 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b8464c5..cc38188 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,10 @@ [2023/11/20] airllm Initial verion! +## Star History + +[![Star History Chart](https://api.star-history.com/svg?repos=lyogavin/airllm&type=Timeline)](https://star-history.com/#lyogavin/airllm&Timeline) + ## Table of Contents * [Quick start](#quickstart)