Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
^
------------------------------------------------------------
cpt/cpt.pxd:1:0: 'cpt/prediction_tree.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
^
------------------------------------------------------------
cpt/cpt.pxd:1:0: 'cpt/prediction_tree/PredictionTree.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
from cpt.alphabet cimport Alphabet
^
------------------------------------------------------------
cpt/cpt.pxd:2:0: 'cpt/alphabet.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
from cpt.alphabet cimport Alphabet
^
------------------------------------------------------------
cpt/cpt.pxd:2:0: 'cpt/alphabet/Alphabet.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
from cpt.alphabet cimport Alphabet
from cpt.bitset cimport Bitset
^
------------------------------------------------------------
cpt/cpt.pxd:3:0: 'cpt/bitset.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
from cpt.alphabet cimport Alphabet
from cpt.bitset cimport Bitset
^
------------------------------------------------------------
cpt/cpt.pxd:3:0: 'cpt/bitset/Bitset.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
from cpt.alphabet cimport Alphabet
from cpt.bitset cimport Bitset
from cpt.scorer cimport Scorer
^
------------------------------------------------------------
cpt/cpt.pxd:4:0: 'cpt/scorer.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpt.prediction_tree cimport PredictionTree
from cpt.alphabet cimport Alphabet
from cpt.bitset cimport Bitset
from cpt.scorer cimport Scorer
^
------------------------------------------------------------
cpt/cpt.pxd:4:0: 'cpt/scorer/Scorer.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from libcpp.vector cimport vector
cdef class Cpt:
cdef:
PredictionTree tree
^
------------------------------------------------------------
cpt/cpt.pxd:10:8: 'PredictionTree' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef class Cpt:
cdef:
PredictionTree tree
vector[Bitset] inverted_index
^
------------------------------------------------------------
cpt/cpt.pxd:11:21: unknown type in template argument
Error compiling Cython file:
------------------------------------------------------------
...
vector[Bitset] inverted_index
vector[size_t] lookup_table
int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil
vector[int] c_compute_noisy_items(self, float noise_ratio) nogil
Bitset c_find_similar_sequences(self, vector[int] sequence) nogil
^
------------------------------------------------------------
cpt/cpt.pxd:16:8: 'Bitset' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
vector[size_t] lookup_table
int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil
vector[int] c_compute_noisy_items(self, float noise_ratio) nogil
Bitset c_find_similar_sequences(self, vector[int] sequence) nogil
int update_score(self, vector[int] suffix, Scorer& score) nogil
^
------------------------------------------------------------
cpt/cpt.pxd:17:51: 'Scorer' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
int split_length
float noise_ratio
int MBR
cdef readonly:
Alphabet alphabet
^
------------------------------------------------------------
cpt/cpt.pxd:28:8: 'Alphabet' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
int split_length
float noise_ratio
int MBR
cdef readonly:
Alphabet alphabet
^
------------------------------------------------------------
cpt/cpt.pxd:28:17: C attribute of type '<error>' cannot be accessed from Python
Error compiling Cython file:
------------------------------------------------------------
...
from libcpp.queue cimport queue
from libcpp.iterator cimport back_inserter
from cython.parallel import prange
from cpython.object cimport Py_EQ, Py_NE
from cpt.prediction_tree cimport PredictionTree, Node, ROOT
^
------------------------------------------------------------
cpt/cpt.pyx:9:0: 'cpt/prediction_tree/Node.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from libcpp.queue cimport queue
from libcpp.iterator cimport back_inserter
from cython.parallel import prange
from cpython.object cimport Py_EQ, Py_NE
from cpt.prediction_tree cimport PredictionTree, Node, ROOT
^
------------------------------------------------------------
cpt/cpt.pyx:9:0: 'cpt/prediction_tree/ROOT.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cython.parallel import prange
from cpython.object cimport Py_EQ, Py_NE
from cpt.prediction_tree cimport PredictionTree, Node, ROOT
from cpt.alphabet cimport Alphabet
from cpt.alphabet cimport NOT_AN_INDEX
^
------------------------------------------------------------
cpt/cpt.pyx:11:0: 'cpt/alphabet/NOT_AN_INDEX.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
if self.inverted_index[i].compute_frequency() <= noise_ratio:
least_frequent_items.push_back(i)
return least_frequent_items
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
^
------------------------------------------------------------
cpt/cpt.pyx:284:9: 'Bitset' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
for i in range(1, sequence.size()):
bitset_temp.inter(self.inverted_index[sequence[i]])
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
^
------------------------------------------------------------
cpt/cpt.pyx:297:52: 'Scorer' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
Examples
--------
>>> model.fit([['hello', 'world'], ['hello', 'cpt']])
'''
cdef size_t number_sequences_to_train = len(sequences)
cdef Node current
^
------------------------------------------------------------
cpt/cpt.pyx:71:13: 'Node' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
return [self.alphabet.get_symbol(index) for index in reversed(sequence)]
cdef int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil:
cdef:
Scorer scorer = Scorer(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:248:12: 'Scorer' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
if sequence.empty():
return Bitset(self.alphabet.length)
cdef Bitset bitset_temp
^
------------------------------------------------------------
cpt/cpt.pyx:288:13: 'Bitset' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:299:12: 'Bitset' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
size_t i, similar_sequence_id
Node end_node
^
------------------------------------------------------------
cpt/cpt.pyx:301:12: 'Node' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
next_transition = self.tree.getTransition(end_node)
return update_count
cdef list retrieve_similar_sequences(self, vector[int] sequence_index):
cdef Bitset bitset_similar = self.c_find_similar_sequences(sequence_index)
^
------------------------------------------------------------
cpt/cpt.pyx:322:13: 'Bitset' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
def __init__(self, int split_length=0, float noise_ratio=0, int MBR=0):
if split_length < 0:
raise ValueError('split_length value should be non-negative, actual value: {}'.format(split_length))
_check_noise_ratio(noise_ratio)
_check_MBR(MBR)
self.tree = PredictionTree()
^
------------------------------------------------------------
cpt/cpt.pyx:41:20: 'PredictionTree' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
if split_length < 0:
raise ValueError('split_length value should be non-negative, actual value: {}'.format(split_length))
_check_noise_ratio(noise_ratio)
_check_MBR(MBR)
self.tree = PredictionTree()
self.inverted_index = vector[Bitset]()
^
------------------------------------------------------------
cpt/cpt.pyx:42:37: unknown type in template argument
Error compiling Cython file:
------------------------------------------------------------
...
raise ValueError('split_length value should be non-negative, actual value: {}'.format(split_length))
_check_noise_ratio(noise_ratio)
_check_MBR(MBR)
self.tree = PredictionTree()
self.inverted_index = vector[Bitset]()
self.lookup_table = vector[Node]()
^
------------------------------------------------------------
cpt/cpt.pyx:43:35: unknown type in template argument
Error compiling Cython file:
------------------------------------------------------------
...
self.inverted_index = vector[Bitset]()
self.lookup_table = vector[Node]()
self.split_length = -split_length
self.noise_ratio = noise_ratio
self.MBR = MBR
self.alphabet = Alphabet()
^
------------------------------------------------------------
cpt/cpt.pyx:47:24: 'Alphabet' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
for i in range(self.inverted_index.size()):
self.inverted_index[i].resize(self._number_trained_sequences + number_sequences_to_train)
for i, sequence in enumerate(sequences):
id_seq = i + self._number_trained_sequences
current = ROOT
^
------------------------------------------------------------
cpt/cpt.pyx:80:22: 'ROOT' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
# Adding to the Prediction Tree
current = self.tree.addChild(current, index)
# Adding to the Inverted Index
if not index < self.inverted_index.size():
self.inverted_index.push_back(Bitset(self._number_trained_sequences + number_sequences_to_train))
^
------------------------------------------------------------
cpt/cpt.pyx:89:50: 'Bitset' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
sequence = []
end_node = self.lookup_table[index]
next_transition = self.tree.getTransition(end_node)
while next_transition != NOT_AN_INDEX:
^
------------------------------------------------------------
cpt/cpt.pyx:239:33: 'NOT_AN_INDEX' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
return [self.alphabet.get_symbol(index) for index in reversed(sequence)]
cdef int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil:
cdef:
Scorer scorer = Scorer(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:248:28: 'Scorer' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
queue[vector[int]] suffixes = queue[vector[int]]()
vector[int] suffix_without_noise, suffix
size_t i
int noise, update_count = 0
target_sequence.erase(remove(target_sequence.begin(), target_sequence.end(), NOT_AN_INDEX), target_sequence.end())
^
------------------------------------------------------------
cpt/cpt.pyx:254:85: 'NOT_AN_INDEX' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
return least_frequent_items
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
if sequence.empty():
return Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:286:19: 'Bitset' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
return Bitset(self.alphabet.length)
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
^
------------------------------------------------------------
cpt/cpt.pyx:291:22: 'Bitset' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:299:47: 'Bitset' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
split_length, alphabet, lookup_table_state, inverted_index_state, prediction_tree_state, number_trained_sequences = state
self.split_length = split_length
self.alphabet = alphabet
self.lookup_table = lookup_table_state
for bitset_state in inverted_index_state:
self.inverted_index.push_back(Bitset(bitset_state[0], bitset_state[1]))
^
------------------------------------------------------------
cpt/cpt.pyx:362:42: 'Bitset' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
self.split_length = split_length
self.alphabet = alphabet
self.lookup_table = lookup_table_state
for bitset_state in inverted_index_state:
self.inverted_index.push_back(Bitset(bitset_state[0], bitset_state[1]))
self.tree = PredictionTree(prediction_tree_state[0], prediction_tree_state[1], prediction_tree_state[2], prediction_tree_state[3])
^
------------------------------------------------------------
cpt/cpt.pyx:363:20: 'PredictionTree' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
return [self.alphabet.get_symbol(index) for index in reversed(sequence)]
cdef int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil:
cdef:
Scorer scorer = Scorer(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:248:34: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
return [self.alphabet.get_symbol(index) for index in reversed(sequence)]
cdef int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil:
cdef:
Scorer scorer = Scorer(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:248:34: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return [self.alphabet.get_symbol(index) for index in reversed(sequence)]
cdef int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil:
cdef:
Scorer scorer = Scorer(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:248:28: Accessing Python global or builtin not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return [self.alphabet.get_symbol(index) for index in reversed(sequence)]
cdef int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil:
cdef:
Scorer scorer = Scorer(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:248:34: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return [self.alphabet.get_symbol(index) for index in reversed(sequence)]
cdef int predict_seq(self, vector[int] target_sequence, vector[int] least_frequent_items) nogil:
cdef:
Scorer scorer = Scorer(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:248:48: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
queue[vector[int]] suffixes = queue[vector[int]]()
vector[int] suffix_without_noise, suffix
size_t i
int noise, update_count = 0
target_sequence.erase(remove(target_sequence.begin(), target_sequence.end(), NOT_AN_INDEX), target_sequence.end())
^
------------------------------------------------------------
cpt/cpt.pyx:254:85: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
queue[vector[int]] suffixes = queue[vector[int]]()
vector[int] suffix_without_noise, suffix
size_t i
int noise, update_count = 0
target_sequence.erase(remove(target_sequence.begin(), target_sequence.end(), NOT_AN_INDEX), target_sequence.end())
^
------------------------------------------------------------
cpt/cpt.pyx:254:85: Accessing Python global or builtin not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
remove_copy(suffix.begin(), suffix.end(), back_inserter(suffix_without_noise), noise)
if not suffix_without_noise.empty():
suffixes.push(suffix_without_noise)
update_count += self.update_score(suffix_without_noise, scorer)
return scorer.get_best_prediction()
^
------------------------------------------------------------
cpt/cpt.pyx:271:41: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
remove_copy(suffix.begin(), suffix.end(), back_inserter(suffix_without_noise), noise)
if not suffix_without_noise.empty():
suffixes.push(suffix_without_noise)
update_count += self.update_score(suffix_without_noise, scorer)
return scorer.get_best_prediction()
^
------------------------------------------------------------
cpt/cpt.pyx:271:41: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
remove_copy(suffix.begin(), suffix.end(), back_inserter(suffix_without_noise), noise)
if not suffix_without_noise.empty():
suffixes.push(suffix_without_noise)
update_count += self.update_score(suffix_without_noise, scorer)
return scorer.get_best_prediction()
^
------------------------------------------------------------
cpt/cpt.pyx:271:21: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
remove_copy(suffix.begin(), suffix.end(), back_inserter(suffix_without_noise), noise)
if not suffix_without_noise.empty():
suffixes.push(suffix_without_noise)
update_count += self.update_score(suffix_without_noise, scorer)
return scorer.get_best_prediction()
^
------------------------------------------------------------
cpt/cpt.pyx:271:41: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef vector[int] c_compute_noisy_items(self, float noise_ratio) nogil:
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
^
------------------------------------------------------------
cpt/cpt.pyx:278:36: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
cdef vector[int] c_compute_noisy_items(self, float noise_ratio) nogil:
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
^
------------------------------------------------------------
cpt/cpt.pyx:278:36: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
if self.inverted_index[i].compute_frequency() <= noise_ratio:
^
------------------------------------------------------------
cpt/cpt.pyx:279:58: Truth-testing Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
if self.inverted_index[i].compute_frequency() <= noise_ratio:
^
------------------------------------------------------------
cpt/cpt.pyx:279:58: Operation not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
if self.inverted_index[i].compute_frequency() <= noise_ratio:
^
------------------------------------------------------------
cpt/cpt.pyx:279:55: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
if self.inverted_index[i].compute_frequency() <= noise_ratio:
^
------------------------------------------------------------
cpt/cpt.pyx:279:37: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
if self.inverted_index[i].compute_frequency() <= noise_ratio:
^
------------------------------------------------------------
cpt/cpt.pyx:279:55: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef:
int i
vector[int] least_frequent_items = vector[int]()
for i in range(self.alphabet.length):
if self.inverted_index[i].compute_frequency() <= noise_ratio:
^
------------------------------------------------------------
cpt/cpt.pyx:279:61: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return least_frequent_items
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
if sequence.empty():
return Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:286:25: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
return least_frequent_items
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
if sequence.empty():
return Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:286:25: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return least_frequent_items
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
if sequence.empty():
return Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:286:19: Accessing Python global or builtin not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return least_frequent_items
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
if sequence.empty():
return Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:286:25: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return least_frequent_items
cdef Bitset c_find_similar_sequences(self, vector[int] sequence) nogil:
if sequence.empty():
return Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:286:39: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return Bitset(self.alphabet.length)
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
^
------------------------------------------------------------
cpt/cpt.pyx:291:28: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
return Bitset(self.alphabet.length)
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
^
------------------------------------------------------------
cpt/cpt.pyx:291:28: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return Bitset(self.alphabet.length)
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
^
------------------------------------------------------------
cpt/cpt.pyx:291:22: Accessing Python global or builtin not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return Bitset(self.alphabet.length)
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
^
------------------------------------------------------------
cpt/cpt.pyx:291:28: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return Bitset(self.alphabet.length)
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
^
------------------------------------------------------------
cpt/cpt.pyx:291:48: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
for i in range(1, sequence.size()):
bitset_temp.inter(self.inverted_index[sequence[i]])
^
------------------------------------------------------------
cpt/cpt.pyx:293:29: Discarding owned Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
for i in range(1, sequence.size()):
bitset_temp.inter(self.inverted_index[sequence[i]])
^
------------------------------------------------------------
cpt/cpt.pyx:293:29: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
for i in range(1, sequence.size()):
bitset_temp.inter(self.inverted_index[sequence[i]])
^
------------------------------------------------------------
cpt/cpt.pyx:293:23: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
for i in range(1, sequence.size()):
bitset_temp.inter(self.inverted_index[sequence[i]])
^
------------------------------------------------------------
cpt/cpt.pyx:293:29: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
cdef Bitset bitset_temp
cdef size_t i
bitset_temp = Bitset(self.inverted_index[sequence[0]])
for i in range(1, sequence.size()):
bitset_temp.inter(self.inverted_index[sequence[i]])
^
------------------------------------------------------------
cpt/cpt.pyx:293:49: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:299:53: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:299:53: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:299:47: Accessing Python global or builtin not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:299:53: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
return bitset_temp
cdef int update_score(self, vector[int] suffix, Scorer& scorer) nogil:
cdef:
Bitset similar_sequences, bitseq = Bitset(self.alphabet.length)
^
------------------------------------------------------------
cpt/cpt.pyx:299:67: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
size_t i, similar_sequence_id
Node end_node
int next_transition, update_count = 0
for i in range(suffix.size()):
bitseq.add(suffix[i])
^
------------------------------------------------------------
cpt/cpt.pyx:305:22: Discarding owned Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
size_t i, similar_sequence_id
Node end_node
int next_transition, update_count = 0
for i in range(suffix.size()):
bitseq.add(suffix[i])
^
------------------------------------------------------------
cpt/cpt.pyx:305:22: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
size_t i, similar_sequence_id
Node end_node
int next_transition, update_count = 0
for i in range(suffix.size()):
bitseq.add(suffix[i])
^
------------------------------------------------------------
cpt/cpt.pyx:305:18: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
size_t i, similar_sequence_id
Node end_node
int next_transition, update_count = 0
for i in range(suffix.size()):
bitseq.add(suffix[i])
^
------------------------------------------------------------
cpt/cpt.pyx:305:22: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
size_t i, similar_sequence_id
Node end_node
int next_transition, update_count = 0
for i in range(suffix.size()):
bitseq.add(suffix[i])
^
------------------------------------------------------------
cpt/cpt.pyx:305:29: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
for i in range(suffix.size()):
bitseq.add(suffix[i])
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
^
------------------------------------------------------------
cpt/cpt.pyx:308:63: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
for i in range(suffix.size()):
bitseq.add(suffix[i])
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
^
------------------------------------------------------------
cpt/cpt.pyx:308:63: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
for i in range(suffix.size()):
bitseq.add(suffix[i])
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
^
------------------------------------------------------------
cpt/cpt.pyx:308:58: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
for i in range(suffix.size()):
bitseq.add(suffix[i])
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
^
------------------------------------------------------------
cpt/cpt.pyx:308:63: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
if similar_sequences[similar_sequence_id]:
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:311:57: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
if similar_sequences[similar_sequence_id]:
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:311:57: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
if similar_sequences[similar_sequence_id]:
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:311:43: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
if similar_sequences[similar_sequence_id]:
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:311:57: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
similar_sequences = self.c_find_similar_sequences(suffix)
for similar_sequence_id in range(similar_sequences.size()):
if similar_sequences[similar_sequence_id]:
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:311:58: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
^
------------------------------------------------------------
cpt/cpt.pyx:315:33: Discarding owned Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
^
------------------------------------------------------------
cpt/cpt.pyx:315:33: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
^
------------------------------------------------------------
cpt/cpt.pyx:315:26: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
^
------------------------------------------------------------
cpt/cpt.pyx:315:33: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
end_node = self.lookup_table[similar_sequence_id]
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
^
------------------------------------------------------------
cpt/cpt.pyx:315:34: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:316:50: Coercion from Python not allowed without the GIL
Error compiling Cython file:
------------------------------------------------------------
...
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:316:50: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:316:40: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:316:50: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
next_transition = self.tree.getTransition(end_node)
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:316:51: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:317:61: Coercion from Python not allowed without the GIL
cpt/cpt.pyx: cannot find cimported module 'cpt.alphabet'
cpt/cpt.pyx: cannot find cimported module 'cpt.bitset'
cpt/cpt.pyx: cannot find cimported module 'cpt.prediction_tree'
cpt/cpt.pyx: cannot find cimported module 'cpt.scorer'
cpt/cpt.pxd: cannot find cimported module 'cpt.alphabet'
cpt/cpt.pxd: cannot find cimported module 'cpt.bitset'
cpt/cpt.pxd: cannot find cimported module 'cpt.prediction_tree'
cpt/cpt.pxd: cannot find cimported module 'cpt.scorer'
Compiling cpt/alphabet.pyx because it depends on /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/Cython/Includes/cpython/object.pxd.
Compiling cpt/cpt.pyx because it depends on /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/Cython/Includes/libcpp/vector.pxd.
[1/2] Cythonizing cpt/alphabet.pyx
[2/2] Cythonizing cpt/cpt.pyx
Error compiling Cython file:
------------------------------------------------------------
...
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:317:61: Calling gil-requiring function not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:317:47: Accessing Python attribute not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:317:61: Constructing Python tuple not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
update_count += not bitseq[next_transition]
while not bitseq[next_transition]:
scorer.update(next_transition)
end_node = self.tree.getParent(end_node)
next_transition = self.tree.getTransition(end_node)
^
------------------------------------------------------------
cpt/cpt.pyx:317:62: Converting to Python object not allowed without gil
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-03ie79bc/cpt/setup.py", line 41, in <module>
compiler_directives={'language_level': sys.version_info[0]}),
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1026, in cythonize
cythonize_one(*args)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1146, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: cpt/cpt.pyx
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output