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

docs/guides/06_shared_state.ipynb fails #489

Closed
akihikokuroda opened this issue May 1, 2023 · 3 comments
Closed

docs/guides/06_shared_state.ipynb fails #489

akihikokuroda opened this issue May 1, 2023 · 3 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@akihikokuroda
Copy link
Collaborator

Steps to reproduce the problem

Run docker compose
Run jupyter notebook
Change the localhost to gateway in cell 2
Change the name to title in cell 4
Run docs/guides/06_shared_state.ipynb

What is the current behavior?

It fails. The job.logs() returns

'/tmp/ray/session_2023-05-01_13-14-20_727443_1/runtime_resources/working_dir_files/_ray_pkg_f3eb27d45c4a60ff/job_with_state.py:10: DeprecationWarning: Decorator `run_qiskit_remote` is deprecated. Please, consider using `distribute_task` instead.\n  @run_qiskit_remote(state=state_handler)\n/tmp/ray/session_2023-05-01_13-14-20_727443_1/runtime_resources/working_dir_files/_ray_pkg_f3eb27d45c4a60ff/job_with_state.py:16: DeprecationWarning: Decorator `run_qiskit_remote` is deprecated. Please, consider using `distribute_task` instead.\n  @run_qiskit_remote(state=state_handler)\n/tmp/ray/session_2023-05-01_13-14-20_727443_1/runtime_resources/working_dir_files/_ray_pkg_f3eb27d45c4a60ff/job_with_state.py:22: DeprecationWarning: Calling `with serverless: ...` is deprecated. Please, consider using `with serverless.context(): ...`\n  with serverless:\n2023-05-01 13:51:20,265\tWARNING worker.py:1313 -- File descriptor limit 1024 is too low for production servers and may result in connection errors. At least 8192 is recommended. --- Fix with \'ulimit -n 8192\'\n/home/ray/anaconda3/lib/python3.9/site-packages/ray/_private/worker.py:995: UserWarning: len(ctx) is deprecated. Use len(ctx.address_info) instead.\n  warnings.warn("len(ctx) is deprecated. Use len(ctx.address_info) instead.")\nTraceback (most recent call last):\n  File "/tmp/ray/session_2023-05-01_13-14-20_727443_1/runtime_resources/working_dir_files/_ray_pkg_f3eb27d45c4a60ff/job_with_state.py", line 23, in <module>\n    result = get(other_func_with_state(42))\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper\n    return func(*args, **kwargs)\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/ray/_private/worker.py", line 2380, in get\n    raise value.as_instanceof_cause()\nray.exceptions.RayTaskError(ConnectionError): \x1b[36mray::other_func_with_state()\x1b[39m (pid=907, ip=10.4.1.74)\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/retry.py", line 46, in call_with_retry\n    return do()\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 699, in <lambda>\n    lambda: self._connect(), lambda error: self.disconnect(error)\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 987, in _connect\n    raise err\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 975, in _connect\n    sock.connect(socket_address)\nOSError: [Errno 113] No route to host\n\nDuring handling of the above exception, another exception occurred:\n\n\x1b[36mray::other_func_with_state()\x1b[39m (pid=907, ip=10.4.1.74)\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/quantum_serverless/core/decorators.py", line 202, in wraps\n    return func(*args, **kwargs)\n  File "/tmp/ray/session_2023-05-01_13-14-20_727443_1/runtime_resources/working_dir_files/_ray_pkg_f3eb27d45c4a60ff/job_with_state.py", line 18, in other_func_with_state\n    state.set("in_other_job", {"other_k": seed})\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/quantum_serverless/core/state.py", line 89, in set\n    return self._redis.set(key, json.dumps(value))\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/commands/core.py", line 2302, in set\n    return self.execute_command("SET", *pieces, **options)\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/client.py", line 1255, in execute_command\n    conn = self.connection or pool.get_connection(command_name, **options)\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 1442, in get_connection\n    connection.connect()\n  File "/home/ray/anaconda3/lib/python3.9/site-packages/redis/connection.py", line 704, in connect\n    raise ConnectionError(self._error_message(e))\nredis.exceptions.ConnectionError: Error 113 connecting to redis:6379. No route to host.\n'

What is the expected behavior?

It should run without error.

@akihikokuroda akihikokuroda added the bug Something isn't working label May 1, 2023
@akihikokuroda
Copy link
Collaborator Author

I wonder if we should rewrite this or add the redis in the docker compose.

@IceKhan13
Copy link
Member

I will cover all those under #479

We will remove redis

@IceKhan13 IceKhan13 self-assigned this May 2, 2023
@IceKhan13 IceKhan13 added this to the 0.1 milestone May 2, 2023
@Tansito Tansito added the documentation Improvements or additions to documentation label May 5, 2023
@IceKhan13
Copy link
Member

Gone in #481

akihikokuroda pushed a commit that referenced this issue Aug 22, 2024
…oduction

Functions configuration for production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants