refine import path for ps_instance.py

test=develop
revert-15207-remove_op_handle_lock_and_fix_var
dongdaxiang 6 years ago
parent 29c772663a
commit 178c47c074

@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from mpi4py import MPI
import ps_pb2 as pslib
@ -59,7 +58,7 @@ class FileSystem(object):
class MPIHelper(object):
"""
MPIHelper is a wrapper of mpi4py, supprot get_rank get_size etc.
MPIHelper is a wrapper of mpi4py, support get_rank get_size etc.
Args:
No params
Examples:
@ -68,7 +67,9 @@ class MPIHelper(object):
"""
def __init__(self):
from mpi4py import MPI
self.comm = MPI.COMM_WORLD
self.MPI = MPI
def get_rank(self):
return self.comm.Get_rank()
@ -86,4 +87,4 @@ class MPIHelper(object):
return socket.gethostname()
def finalize(self):
MPI.Finalize()
self.MPI.Finalize()

@ -9,4 +9,3 @@ Pillow
nltk>=3.2.2
graphviz
six
mpi4py==3.0.0

Loading…
Cancel
Save