We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release Flair 0.8
Time finally for another release! This issue tracks the progress of releasing 0.8.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `flair/datasets/__init__.py`
Content:
```
1 # Expose base classses
2 from .base import DataLoader
3 from .base import SentenceDataset
4 from .base import StringDataset
5 from .base import MongoDataset
6 
7 # Expose all sequence labeling datasets
8 from .sequence_labeling import ColumnCorpus
9 from .sequence_labeling import ColumnDataset
10 from .sequence_labeling import ANER_CORP
11 from .sequence_labeling import BIOFID
12 from .sequence_labeling import BIOSCOPE
13 from .sequence_labeling import CONLL_03
14 from .sequence_labeling import CONLL_03_GERMAN
15 from .sequence_labeling import CONLL_03_DUTCH
16 from .sequence_labeling import CONLL_03_SPANISH
17 from .sequence_labeling import CONLL_2000
18 from .sequence_labeling import DANE
19 from .sequence_labeling import EUROPARL_NER_GERMAN
20 from .sequence_labeling import GERMEVAL_14
21 from .sequence_labeling import INSPEC
22 from .sequence_labeling import LER_GERMAN
23 from .sequence_labeling import MIT_MOVIE_NER_SIMPLE
24 from .sequence_labeling import MIT_MOVIE_NER_COMPLEX
25 from .sequence_labeling import MIT_RESTAURANT_NER
26 from .sequence_labeling import NER_BASQUE
27 from .sequence_labeling import NER_FINNISH
28 from .sequence_labeling import NER_SWEDISH
29 from .sequence_labeling import STACKOVERFLOW_NER
30 from .sequence_labeling import SEMEVAL2010
31 from .sequence_labeling import SEMEVAL2017
32 from .sequence_labeling import TURKU_NER
33 from .sequence_labeling import TWITTER_NER
34 from .sequence_labeling import UP_CHINESE
35 from .sequence_labeling import UP_ENGLISH
36 from .sequence_labeling import UP_FINNISH
37 from .sequence_labeling import UP_FRENCH
38 from .sequence_labeling import UP_GERMAN
39 from .sequence_labeling import UP_ITALIAN
40 from .sequence_labeling import UP_SPANISH
41 from .sequence_labeling import UP_SPANISH_ANCORA
42 from .sequence_labeling import WEIBO_NER
43 from .sequence_labeling import WIKIANN
44 from .sequence_labeling import WIKIGOLD_NER
45 from .sequence_labeling import WIKINER_ENGLISH
46 from .sequence_labeling import WIKINER_GERMAN
47 from .sequence_labeling import WIKINER_DUTCH
48 from .sequence_labeling import WIKINER_FRENCH
49 from .sequence_labeling import WIKINER_ITALIAN
50 from .sequence_labeling import WIKINER_SPANISH
51 from .sequence_labeling import WIKINER_PORTUGUESE
52 from .sequence_labeling import WIKINER_POLISH
53 from .sequence_labeling import WIKINER_RUSSIAN
54 from .sequence_labeling import WNUT_17
55 from .sequence_labeling import WSD_UFSAC
56 from .sequence_labeling import WNUT_2020_NER
57 from .sequence_labeling import XTREME
58 from .sequence_labeling import BUSINESS_HUN
59 
60 # Expose all document classification datasets
61 from .document_classification import ClassificationCorpus
62 from .document_classification import ClassificationDataset
63 from .document_classification import CSVClassificationCorpus
64 from .document_classification import CSVClassificationDataset
65 from .document_classification import AMAZON_REVIEWS
66 from .document_classification import IMDB
67 from .document_classification import NEWSGROUPS
68 from .document_classification import SENTIMENT_140
69 from .document_classification import SENTEVAL_CR
70 from .document_classification import SENTEVAL_MR
71 from .document_classification import SENTEVAL_MPQA
72 from .document_classification import SENTEVAL_SUBJ
73 from .document_classification import SENTEVAL_SST_BINARY
74 from .document_classification import SENTEVAL_SST_GRANULAR
75 from .document_classification import TREC_50
76 from .document_classification import TREC_6
77 from .document_classification import COMMUNICATIVE_FUNCTIONS
78 from .document_classification import WASSA_ANGER
79 from .document_classification import WASSA_FEAR
80 from .document_classification import WASSA_JOY
81 from .document_classification import WASSA_SADNESS
82 from .document_classification import GO_EMOTIONS
83 from .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE
84 
85 # Expose all treebanks
86 from .treebanks import UniversalDependenciesCorpus
87 from .treebanks import UniversalDependenciesDataset
88 from .treebanks import UD_ENGLISH
89 from .treebanks import UD_GERMAN
90 from .treebanks import UD_GERMAN_HDT
91 from .treebanks import UD_DUTCH
92 from .treebanks import UD_FRENCH
93 from .treebanks import UD_ITALIAN
94 from .treebanks import UD_SPANISH
95 from .treebanks import UD_PORTUGUESE
96 from .treebanks import UD_ROMANIAN
97 from .treebanks import UD_CATALAN
98 from .treebanks import UD_POLISH
99 from .treebanks import UD_CZECH
100 from .treebanks import UD_SLOVAK
101 from .treebanks import UD_SWEDISH
102 from .treebanks import UD_DANISH
103 from .treebanks import UD_NORWEGIAN
104 from .treebanks import UD_FINNISH
105 from .treebanks import UD_SLOVENIAN
106 from .treebanks import UD_CROATIAN
107 from .treebanks import UD_SERBIAN
108 from .treebanks import UD_BULGARIAN
109 from .treebanks import UD_ARABIC
110 from .treebanks import UD_HEBREW
111 from .treebanks import UD_TURKISH
112 from .treebanks import UD_PERSIAN
113 from .treebanks import UD_RUSSIAN
114 from .treebanks import UD_HINDI
115 from .treebanks import UD_INDONESIAN
116 from .treebanks import UD_JAPANESE
117 from .treebanks import UD_CHINESE
118 from .treebanks import UD_KOREAN
119 from .treebanks import UD_BASQUE
120 from .treebanks import UD_GREEK
121 from .treebanks import UD_LIVVI
122 from .treebanks import UD_NORTH_SAMI
123 from .treebanks import UD_MARATHI
124 from .treebanks import UD_MALTESE
125 from .treebanks import UD_AFRIKAANS
126 from .treebanks import UD_OLD_FRENCH
127 from .treebanks import UD_GOTHIC
128 from .treebanks import UD_WOLOF
129 
130 # Expose all text-text datasets
131 from .text_text import ParallelTextCorpus
132 from .text_text import ParallelTextDataset
133 from .text_text import OpusParallelCorpus
134 from .text_text import DataPairDataset
135 from .text_text import DataPairCorpus
136 from .text_text import GLUE_RTE
137 from .text_text import SUPERGLUE_RTE
138 
139 # Expose all text-image datasets
140 from .text_image import FeideggerCorpus
141 from .text_image import FeideggerDataset
142 
143 # Expose all biomedical data sets
144 from .biomedical import ANAT_EM
145 from .biomedical import AZDZ
146 from .biomedical import BIONLP2013_PC
147 from .biomedical import BIONLP2013_CG
148 from .biomedical import BIO_INFER
149 from .biomedical import BIOSEMANTICS
150 from .biomedical import BC2GM
151 from .biomedical import CELL_FINDER
152 from .biomedical import CEMP
153 from .biomedical import CDR
154 from .biomedical import CHEMDNER
155 from .biomedical import CRAFT
156 from .biomedical import CRAFT_V4
157 from .biomedical import CLL
158 from .biomedical import DECA
159 from .biomedical import FSU
160 from .biomedical import GELLUS
161 from .biomedical import GPRO
162 from .biomedical import IEPA
163 from .biomedical import JNLPBA
164 from .biomedical import LOCTEXT
165 from .biomedical import LINNEAUS
166 from .biomedical import NCBI_DISEASE
167 from .biomedical import MIRNA
168 from .biomedical import OSIRIS
169 from .biomedical import PDR
170 from .biomedical import S800
171 from .biomedical import SCAI_CHEMICALS
172 from .biomedical import SCAI_DISEASE
173 from .biomedical import VARIOME
174 
175 # Expose all biomedical data sets using the HUNER splits
176 from .biomedical import HUNER_CHEMICAL
177 from .biomedical import HUNER_CHEMICAL_CHEBI
178 from .biomedical import HUNER_CHEMICAL_CHEMDNER
179 from .biomedical import HUNER_CHEMICAL_CDR
180 from .biomedical import HUNER_CHEMICAL_CEMP
181 from .biomedical import HUNER_CHEMICAL_SCAI
182 from .biomedical import HUNER_CHEMICAL_CRAFT_V4
183 # -
184 from .biomedical import HUNER_CELL_LINE
185 from .biomedical import HUNER_CELL_LINE_CLL
186 from .biomedical import HUNER_CELL_LINE_CELL_FINDER
187 from .biomedical import HUNER_CELL_LINE_GELLUS
188 from .biomedical import HUNER_CELL_LINE_JNLPBA
189 # -
190 from .biomedical import HUNER_DISEASE
191 from .biomedical import HUNER_DISEASE_CDR
192 from .biomedical import HUNER_DISEASE_MIRNA
193 from .biomedical import HUNER_DISEASE_NCBI
194 from .biomedical import HUNER_DISEASE_SCAI
195 from .biomedical import HUNER_DISEASE_VARIOME
196 from .biomedical import HUNER_DISEASE_PDR
197 # -
198 from .biomedical import HUNER_GENE
199 from .biomedical import HUNER_GENE_BIO_INFER
200 from .biomedical import HUNER_GENE_BC2GM
201 from .biomedical import HUNER_GENE_CHEBI
202 from .biomedical import HUNER_GENE_CRAFT_V4
203 from .biomedical import HUNER_GENE_CELL_FINDER
204 from .biomedical import HUNER_GENE_DECA
205 from .biomedical import HUNER_GENE_FSU
206 from .biomedical import HUNER_GENE_GPRO
207 from .biomedical import HUNER_GENE_IEPA
208 from .biomedical import HUNER_GENE_JNLPBA
209 from .biomedical import HUNER_GENE_LOCTEXT
210 from .biomedical import HUNER_GENE_MIRNA
211 from .biomedical import HUNER_GENE_OSIRIS
212 from .biomedical import HUNER_GENE_VARIOME
213 # -
214 from .biomedical import HUNER_SPECIES
215 from .biomedical import HUNER_SPECIES_CELL_FINDER
216 from .biomedical import HUNER_SPECIES_CHEBI
217 from .biomedical import HUNER_SPECIES_CRAFT_V4
218 from .biomedical import HUNER_SPECIES_LOCTEXT
219 from .biomedical import HUNER_SPECIES_LINNEAUS
220 from .biomedical import HUNER_SPECIES_MIRNA
221 from .biomedical import HUNER_SPECIES_S800
222 from .biomedical import HUNER_SPECIES_VARIOME
223 
224 # Expose all biomedical data sets used for the evaluation of BioBERT
225 from .biomedical import BIOBERT_CHEMICAL_BC4CHEMD
226 from .biomedical import BIOBERT_CHEMICAL_BC5CDR
227 from .biomedical import BIOBERT_DISEASE_NCBI
228 from .biomedical import BIOBERT_DISEASE_BC5CDR
229 from .biomedical import BIOBERT_SPECIES_LINNAEUS
230 from .biomedical import BIOBERT_SPECIES_S800
231 from .biomedical import BIOBERT_GENE_BC2GM
232 from .biomedical import BIOBERT_GENE_JNLPBA
233
```

