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

Add worker configuration #1085

Merged
merged 5 commits into from
Nov 13, 2023
Merged

Conversation

IceKhan13
Copy link
Member

@IceKhan13 IceKhan13 commented Nov 13, 2023

Summary

Fix #1031

This PR is rework of PR #1025

Details and comments

Summary
expose number of workers option (number of workers, min workers and max workers when auto scaling is enabled)

Details and comments
The number of worker can be specified in the Configuration object for QuantumServerless.run function.

provider = ServerlessProvider(
username=os.environ.get("GATEWAY_USER", "user"),
password=os.environ.get("GATEWAY_PASSWORD", "password123"),
# token=os.environ.get("GATEWAY_TOKEN", ""), # token can be used instead of user/password combination
host=os.environ.get("GATEWAY_HOST", "http://localhost:8000"),
)
serverless = QuantumServerless(provider)
program = Program(
title="First program", entrypoint="program.py", working_dir="./source_files/"
)

job = serverless.run(program, config=Configuration(workers=2, min_workers=1, max_workers=5, auto_scaling=True))

Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
@IceKhan13 IceKhan13 changed the title Worker2 Add worker configuration Nov 13, 2023
@IceKhan13 IceKhan13 added enhancement New feature or request project: client Label to identify features related with client project project: gateway Label to identify features related with gateway project labels Nov 13, 2023
@IceKhan13 IceKhan13 added this to the Q4'23 milestone Nov 13, 2023
@IceKhan13 IceKhan13 marked this pull request as ready for review November 13, 2023 14:59
@IceKhan13 IceKhan13 merged commit 5e71dfd into Qiskit:release/0.8 Nov 13, 2023
14 checks passed
@IceKhan13 IceKhan13 mentioned this pull request Nov 13, 2023
IceKhan13 added a commit that referenced this pull request Nov 14, 2023
---------

Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Co-authored-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request project: client Label to identify features related with client project project: gateway Label to identify features related with gateway project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants