Skip to content

ComputeAsset

Used to describe algorithms when initializing new compute jobs via nautilus.compute()

Usage

This type is used for the algorithm properties when starting compute jobs.

await nautilus.compute({
    dataset: { 
        did: 'did:op:1234abcd...',
    }, 
    algorithm: { 
        did: 'did:op:5678wxyz...'
    } 
})

Properties

This interface inherits the same properties provided by ComputeAsset.

In addition, it provides the following properties.

algocustomdata (optional)

Custom parameters that will be passed to the algorithm at runtime. This is defined by the algorithm publisher and can be found in the algorithms metadata.

const algorithm = {
    did: 'did:op:1234abcd...', 
    serviceId: 'specific-service-id',
    userdata: { 
        parameter: 'value',
    }, 
    algocustomdata: { 
        parameter: 'value', 
        number: 123, 
        boolean: true, 
        select: 'option', 
    } 
} satisfies ComputeAlgorithm