Skip to main content

Library for Opthub CLI tools.

Project description

日本語版 👈

OptHub Client

Skills

The Opthub Client is a Python package that provides the following features:

  • Submitting solutions to OptHub competitions
  • Checking the history and status of solutions submitted to OptHub competitions

This section explains how to install the OptHub Client and provides a tutorial. For more detailed instructions, please refer to the OptHub Client User Guide.

Installation

Make sure you have Python 3.10 or higher installed and that you have set up pip as your package manager. Then, run the following command to install opthub-client from PyPI.

$ pip install opthub-client

Tutorial

In this tutorial, we will explain how to submit solutions for the competitions you are participating in and how to review the history of your submissions.

To submit solutions, you need to create an account and join a competition beforehand.

👉 How to Create an Account and Join a Competition

Login

Execute opt login and enter your username and password.

$ opt login
Username: [username] # Your username
Password: [password]   # Your password
Hello [username]. Successfully logged in.

⚠ You need to create an account and verify your email address beforehand.

Select a Competition and Match

Execute opt select and select a competition and match.

$ opt select
? Select a competition: [competition_id] # Use ↑↓ keys to select a competition
? Select a match: [match_id] # Use ↑↓ keys to select a match
You have selected [competition_id]/[match_id]

⚠ You need to join at least one competition beforehand.

Submit a Solution

Execute opt submit and enter a solution according to the competition's input/output requirements.

$ opt submit
? Write the solution: [your_solution] # Enter your solution
Submitting to [competition_id]/[match_id]... # Submitting
...Submitted # Submission complete

👉 How to submit solutions from files 👉 How to submit solutions by your program

Check Submitted Solutions

Execute opt show trials to display the solutions you have submitted. Press n to display the next 20 solutions, or press e to exit the check.

$ opt show trials # Displays 20 solutions in descending order by default
Trial No: 30, status: success, Score: 0.0001
Trial No: 29, status: scoring
Trial No: 28, status: evaluating
・・・
n: next solutions, e: exit
# Press n to display the next 20 solutions, e to exit the check

Download Submitted Solutions

Execute opt download to download the solutions by specifying the range of trial numbers.

$ opt download -s 10 -e 30 # Download trial numbers 10 to 30
Downloading trials  [####################################]  100%
Trials have been written to trials_match1.json

👉 Format of the Output JSON File

For Contributors

Follow these steps to set up the environment:

  1. Clone this repository.
  2. Set up Poetry.
  3. Run poetry install.
  4. Download the recommended VSCode Extensions.
  5. Disable the following VS Code Extensions for this workspace to avoid conflicts with other packages:
    • ms-python.pylint
    • ms-python.black-formatter
    • ms-python.flake8
    • ms-python.isort

Once you have completed the above setup, you can use the opt command in the project's root directory.

Contact

If you have any questions or concerns, please feel free to contact us (Email: dev@opthub.ai).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opthub_client-0.8.1.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opthub_client-0.8.1-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file opthub_client-0.8.1.tar.gz.

File metadata

  • Download URL: opthub_client-0.8.1.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.1 Linux/6.8.0-1017-azure

File hashes

Hashes for opthub_client-0.8.1.tar.gz
Algorithm Hash digest
SHA256 fd2c20a11f150150bbd56bccfd3ea40ea6181bed4bd15d4c49f09c08c18a7231
MD5 bab59f29f8d2f5049e0c51b050ecc04f
BLAKE2b-256 177e65969e6e5a665cb696ff195fde083933ac44eabd4eeede2d81486d553bf3

See more details on using hashes here.

File details

Details for the file opthub_client-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: opthub_client-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.1 Linux/6.8.0-1017-azure

File hashes

Hashes for opthub_client-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ed6d986018cb023b4ef5bbc2e0b5a5267cfe81c612b34b0dfbb0b3d776f77516
MD5 4e25e5e847767a9b2b5dad5880fcf1c6
BLAKE2b-256 05dc81a3677219b403db174d8b87a231428f5d5d6a2a42aa689b101c680105d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page