Skip to content

flair: a wrapper to access the Flair library from Python.

Returns:

  • list: A list of method as python module.

Environment and Configuration:
  • os: Pertains to operating system related functions, such as path handling, file operations, and more.

  • Path: From pathlib, used for more convenient file path operations.

  • set_seed: Functions to set the random seed.

  • hf_set_seed: Functions to set the random seed.

  • set_proxies: Used to configure network proxies.

Data and Data Loading:
  • data: Functions related to data handling and operations.

  • datasets: Modules or methods to load and handle specific datasets.

  • file_utils: Utilities for file operations.

Embeddings and Model Layers:
  • embeddings: About embeddings, including word embeddings, contextual embeddings, etc.

  • nn: Related to neural network layers or operations.

  • models: Different model architectures or structures.

Training and Optimization:
  • trainers: Related to training models.

  • training_utils: Utility functions for the training process.

  • optim: Optimization algorithms, like SGD, Adam.

Tokenization and Text Processing:
  • tokenization: To break text into tokens.

  • splitter: For splitting datasets or texts.

Visualizations and Miscellaneous:
  • visual: Related to visualization.

  • torch: The main PyTorch library.

  • cache_root: Related to caching data or models.

Usage

import_flair()

Value

An object that represents the Flair module from Python.

Details

This function relies on the reticulate package to import and use the Flair module from Python. Ensure you have the Flair Python library installed in the Python environment being used.

Examples

if (FALSE) { # \dontrun{
flair <- import_flair()
} # }