Path: `setup.py`
Content:
```
1 from setuptools import setup, find_packages
2 
3 with open("requirements.txt") as f:
4     required = f.read().splitlines()
5 
6 setup(
7     name="flair",
8     version="0.7",
9     description="A very simple framework for state-of-the-art NLP",
10     long_description=open("README.md", encoding="utf-8").read(),
11     long_description_content_type="text/markdown",
12     author="Alan Akbik",
13     author_email="alan.akbik@gmail.com",
14     url="https://github.com/flairNLP/flair",
15     packages=find_packages(exclude="tests"),  # same as name
16     license="MIT",
17     install_requires=required,
18     include_package_data=True,
19     python_requires=">=3.6",
20 )
21
```

Path: `flair/__init__.py`
Content:
```
1 import os
2 import torch
3 from pathlib import Path
4 from transformers import set_seed as hf_set_seed
5 
6 # global variable: cache_root
7 cache_root = os.getenv('FLAIR_CACHE_ROOT', Path(Path.home(), ".flair"))
8 
9 # global variable: device
10 device = None
11 if torch.cuda.is_available():
12     device = torch.device("cuda:0")
13 else:
14     device = torch.device("cpu")
15 
16 # global variable: embedding_storage_mode
17 embedding_storage_mode = "default"
18 
19 from . import data
20 from . import models
21 from . import visual
22 from . import trainers
23 from . import nn
24 from .training_utils import AnnealOnPlateau
25 
26 import logging.config
27 
28 __version__ = "0.7"
29 
30 logging.config.dictConfig(
31     {
32         "version": 1,
33         "disable_existing_loggers": False,
34         "formatters": {"standard": {"format": "%(asctime)-15s %(message)s"}},
35         "handlers": {
36             "console": {
37                 "level": "INFO",
38                 "class": "logging.StreamHandler",
39                 "formatter": "standard",
40                 "stream": "ext://sys.stdout",
41             }
42         },
43         "loggers": {
44             "flair": {"handlers": ["console"], "level": "INFO", "propagate": False}
45         },
46     }
47 )
48 
49 logger = logging.getLogger("flair")
50 
51 def set_seed(seed: int):
52     hf_set_seed(seed)
53
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/flair/__init__.py b/flair/__init__.py
--- a/flair/__init__.py
+++ b/flair/__init__.py
@@ -25,7 +25,7 @@
 
 import logging.config
 
-__version__ = "0.7"
+__version__ = "0.8"
 
 logging.config.dictConfig(
     {
diff --git a/flair/datasets/__init__.py b/flair/datasets/__init__.py
--- a/flair/datasets/__init__.py
+++ b/flair/datasets/__init__.py
@@ -10,6 +10,7 @@
 from .sequence_labeling import ANER_CORP
 from .sequence_labeling import BIOFID
 from .sequence_labeling import BIOSCOPE
+from .sequence_labeling import BUSINESS_HUN
 from .sequence_labeling import CONLL_03
 from .sequence_labeling import CONLL_03_GERMAN
 from .sequence_labeling import CONLL_03_DUTCH
@@ -55,7 +56,6 @@
 from .sequence_labeling import WSD_UFSAC
 from .sequence_labeling import WNUT_2020_NER
 from .sequence_labeling import XTREME
-from .sequence_labeling import BUSINESS_HUN
 
 # Expose all document classification datasets
 from .document_classification import ClassificationCorpus
@@ -63,6 +63,9 @@
 from .document_classification import CSVClassificationCorpus
 from .document_classification import CSVClassificationDataset
 from .document_classification import AMAZON_REVIEWS
+from .document_classification import COMMUNICATIVE_FUNCTIONS
+from .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE
+from .document_classification import GO_EMOTIONS
 from .document_classification import IMDB
 from .document_classification import NEWSGROUPS
 from .document_classification import SENTIMENT_140
@@ -74,13 +77,10 @@
 from .document_classification import SENTEVAL_SST_GRANULAR
 from .document_classification import TREC_50
 from .document_classification import TREC_6
-from .document_classification import COMMUNICATIVE_FUNCTIONS
 from .document_classification import WASSA_ANGER
 from .document_classification import WASSA_FEAR
 from .document_classification import WASSA_JOY
 from .document_classification import WASSA_SADNESS
-from .document_classification import GO_EMOTIONS
-from .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE
 
 # Expose all treebanks
 from .treebanks import UniversalDependenciesCorpus
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@
 
 setup(
     name="flair",
-    version="0.7",
+    version="0.8",
     description="A very simple framework for state-of-the-art NLP",
     long_description=open("README.md", encoding="utf-8").read(),
     long_description_content_type="text/markdown",

{"golden_diff": "diff --git a/flair/__init__.py b/flair/__init__.py\n--- a/flair/__init__.py\n+++ b/flair/__init__.py\n@@ -25,7 +25,7 @@\n \n import logging.config\n \n-__version__ = \"0.7\"\n+__version__ = \"0.8\"\n \n logging.config.dictConfig(\n     {\ndiff --git a/flair/datasets/__init__.py b/flair/datasets/__init__.py\n--- a/flair/datasets/__init__.py\n+++ b/flair/datasets/__init__.py\n@@ -10,6 +10,7 @@\n from .sequence_labeling import ANER_CORP\n from .sequence_labeling import BIOFID\n from .sequence_labeling import BIOSCOPE\n+from .sequence_labeling import BUSINESS_HUN\n from .sequence_labeling import CONLL_03\n from .sequence_labeling import CONLL_03_GERMAN\n from .sequence_labeling import CONLL_03_DUTCH\n@@ -55,7 +56,6 @@\n from .sequence_labeling import WSD_UFSAC\n from .sequence_labeling import WNUT_2020_NER\n from .sequence_labeling import XTREME\n-from .sequence_labeling import BUSINESS_HUN\n \n # Expose all document classification datasets\n from .document_classification import ClassificationCorpus\n@@ -63,6 +63,9 @@\n from .document_classification import CSVClassificationCorpus\n from .document_classification import CSVClassificationDataset\n from .document_classification import AMAZON_REVIEWS\n+from .document_classification import COMMUNICATIVE_FUNCTIONS\n+from .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE\n+from .document_classification import GO_EMOTIONS\n from .document_classification import IMDB\n from .document_classification import NEWSGROUPS\n from .document_classification import SENTIMENT_140\n@@ -74,13 +77,10 @@\n from .document_classification import SENTEVAL_SST_GRANULAR\n from .document_classification import TREC_50\n from .document_classification import TREC_6\n-from .document_classification import COMMUNICATIVE_FUNCTIONS\n from .document_classification import WASSA_ANGER\n from .document_classification import WASSA_FEAR\n from .document_classification import WASSA_JOY\n from .document_classification import WASSA_SADNESS\n-from .document_classification import GO_EMOTIONS\n-from .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE\n \n # Expose all treebanks\n from .treebanks import UniversalDependenciesCorpus\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -5,7 +5,7 @@\n \n setup(\n     name=\"flair\",\n-    version=\"0.7\",\n+    version=\"0.8\",\n     description=\"A very simple framework for state-of-the-art NLP\",\n     long_description=open(\"README.md\", encoding=\"utf-8\").read(),\n     long_description_content_type=\"text/markdown\",\n", "issue": "Release Flair 0.8\nTime finally for another release! This issue tracks the progress of releasing 0.8.\n", "before_files": [{"content": "# Expose base classses\nfrom .base import DataLoader\nfrom .base import SentenceDataset\nfrom .base import StringDataset\nfrom .base import MongoDataset\n\n# Expose all sequence labeling datasets\nfrom .sequence_labeling import ColumnCorpus\nfrom .sequence_labeling import ColumnDataset\nfrom .sequence_labeling import ANER_CORP\nfrom .sequence_labeling import BIOFID\nfrom .sequence_labeling import BIOSCOPE\nfrom .sequence_labeling import CONLL_03\nfrom .sequence_labeling import CONLL_03_GERMAN\nfrom .sequence_labeling import CONLL_03_DUTCH\nfrom .sequence_labeling import CONLL_03_SPANISH\nfrom .sequence_labeling import CONLL_2000\nfrom .sequence_labeling import DANE\nfrom .sequence_labeling import EUROPARL_NER_GERMAN\nfrom .sequence_labeling import GERMEVAL_14\nfrom .sequence_labeling import INSPEC\nfrom .sequence_labeling import LER_GERMAN\nfrom .sequence_labeling import MIT_MOVIE_NER_SIMPLE\nfrom .sequence_labeling import MIT_MOVIE_NER_COMPLEX\nfrom .sequence_labeling import MIT_RESTAURANT_NER\nfrom .sequence_labeling import NER_BASQUE\nfrom .sequence_labeling import NER_FINNISH\nfrom .sequence_labeling import NER_SWEDISH\nfrom .sequence_labeling import STACKOVERFLOW_NER\nfrom .sequence_labeling import SEMEVAL2010\nfrom .sequence_labeling import SEMEVAL2017\nfrom .sequence_labeling import TURKU_NER\nfrom .sequence_labeling import TWITTER_NER\nfrom .sequence_labeling import UP_CHINESE\nfrom .sequence_labeling import UP_ENGLISH\nfrom .sequence_labeling import UP_FINNISH\nfrom .sequence_labeling import UP_FRENCH\nfrom .sequence_labeling import UP_GERMAN\nfrom .sequence_labeling import UP_ITALIAN\nfrom .sequence_labeling import UP_SPANISH\nfrom .sequence_labeling import UP_SPANISH_ANCORA\nfrom .sequence_labeling import WEIBO_NER\nfrom .sequence_labeling import WIKIANN\nfrom .sequence_labeling import WIKIGOLD_NER\nfrom .sequence_labeling import WIKINER_ENGLISH\nfrom .sequence_labeling import WIKINER_GERMAN\nfrom .sequence_labeling import WIKINER_DUTCH\nfrom .sequence_labeling import WIKINER_FRENCH\nfrom .sequence_labeling import WIKINER_ITALIAN\nfrom .sequence_labeling import WIKINER_SPANISH\nfrom .sequence_labeling import WIKINER_PORTUGUESE\nfrom .sequence_labeling import WIKINER_POLISH\nfrom .sequence_labeling import WIKINER_RUSSIAN\nfrom .sequence_labeling import WNUT_17\nfrom .sequence_labeling import WSD_UFSAC\nfrom .sequence_labeling import WNUT_2020_NER\nfrom .sequence_labeling import XTREME\nfrom .sequence_labeling import BUSINESS_HUN\n\n# Expose all document classification datasets\nfrom .document_classification import ClassificationCorpus\nfrom .document_classification import ClassificationDataset\nfrom .document_classification import CSVClassificationCorpus\nfrom .document_classification import CSVClassificationDataset\nfrom .document_classification import AMAZON_REVIEWS\nfrom .document_classification import IMDB\nfrom .document_classification import NEWSGROUPS\nfrom .document_classification import SENTIMENT_140\nfrom .document_classification import SENTEVAL_CR\nfrom .document_classification import SENTEVAL_MR\nfrom .document_classification import SENTEVAL_MPQA\nfrom .document_classification import SENTEVAL_SUBJ\nfrom .document_classification import SENTEVAL_SST_BINARY\nfrom .document_classification import SENTEVAL_SST_GRANULAR\nfrom .document_classification import TREC_50\nfrom .document_classification import TREC_6\nfrom .document_classification import COMMUNICATIVE_FUNCTIONS\nfrom .document_classification import WASSA_ANGER\nfrom .document_classification import WASSA_FEAR\nfrom .document_classification import WASSA_JOY\nfrom .document_classification import WASSA_SADNESS\nfrom .document_classification import GO_EMOTIONS\nfrom .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE\n\n# Expose all treebanks\nfrom .treebanks import UniversalDependenciesCorpus\nfrom .treebanks import UniversalDependenciesDataset\nfrom .treebanks import UD_ENGLISH\nfrom .treebanks import UD_GERMAN\nfrom .treebanks import UD_GERMAN_HDT\nfrom .treebanks import UD_DUTCH\nfrom .treebanks import UD_FRENCH\nfrom .treebanks import UD_ITALIAN\nfrom .treebanks import UD_SPANISH\nfrom .treebanks import UD_PORTUGUESE\nfrom .treebanks import UD_ROMANIAN\nfrom .treebanks import UD_CATALAN\nfrom .treebanks import UD_POLISH\nfrom .treebanks import UD_CZECH\nfrom .treebanks import UD_SLOVAK\nfrom .treebanks import UD_SWEDISH\nfrom .treebanks import UD_DANISH\nfrom .treebanks import UD_NORWEGIAN\nfrom .treebanks import UD_FINNISH\nfrom .treebanks import UD_SLOVENIAN\nfrom .treebanks import UD_CROATIAN\nfrom .treebanks import UD_SERBIAN\nfrom .treebanks import UD_BULGARIAN\nfrom .treebanks import UD_ARABIC\nfrom .treebanks import UD_HEBREW\nfrom .treebanks import UD_TURKISH\nfrom .treebanks import UD_PERSIAN\nfrom .treebanks import UD_RUSSIAN\nfrom .treebanks import UD_HINDI\nfrom .treebanks import UD_INDONESIAN\nfrom .treebanks import UD_JAPANESE\nfrom .treebanks import UD_CHINESE\nfrom .treebanks import UD_KOREAN\nfrom .treebanks import UD_BASQUE\nfrom .treebanks import UD_GREEK\nfrom .treebanks import UD_LIVVI\nfrom .treebanks import UD_NORTH_SAMI\nfrom .treebanks import UD_MARATHI\nfrom .treebanks import UD_MALTESE\nfrom .treebanks import UD_AFRIKAANS\nfrom .treebanks import UD_OLD_FRENCH\nfrom .treebanks import UD_GOTHIC\nfrom .treebanks import UD_WOLOF\n\n# Expose all text-text datasets\nfrom .text_text import ParallelTextCorpus\nfrom .text_text import ParallelTextDataset\nfrom .text_text import OpusParallelCorpus\nfrom .text_text import DataPairDataset\nfrom .text_text import DataPairCorpus\nfrom .text_text import GLUE_RTE\nfrom .text_text import SUPERGLUE_RTE\n\n# Expose all text-image datasets\nfrom .text_image import FeideggerCorpus\nfrom .text_image import FeideggerDataset\n\n# Expose all biomedical data sets\nfrom .biomedical import ANAT_EM\nfrom .biomedical import AZDZ\nfrom .biomedical import BIONLP2013_PC\nfrom .biomedical import BIONLP2013_CG\nfrom .biomedical import BIO_INFER\nfrom .biomedical import BIOSEMANTICS\nfrom .biomedical import BC2GM\nfrom .biomedical import CELL_FINDER\nfrom .biomedical import CEMP\nfrom .biomedical import CDR\nfrom .biomedical import CHEMDNER\nfrom .biomedical import CRAFT\nfrom .biomedical import CRAFT_V4\nfrom .biomedical import CLL\nfrom .biomedical import DECA\nfrom .biomedical import FSU\nfrom .biomedical import GELLUS\nfrom .biomedical import GPRO\nfrom .biomedical import IEPA\nfrom .biomedical import JNLPBA\nfrom .biomedical import LOCTEXT\nfrom .biomedical import LINNEAUS\nfrom .biomedical import NCBI_DISEASE\nfrom .biomedical import MIRNA\nfrom .biomedical import OSIRIS\nfrom .biomedical import PDR\nfrom .biomedical import S800\nfrom .biomedical import SCAI_CHEMICALS\nfrom .biomedical import SCAI_DISEASE\nfrom .biomedical import VARIOME\n\n# Expose all biomedical data sets using the HUNER splits\nfrom .biomedical import HUNER_CHEMICAL\nfrom .biomedical import HUNER_CHEMICAL_CHEBI\nfrom .biomedical import HUNER_CHEMICAL_CHEMDNER\nfrom .biomedical import HUNER_CHEMICAL_CDR\nfrom .biomedical import HUNER_CHEMICAL_CEMP\nfrom .biomedical import HUNER_CHEMICAL_SCAI\nfrom .biomedical import HUNER_CHEMICAL_CRAFT_V4\n# -\nfrom .biomedical import HUNER_CELL_LINE\nfrom .biomedical import HUNER_CELL_LINE_CLL\nfrom .biomedical import HUNER_CELL_LINE_CELL_FINDER\nfrom .biomedical import HUNER_CELL_LINE_GELLUS\nfrom .biomedical import HUNER_CELL_LINE_JNLPBA\n# -\nfrom .biomedical import HUNER_DISEASE\nfrom .biomedical import HUNER_DISEASE_CDR\nfrom .biomedical import HUNER_DISEASE_MIRNA\nfrom .biomedical import HUNER_DISEASE_NCBI\nfrom .biomedical import HUNER_DISEASE_SCAI\nfrom .biomedical import HUNER_DISEASE_VARIOME\nfrom .biomedical import HUNER_DISEASE_PDR\n# -\nfrom .biomedical import HUNER_GENE\nfrom .biomedical import HUNER_GENE_BIO_INFER\nfrom .biomedical import HUNER_GENE_BC2GM\nfrom .biomedical import HUNER_GENE_CHEBI\nfrom .biomedical import HUNER_GENE_CRAFT_V4\nfrom .biomedical import HUNER_GENE_CELL_FINDER\nfrom .biomedical import HUNER_GENE_DECA\nfrom .biomedical import HUNER_GENE_FSU\nfrom .biomedical import HUNER_GENE_GPRO\nfrom .biomedical import HUNER_GENE_IEPA\nfrom .biomedical import HUNER_GENE_JNLPBA\nfrom .biomedical import HUNER_GENE_LOCTEXT\nfrom .biomedical import HUNER_GENE_MIRNA\nfrom .biomedical import HUNER_GENE_OSIRIS\nfrom .biomedical import HUNER_GENE_VARIOME\n# -\nfrom .biomedical import HUNER_SPECIES\nfrom .biomedical import HUNER_SPECIES_CELL_FINDER\nfrom .biomedical import HUNER_SPECIES_CHEBI\nfrom .biomedical import HUNER_SPECIES_CRAFT_V4\nfrom .biomedical import HUNER_SPECIES_LOCTEXT\nfrom .biomedical import HUNER_SPECIES_LINNEAUS\nfrom .biomedical import HUNER_SPECIES_MIRNA\nfrom .biomedical import HUNER_SPECIES_S800\nfrom .biomedical import HUNER_SPECIES_VARIOME\n\n# Expose all biomedical data sets used for the evaluation of BioBERT\nfrom .biomedical import BIOBERT_CHEMICAL_BC4CHEMD\nfrom .biomedical import BIOBERT_CHEMICAL_BC5CDR\nfrom .biomedical import BIOBERT_DISEASE_NCBI\nfrom .biomedical import BIOBERT_DISEASE_BC5CDR\nfrom .biomedical import BIOBERT_SPECIES_LINNAEUS\nfrom .biomedical import BIOBERT_SPECIES_S800\nfrom .biomedical import BIOBERT_GENE_BC2GM\nfrom .biomedical import BIOBERT_GENE_JNLPBA\n", "path": "flair/datasets/__init__.py"}, {"content": "from setuptools import setup, find_packages\n\nwith open(\"requirements.txt\") as f:\n    required = f.read().splitlines()\n\nsetup(\n    name=\"flair\",\n    version=\"0.7\",\n    description=\"A very simple framework for state-of-the-art NLP\",\n    long_description=open(\"README.md\", encoding=\"utf-8\").read(),\n    long_description_content_type=\"text/markdown\",\n    author=\"Alan Akbik\",\n    author_email=\"alan.akbik@gmail.com\",\n    url=\"https://github.com/flairNLP/flair\",\n    packages=find_packages(exclude=\"tests\"),  # same as name\n    license=\"MIT\",\n    install_requires=required,\n    include_package_data=True,\n    python_requires=\">=3.6\",\n)\n", "path": "setup.py"}, {"content": "import os\nimport torch\nfrom pathlib import Path\nfrom transformers import set_seed as hf_set_seed\n\n# global variable: cache_root\ncache_root = os.getenv('FLAIR_CACHE_ROOT', Path(Path.home(), \".flair\"))\n\n# global variable: device\ndevice = None\nif torch.cuda.is_available():\n    device = torch.device(\"cuda:0\")\nelse:\n    device = torch.device(\"cpu\")\n\n# global variable: embedding_storage_mode\nembedding_storage_mode = \"default\"\n\nfrom . import data\nfrom . import models\nfrom . import visual\nfrom . import trainers\nfrom . import nn\nfrom .training_utils import AnnealOnPlateau\n\nimport logging.config\n\n__version__ = \"0.7\"\n\nlogging.config.dictConfig(\n    {\n        \"version\": 1,\n        \"disable_existing_loggers\": False,\n        \"formatters\": {\"standard\": {\"format\": \"%(asctime)-15s %(message)s\"}},\n        \"handlers\": {\n            \"console\": {\n                \"level\": \"INFO\",\n                \"class\": \"logging.StreamHandler\",\n                \"formatter\": \"standard\",\n                \"stream\": \"ext://sys.stdout\",\n            }\n        },\n        \"loggers\": {\n            \"flair\": {\"handlers\": [\"console\"], \"level\": \"INFO\", \"propagate\": False}\n        },\n    }\n)\n\nlogger = logging.getLogger(\"flair\")\n\ndef set_seed(seed: int):\n    hf_set_seed(seed)\n", "path": "flair/__init__.py"}], "after_files": [{"content": "# Expose base classses\nfrom .base import DataLoader\nfrom .base import SentenceDataset\nfrom .base import StringDataset\nfrom .base import MongoDataset\n\n# Expose all sequence labeling datasets\nfrom .sequence_labeling import ColumnCorpus\nfrom .sequence_labeling import ColumnDataset\nfrom .sequence_labeling import ANER_CORP\nfrom .sequence_labeling import BIOFID\nfrom .sequence_labeling import BIOSCOPE\nfrom .sequence_labeling import BUSINESS_HUN\nfrom .sequence_labeling import CONLL_03\nfrom .sequence_labeling import CONLL_03_GERMAN\nfrom .sequence_labeling import CONLL_03_DUTCH\nfrom .sequence_labeling import CONLL_03_SPANISH\nfrom .sequence_labeling import CONLL_2000\nfrom .sequence_labeling import DANE\nfrom .sequence_labeling import EUROPARL_NER_GERMAN\nfrom .sequence_labeling import GERMEVAL_14\nfrom .sequence_labeling import INSPEC\nfrom .sequence_labeling import LER_GERMAN\nfrom .sequence_labeling import MIT_MOVIE_NER_SIMPLE\nfrom .sequence_labeling import MIT_MOVIE_NER_COMPLEX\nfrom .sequence_labeling import MIT_RESTAURANT_NER\nfrom .sequence_labeling import NER_BASQUE\nfrom .sequence_labeling import NER_FINNISH\nfrom .sequence_labeling import NER_SWEDISH\nfrom .sequence_labeling import STACKOVERFLOW_NER\nfrom .sequence_labeling import SEMEVAL2010\nfrom .sequence_labeling import SEMEVAL2017\nfrom .sequence_labeling import TURKU_NER\nfrom .sequence_labeling import TWITTER_NER\nfrom .sequence_labeling import UP_CHINESE\nfrom .sequence_labeling import UP_ENGLISH\nfrom .sequence_labeling import UP_FINNISH\nfrom .sequence_labeling import UP_FRENCH\nfrom .sequence_labeling import UP_GERMAN\nfrom .sequence_labeling import UP_ITALIAN\nfrom .sequence_labeling import UP_SPANISH\nfrom .sequence_labeling import UP_SPANISH_ANCORA\nfrom .sequence_labeling import WEIBO_NER\nfrom .sequence_labeling import WIKIANN\nfrom .sequence_labeling import WIKIGOLD_NER\nfrom .sequence_labeling import WIKINER_ENGLISH\nfrom .sequence_labeling import WIKINER_GERMAN\nfrom .sequence_labeling import WIKINER_DUTCH\nfrom .sequence_labeling import WIKINER_FRENCH\nfrom .sequence_labeling import WIKINER_ITALIAN\nfrom .sequence_labeling import WIKINER_SPANISH\nfrom .sequence_labeling import WIKINER_PORTUGUESE\nfrom .sequence_labeling import WIKINER_POLISH\nfrom .sequence_labeling import WIKINER_RUSSIAN\nfrom .sequence_labeling import WNUT_17\nfrom .sequence_labeling import WSD_UFSAC\nfrom .sequence_labeling import WNUT_2020_NER\nfrom .sequence_labeling import XTREME\n\n# Expose all document classification datasets\nfrom .document_classification import ClassificationCorpus\nfrom .document_classification import ClassificationDataset\nfrom .document_classification import CSVClassificationCorpus\nfrom .document_classification import CSVClassificationDataset\nfrom .document_classification import AMAZON_REVIEWS\nfrom .document_classification import COMMUNICATIVE_FUNCTIONS\nfrom .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE\nfrom .document_classification import GO_EMOTIONS\nfrom .document_classification import IMDB\nfrom .document_classification import NEWSGROUPS\nfrom .document_classification import SENTIMENT_140\nfrom .document_classification import SENTEVAL_CR\nfrom .document_classification import SENTEVAL_MR\nfrom .document_classification import SENTEVAL_MPQA\nfrom .document_classification import SENTEVAL_SUBJ\nfrom .document_classification import SENTEVAL_SST_BINARY\nfrom .document_classification import SENTEVAL_SST_GRANULAR\nfrom .document_classification import TREC_50\nfrom .document_classification import TREC_6\nfrom .document_classification import WASSA_ANGER\nfrom .document_classification import WASSA_FEAR\nfrom .document_classification import WASSA_JOY\nfrom .document_classification import WASSA_SADNESS\n\n# Expose all treebanks\nfrom .treebanks import UniversalDependenciesCorpus\nfrom .treebanks import UniversalDependenciesDataset\nfrom .treebanks import UD_ENGLISH\nfrom .treebanks import UD_GERMAN\nfrom .treebanks import UD_GERMAN_HDT\nfrom .treebanks import UD_DUTCH\nfrom .treebanks import UD_FRENCH\nfrom .treebanks import UD_ITALIAN\nfrom .treebanks import UD_SPANISH\nfrom .treebanks import UD_PORTUGUESE\nfrom .treebanks import UD_ROMANIAN\nfrom .treebanks import UD_CATALAN\nfrom .treebanks import UD_POLISH\nfrom .treebanks import UD_CZECH\nfrom .treebanks import UD_SLOVAK\nfrom .treebanks import UD_SWEDISH\nfrom .treebanks import UD_DANISH\nfrom .treebanks import UD_NORWEGIAN\nfrom .treebanks import UD_FINNISH\nfrom .treebanks import UD_SLOVENIAN\nfrom .treebanks import UD_CROATIAN\nfrom .treebanks import UD_SERBIAN\nfrom .treebanks import UD_BULGARIAN\nfrom .treebanks import UD_ARABIC\nfrom .treebanks import UD_HEBREW\nfrom .treebanks import UD_TURKISH\nfrom .treebanks import UD_PERSIAN\nfrom .treebanks import UD_RUSSIAN\nfrom .treebanks import UD_HINDI\nfrom .treebanks import UD_INDONESIAN\nfrom .treebanks import UD_JAPANESE\nfrom .treebanks import UD_CHINESE\nfrom .treebanks import UD_KOREAN\nfrom .treebanks import UD_BASQUE\nfrom .treebanks import UD_GREEK\nfrom .treebanks import UD_LIVVI\nfrom .treebanks import UD_NORTH_SAMI\nfrom .treebanks import UD_MARATHI\nfrom .treebanks import UD_MALTESE\nfrom .treebanks import UD_AFRIKAANS\nfrom .treebanks import UD_OLD_FRENCH\nfrom .treebanks import UD_GOTHIC\nfrom .treebanks import UD_WOLOF\n\n# Expose all text-text datasets\nfrom .text_text import ParallelTextCorpus\nfrom .text_text import ParallelTextDataset\nfrom .text_text import OpusParallelCorpus\nfrom .text_text import DataPairDataset\nfrom .text_text import DataPairCorpus\nfrom .text_text import GLUE_RTE\nfrom .text_text import SUPERGLUE_RTE\n\n# Expose all text-image datasets\nfrom .text_image import FeideggerCorpus\nfrom .text_image import FeideggerDataset\n\n# Expose all biomedical data sets\nfrom .biomedical import ANAT_EM\nfrom .biomedical import AZDZ\nfrom .biomedical import BIONLP2013_PC\nfrom .biomedical import BIONLP2013_CG\nfrom .biomedical import BIO_INFER\nfrom .biomedical import BIOSEMANTICS\nfrom .biomedical import BC2GM\nfrom .biomedical import CELL_FINDER\nfrom .biomedical import CEMP\nfrom .biomedical import CDR\nfrom .biomedical import CHEMDNER\nfrom .biomedical import CRAFT\nfrom .biomedical import CRAFT_V4\nfrom .biomedical import CLL\nfrom .biomedical import DECA\nfrom .biomedical import FSU\nfrom .biomedical import GELLUS\nfrom .biomedical import GPRO\nfrom .biomedical import IEPA\nfrom .biomedical import JNLPBA\nfrom .biomedical import LOCTEXT\nfrom .biomedical import LINNEAUS\nfrom .biomedical import NCBI_DISEASE\nfrom .biomedical import MIRNA\nfrom .biomedical import OSIRIS\nfrom .biomedical import PDR\nfrom .biomedical import S800\nfrom .biomedical import SCAI_CHEMICALS\nfrom .biomedical import SCAI_DISEASE\nfrom .biomedical import VARIOME\n\n# Expose all biomedical data sets using the HUNER splits\nfrom .biomedical import HUNER_CHEMICAL\nfrom .biomedical import HUNER_CHEMICAL_CHEBI\nfrom .biomedical import HUNER_CHEMICAL_CHEMDNER\nfrom .biomedical import HUNER_CHEMICAL_CDR\nfrom .biomedical import HUNER_CHEMICAL_CEMP\nfrom .biomedical import HUNER_CHEMICAL_SCAI\nfrom .biomedical import HUNER_CHEMICAL_CRAFT_V4\n# -\nfrom .biomedical import HUNER_CELL_LINE\nfrom .biomedical import HUNER_CELL_LINE_CLL\nfrom .biomedical import HUNER_CELL_LINE_CELL_FINDER\nfrom .biomedical import HUNER_CELL_LINE_GELLUS\nfrom .biomedical import HUNER_CELL_LINE_JNLPBA\n# -\nfrom .biomedical import HUNER_DISEASE\nfrom .biomedical import HUNER_DISEASE_CDR\nfrom .biomedical import HUNER_DISEASE_MIRNA\nfrom .biomedical import HUNER_DISEASE_NCBI\nfrom .biomedical import HUNER_DISEASE_SCAI\nfrom .biomedical import HUNER_DISEASE_VARIOME\nfrom .biomedical import HUNER_DISEASE_PDR\n# -\nfrom .biomedical import HUNER_GENE\nfrom .biomedical import HUNER_GENE_BIO_INFER\nfrom .biomedical import HUNER_GENE_BC2GM\nfrom .biomedical import HUNER_GENE_CHEBI\nfrom .biomedical import HUNER_GENE_CRAFT_V4\nfrom .biomedical import HUNER_GENE_CELL_FINDER\nfrom .biomedical import HUNER_GENE_DECA\nfrom .biomedical import HUNER_GENE_FSU\nfrom .biomedical import HUNER_GENE_GPRO\nfrom .biomedical import HUNER_GENE_IEPA\nfrom .biomedical import HUNER_GENE_JNLPBA\nfrom .biomedical import HUNER_GENE_LOCTEXT\nfrom .biomedical import HUNER_GENE_MIRNA\nfrom .biomedical import HUNER_GENE_OSIRIS\nfrom .biomedical import HUNER_GENE_VARIOME\n# -\nfrom .biomedical import HUNER_SPECIES\nfrom .biomedical import HUNER_SPECIES_CELL_FINDER\nfrom .biomedical import HUNER_SPECIES_CHEBI\nfrom .biomedical import HUNER_SPECIES_CRAFT_V4\nfrom .biomedical import HUNER_SPECIES_LOCTEXT\nfrom .biomedical import HUNER_SPECIES_LINNEAUS\nfrom .biomedical import HUNER_SPECIES_MIRNA\nfrom .biomedical import HUNER_SPECIES_S800\nfrom .biomedical import HUNER_SPECIES_VARIOME\n\n# Expose all biomedical data sets used for the evaluation of BioBERT\nfrom .biomedical import BIOBERT_CHEMICAL_BC4CHEMD\nfrom .biomedical import BIOBERT_CHEMICAL_BC5CDR\nfrom .biomedical import BIOBERT_DISEASE_NCBI\nfrom .biomedical import BIOBERT_DISEASE_BC5CDR\nfrom .biomedical import BIOBERT_SPECIES_LINNAEUS\nfrom .biomedical import BIOBERT_SPECIES_S800\nfrom .biomedical import BIOBERT_GENE_BC2GM\nfrom .biomedical import BIOBERT_GENE_JNLPBA\n", "path": "flair/datasets/__init__.py"}, {"content": "from setuptools import setup, find_packages\n\nwith open(\"requirements.txt\") as f:\n    required = f.read().splitlines()\n\nsetup(\n    name=\"flair\",\n    version=\"0.8\",\n    description=\"A very simple framework for state-of-the-art NLP\",\n    long_description=open(\"README.md\", encoding=\"utf-8\").read(),\n    long_description_content_type=\"text/markdown\",\n    author=\"Alan Akbik\",\n    author_email=\"alan.akbik@gmail.com\",\n    url=\"https://github.com/flairNLP/flair\",\n    packages=find_packages(exclude=\"tests\"),  # same as name\n    license=\"MIT\",\n    install_requires=required,\n    include_package_data=True,\n    python_requires=\">=3.6\",\n)\n", "path": "setup.py"}, {"content": "import os\nimport torch\nfrom pathlib import Path\nfrom transformers import set_seed as hf_set_seed\n\n# global variable: cache_root\ncache_root = os.getenv('FLAIR_CACHE_ROOT', Path(Path.home(), \".flair\"))\n\n# global variable: device\ndevice = None\nif torch.cuda.is_available():\n    device = torch.device(\"cuda:0\")\nelse:\n    device = torch.device(\"cpu\")\n\n# global variable: embedding_storage_mode\nembedding_storage_mode = \"default\"\n\nfrom . import data\nfrom . import models\nfrom . import visual\nfrom . import trainers\nfrom . import nn\nfrom .training_utils import AnnealOnPlateau\n\nimport logging.config\n\n__version__ = \"0.8\"\n\nlogging.config.dictConfig(\n    {\n        \"version\": 1,\n        \"disable_existing_loggers\": False,\n        \"formatters\": {\"standard\": {\"format\": \"%(asctime)-15s %(message)s\"}},\n        \"handlers\": {\n            \"console\": {\n                \"level\": \"INFO\",\n                \"class\": \"logging.StreamHandler\",\n                \"formatter\": \"standard\",\n                \"stream\": \"ext://sys.stdout\",\n            }\n        },\n        \"loggers\": {\n            \"flair\": {\"handlers\": [\"console\"], \"level\": \"INFO\", \"propagate\": False}\n        },\n    }\n)\n\nlogger = logging.getLogger(\"flair\")\n\ndef set_seed(seed: int):\n    hf_set_seed(seed)\n", "path": "flair/__init__.py"}]}