Skip to content

Commit

Permalink
Rearrange imports / import from full path rather than relative
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Jan 9, 2024
1 parent d4d1f33 commit 262efca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stanza/models/lemma_classifier/baseline_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import stanza
import os
from evaluate_models import evaluate_sequences
from prepare_dataset import load_doc_from_conll_file
from stanza.models.lemma_classifier.prepare_dataset import load_doc_from_conll_file

class BaselineModel:

Expand Down
11 changes: 6 additions & 5 deletions stanza/models/lemma_classifier/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from collections import Counter, defaultdict
import os
from typing import List, Tuple, Any, Mapping

import stanza
import torch
import os
import prepare_dataset

from stanza.models.lemma_classifier.constants import DEFAULT_BATCH_SIZE
from typing import List, Tuple, Any, Mapping
from collections import Counter, defaultdict
import stanza.models.lemma_classifier.prepare_dataset as prepare_dataset


def load_dataset(data_path: str, batch_size=DEFAULT_BATCH_SIZE, get_counts: bool = False, label_decoder: dict = None) -> Tuple[List[List[str]], List[torch.Tensor], List[torch.Tensor], Mapping[int, int], Mapping[str, int]]:
Expand Down Expand Up @@ -109,4 +110,4 @@ def main():
sentence_batches, indices_batches, upos_batches, _, counts, _, upos_to_id = load_dataset(default_test_path, get_counts=True)

if __name__ == "__main__":
main()
main()

0 comments on commit 262efca

Please sign in to comment.