Download kaggle/notebook_export.py from idefinity/webfm-eval: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/datasets/idefinity/webfm-eval/resolve/main/kaggle/notebook_export.py
- Command line
-
hf download hf://datasets/idefinity/webfm-eval/kaggle/notebook_export.py
-
curl -L -o notebook_export.py https://huggingface.co/datasets/idefinity/webfm-eval/resolve/main/kaggle/notebook_export.py
775 Bytes
| """Kaggle notebook body: export the browser graphs (lm, aggregator, voc).""" | |
| 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() | |
| subprocess.run("pip install -q onnx_ir onnxscript", shell=True, check=False) | |
| pull(WEIGHTS, MODEL) | |
| pull(BUNDLE_REPO, BUNDLE, repo_type="dataset") | |
| env = dict(os.environ, WORK_ROOT=str(ROOT), CUDA_VISIBLE_DEVICES="0", | |
| STAGE=os.environ.get("STAGE", "all")) | |
| rc = subprocess.run([sys.executable, str(BUNDLE / "kaggle/export_browser.py")], | |
| env=env).returncode | |
| print("export rc", rc) | |
| if __name__ == "__main__": | |
| main() | |