update travis to py3

pull/519/head
Hui Zhang 5 years ago
parent f965d72f3f
commit 00e109752a

@ -13,11 +13,13 @@ addons:
apt: apt:
packages: packages:
- git - git
- python - python3
- python-pip - python3-pip
- python2.7-dev - python3-dev
before_install: before_install:
- python --version
- pip --version
- sudo pip install -U virtualenv pre-commit pip - sudo pip install -U virtualenv pre-commit pip
- docker pull paddlepaddle/paddle:latest - docker pull paddlepaddle/paddle:latest

@ -17,7 +17,7 @@ unittest(){
fi fi
find . -name 'tests' -type d -print0 | \ find . -name 'tests' -type d -print0 | \
xargs -0 -I{} -n1 bash -c \ xargs -0 -I{} -n1 bash -c \
'python -m unittest discover -v -s {}' 'python3 -m unittest discover -v -s {}'
cd - > /dev/null cd - > /dev/null
} }

@ -114,8 +114,6 @@ def ctc_beam_search_decoder_batch(probs_split,
batch_beam_results = swig_decoders.ctc_beam_search_decoder_batch( batch_beam_results = swig_decoders.ctc_beam_search_decoder_batch(
probs_split, vocabulary, beam_size, num_processes, cutoff_prob, probs_split, vocabulary, beam_size, num_processes, cutoff_prob,
cutoff_top_n, ext_scoring_func) cutoff_top_n, ext_scoring_func)
batch_beam_results = [ batch_beam_results = [[(res[0], res[1]) for res in beam_results]
[(res[0], res[1]) for res in beam_results] for beam_results in batch_beam_results]
for beam_results in batch_beam_results
]
return batch_beam_results return batch_beam_results

@ -1,4 +1,3 @@
import collections import collections
import paddle.fluid as fluid import paddle.fluid as fluid
import numpy as np import numpy as np

Loading…
Cancel
Save