This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
v2.5.0
#5241
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🆕 AllenNLP
v2.5.0
comes with a few big new features and improvements 🆕There is a whole new module
allennlp.fairness
that contains implementations of fairness metrics, bias metrics, and bias mitigation tools for your models thanks to @ArjunSubramonian. For a great introduction, check out the corresponding chapter of the guide: https://guide.allennlp.org/fairness.Another major addition is the
allennlp.confidence_checks.task_checklists
submodule, thanks to @AkshitaB, which provides an automated way to run behavioral tests of your models using thechecklist
library.BeamSearch
also has several new important features, including an easy to add arbitrary constraints, thanks to @danieldeutsch.See below for a comprehensive list of updates 👇
What's new
Added 🎉
TaskSuite
base class and command line functionality for runningchecklist
test suites, along with implementations forSentimentAnalysisSuite
,QuestionAnsweringSuite
, andTextualEntailmentSuite
. These can be found in theallennlp.confidence_checks.task_checklists
module.BiasMitigatorApplicator
, which wraps any Model and mitigates biases by finetuningon a downstream task.
allennlp diff
command to compute a diff on model checkpoints, analogous to whatgit diff
does on two files.allennlp.common.meta.Meta
is now saved in the serialization directory and archive filewhen training models from the command line. This is also now part of the
Archive
named tuple that's returned fromload_archive()
.nn.util.distributed_device()
helper function.allennlp.nn.util.load_state_dict
helper function.such as the
PretrainedTransformerEmbedder
andPretrainedTransformerMismatchedEmbedder
.You can do this by setting the parameter
load_weights
toFalse
.See PR #5172 for more details.
SpanExtractorWithSpanWidthEmbedding
, putting specific span embedding computations into the_embed_spans
method and leaving the common code inSpanExtractorWithSpanWidthEmbedding
to unify the arguments, and modifiedBidirectionalEndpointSpanExtractor
,EndpointSpanExtractor
andSelfAttentiveSpanExtractor
accordingly. Now,SelfAttentiveSpanExtractor
can also embed span widths.min_steps
parameter toBeamSearch
to set a minimum length for the predicted sequences.FinalSequenceScorer
abstraction to calculate the final scores of the generated sequences inBeamSearch
.shuffle
argument toBucketBatchSampler
which allows for disabling shuffling.allennlp.modules.transformer.attention_module
which contains a generalizedAttentionModule
.SelfAttention
andT5Attention
both inherit from this.Constraint
abstract class toBeamSearch
, which allows for incorporating constraints on the predictions found byBeamSearch
,along with a
RepeatedNGramBlockingConstraint
constraint implementation, which allows for preventing repeated n-grams in the output fromBeamSearch
.DataCollator
for dynamic operations for each batch.Changed⚠️
dist_reduce_sum
in distributed metrics.cached_path
("gs://...").nn.util.load_state_dict()
toread_state_dict
to avoid confusion withtorch.nn.Module.load_state_dict()
.TransformerModule.from_pretrained_module
now only accepts a pretrained model ID (e.g. "bert-base-case") instead ofan actual
torch.nn.Module
. Other parameters to this method have changed as well.sanity_checks
toconfidence_checks
(sanity_checks
is deprecated and will be removed in AllenNLP 3.0).BeamSearch
is now aRegistrable
class.Fixed ✅
PretrainedTransformerIndexer
folds long sequences, it no longer loses the information from token type ids.GradientDescentTrainer.cuda_device
.cached_path()
when extracting archives. Although the race conditionis still possible if used with
force_extract=True
.wandb
callback to work in distributed training.tqdm
logging into multiple files withallennlp-optuna
.Commits
b92fd9a Contextualized bias mitigation (#5176)
aa52a9a Checklist fixes (#5239)
6206797 Fix tqdm logging into multiple files with allennlp-optuna (#5235)
b0aa1d4 Generalize T5 modules (#5166)
5b111d0 tick version for nightly release
39d7e5a Make BeamSearch Registrable (#5231)
c014232 Add constraints to beam search (#5216)
98dae7f Emergency fix. I forgot to take this out.
c5bff8b Fixes Checkpointing (#5220)
3d5799d Roll backbone (#5229)
babc450 Added
DataCollator
for dynamic operations for each batch. (#5221)d97ed40 Bump checklist from 0.0.10 to 0.0.11 (#5222)
12155c4 fix race condition when extracting files with cached_path (#5227)
d662977 cancel redundant GH Actions workflows (#5226)
2d8f390 Fix W&B callback for distributed training (#5223)
59df2ad Update nr-interface requirement from <0.0.4 to <0.0.6 (#5213)
3e1b553 Bump black from 20.8b1 to 21.5b1 (#5195)
d2840cb save meta data with model archives (#5209)
bd941c6 added shuffle disable option in BucketBatchSampler (#5212)
3585c9f Implementing abstraction to score final sequences in
BeamSearch
(#5208)79d16af Add a
min_steps
parameter toBeamSearch
(#5207)cf113d7 Changes and improvements to how we initialize transformer modules from pretrained models (#5200)
cccb35d Rename sanity_checks to confidence_checks (#5201)
db8ff67 Update transformers requirement from <4.6,>=4.1 to >=4.1,<4.7 (#5199)
fd5c9e4 Bias Metrics (#5139)
d9b19b6 Bias Mitigation and Direction Methods (#5130)
7473737 add diff command (#5109)
d85c5c3 Explicitly pass serialization directory and local rank to trainer in train command (#5180)
96c3caf fix nltk downloads in install (#5189)
b1b455a improve contributing guide / PR template (#5185)
7a260da fix cuda_device docs (#5188)
0bf590d Update Makefile (#5183)
3335700 Default print first batch (#5175)
b533733 Refactor span extractors and unify forward. (#5160)
01b232f Allow google cloud storage locations for cached_path (#5173)
eb2ae30 Update README.md (#5165)
55efa68 fix dataclasses import (#5169)
a463e0e Add way of skipping pretrained weights download (#5172)
c71bb46 improve err msg for PolynomialDecay LR scheduler (#5143)
530dae4 Simplify metrics (#5154)
12f5b0f Run some slow tests on the self-hosted runner (#5161)
9091580 Fixes token type ids for folded sequences (#5149)
10400e0 Run checklist suites in AllenNLP (#5065)
d11359e make dist_reduce_sum work for tensors (#5147)
9184fbc Fixes Backbone / Model MRO inconsistency (#5148)
This discussion was created from the release v2.5.0.
Beta Was this translation helpful? Give feedback.
All reactions