Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JinYuanLi0012/PGIM
/ types & classes
Types & classes
105 in github.com/JinYuanLi0012/PGIM
⨍
Functions
413
◇
Types & classes
105
↓ 10 callers
Class
ConfigurationError
The exception raised by any Adaseq object when it's misconfigured (e.g. missing properties, invalid properties, unknown properties).
adaseq/utils/checks.py:10
↓ 7 callers
Class
WordDropout
Word-level Dropout module During training, randomly zeroes some of the elements of the input tensor at word level with probability `dropout_r
adaseq/modules/dropouts.py:6
↓ 3 callers
Class
CRF
Conditional random field. This module implements a conditional random field [LMP01]_. The forward computation of this class computes the log l
adaseq/modules/decoders/crf.py:13
↓ 3 callers
Class
SpanEncoder
Turn token embedding sequenece to a single vector.
adaseq/modules/encoders/span_encoder.py:13
↓ 2 callers
Class
ErrorFilter
Filters out everything that is at the ERROR level or higher. This is meant to be used with a stdout handler when a stderr handler is also con
adaseq/utils/logging.py:56
↓ 2 callers
Class
InvalidTagSequence
adaseq/data/span_utils.py:10
↓ 2 callers
Class
SetScore
evaluate macro and micro set p/r/f1 scores
adaseq/metrics/typing_metric.py:15
↓ 2 callers
Class
WBCEWithLogitsLoss
Weighed BCE loss, multiply the loss of positive examples with a scaler
adaseq/models/multilabel_typing_model.py:22
↓ 1 callers
Class
Biaffine
Biaffine Attention
adaseq/modules/biaffine.py:6
↓ 1 callers
Class
BiaffineScorer
Biaffine scorer.
adaseq/models/biaffine_ner_model.py:161
↓ 1 callers
Class
CRFwithConstraints
Conditional random field. This module implements a conditional random field [LMP01]_. The forward computation of this class computes the log l
adaseq/modules/decoders/crf.py:539
↓ 1 callers
Class
DataBatch
represent a data batch, support `tensorize` function.
adaseq/data/batch.py:7
↓ 1 callers
Class
LabelTransformLayerMLP
MLP on label embeddings to parameterize potentials
adaseq/modules/decoders/pairwise_crf.py:197
↓ 1 callers
Class
MLMPredictionHead
TODO
adaseq/modules/decoders/mlm_head.py:26
↓ 1 callers
Class
PairwiseCRF
The module proposed in the EMNLP2022 Paper to model label correlations, require label embeddings and use mean-field variational inference.
adaseq/modules/decoders/pairwise_crf.py:231
↓ 1 callers
Class
PartialCRF
Partial/Fuzzy Conditional random field.
adaseq/modules/decoders/partial_crf.py:14
↓ 1 callers
Class
PredictionHeadTransform
TODO
adaseq/modules/decoders/mlm_head.py:7
↓ 1 callers
Class
ScalarMix
Computes a parameterised scalar mixture of N tensors, `mixture = gamma * sum(s_k * tensor_k)` where `s = softmax(w)`, with `w` and `gamma` sc
adaseq/modules/scalar_mix.py:13
↓ 1 callers
Class
SetScore
evaluate macro and micro set p/r/f1 scores
adaseq/metrics/pretraining_metric.py:13
↓ 1 callers
Class
SimpleFeedForwardLayer
2-layer feed forward
adaseq/modules/decoders/pairwise_crf.py:165
↓ 1 callers
Class
SinusoidalPositionEmbedding
Sin-Cos Embedding. ref: https://spaces.ac.cn/archives/8265
adaseq/models/global_pointer_model.py:18
Class
AdaSeqLogger
A custom subclass of 'logging.Logger' that keeps a set of messages to implement {debug,info,etc.}_once() methods.
adaseq/utils/logging.py:16
Class
AdaSeqTextLoggerHook
Logger hook in text, Output log to both console and local json file. Args: by_epoch (bool, optional): Whether EpochBasedtrainer is used.
adaseq/training/hooks/text_logger_hook.py:18
Class
BiaffineNerModel
Named Entity Recognition as Dependency Parsing (Yu et al., ACL 2020) ref: https://aclanthology.org/2020.acl-main.577/
adaseq/models/biaffine_ner_model.py:18
Class
ConcatTypingThresholdMetric
Evaluate metrics for typing tasks, with threshold tuning
adaseq/metrics/typing_metric.py:143
Class
CustomDatasetBuilder
Base class for custumized dataset builder.
adaseq/data/dataset_builders/base.py:10
Class
DataCollatorWithPadding
A `DataCollator` support padding some fields to same length. Support padding encoder related fields: input_ids, token_type_ids, mask, and
adaseq/data/data_collators/base.py:25
Class
DataCollators
Names for different data_collators
adaseq/metainfo.py:90
Class
DatasetDumper
class to dump model predictions
adaseq/data/dataset_dumpers/base.py:8
Class
DatasetDumpers
Names for different dataset dumpers
adaseq/metainfo.py:127
Class
DatasetManager
An `DatasetManager` is used by trainers to load a dataset from `modelscope`, local files by built-in `DatasetBuilder`s, or custom huggingface
adaseq/data/dataset_manager.py:20
Class
Decoder
The decoder base class for downstream tasks
adaseq/modules/decoders/base.py:30
Class
Decoders
Names for different decoders
adaseq/metainfo.py:66
Class
DefaultTrainer
Default trainer class for AdaSeq. This trainer inherits from EpochBasedTrainer with some modifications. It implements some common data proces
adaseq/training/default_trainer.py:29
Class
Embedder
The embedder base class for encoding input_ids to hidden-states
adaseq/modules/embedders/base.py:27
Class
Embedders
Names for different embedders
adaseq/metainfo.py:50
Class
Embedding
A simple lookup table for word embedding. This module implements a simple lookup table that stores embeddings of a fixed dictionary and size.
adaseq/modules/embedders/embedding.py:16
Class
Encoder
The encoder base class for encoding embeddings to features.
adaseq/modules/encoders/base.py:25
Class
Encoders
Names for different encoders
adaseq/metainfo.py:57
Class
EntityTypingDatasetBuilder
Builder for entity typing datasets. features: id: string, data record id. tokens: list[str] input tokens. spans: List[Dic
adaseq/data/dataset_builders/entity_typing_dataset_builder.py:19
Class
EntityTypingDatasetBuilderConfig
BuilderConfig for entity typing datasets
adaseq/data/dataset_builders/entity_typing_dataset_builder.py:11
Class
Exporter
The base class of exporter inheriting from TorchModelExporter. This class provides the default implementations for exporting onnx and torch scrip
adaseq/exporters/base.py:4
Class
GlobalPointerModel
GlobalPointer model. ref: https://arxiv.org/abs/2208.03054 ref: https://github.com/xhw205/Efficient-GlobalPointer-torch
adaseq/models/global_pointer_model.py:55
Class
GruEncoder
Registered as a `Encoder` with name "gru".
adaseq/modules/encoders/pytorch_rnn_encoder.py:84
Class
Hooks
Names for different hooks
adaseq/metainfo.py:121
Class
LR_Schedulers
Names for different lr_schedulers
adaseq/metainfo.py:115
Class
LstmEncoder
Registered as a `Encoder` with name "lstm".
adaseq/modules/encoders/pytorch_rnn_encoder.py:111
Class
MCCEDatasetBuilder
Builder for entity typing datasets. features: id: string, data record id. tokens: list[str] input tokens. spans: List[Dic
adaseq/data/dataset_builders/mcce_entity_typing_dataset_builder.py:21
Class
MCCEDatasetBuilderConfig
BuilderConfig for entity typing datasets
adaseq/data/dataset_builders/mcce_entity_typing_dataset_builder.py:13
Class
Metrics
Names for different metrics
adaseq/metainfo.py:24
Class
Model
The model base class
adaseq/models/base.py:23
Class
Models
Names for different models
adaseq/metainfo.py:36
Class
MultiLabelConcatTypingDataCollatorWithPadding
Padding method for multilabel span concat typing dataset.
adaseq/data/data_collators/multilabel_typing_data_collator_with_padding.py:33
Class
MultiLabelConcatTypingMCCEPreprocessor
Preprocessor for multilabel (aka multi-type) span concat typing task. cand_size: number of candidates, -1 when use all labels candidates
adaseq/data/preprocessors/multilabel_typing_preprocessor.py:112
Class
MultiLabelConcatTypingModel
Concat based Single Mention MultiLabel Entity Typing model This model is used for single mention multilabel entity typing tasks. Input format
adaseq/models/multilabel_typing_model.py:180
Class
MultiLabelConcatTypingModelMCCES
Concat based Single Mention MultiLabel Entity Typing model MCCE This model is used for single mention multilabel entity typing tasks. Input f
adaseq/models/multilabel_typing_model.py:309
Class
MultiLabelConcatTypingPreprocessor
Preprocessor for multilabel (aka multi-type) span concat typing task.
adaseq/data/preprocessors/multilabel_typing_preprocessor.py:55
Class
MultiLabelSpanTypingDataCollatorWithPadding
Padding method for multilabel span typing dataset.
adaseq/data/data_collators/multilabel_typing_data_collator_with_padding.py:10
Class
MultiLabelSpanTypingModel
Span based MultiLabel Entity Typing model This model is used for multilabel entity typing tasks. Args: num_labels (int): number of l
adaseq/models/multilabel_typing_model.py:43
Class
MultiLabelSpanTypingPreprocessor
Preprocessor for multilabel (aka multi-type) span typing task. span targets are processed into mention_boundary, type_ids. examples: s
adaseq/data/preprocessors/multilabel_typing_preprocessor.py:16
Class
NLPPreprocessor
Some common pre-process operations for NLP tasks. Args: model_dir (str): pre-trained model name or path. is_word2vec (bool):
adaseq/data/preprocessors/nlp_preprocessor.py:21
Class
NamedEntityRecognitionDatasetBuilder
Builder for entity typing datasets. features: id: string, data record id. tokens: list[str] input tokens. spans: List[Dic
adaseq/data/dataset_builders/named_entity_recognition_dataset_builder.py:22
Class
NamedEntityRecognitionDatasetBuilderConfig
BuilderConfig for Named Entity Recognition datasets
adaseq/data/dataset_builders/named_entity_recognition_dataset_builder.py:14
Class
NamedEntityRecognitionDatasetDumper
Named Entity Recognition dumper.
adaseq/data/dataset_dumpers/named_entity_recognition_dataset_dumper.py:16
Class
OnlyMLMHead
TODO
adaseq/modules/decoders/mlm_head.py:48
Class
Optimizers
Names for different optimizers
adaseq/metainfo.py:109
Class
PULearningLoss
PU Learning Loss. https://aclanthology.org/P19-1231.pdf https://aclanthology.org/2020.findings-emnlp.60.pdf
adaseq/modules/losses.py:101
Class
PartialBCELoss
PartialBCELoss
adaseq/modules/losses.py:57
Class
Pipeline
use `model` and `preprocessor` to create a pipeline for prediction Args: model (str or Model): A model instance or a model local dir or a
adaseq/pipelines/base.py:11
Class
Pipelines
Names for different pipelines
adaseq/metainfo.py:133
Class
Preprocessors
Names for different preprocessors
adaseq/metainfo.py:76
Class
PretrainingDataCollatorWithPadding
Padding method for pretraining dataset.
adaseq/data/data_collators/pretraining_data_collator_with_padding.py:10
Class
PretrainingMetric
Evaluate metrics for typing tasks and identification tasks
adaseq/metrics/pretraining_metric.py:102
Class
PretrainingModel
Pretraining model Args: num_labels (int): number of labels embedder (Union[embedder, str], `optional`): embedder used in the mode
adaseq/models/pretraining_model.py:20
Class
PretrainingPreprocessor
Preprocessor for pretraining. span targets are processed into mention_boundary, type_ids, ident_ids. examples: span: {'start':1, 'end'
adaseq/data/preprocessors/pretraining_preprocessor.py:15
Class
RelationExtractionDatasetBuilder
Dataset Builder for Relation Extraction
adaseq/data/dataset_builders/relation_extraction_dataset_builder.py:24
Class
RelationExtractionDatasetBuilderConfig
Builder Config for Relation Extraction
adaseq/data/dataset_builders/relation_extraction_dataset_builder.py:16
Class
RelationExtractionMetric
The metric computation class for relation extraction tasks.
adaseq/metrics/relation_extraction_metric.py:45
Class
RelationExtractionModel
Relation extraction model This model is used for relation extraction tasks.
adaseq/models/relation_extraction_model.py:17
Class
RelationExtractionPreprocessor
Relation Extraction data preprocessor
adaseq/data/preprocessors/relation_extraction_preprocessor.py:16
Class
RnnEncoder
Registered as a `Encoder` with name "rnn".
adaseq/modules/encoders/pytorch_rnn_encoder.py:138
Class
SequenceLabelingDataCollatorWithPadding
Collator for the sequence labeling task
adaseq/data/data_collators/sequence_labeling_data_collator_with_padding.py:11
Class
SequenceLabelingMetric
The metric computation class for sequence-labeling tasks. This metric class uses seqeval to calculate scores. Args: return_macro_f1
adaseq/metrics/sequence_labeling_metric.py:15
Class
SequenceLabelingModel
Sequence labeling model This model is used for sequence labeling tasks. Various decoders are supported, including argmax, crf, partial-crf, e
adaseq/models/sequence_labeling_model.py:23
Class
SequenceLabelingModelExporter
An exporter for sequence labeling model
adaseq/exporters/sequence_labeling_model_exporter.py:18
Class
SequenceLabelingPipeline
A pipeline for sequence labeling models Model outputs should contain: predicts: [[0, 0, 1, 2, 2, ...]] Pipeline outputs will be l
adaseq/pipelines/sequence_labeling_pipeline.py:17
Class
SequenceLabelingPreprocessor
Preprocessor for Sequence Labeling
adaseq/data/preprocessors/sequence_labeling_preprocessor.py:17
Class
SpanBasedNERPipeline
A NER pipeline for span based models, e.g. biaffine model and global pointer model. Model outputs should contain: predicts: [[(start,
adaseq/pipelines/span_based_ner_pipeline.py:17
Class
SpanExtracionPreprocessor
Preprocessor of span-based model. span targets are processed into `span_labels`
adaseq/data/preprocessors/span_extraction_preprocessor.py:14
Class
SpanExtractionDataCollatorWithPadding
Padding method for span extraction dataset.
adaseq/data/data_collators/span_extraction_data_collator_with_padding.py:12
Class
SpanExtractionMetric
The metric computation class for span-extraction tasks.
adaseq/metrics/span_extraction_metric.py:17
Class
Subcommand
Abstract class for subcommands
adaseq/commands/subcommand.py:6
Class
Tasks
Names for different tasks
adaseq/metainfo.py:13
Class
Test
usage: adaseq test [-h] -w WORK_DIR [-d DEVICE] [-ckpt CHECKPOINT_PATH] optional arguments: -h, --help show this help messa
adaseq/commands/test.py:18
Class
Train
usage: adaseq train [-h] -c CONFIG_PATH [-w WORK_DIR] [-n RUN_NAME] [-f FORCE] [-ckpt CHECKPOINT_PATH] [--seed SEED] [-d
adaseq/commands/train.py:27
Class
Trainers
Names for different trainers
adaseq/metainfo.py:102
Class
TransformerEmbedder
Uses a pretrained model from `transformers` as a `Embedder`. # Parameters model_name_or_path : `str` The name of the `transform
adaseq/modules/embedders/transformer_embedder.py:21
Class
TwoStageNERModel
Two stage ner model This model is used for two-stage few-shot ner model with pre-trained NER model (see pretraining_model module). Args:
adaseq/models/twostage_ner_model.py:19
Class
TwoStagePreprocessor
Preprocessor for twostage-ner. span targets are processed into mention_boundary, type_ids, ident_ids. examples: span: {'start':1, 'end
adaseq/data/preprocessors/twostage_preprocessor.py:13
Class
TwostageDataCollatorWithPadding
Padding method for two stage ner dataset.
adaseq/data/data_collators/twostage_data_collator_with_padding.py:10
next →
1–100 of 105, ranked by callers