diff --git a/.idea/combolightning.iml b/.idea/combolightning.iml index d4c73d1453b1ff1f26ddcd3f4f3d30c25e5096cc..3578d353db0efcadc8984eedebbe1b853bb604f9 100644 --- a/.idea/combolightning.iml +++ b/.idea/combolightning.iml @@ -1,7 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="PYTHON_MODULE" version="4"> <component name="NewModuleRootManager"> - <content url="file://$MODULE_DIR$" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/combo" isTestSource="false" /> + </content> <orderEntry type="jdk" jdkName="combo" jdkType="Python SDK" /> <orderEntry type="sourceFolder" forTests="false" /> </component> diff --git a/combo/config/from_parameters.py b/combo/config/from_parameters.py index 7d7d5074f7b98c3d239953dca9ce76f74ed9714a..0e1f1853076b70c54ea35ba4338c744590b203a6 100644 --- a/combo/config/from_parameters.py +++ b/combo/config/from_parameters.py @@ -8,7 +8,6 @@ import torch from combo.common.params import Params from combo.config.exceptions import RegistryException from combo.config.registry import (Registry) -from combo.nn import Activation from combo.utils import ConfigurationError @@ -51,12 +50,6 @@ def _resolve(type: Type[object], return _resolve(type.__base__, values, pass_to_subclasses, default_name) warnings.warn(f'No classes of type {type} (values: {values}) in Registry!') return values - elif type is Activation and isinstance(values, str): - try: - return Registry.resolve(type, values)() - except RegistryException: - warnings.warn(f'No Activation of class name {values} in Registry!') - return values else: return values diff --git a/combo/main.py b/combo/main.py old mode 100644 new mode 100755 index 207b9fd6d9ec0dd0c021b59f62273ad9b09fabb5..d12b5f471b55fa8fdef35041209ef7ce02ed5002 --- a/combo/main.py +++ b/combo/main.py @@ -82,6 +82,7 @@ flags.DEFINE_enum(name="predictor_name", default="combo-spacy", def run(_): + print("COMBO") pass diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..d5bdfd3afe63598ebf9e4e9b01a77f2ff415f7c3 --- /dev/null +++ b/setup.py @@ -0,0 +1,38 @@ +import subprocess +from setuptools import find_packages, setup + +subprocess.call(['pip', 'install', '--no-deps', 'git+https://gitlab.clarin-pl.eu/syntactic-tools/lambo.git#egg=lambo']) + +REQUIREMENTS = [ + "absl-py~=1.4.0", + "base58~=2.1.1", + "cached-path~=1.3.3", + "conllu~=4.4.1", + "conllutils~=1.1.4", + "dill~=0.3.6", + "importlib-resources~=5.12.0", + "overrides~=7.3.1", + "torch~=2.0.0", + "torchtext~=0.15.1", + "numpy~=1.24.1", + "pytorch-lightning~=2.0.01", + "requests~=2.28.2", + "tqdm~=4.64.1", + "urllib3~=1.26.14", + "filelock~=3.9.0", + "pytest~=7.2.2", + "transformers~=4.27.3", + "spacy~=3.3.1" +] + +setup( + name="combo", + version="2.0.0", + author="Maja Jablonska", + author_email="maja.jablonska@ipipan.waw.pl", + install_requirements=REQUIREMENTS, + packages=find_packages(exclude=['tests']), + license="GPL-3.0", + keywords="nlp natural-language-processing dependency-parsing", + entrypoints={'console_scripts': ['combo = combo.main:main']} +) \ No newline at end of file