Skip to content

Create a coherent system for hyperparameters #2032

@ppolewicz

Description

@ppolewicz

Hyperparameters have common logic around them:

  • lower bound for owners
  • higher bound for owners
  • ability for the owner to touch it at all (could be achieved by the first two, but a dedicated boolean provides a much better error description)
  • lower bound for sudo
  • higher bound for sudo
  • minimum allowed value that should be migrated up to if they are any lower (usually same as lower bound for sudo)
  • maximum allowed value that should be migrated down to if they are any higher (usually same as higher bound for sudo)
  • serialization type (for example kappa is uint16 -> fraction between 0 and 1, adjustment_alpha is uint64 -> fraction between 0 and 1, sigmoid_steepness is int16 -> (-327.68, +32767) and so on
  • getter extrinsic
  • setter extrinsic
  • including on the list of hyperparameter types that I think John is working on, with their types and permissions, so that they can be inspected dynamically (for forward compatibility of cli / sdk)
  • including on the list of hyperparameter values

This can just be a class family and a registry, but it could be something else, using composition, macros or other rust tricks that I'm not familiar with.

The motivation behind this is that we'll be going over the list of hyperparameters and assigning proper bounds to them, but there are many already (and more coming), so if we had a coherent system for it, we wouldn't have to write a migration manually 20+ times etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions