-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Examples] Add word count and pagerank #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the readme again.
backend/python_connector.cpp
Outdated
@@ -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 pyhusky.backend.python_backend " + std::to_string(lid) + " " + std::to_string(gid) + " " + | |||
popen(("python -m python.pyhusky.backend.python_backend " + std::to_string(lid) + " " + std::to_string(gid) + " " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to change this. By default, $PYTHONPATH
in readme includes python dir.
backend/register.cpp
Outdated
@@ -17,6 +17,8 @@ | |||
#include "backend/library/functional.hpp" | |||
#include "backend/library/linear_regression.hpp" | |||
#include "backend/library/logistic_regression.hpp" | |||
#include "backend/library/word.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong order?
@@ -16,8 +16,8 @@ | |||
|
|||
import cloudpickle | |||
|
|||
from pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam, GlobalN2NSocket | |||
from pyhusky.common.serializers import Serializer | |||
from python.pyhusky.backend.globalvar import GlobalVar, GlobalSocket, OperationParam, GlobalN2NSocket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to use the installed one. I met some problem during re-installation. The package cannot update. So instead I directly use the raw python file in the folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly yes for development. Then you don't need to use the installed method. A very simple way is to set env $PYTHONPATH
like $ export PYTHONPATH=$PYHUSKY_ROOT/python
and this is compatible with import pyhusky.*
. Adding python.pyhusky
is too ugly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for that I don't remember to add this into readme.
Ref #28 |
No description provided.