Skip to main content

A utilities library for model training subnets.

Project description

Taoverse Package

This is a package containing various python modules for use in bittensor subnets.

Currently it is primarily supporting the Macrocosmos SN 9 Pretraining and SN 37 Finetuning subnets but much of the code is generally useful and all are welcome to leverage it for their own work as well.

Find the latest published package here: https://pypi.org/project/taoverse/

Following is an overview of each module and some of the bigger pieces of code they include.

Metagraph

The metagraph module contains code relating to metagraph operations.

  • The MetagraphSyncer allows for easily refreshing a specified metagraph at a specified cadence. It will operate in asynchronously on the asyncio event loop and will notify any registered listeners after each sync.

  • The MinerIterator provides a thread safe infinite iterator that safely handles adding new uids.

Model

The model module contains code relating to large language models.

  • The ModelTracker will track model metadata and evaluation history on a per hotkey basis. It is designed to keep state across restarts and has methods to save and load state.

  • The ModelUpdater reads metadata from the chain, validates it, and checks if it is an update to a previous tracked hotkey.

  • The model.competition module supports grouping models into distinct competitions.

    • The CompetitionTracker helps track weights at a per competition and per subnet level. Like the ModelTracker it is designed to keep state across restarts.
    • The EpislonFunc allows for computing epsilon with a custom function on a per competition basis. Both a FixedEpsilon and a LinearDecay implementation are included.
  • The model.storage module supports storing and retrieving models and metadata.

    • For models there are included implementations for Hugging Face and the local disk.
    • For metadata there is an included implementation using the Bittensor chain.

Utilities

The utilities module contains code found to be generically useful in the context of subnets.

  • The PerfMonitor is a context manager that tracks the performance of a block of code by taking several samples
  • In utils.py there are some helpers to run_in_thread or run_in_subprocess.
    • Running metagraph operations in a separate thread with a ttl can help avoid getting stuck on those actions.
    • Running model evaluation within a sub process can help ensure that the model is completely removed from the gpu afterwards.

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

taoverse-1.1.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

taoverse-1.1.0-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file taoverse-1.1.0.tar.gz.

File metadata

  • Download URL: taoverse-1.1.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for taoverse-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e7af7a57572a35d0af2fd5c2ccb73e00a6456ac22868f9ca30868eeaddad525d
MD5 9d976551701fc2961234fe56f14ee9d2
BLAKE2b-256 8f6ad84246fe742bbbf3bdd64d46dc58dc5b9a7dd52ce3f4b91d8ff8a4412bdb

See more details on using hashes here.

File details

Details for the file taoverse-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: taoverse-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for taoverse-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eef9e299ba00df879276a4c4ac6739a551497d7ccb5f2aa5083d86826bc074db
MD5 b16137b9abd0f3a4c0f5f42789025e71
BLAKE2b-256 41b8a78d752307f34a962d04daca01ebe0d84d9f02e3d619cd6f7cc73ca88cda

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