Skip to content

docs: ML Inference examples missing error handling #228

@Saiful-15931

Description

@Saiful-15931

Problem

The ML Inference docs show basic examples but
don't include any error handling.

For a blockchain app where real money is involved,
new developers need to know how to handle:

  • Network failures
  • Invalid model CID
  • Insufficient wallet balance
  • Timeout errors

Suggested Fix

Add a try/except example showing proper error handling:

try:
    result = alpha.infer(
        model_cid='QmbUqS93...',
        model_input={...},
        inference_mode=og.InferenceMode.VANILLA
    )
except Exception as e:
    print(f"Inference failed: {e}")
This would help new developers debug issues faster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions