Skip to content

Does method_meta exist in python runtime api? #7709

@bluejack

Description

@bluejack

📚 The doc issue

This python code does not work, but the api reference suggests it should?

et_runtime: Runtime = Runtime.get()
program: Program = et_runtime.load_program(
    Path("text_model.pte"),
    verification=Verification.InternalConsistency,
)
print("Program methods:", program.method_names)
forward: Method = program.load_method("forward")

methmeta: MethodMeta = program.method_meta("forward")

Looking at https://pytorch.org/executorch/stable/executorch-runtime-api-reference.html#_CPPv4NK10executorch7runtime7Program11method_metaEPKc

Although that looks to be the C++ api documentation, not the python documentation, but I don't see separate pythong documentation for the API...

Suggest a potential alternative/fix

Clarify where things are or are not available in the python api, or have a python specific api.

Also, is there some means by which this call can be accessed in python?

cc @mergennachin @byjlw

Metadata

Metadata

Labels

module: docIssues related to documentation, both in docs/ and inlined in codemodule: user experienceIssues related to reducing friction for userstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

  • Status

    Ready
  • Status

    Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions