提交 7ddfdd91 编写于 作者: H houj04 提交者: Steffy-zxf

fix integer division bug on python3 and fix a typo. (#299)

上级 ed8afae2
...@@ -69,7 +69,7 @@ class MPIHelper(object): ...@@ -69,7 +69,7 @@ class MPIHelper(object):
def split_range(self, array_length): def split_range(self, array_length):
if self._size == 1: if self._size == 1:
return 0, array_length return 0, array_length
average_count = array_length / self._size average_count = array_length // self._size
if array_length % self._size == 0: if array_length % self._size == 0:
return average_count * self._rank, average_count * (self._rank + 1) return average_count * self._rank, average_count * (self._rank + 1)
else: else:
......
...@@ -221,7 +221,7 @@ class AutoFineTuneCommand(BaseCommand): ...@@ -221,7 +221,7 @@ class AutoFineTuneCommand(BaseCommand):
"\tsaved_params_dir\n") "\tsaved_params_dir\n")
print( print(
"The related infomation about hyperparamemters searched are saved as %s/log_file.txt ." "The related information about hyperparamemters searched are saved as %s/log_file.txt ."
% autoft._output_dir) % autoft._output_dir)
for solution, modeldir in solutions_modeldirs.items(): for solution, modeldir in solutions_modeldirs.items():
param = evaluator.convert_params(solution) param = evaluator.convert_params(solution)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册