Skip to content

Commit

Permalink
[python] Remove python-prefix in import
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuzhen11 committed May 5, 2017
1 parent fa96c35 commit 597e4a8
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion backend/python_connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void PythonConnector::start_python_proc(int lid, int gid, int num_workers) {
std::string master_port = std::to_string(Context::get_config().get_master_port());
std::string proc_id = std::to_string(Context::get_worker_info().get_process_id());
extern_py_proc =
popen(("python -m python.pyhusky.backend.python_backend " + std::to_string(lid) + " " + std::to_string(gid) + " " +
popen(("python -m pyhusky.backend.python_backend " + std::to_string(lid) + " " + std::to_string(gid) + " " +
proc_id + " " + std::to_string(num_workers) + " " + master_port + " > /tmp/log-pyhusky-" + master_port +
"-proc-" + proc_id + "-" + std::to_string(lid))
.c_str(),
Expand Down
4 changes: 2 additions & 2 deletions python/pyhusky/backend/library/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import cloudpickle

from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam, GlobalN2NSocket
from python.pyhusky.common.serializers import Serializer
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam, GlobalN2NSocket
from pyhusky.common.serializers import Serializer

def register_all():
"""
Expand Down
2 changes: 1 addition & 1 deletion python/pyhusky/backend/library/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import json
import cPickle
from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam

def register_all():
# register graph
Expand Down
2 changes: 1 addition & 1 deletion python/pyhusky/backend/library/linear_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam

def register_all():
LinearModel.register()
Expand Down
2 changes: 1 addition & 1 deletion python/pyhusky/backend/library/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam

def register_all():
LogisticModel.register()
Expand Down
2 changes: 1 addition & 1 deletion python/pyhusky/backend/library/svm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam

def register_all():
SVMModel.register()
Expand Down
2 changes: 1 addition & 1 deletion python/pyhusky/backend/library/word.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam

def register_all():
# register word
Expand Down
4 changes: 2 additions & 2 deletions python/pyhusky/backend/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import sys

from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket
from python.pyhusky.common.binstream import BinStream
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket
from pyhusky.common.binstream import BinStream

def log_msg(msg):
print msg
Expand Down
8 changes: 4 additions & 4 deletions python/pyhusky/backend/python_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

import sys

from python.pyhusky.backend.globalvar import GlobalSocket, GlobalVar, GlobalN2NSocket
from python.pyhusky.backend.processor import handle_instr
from python.pyhusky.backend.register import register_func
from python.pyhusky.common.serializers import Serializer, PickleSerializer
from pyhusky.backend.globalvar import GlobalSocket, GlobalVar, GlobalN2NSocket
from pyhusky.backend.processor import handle_instr
from pyhusky.backend.register import register_func
from pyhusky.common.serializers import Serializer, PickleSerializer

def log_msg(msg):
print msg
Expand Down
10 changes: 5 additions & 5 deletions python/pyhusky/backend/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import python.pyhusky.backend.library.functional as functional
import python.pyhusky.backend.library.linear_regression as LinearR
import python.pyhusky.backend.library.logistic_regression as LogisticR
import python.pyhusky.backend.library.word as word
import python.pyhusky.backend.library.graph as graph
import pyhusky.backend.library.functional as functional
import pyhusky.backend.library.linear_regression as LinearR
import pyhusky.backend.library.logistic_regression as LogisticR
import pyhusky.backend.library.word as word
import pyhusky.backend.library.graph as graph

def register_func():
# register
Expand Down

0 comments on commit 597e4a8

Please sign in to comment.