remove old envvar "OPT" (#4060)

This commit is contained in:
chenyu 2024-04-03 14:55:21 -04:00 committed by GitHub
parent 406cb5fd90
commit e3c0ac9fbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

View File

@ -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"

View File

@ -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