Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Allowed transitions (#5706)
Browse files Browse the repository at this point in the history
* Add allowed_transitions in __init__.py of crf mod.

Fix ImportError:
from allennlp.modules.conditional_random_field import allowed_transitions
ImportError: cannot import name 'allowed_transitions' from 'allennlp.modules.conditional_random_field'

* Fix doc build

Co-authored-by: Chengjiang Li <iamlockelightning@gmail.com>
  • Loading branch information
dirkgr and iamlockelightning authored Aug 24, 2022
1 parent c6b248f commit b2eb036
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ jobs:
- name: Build docs
run: |
source .venv/bin/activate
./scripts/build_docs.sh
env PYTHONPATH=. ./scripts/build_docs.sh
- name: Print the ref
run: |
Expand Down
1 change: 1 addition & 0 deletions allennlp/modules/conditional_random_field/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from allennlp.modules.conditional_random_field.conditional_random_field import (
ConditionalRandomField,
allowed_transitions,
)
from allennlp.modules.conditional_random_field.conditional_random_field_wemission import (
ConditionalRandomFieldWeightEmission,
Expand Down

0 comments on commit b2eb036

Please sign in to comment.