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 API + client with dashboard #671

Open
grzanka opened this issue Feb 6, 2024 · 0 comments
Open

Python API + client with dashboard #671

grzanka opened this issue Feb 6, 2024 · 0 comments

Comments

@grzanka
Copy link

grzanka commented Feb 6, 2024

Is there a working combination where I could use hyperqueue server with running dashboard and connect to it from Python API ?

As reported in #670 only v0.17.0-liberec server version has dashboard.
I've tried to install hyperqueue pip package from pypi using pip install hyperqueue. It seems to install v0.17.0, not v0.17.0-liberec.
When connecting to server with simple python script I get the message:

(venv) [ares][plgkongruencj@ac0040 2022-krakow-lgad]$ python src/ares/submit_lv2_v3.py 
Traceback (most recent call last):
  File "/net/people/plgrid/plgkongruencj/2022-krakow-lgad/src/ares/submit_lv2_v3.py", line 9, in <module>
    client = Client(hq_server_path)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/memfs/7515829/venv/lib/python3.11/site-packages/hyperqueue/client.py", line 69, in __init__
    self.connection = ClientConnection(server_dir)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/memfs/7515829/venv/lib/python3.11/site-packages/hyperqueue/ffi/client.py", line 28, in __init__
    self.ctx: HqClientContext = ffi.connect_to_server(directory)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Hyperqueue version mismatch detected.
Access record contains version v0.17.0-liberec, but the current version is v0.17.0.

Here is my python code:

from hyperqueue import Client, Job
from pathlib import Path

hq_server_path = Path.home() / ".hq-server/hq-current"

def test_fun():
    print("Hello World!")

client = Client(hq_server_path)

job = Job(test_fun)

client.submit(job)

Do you have a working combination of server with dashboard and python API ? I wasn't able to figureout how to install v0.17.0-liberec python package.

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

No branches or pull requests

1 participant