sparsezoo icon indicating copy to clipboard operation
sparsezoo copied to clipboard

API for model.md, benchmark

Open horheynm opened this issue 2 years ago • 2 comments

Given a git-server url (model page url, git clone http or git clone ssh), load its metadata

url = "https://git.neuralmagic.com/neuralmagic/cary" \
or " [email protected]:neuralmagic/cary.git" \
 or "https://git.neuralmagic.com/neuralmagic/cary.git"

server_model = GitServerModel(url)
server_model.benchmark.metadata # benchmark metadata
server_model.card.metadata # model.md metadata

Also can access attributes of each class.

server_model.card.domain # model.m's domain
server_model.card.optimizations # model.md's optimizations
server_model.card.task # model.md's task
# etc...

server_model.benchmark.deepsparse_version # deepsparse version
server_model.benchmark.model_commit_sha # commit sha of the model.onnx
# etc...

Model card looks like: https://git.neuralmagic.com/neuralmagic/cary/-/blob/main/model.md

Benchmark.yaml looks like: https://git.neuralmagic.com/neuralmagic/cary/-/blob/main/benchmark.yaml

horheynm avatar Aug 04 '22 19:08 horheynm

@kazukageorge is this still in WIP mode?

dbogunowicz avatar Aug 10 '22 09:08 dbogunowicz

Got comment to move the folder structure from git-server to general pathway

horheynm avatar Aug 10 '22 17:08 horheynm