compute
Triggers a new Compute Job on a given dataset using a specified algorithm.
Usage
import { Nautilus } from '@deltadao/nautilus'
import { Wallet } from 'ethers'
const nautilus = await Nautilus.create(new Wallet('0x1234'))
await nautilus.compute({
dataset: {
did: 'did:op:dataset...'
},
algorithm: {
did: 'did:op:algorithm...'
}
})
Returns
The compute job object that was created when starting the new job.
Parameters
config
- Type:
ComputeConfig
The configuration object for the compute job to start.
Properties
dataset
- Type:
ComputeAsset
The dataset to compute on.
await nautilus.compute({
dataset: {
did: 'did:op:dataset...'
},
algorithm: {
did: 'did:op:algorithm...'
}
})
algorithm
- Type:
ComputeAlgorithm
The algorithm to compute with.
await nautilus.compute({
dataset: {
did: 'did:op:dataset...'
},
algorithm: {
did: 'did:op:algorithm...'
}
})
additionalDatasets (optional)
- Type:
ComputeAsset[]
A list of additional datasets to use for computation.
await nautilus.compute({
dataset: {
did: 'did:op:dataset...'
},
algorithm: {
did: 'did:op:algorithm...'
},
additionalDatasets: [
{
did: 'did:op:dataset...'
}
]
})