Explorar el Código

Refa: drop useless fasttext (#5470)

### What problem does this PR solve?

This patch drop useless fastext which is seems useless in the code base 
and its very kind of hard install
should close #4498


### Type of change

- [x] Refactoring

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
tags/v0.17.0
yihong hace 8 meses
padre
commit
37aacb3960
No account linked to committer's email address
Se han modificado 3 ficheros con 0 adiciones y 26 borrados
  1. 0
    12
      deepdoc/vision/operators.py
  2. 0
    1
      pyproject.toml
  3. 0
    13
      uv.lock

+ 0
- 12
deepdoc/vision/operators.py Ver fichero

@@ -145,18 +145,6 @@ class ToCHWImage(object):
return data


class Fasttext(object):
def __init__(self, path="None", **kwargs):
import fasttext
self.fast_model = fasttext.load_model(path)

def __call__(self, data):
label = data['label']
fast_label = self.fast_model[label]
data['fast_label'] = fast_label
return data


class KeepKeys(object):
def __init__(self, keep_keys, **kwargs):
self.keep_keys = keep_keys

+ 0
- 1
pyproject.toml Ver fichero

@@ -36,7 +36,6 @@ dependencies = [
"elastic-transport==8.12.0",
"elasticsearch==8.12.1",
"elasticsearch-dsl==8.12.0",
"fasttext==0.9.3",
"filelock==3.15.4",
"flask==3.0.3",
"flask-cors==5.0.0",

+ 0
- 13
uv.lock Ver fichero

@@ -1420,17 +1420,6 @@ wheels = [
{ url = "https://mirrors.aliyun.com/pypi/packages/b1/f9/98cd0c39115879be1044d59c9b76e8292776e99bb93565bf990078fd11c4/fastparquet-2024.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:74a0b3c40ab373442c0fda96b75a36e88745d8b138fcc3a6143e04682cbbb8ca" },
]

[[package]]
name = "fasttext"
version = "0.9.3"
source = { registry = "https://mirrors.aliyun.com/pypi/simple" }
dependencies = [
{ name = "numpy" },
{ name = "pybind11" },
{ name = "setuptools" },
]
sdist = { url = "https://mirrors.aliyun.com/pypi/packages/9f/3b/9a10b95eaf565358339162848863197c3f0a29b540ca22b2951df2d66a48/fasttext-0.9.3.tar.gz", hash = "sha256:eb03f2ef6340c6ac9e4398a30026f05471da99381b307aafe2f56e4cd26baaef" }

[[package]]
name = "feedparser"
version = "6.0.11"
@@ -4762,7 +4751,6 @@ dependencies = [
{ name = "elastic-transport" },
{ name = "elasticsearch" },
{ name = "elasticsearch-dsl" },
{ name = "fasttext" },
{ name = "filelock" },
{ name = "flasgger" },
{ name = "flask" },
@@ -4894,7 +4882,6 @@ requires-dist = [
{ name = "elasticsearch-dsl", specifier = "==8.12.0" },
{ name = "fastembed", marker = "(platform_machine != 'x86_64' and extra == 'full') or (sys_platform == 'darwin' and extra == 'full')", specifier = ">=0.3.6,<0.4.0" },
{ name = "fastembed-gpu", marker = "platform_machine == 'x86_64' and sys_platform != 'darwin' and extra == 'full'", specifier = ">=0.3.6,<0.4.0" },
{ name = "fasttext", specifier = "==0.9.3" },
{ name = "filelock", specifier = "==3.15.4" },
{ name = "flagembedding", marker = "extra == 'full'", specifier = "==1.2.10" },
{ name = "flasgger", specifier = ">=0.9.7.1,<0.10.0" },

Cargando…
Cancelar
Guardar