From f0811ea238aa6afbcc2eb6c910b906ead37c2501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martyna=20Wi=C4=85cek?= <martyna.wiacek@ipipan.waw.pl> Date: Wed, 14 Feb 2024 11:33:45 +0100 Subject: [PATCH] fixed imports to be absolute, not relative --- combo/combo_model.py | 2 +- combo/modules/seq2seq_encoders/transformer_encoder.py | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/combo/combo_model.py b/combo/combo_model.py index d87d514..162a3b1 100644 --- a/combo/combo_model.py +++ b/combo/combo_model.py @@ -24,7 +24,7 @@ from combo.nn.utils import get_text_field_mask from combo.predictors import Predictor from combo.utils import metrics from combo.utils import ConfigurationError -from modules.seq2seq_encoders.transformer_encoder import TransformerEncoder +from combo.modules.seq2seq_encoders.transformer_encoder import TransformerEncoder @Registry.register("semantic_multitask") diff --git a/combo/modules/seq2seq_encoders/transformer_encoder.py b/combo/modules/seq2seq_encoders/transformer_encoder.py index a49100d..3b126fa 100644 --- a/combo/modules/seq2seq_encoders/transformer_encoder.py +++ b/combo/modules/seq2seq_encoders/transformer_encoder.py @@ -1,18 +1,11 @@ from typing import Optional -from overrides import overrides import torch from torch import nn from combo.modules.encoder import _EncoderBase from combo.config.from_parameters import FromParameters, register_arguments - -# from modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder -from nn.utils import add_positional_features - - -# from allennlp.modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder -# from allennlp.nn.util import add_positional_features +from combo.nn.utils import add_positional_features class TransformerEncoder(_EncoderBase, FromParameters): -- GitLab