flair#

flair.cache_root = PosixPath('/home/runner/.flair')#

The path to the cache folder Flair is using.

This value defaults to <Home Directory>/.flair. You can choose the path by setting the FLAIR_CACHE_ROOT environment variable.

flair.device: device = device(type='cpu')#

Flair is using a single device for everything. You can set this device by overwriting this variable.

The device will be automatically set to the first available GPU if a GPU is present and the ‘FLAIR_DEVICE’ environment variable is not set to ‘cpu’, otherwise it will default to the CPU, and a specific GPU can be chosen by setting the ‘FLAIR_DEVICE’ environment variable to its index.

flair.logger = <Logger flair (INFO)>#

The logger used by Flair.

You can reconfigure it to change the log output to your likings.

flair.set_seed(seed)View on GitHub#

Set the seed for all random generators used in training.

Use this method to guarantee reproducibility of experiments.

Parameters:

seed (int) – any value you want

flair.set_proxies(proxies)View on GitHub#

Allows for data downloaded from urls to be forwarded to a proxy.

see https://requests.readthedocs.io/en/latest/user/advanced/#proxies

Parameters:

proxies (Dict[str, str]) – A dictionary of proxies according to the requests documentation.

Return type:

None