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

Python SDK: PUT/GET API for vineyard csi driver #1555

Closed
dashanji opened this issue Sep 6, 2023 · 4 comments · Fixed by #1557
Closed

Python SDK: PUT/GET API for vineyard csi driver #1555

dashanji opened this issue Sep 6, 2023 · 4 comments · Fixed by #1557
Assignees
Labels
component:python Issues about vineyard's python SDK

Comments

@dashanji
Copy link
Member

dashanji commented Sep 6, 2023

Describe your problem

The issue is part of #1528, and also as a follow-up of #1533.

During integration with kubeflow, we need to provide a simple PUT/GET API to replace the original IO API(such as read_csv/to_csv/read_parquet/to_parquet and so on). The design is as follows:

vineyard.read('path')

client = vineyard.connect('path/vineyard.sock')
objid = client.get_name(path)
value = client.get(path)
client.close()
return value

vineyard.write(value, 'path')

client = vineyard.connect('path/vineyard.sock')
client.put(value, persist=True, name=path)
client.close()
@dashanji dashanji added the component:python Issues about vineyard's python SDK label Sep 6, 2023
@dashanji dashanji self-assigned this Sep 6, 2023
@dashanji
Copy link
Member Author

dashanji commented Sep 6, 2023

Hi @sighingnow, could you please review this?

@sighingnow
Copy link
Member

Don't close the client. Just leave it as it and there's a connection manager that will manage its lifetime.

@sighingnow
Copy link
Member

objid = client.get_name(path)
value = client.get(path)

client.get(name=...)

@dashanji
Copy link
Member Author

dashanji commented Sep 6, 2023

Don't close the client. Just leave it as it and there's a connection manager that will manage its lifetime.

Copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:python Issues about vineyard's python SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants