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

GraphScope on 3/3 part 2: pick up the previous graphscope functions #238

Merged
merged 6 commits into from
Nov 25, 2022

Conversation

sighingnow
Copy link
Collaborator

This pull request picks up necessary routines to support using graphlearn in the context of graphscope (see also the original work in e56fc9c).

This pull request has done a lot of cleanup and simplification, the main changes there are:

  • Add a Client class to support connecting to multiple servers from one client
  • Add basic routines that need to wrap a vineyard graph to use in graphlearn.

Signed-off-by: Tao He <sighingnow@gmail.com>
@sighingnow sighingnow changed the title Pick up the previous graphscope functions GraphScope on 3/3 part 2: pick up the previous graphscope functions Nov 23, 2022
Signed-off-by: Tao He <sighingnow@gmail.com>
# one server finish, start to connect next server
if self._client_cache[next_index] is None:
self._client_cache[next_index] = pywrap.rpc_client(
self._own_servers[next_index], True, True
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are only two args for pywrap.rpc_client

Signed-off-by: Tao He <sighingnow@gmail.com>
Signed-off-by: Tao He <sighingnow@gmail.com>
Signed-off-by: Tao He <sighingnow@gmail.com>
Copy link
Collaborator

@LiSu LiSu left a comment

Choose a reason for hiding this comment

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

LGTM

self._current_index = (self._current_index + 1) % len(self._client)
# initialize the dataset for the next client
if self._dag_datasets[self._current_index] is None:
status = self._client.run_dag(self._dag.dag_def, self._current_index != len(self._client) - 1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can register dag on all the servers this client owned at once, to avoid delay with warming up when moving and consuming samples on next server.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

graphlearn/src/service/request/dag_request.cc Show resolved Hide resolved
Signed-off-by: Tao He <sighingnow@gmail.com>
@sighingnow sighingnow merged commit 66229a6 into alibaba:master Nov 25, 2022
@sighingnow sighingnow deleted the ht/gs-on-gl branch November 25, 2022 07:51
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.

None yet

4 participants