models.ready
  • 11 Nov 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

models.ready

  • Dark
    Light
  • PDF

Article summary

Description

Returns whether or not a machine learning (ML) model is installed and ready for use. When ready, run your model using ai.models.run.


Input Parameters

NameTypeRequiredDescription
keyTextYesUnique model identifier used during ai.models.install

Returns

Type: Boolean

Returns true if model is installed and ready for use. Otherwise, false is returned.


Examples

// check if model is installed and ready for use
if (ai.models.ready("riskModel") === true)
    debug.log("Model is ready.");

Remarks

Use this function to check if a machine learning (ML) model is installed and ready for use. For this to return true, you must have previously installed the model using ai.models.install.


What's Next