From e3c0ac9fbf50c2c902738c9f59ba0cac4cee2dbb Mon Sep 17 00:00:00 2001 From: chenyu Date: Wed, 3 Apr 2024 14:55:21 -0400 Subject: [PATCH] remove old envvar "OPT" (#4060) --- openpilot/compile2.py | 1 - test/external/external_test_opt.py | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/openpilot/compile2.py b/openpilot/compile2.py index 9958e3df49..da3cde1578 100644 --- a/openpilot/compile2.py +++ b/openpilot/compile2.py @@ -5,7 +5,6 @@ sys.path.insert(0, str(pathlib.Path(__file__).parents[1])) if "FLOAT16" not in os.environ: os.environ["FLOAT16"] = "1" if "IMAGE" not in os.environ: os.environ["IMAGE"] = "2" if "NOLOCALS" not in os.environ: os.environ["NOLOCALS"] = "1" -if "OPT" not in os.environ: os.environ["OPT"] = "99" OPENPILOT_MODEL = "https://github.com/commaai/openpilot/raw/v0.9.4/selfdrive/modeld/models/supercombo.onnx" diff --git a/test/external/external_test_opt.py b/test/external/external_test_opt.py index 80e7356ae0..a9158a74ee 100644 --- a/test/external/external_test_opt.py +++ b/test/external/external_test_opt.py @@ -1,18 +1,11 @@ #!/usr/bin/env python -import os import torch -if "OPT" not in os.environ: - os.environ["OPT"] = "2" -else: - assert int(os.environ["OPT"]) >= 2, "test is broken with OPT=0 or OPT=1" -import gc +import gc, unittest import numpy as np -import unittest -from tinygrad.tensor import Tensor, Device -from tinygrad import nn, GlobalCounters +from tinygrad import nn, GlobalCounters, Tensor, Device from tinygrad.helpers import getenv from tinygrad.nn import optim #from tinygrad.lazy import PUSH_PERMUTES