Skip to content

docs: ML Inference examples missing error handling #228

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions