From 76983bd4e607c9d1929cc7c2a48f6a4a46496c68 Mon Sep 17 00:00:00 2001 From: sudoskys Date: Sun, 15 Oct 2023 00:38:52 +0800 Subject: [PATCH] fix --- .gitignore | 1 - SECURITY.md | 6 +++--- docker-compose.yml | 6 +++--- llmkira/sdk/filter/langdetect_fasttext/README.md | 14 +++++++------- llmkira/task/__init__.py | 4 ++-- requirements.txt | 2 -- 6 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index fc2d40c4d..0370db826 100644 --- a/.gitignore +++ b/.gitignore @@ -59,7 +59,6 @@ coverage.xml *.pot # Django stuff: -*.log local_settings.py db.sqlite3 db.sqlite3-journal diff --git a/SECURITY.md b/SECURITY.md index 9e04dca78..e3bb1de90 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -3,9 +3,9 @@ ## Supported Versions | Version | Supported | -| ------- | ------------------ | -| >= 0.15 | :white_check_mark: | -| < 0.15 | :x: | +|---------|--------------------| +| >= 0.15 | :white_check_mark: | +| < 0.15 | :x: | ## Reporting a Vulnerability diff --git a/docker-compose.yml b/docker-compose.yml index b2c980ea0..75dc39a5b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,8 +29,8 @@ services: hostname: rabbitmq restart: on-failure ports: - - 15672:15672 - - 5672:5672 + - "15672:15672" + - "5672:5672" environment: TZ: Asia/Shanghai RABBITMQ_DEFAULT_USER: admin @@ -48,7 +48,7 @@ services: volumes: - ./redis:/data ports: - - 6379:6379 + - "6379:6379" networks: - app-tier diff --git a/llmkira/sdk/filter/langdetect_fasttext/README.md b/llmkira/sdk/filter/langdetect_fasttext/README.md index ef3e12613..b228a7453 100644 --- a/llmkira/sdk/filter/langdetect_fasttext/README.md +++ b/llmkira/sdk/filter/langdetect_fasttext/README.md @@ -30,13 +30,13 @@ print(result) ## Benchmark We benchmarked the fasttext model against [cld2](https://github.com/CLD2Owners/cld2), [langid](https://github.com/saffsd/langid.py), and [langdetect](https://github.com/Mimino666/langdetect) on Wili-2018 dataset. -| | fasttext | langid | langdetect | cld2 | -|--------------------------|-------------|-------------|-------------|-------------| -| Average time (ms) | 0,158273381 | 1,726618705 | 12,44604317 | **0,028776978** | -| 139 langs - not weighted | 76,8 | 61,6 | 37,6 | **80,8** | -| 139 langs - pop weighted | **95,5** | 93,1 | 86,6 | 92,7 | -| 44 langs - not weighted | **93,3** | 89,2 | 81,6 | 91,5 | -| 44 langs - pop weighted | **96,6** | 94,8 | 89,4 | 93,4 | +| | fasttext | langid | langdetect | cld2 | +|--------------------------|-------------|-------------|-------------|-----------------| +| Average time (ms) | 0,158273381 | 1,726618705 | 12,44604317 | **0,028776978** | +| 139 langs - not weighted | 76,8 | 61,6 | 37,6 | **80,8** | +| 139 langs - pop weighted | **95,5** | 93,1 | 86,6 | 92,7 | +| 44 langs - not weighted | **93,3** | 89,2 | 81,6 | 91,5 | +| 44 langs - pop weighted | **96,6** | 94,8 | 89,4 | 93,4 | - `pop weighted` means recall for each language is multipled by [its number of speakers](https://en.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers). - 139 languages = all languages with ISO 639-1 2-letter code diff --git a/llmkira/task/__init__.py b/llmkira/task/__init__.py index 6c03a167a..7dbf19dc2 100644 --- a/llmkira/task/__init__.py +++ b/llmkira/task/__init__.py @@ -57,7 +57,7 @@ async def send_task(self, task: TaskHeader): logger.error( f"[5941163]Rabbitmq Queue param validation error, try deleting the abnormal queue manually and retrying. " f"\n--error {e}" - f"\n--help |web: http://:15672/#/ |shell: `rabbitmqctl delete_queue {self.queue_name}`" + f"\n--help |web: :15672/#/ |shell: `rabbitmqctl delete_queue {self.queue_name}`" ) raise e # Sending the message @@ -101,7 +101,7 @@ async def consuming_task(self, func: callable): logger.error( f"[502231]Rabbitmq Queue parameter validation failed, try deleting the abnormal queue manually and retrying. " f"\n--error {e}" - f"\n--help |web: http://:15672/#/ |shell: `rabbitmqctl delete_queue {self.queue_name}`" + f"\n--help |web: :15672/#/ |shell: `rabbitmqctl delete_queue {self.queue_name}`" ) raise e await queue.consume(func) diff --git a/requirements.txt b/requirements.txt index 69f7b37e7..1ccee90f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,6 @@ httpx>=0.24.1 socksio pydantic<2.0.0 -beautifulsoup4 python-dotenv elara @@ -36,6 +35,5 @@ requests[socks]>=2.31.0 feedparser==6.0.10 pillow inscriptis -bilibili-api-python duckduckgo_search>=3.9.3