Skip to content
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

Merged
merged 4 commits into from
May 7, 2017

Conversation

Yuzhen11
Copy link
Contributor

@Yuzhen11 Yuzhen11 commented May 4, 2017

No description provided.

@Yuzhen11 Yuzhen11 changed the title Add word count library example Add word count and pagerank example May 4, 2017
@kygx-legend kygx-legend changed the title Add word count and pagerank example [Examples] Add word count and pagerank May 5, 2017
Copy link
Member

@kygx-legend kygx-legend left a 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.

@@ -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) + " " +
Copy link
Member

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.

@@ -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"
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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.

@kygx-legend
Copy link
Member

Ref #28

@kygx-legend kygx-legend merged commit ef6134b into husky-team:master May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants