flair.trainers.plugins.ReduceTransformerVocabPlugin#
- class flair.trainers.plugins.ReduceTransformerVocabPlugin(base_path, save_optimizer_state)View on GitHub#
Bases:
TrainerPlugin
- __init__(base_path, save_optimizer_state)View on GitHub#
Initialize the base plugin.
Methods
__init__
(base_path, save_optimizer_state)Initialize the base plugin.
attach_to
(pluggable)Attach this plugin to a Pluggable.
detach
()Detach a plugin from the Pluggable it is attached to.
get_state
()hook
([first_arg])Convience function for BasePlugin.mark_func_as_hook).
mark_func_as_hook
(func, *events)Mark method as a hook triggered by the Pluggable.
save_model_at_the_end
(**kw)Attributes
If set, the plugin will be attached to all processes when distributed, not just the main process.
corpus
model
pluggable
trainer
- register_transformer_smaller_training_vocab(**kw)View on GitHub#
- save_model_at_the_end(**kw)View on GitHub#
- property attach_to_all_processes: bool#
If set, the plugin will be attached to all processes when distributed, not just the main process.