Skip to content

Commit

Permalink
Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
DanShatford committed Sep 1, 2023
1 parent 25caa50 commit 41fbfae
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 39 deletions.
9 changes: 1 addition & 8 deletions examples/batch_process.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import logging
import re
import time
from collections import Counter
from pathlib import Path

import jsonlines
Expand All @@ -10,12 +8,7 @@
import spacy
import torch
import typer
from elasticsearch import Elasticsearch, helpers
from elasticsearch_dsl import Q, Search
from spacy.language import Language
from spacy.pipeline import Pipe
from spacy.tokens import Doc, Token
from torch.utils.data import DataLoader, Dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
from utilities import spacy_doc_setup

Expand Down
2 changes: 0 additions & 2 deletions examples/batch_process_production.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
import re
import time
from collections import Counter
from configparser import ConfigParser
from pathlib import Path

Expand All @@ -16,7 +15,6 @@

import mordecai3.elastic_utilities as es_util
from mordecai3.geoparse import Geoparser, doc_to_ex_expanded
from mordecai3.roberta_qa import setup_qa
from mordecai3.torch_model import ProductionData
from mordecai3.utilities import spacy_doc_setup

Expand Down
6 changes: 1 addition & 5 deletions examples/production_event.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import json

import numpy as np
import pandas as pd
import spacy
import streamlit as st
import torch
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Q, Search
from spacy.pipeline import Pipe
from spacy.tokens import Doc, Token
from elasticsearch_dsl import Search
from torch.utils.data import DataLoader

import mordecai3.elastic_utilities as es_util
Expand Down
2 changes: 1 addition & 1 deletion mordecai3/elastic_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import jellyfish
import numpy as np
from elasticsearch import Elasticsearch, helpers
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Q, Search

logger = logging.getLogger(__name__)
Expand Down
8 changes: 1 addition & 7 deletions mordecai3/geoparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
import os
import re

import jsonlines
import numpy as np
import pandas as pd
import pkg_resources
import spacy
import torch
from spacy.language import Language
from spacy.pipeline import Pipe
from spacy.tokens import Doc, Span, Token
from torch.utils.data import DataLoader, Dataset
from tqdm import tqdm
from torch.utils.data import DataLoader

from mordecai3.elastic_utilities import (
add_es_data_doc,
Expand Down
16 changes: 4 additions & 12 deletions mordecai3/mordecai_streamlit.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import re

import jsonlines
import numpy as np
import spacy
import streamlit as st
import torch
from elastic_utilities import add_es_data, res_formatter
from elasticsearch import Elasticsearch, helpers
from elasticsearch_dsl import Q, Search
from geoparse import Geoparser, doc_to_ex_expanded
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
from spacy.language import Language
from spacy.pipeline import Pipe
from spacy.tokens import Doc, Token
from torch.utils.data import DataLoader, Dataset
from torch_model import ProductionData, geoparse_model
from tqdm import tqdm
from spacy.tokens import Token
from torch_model import geoparse_model

HTML_WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem; margin-bottom: 2.5rem">{}</div>"""

Expand Down
2 changes: 1 addition & 1 deletion mordecai3/roberta_qa.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from spacy.tokens import Span
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
from transformers import pipeline

model_name = "deepset/roberta-base-squad2"

Expand Down
1 change: 0 additions & 1 deletion mordecai3/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
import spacy

from ..geoparse import Geoparser

Expand Down
2 changes: 0 additions & 2 deletions mordecai3/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

import datetime
import logging
import multiprocessing

import elastic_utilities as es_util
import elasticsearch
import numpy as np
import spacy
import torch
Expand Down

0 comments on commit 41fbfae

Please sign in to comment.