Skip to content

Commit

Permalink
Removing Indexers from forte (asyml#467)
Browse files Browse the repository at this point in the history
* remove indexers

* remove dep

* Remove elastic dependency

* Fix docs.
  • Loading branch information
hunterhector authored Jun 2, 2021
1 parent f8d5d77 commit 400cd82
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 1,045 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ jobs:
- name: Build ontology
run: |
./scripts/build_ontology_specs.sh
- name: Start Elastic Server
run: |
wget -q https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2-linux-x86_64.tar.gz
tar -zxf elasticsearch-7.4.2-linux-x86_64.tar.gz
rm -rf elasticsearch-7.4.2-linux-x86_64.tar.gz
elasticsearch-7.4.2/bin/elasticsearch -d
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
5 changes: 0 additions & 5 deletions docs/code/data_aug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ Data Augmentation Processors
.. autoclass:: forte.processors.base.data_selector_for_da.BaseElasticSearchDataSelector
:members:

.. autoclass:: forte.processors.data_augment.selector_index_processor.DataSelectorIndexProcessor
:members:

.. autoclass:: forte.processors.ir.elastic_search_index_processor.ElasticSearchPackIndexProcessor
:members:

:hidden:`UDAIterator`
---------------------------------------------
Expand Down
17 changes: 0 additions & 17 deletions docs/code/indexers.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ API
code/training_system.rst
code/data_aug.rst
code/vocabulary.rst
code/indexers.rst
2 changes: 1 addition & 1 deletion examples/chatbot/create_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import texar.torch as tx

from forte.common.configuration import Config
from forte.indexers.embedding_based_indexer import EmbeddingBasedIndexer
from forte_wrapper.faiss import EmbeddingBasedIndexer

logging.basicConfig(level=logging.INFO)

Expand Down
3 changes: 2 additions & 1 deletion examples/clinical_pipeline/utterance_searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import sqlite3
from typing import Dict, Any, Optional, List

from forte_wrapper.elastic import ElasticSearchIndexer

from forte.common import Resources, ProcessorConfigError
from forte.common.configuration import Config
from forte.data.common_entry_utils import create_utterance, \
get_last_utterance
from forte.data.data_pack import DataPack
from forte.indexers.elastic_indexer import ElasticSearchIndexer
from forte.processors.base import PackProcessor
from ft.onto.base_ontology import Utterance

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
from typing import Dict, Any
import logging

from forte_wrapper.elastic import ElasticSearchIndexer
from forte_wrapper.elastic import ElasticSearchPackIndexProcessor

from forte.common.configuration import Config
from forte.data.data_pack import DataPack
from forte.indexers.elastic_indexer import ElasticSearchIndexer
from forte.pipeline import Pipeline
from forte.processors.data_augment.selector_index_processor import \
DataSelectorIndexProcessor

__all__ = [
"CreateIndexerPipeline",
Expand All @@ -52,7 +52,7 @@ def create_pipeline(self):
# pylint: disable=attribute-defined-outside-init
self.nlp: Pipeline[DataPack] = Pipeline()
self.nlp.set_reader(reader=self.reader, config=self.reader_config)
self.nlp.add(DataSelectorIndexProcessor(), config=self.config)
self.nlp.add(ElasticSearchPackIndexProcessor(), config=self.config)
self.nlp.initialize()

def create_index(self, datapath):
Expand Down
13 changes: 0 additions & 13 deletions forte/indexers/__init__.py

This file was deleted.

184 changes: 0 additions & 184 deletions forte/indexers/elastic_indexer.py

This file was deleted.

Loading

0 comments on commit 400cd82

Please sign in to comment.