Skip to content

Commit

Permalink
switch name from farm_haystack to haystack
Browse files Browse the repository at this point in the history
  • Loading branch information
tholor committed Nov 27, 2019
1 parent 3ecdc03 commit 3367b46
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ dmypy.json
.pyre/

# haystack files
farm_haystack/database/qa.db
haystack/database/qa.db
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ RUN pip install -r requirements.txt
RUN pip install -e .

# copy code
COPY farm_haystack /home/user/farm_haystack
COPY haystack /home/user/haystack

# copy saved FARM models
COPY saved_models /home/user/saved_models

# cmd for running the API
CMD FLASK_APP=farm_haystack.api.inference flask run --host 0.0.0.0
CMD FLASK_APP=haystack.api.inference flask run --host 0.0.0.0
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Installation
There are two ways to install:

* (recommended) from source, :code:`git clone <url>` and run :code:`pip install [--editable] .` from the root of the repositry.
* from PyPI, do a :code:`pip install farm_haystack`
* from PyPI, do a :code:`pip install farm-haystack`

Usage
-----
Expand Down
6 changes: 3 additions & 3 deletions farm_haystack/__init__.py → haystack/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from farm_haystack.retriever.tfidf import TfidfRetriever
from farm_haystack.reader.farm import FARMReader
from farm_haystack.database import db
from haystack.retriever.tfidf import TfidfRetriever
from haystack.reader.farm import FARMReader
from haystack.database import db
import logging
import farm

Expand Down
8 changes: 4 additions & 4 deletions farm_haystack/api/inference.py → haystack/api/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from flask_cors import CORS
from flask_restplus import Api, Resource

from farm_haystack import Finder
from farm_haystack.database import app
from farm_haystack.reader.farm import FARMReader
from farm_haystack.retriever.tfidf import TfidfRetriever
from haystack import Finder
from haystack.database import app
from haystack.reader.farm import FARMReader
from haystack.retriever.tfidf import TfidfRetriever

CORS(app)
api = Api(
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion farm_haystack/database/orm.py → haystack/database/orm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sqlalchemy.orm import relationship

from farm_haystack.database import db
from haystack.database import db


class ORMBase(db.Model):
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion farm_haystack/indexing/io.py → haystack/indexing/io.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from farm_haystack.database.orm import Document, db
from haystack.database.orm import Document, db
from pathlib import Path
import logging
from farm.data_handler.utils import http_get
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer

from farm_haystack.database import db
from farm_haystack.database.orm import Document
from haystack.database import db
from haystack.database.orm import Document

logger = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions farm_haystack/utils.py → haystack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import logging
import pprint

from farm_haystack.database.orm import Document
from farm_haystack.database.orm import db
from haystack.database.orm import Document
from haystack.database.orm import db

logger = logging.getLogger(__name__)

Expand Down
20 changes: 10 additions & 10 deletions tutorials/Tutorial1_Basic_QA_Pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
}
],
"source": [
"from farm_haystack.reader.farm import FARMReader\n",
"from farm_haystack.retriever.tfidf import TfidfRetriever\n",
"from farm_haystack import Finder\n",
"from farm_haystack.indexing.io import write_documents_to_db, fetch_archive_from_http\n",
"from farm_haystack.indexing.cleaning import clean_wiki_text\n",
"from farm_haystack.utils import print_answers"
"from haystack.reader.farm import FARMReader\n",
"from haystack.retriever.tfidf import TfidfRetriever\n",
"from haystack import Finder\n",
"from haystack.indexing.io import write_documents_to_db, fetch_archive_from_http\n",
"from haystack.indexing.cleaning import clean_wiki_text\n",
"from haystack.utils import print_answers"
]
},
{
Expand Down Expand Up @@ -93,7 +93,7 @@
],
"source": [
"# Init a database (default: sqllite)\n",
"from farm_haystack.database import db\n",
"from haystack.database import db\n",
"db.create_all()\n",
"\n",
"# Let's first get some documents that we want to query\n",
Expand Down Expand Up @@ -296,13 +296,13 @@
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
},
"source": []
}
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
}

0 comments on commit 3367b46

Please sign in to comment.