11## Local Mode
22
3-
4- First be sure that you have docker tools installed.
3+ To run in local mode you first be sure that you have [ docker tools ] ( https://docs.docker.com/desktop/install/mac-install/ )
4+ installed. On Debian systems:
55
66``` bash
77apt install docker
88```
99
10- To install the benchmark run,
11-
10+ To get started, run the ` setup ` command with the dataset
11+ split that you are interested in working with.
12+ We'll start with the ` lite ` split.
1213
13- The system is a command-line tool that allows you to run unit-tests on a
14- variety of libraries in isolated environments. To get started with the full
15- setup run the ` setup ` command which will install a clone the code of a subset
16- of libraries to your ` repos/ ` directory.
1714
1815``` bash
1916commit0 setup lite
2017```
2118
19+ This will install a clone the code for subset of libraries to your ` repos/ ` directory.
20+
2221Next run the ` build ` command which will configure Docker containers for
2322each of the libraries with isolated virtual environments. The command uses the
2423[ uv] ( https://github.com/astral-sh/uv ) library for efficient builds.
2524
2625``` bash
27- commit0 build lit
26+ commit0 build
2827```
2928
3029The main operation you can do with these enviroments is to run tests.
@@ -34,36 +33,4 @@ Here we run [a test](https://github.com/commit-0/simpy/blob/master/tests/test_ev
3433commit0 test simpy tests/test_event.py::test_succeed
3534```
3635
37- This test should run and pass, but others will fail.
38-
39- ``` bash
40- commit0 test minitorch tests/test_operators.py::test_relu
41- ```
42-
43- Let's now manually go in and change that repo.
44- This is all just standard shell commands.
45-
46- ``` bash
47- cd repos/minitorch/
48- git checkout -b mychange
49- ```
50-
51- And apply and commit this patch.
52-
53- ```
54- --- a/minitorch/operators.py
55- +++ b/minitorch/operators.py
56- @@ -81,7 +81,7 @@ def relu(x: float) -> float:
57- (See https://en.wikipedia.org/wiki/Rectifier_(neural_networks) .)
58- """
59- # TODO: Implement for Task 0.1.
60- - raise NotImplementedError('Need to implement for Task 0.1')
61- + return 1. if x > 0. else 0.
62- ```
63-
64- Once this is done we can run ` test ` with
65- a branch and the environment will sync and run.
66-
67- ``` bash
68- commit0 test minitorch branch=mychange tests/test_operators.py::test_relu
69- ```
36+ See [ distributed setup] ( setupdist ) for more commands.
0 commit comments