webfm-eval / kaggle /notebook_describe.py
zziang's picture
add structure probe for the browser export
ad9097c verified
Raw History Blame Contribute Delete
645 Bytes
"""Kaggle notebook body: dump model structure for the ONNX export."""
import os
import subprocess
import sys
from notebook_eval import BUNDLE, MODEL, ROOT, WEIGHTS, pull, stage_deps, stage_repo
BUNDLE_REPO = "idefinity/webfm-eval"
def main() -> None:
stage_repo()
stage_deps()
pull(WEIGHTS, MODEL)
pull(BUNDLE_REPO, BUNDLE, repo_type="dataset")
env = dict(os.environ, WORK_ROOT=str(ROOT), CUDA_VISIBLE_DEVICES="0")
rc = subprocess.run([sys.executable, str(ROOT / "webfm-eval/kaggle/describe_model.py")],
env=env).returncode
print("describe rc", rc)
if __name__ == "__main__":
main()