mirror of https://github.com/commaai/tinygrad.git
commit
55f9db8af6
|
@ -0,0 +1,26 @@
|
|||
name: Unit Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install Dependencies
|
||||
run: pip install ipython numpy tqdm requests
|
||||
- name: Run Tests
|
||||
run: ipython3 test/mnist.py
|
|
@ -2,7 +2,7 @@ def fetch_mnist():
|
|||
def fetch(url):
|
||||
import requests, gzip, os, hashlib, numpy
|
||||
fp = os.path.join("/tmp", hashlib.md5(url.encode('utf-8')).hexdigest())
|
||||
if not os.path.isfile(fp):
|
||||
if os.path.isfile(fp):
|
||||
with open(fp, "rb") as f:
|
||||
dat = f.read()
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue