-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make all deps optional and test simple interface
Signed-off-by: Michele Dolfi <[email protected]>
- Loading branch information
1 parent
1490677
commit e1abdec
Showing
5 changed files
with
67 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import json | ||
|
||
from deepsearch_glm.andromeda_nlp import nlp_model | ||
|
||
|
||
def test_simple_interface(): | ||
model = nlp_model() | ||
model.set_loglevel("WARNING") | ||
|
||
config = model.get_apply_configs()[0] | ||
config["models"] = "" | ||
config["subject-filters"] = [] | ||
|
||
model.initialise(config) | ||
|
||
doc = json.load(open("tests/data/docs/1806.02284.json")) | ||
output = model.apply_on_doc(doc) |