prompting.validators.forward#

Module Contents#

Functions#

get_random_uids(self, k[, exclude])

Returns k available random uids from the metagraph.

run_step(self, task, k, timeout[, exclude])

forward(self)

prompting.validators.forward.get_random_uids(self, k, exclude=None)#

Returns k available random uids from the metagraph. :param k: Number of uids to return. :type k: int :param exclude: List of uids to exclude from the random sampling. :type exclude: List[int]

Returns:

Randomly sampled available uids.

Return type:

uids (torch.LongTensor)

Parameters:
  • k (int) –

  • exclude (List[int]) –

Notes

If k is larger than the number of available uids, set k to the number of available uids.

async prompting.validators.forward.run_step(self, task, k, timeout, exclude=[])#
Parameters:
async prompting.validators.forward.forward(self)#