Skip to main content

▶️ Try Out Opal on Streamlit

modelsize version pyversions https://img.shields.io/pypi/dm/opal-net

Test Model Pipeline Inference

☄️ opal-net

opal is an accuracy-prediction model.

It uses a Matrix Factorization branch & Multi-layered Perceptron branch to learn associations between user and maps, then use those associations to predict new scores never before seen.

⏳ Project Status

Currently, it's in its early access, that means, it'll have many problems! However, we're working on it to minimize these issues o wo)b

⏬ Dataset Used

I used the top 10K mania users data from https://data.ppy.sh. After preprocessing, we use

  • ~10m scores for training
  • ~1m scores for validation and testing each

After preprocessing, we found ~30K valid users, ~10K valid maps This models can thus help predict ~300m unplayed scores!

Users

We deem a player on separate years as a different user. This is to reflect the improvement of the player after time.

🔆 Usage

To use this, install opal-net

pip install opal-net

Then in a python script

Tip: GPU doesn't speed this up significantly, you can use a CPU.

from opal import OpalNet

# Load in the model
# You can explicitly specify map_location='cpu' or 'cuda' in map_location=...
opal = OpalNet.load()

# You can predict a single instance.
#
# The 1st arg: "<USER_ID>/<YEAR>",
# The 2nd arg: "<MAP_ID>/<SPEED>" 
#   <YEAR> is the year of the user to test.
#   <SPEED> can be {-1, 0, or 1} for {HT, NT, DT}
#
# For example: 
# Predict Evening on Year 2020, on the map Triumph & Regret [Regret] at Double Time
pred = opal.predict("2193881/2020", "767046/1")

# You can predict multiple entries at the same time. This is much faster that looping the above.
# Note that both lists must be of the same length!
# Note: If you're predicting millions, partition the predictions to reduce GPU memory usage!
preds = opal.predict(["2193881/2020", "2193881/2017"], ["767046/0", "767046/1"])

# Note that if the prediction doesn't exist, then it'll raise a ValueError
try:
    opal.predict("2193881/2018", "767046/0")
except ValueError:
    print("Prediction Failed!")

🧠 AlphaOsu!

Currently, opal doesn't provide recommendations, however, you can try out AlphaOsu!.

Annex

Why not Score Metric?

Score is not straightforward to calculate, and may be difficult to debug. Furthermore, score isn't of interest when calculating performance points anymore.

osu!mania ScoreV1 Reference

Metadata

Release files for opal-net 2023.9.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opal-net 2023.9.4
File Size Uploaded Provenance Actions
opal_net-2023.9.4.tar.gz 7.2 MB Without provenance Details for opal_net-2023.9.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opal-net 2023.9.4
File Interpreter ABI Platform Actions
opal_net-2023.9.4-py3-none-any.whl Python 3 none any Details for opal_net-2023.9.4-py3-none-any.whl

Total release size: 14.4 MB

Release files / opal_net-2023.9.4.tar.gz

Download URL opal_net-2023.9.4.tar.gz
Size 7.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e967ae7c021c27ea8aecd165bf81909f262ca422ab0350ab42c99b77c99c8921
BLAKE2b-256 checksum
How to use checksums
762004c0de7d6bf68ca3c412a4d8e8465f20cac65fb460f7afe56e5226872ba6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Windows/10

Release files / opal_net-2023.9.4-py3-none-any.whl

Download URL opal_net-2023.9.4-py3-none-any.whl
Size 7.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8b4029531d74ad4b637995ba5b808f690b0e2bf171848dfaa2e4c3f70aeaf4f6
BLAKE2b-256 checksum
How to use checksums
e06048cba7f88340bb4d0cc48b84b128f85da777790a08f31e36c944734d3588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Windows/10

Security for opal-net 2023.9.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page