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.

This value will be automatically set to the first found GPU if available and to CPU otherwise. You can choose a specific GPU, 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