mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-04 20:03:13 +03:00
commit
fbf29db2f9
|
@ -16,7 +16,7 @@ smart-open>=5.2.1,<7.0.0
|
||||||
numpy>=1.15.0
|
numpy>=1.15.0
|
||||||
requests>=2.13.0,<3.0.0
|
requests>=2.13.0,<3.0.0
|
||||||
tqdm>=4.38.0,<5.0.0
|
tqdm>=4.38.0,<5.0.0
|
||||||
pydantic>=1.7.4,!=1.8,!=1.8.1,<1.11.0
|
pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
|
||||||
jinja2
|
jinja2
|
||||||
langcodes>=3.2.0,<4.0.0
|
langcodes>=3.2.0,<4.0.0
|
||||||
# Official Python utilities
|
# Official Python utilities
|
||||||
|
|
|
@ -58,7 +58,7 @@ install_requires =
|
||||||
tqdm>=4.38.0,<5.0.0
|
tqdm>=4.38.0,<5.0.0
|
||||||
numpy>=1.15.0
|
numpy>=1.15.0
|
||||||
requests>=2.13.0,<3.0.0
|
requests>=2.13.0,<3.0.0
|
||||||
pydantic>=1.7.4,!=1.8,!=1.8.1,<1.11.0
|
pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
|
||||||
jinja2
|
jinja2
|
||||||
# Official Python utilities
|
# Official Python utilities
|
||||||
setuptools
|
setuptools
|
||||||
|
@ -111,6 +111,8 @@ cuda117 =
|
||||||
cupy-cuda117>=5.0.0b4,<13.0.0
|
cupy-cuda117>=5.0.0b4,<13.0.0
|
||||||
cuda11x =
|
cuda11x =
|
||||||
cupy-cuda11x>=11.0.0,<13.0.0
|
cupy-cuda11x>=11.0.0,<13.0.0
|
||||||
|
cuda12x =
|
||||||
|
cupy-cuda12x>=11.5.0,<13.0.0
|
||||||
cuda-autodetect =
|
cuda-autodetect =
|
||||||
cupy-wheel>=11.0.0,<13.0.0
|
cupy-wheel>=11.0.0,<13.0.0
|
||||||
apple =
|
apple =
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Any, Dict, List, Union
|
from typing import Any, Dict, List, Union
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, ValidationError
|
try:
|
||||||
from pydantic.types import StrictBool, StrictInt, StrictStr
|
from pydantic.v1 import BaseModel, Field, ValidationError
|
||||||
|
from pydantic.v1.types import StrictBool, StrictInt, StrictStr
|
||||||
|
except ImportError:
|
||||||
|
from pydantic import BaseModel, Field, ValidationError # type: ignore
|
||||||
|
from pydantic.types import StrictBool, StrictInt, StrictStr # type: ignore
|
||||||
|
|
||||||
|
|
||||||
class MatchNodeSchema(BaseModel):
|
class MatchNodeSchema(BaseModel):
|
||||||
|
|
|
@ -16,7 +16,8 @@ from typing import (
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
|
||||||
from pydantic import (
|
try:
|
||||||
|
from pydantic.v1 import (
|
||||||
BaseModel,
|
BaseModel,
|
||||||
ConstrainedStr,
|
ConstrainedStr,
|
||||||
Field,
|
Field,
|
||||||
|
@ -28,7 +29,21 @@ from pydantic import (
|
||||||
create_model,
|
create_model,
|
||||||
validator,
|
validator,
|
||||||
)
|
)
|
||||||
from pydantic.main import ModelMetaclass
|
from pydantic.v1.main import ModelMetaclass
|
||||||
|
except ImportError:
|
||||||
|
from pydantic import ( # type: ignore
|
||||||
|
BaseModel,
|
||||||
|
ConstrainedStr,
|
||||||
|
Field,
|
||||||
|
StrictBool,
|
||||||
|
StrictFloat,
|
||||||
|
StrictInt,
|
||||||
|
StrictStr,
|
||||||
|
ValidationError,
|
||||||
|
create_model,
|
||||||
|
validator,
|
||||||
|
)
|
||||||
|
from pydantic.main import ModelMetaclass # type: ignore
|
||||||
from thinc.api import ConfigValidationError, Model, Optimizer
|
from thinc.api import ConfigValidationError, Model, Optimizer
|
||||||
from thinc.config import Promise
|
from thinc.config import Promise
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import pytest
|
import pytest
|
||||||
from pydantic import StrictBool
|
|
||||||
|
try:
|
||||||
|
from pydantic.v1 import StrictBool
|
||||||
|
except ImportError:
|
||||||
|
from pydantic import StrictBool # type: ignore
|
||||||
|
|
||||||
from thinc.api import ConfigValidationError
|
from thinc.api import ConfigValidationError
|
||||||
|
|
||||||
from spacy.lang.en import English
|
from spacy.lang.en import English
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import pytest
|
import pytest
|
||||||
from pydantic import StrictInt, StrictStr
|
|
||||||
|
try:
|
||||||
|
from pydantic.v1 import StrictInt, StrictStr
|
||||||
|
except ImportError:
|
||||||
|
from pydantic import StrictInt, StrictStr # type: ignore
|
||||||
|
|
||||||
from thinc.api import ConfigValidationError, Linear, Model
|
from thinc.api import ConfigValidationError, Linear, Model
|
||||||
|
|
||||||
import spacy
|
import spacy
|
||||||
|
|
|
@ -3,7 +3,12 @@ import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from pydantic import ValidationError
|
|
||||||
|
try:
|
||||||
|
from pydantic.v1 import ValidationError
|
||||||
|
except ImportError:
|
||||||
|
from pydantic import ValidationError # type: ignore
|
||||||
|
|
||||||
from thinc.api import (
|
from thinc.api import (
|
||||||
Config,
|
Config,
|
||||||
ConfigValidationError,
|
ConfigValidationError,
|
||||||
|
|
|
@ -10,15 +10,19 @@ const DEFAULT_PLATFORM = 'x86'
|
||||||
const DEFAULT_MODELS = ['en']
|
const DEFAULT_MODELS = ['en']
|
||||||
const DEFAULT_OPT = 'efficiency'
|
const DEFAULT_OPT = 'efficiency'
|
||||||
const DEFAULT_HARDWARE = 'cpu'
|
const DEFAULT_HARDWARE = 'cpu'
|
||||||
const DEFAULT_CUDA = 'cuda-autodetect'
|
const DEFAULT_CUDA = 'cuda11x'
|
||||||
const CUDA = {
|
const CUDA = {
|
||||||
'8.0': 'cuda80',
|
'8.0': 'cuda80',
|
||||||
'9.0': 'cuda90',
|
'9.0': 'cuda90',
|
||||||
9.1: 'cuda91',
|
'9.1': 'cuda91',
|
||||||
9.2: 'cuda92',
|
'9.2': 'cuda92',
|
||||||
'10.0': 'cuda100',
|
'10.0': 'cuda100',
|
||||||
10.1: 'cuda101',
|
'10.1': 'cuda101',
|
||||||
'10.2, 11.0+': 'cuda-autodetect',
|
'10.2': 'cuda102',
|
||||||
|
'11.0': 'cuda110',
|
||||||
|
'11.1': 'cuda111',
|
||||||
|
'11.2-11.x': 'cuda11x',
|
||||||
|
'12.x': 'cuda12x',
|
||||||
}
|
}
|
||||||
const LANG_EXTRAS = ['ja'] // only for languages with models
|
const LANG_EXTRAS = ['ja'] // only for languages with models
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user