Skip to content

Commit c2f676a

Browse files
committed
Update README and development setup
1 parent 2d23d76 commit c2f676a

28 files changed

+30
-2852
lines changed

README.md

+16-32
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,42 @@ ensembles of disparate search techniques simultaneously, techniques which
1616
perform well will receive larger testing budgets and techniques which perform
1717
poorly will be disabled.
1818

19-
System dependencies
20-
-------------------
21-
22-
A list of system dependencies can be found in [debian-packages-deps][]
23-
which are primarily python 2.6+ (not 3.x) and sqlite3 (or your
24-
[supported][sqlalchemy-dialects] database backend of choice).
25-
26-
On Ubuntu/Debian there can be installed with:
27-
28-
sudo apt-get install `cat debian-packages-deps | tr '\n' ' '`
29-
30-
[debian-packages-deps]: https://raw.github.com/jansel/opentuner/master/debian-packages-deps
31-
[sqlalchemy-dialects]: http://docs.sqlalchemy.org/en/rel_0_8/dialects/index.html
32-
3319

3420
Installation
3521
-------------------
36-
OpenTuner (and dependencies) can be installed with
22+
23+
OpenTuner requires python 3.7+ and sqlite3 (or your
24+
[supported][sqlalchemy-dialects] database backend of choice).
25+
Install with:
3726

3827
sudo pip install opentuner
3928

4029
or
4130

4231
pip install --user opentuner
4332

44-
This will not install any of the example programs.
45-
33+
[sqlalchemy-dialects]: http://docs.sqlalchemy.org/en/rel_0_8/dialects/index.html
4634

4735
Development installation
4836
-------------------
49-
For development (running OpenTuner out of a git checkout), a list of python
50-
dependencies can be found in [requirements.txt][] these can be installed
51-
system-wide with `pip`.
52-
53-
sudo apt-get install python-pip
54-
sudo pip install -r requirements.txt
5537

56-
Or you can use virtual env to create a isolated python environment by running:
38+
For development or running examples out of a git checkout, we recommend using
39+
[miniconda3](https://docs.conda.io/en/latest/miniconda.html).
5740

58-
python ./venv-bootstrap.py
59-
60-
which will create a ./venv/bin/python (./venv/Scripts/python.exe on windows)
61-
with all the required packages installed.
62-
63-
[requirements.txt]: https://raw.github.com/jansel/opentuner/master/requirements.txt
41+
conda create --name=opentuner python=3.8
42+
conda activate opentuner
43+
pip install -r requirements.txt -r optional-requirements.txt
44+
python setup.py develop
6445

6546

6647
Checking Installation
6748
---------------------
6849

69-
Quickly checking that a successful installation has been made, may be performed
70-
by running an example program such as:
50+
To check an installation you can run tests:
51+
52+
pytest tests/*
53+
54+
Or run an example program:
7155

7256
./examples/rosenbrock/rosenbrock.py
7357

debian-packages-deps

-9
This file was deleted.

examples/gccflags/adddeps.py

-7
This file was deleted.

examples/gccflags/gccflags.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from builtins import filter
66
from builtins import range
77
from past.utils import old_div
8-
import adddeps # fix sys.path
98

109
import math
1110
import argparse

examples/gccflags/gccflags_minimal.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#
55
# This is an extremely simplified version meant only for tutorials
66
#
7-
import adddeps # fix sys.path
87

98
import opentuner
109
from opentuner import ConfigurationManipulator

examples/halide/adddeps.py

-7
This file was deleted.

examples/halide/halidetuner.py

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from builtins import input
2323
from builtins import range
2424
from builtins import object
25-
import adddeps # fix sys.path
2625

2726
import argparse
2827
import collections

examples/hpl/adddeps.py

-7
This file was deleted.

examples/hpl/hpl.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
from __future__ import print_function
2-
from builtins import str
3-
import adddeps # fix sys.path
42

53
import argparse
64
import logging
5+
from builtins import str
76

87
import opentuner
9-
from opentuner.search.manipulator import (ConfigurationManipulator,
10-
IntegerParameter,
11-
FloatParameter)
12-
from opentuner.search.objective import MinimizeTime
138
from opentuner.measurement import MeasurementInterface
14-
from opentuner.measurement.inputmanager import FixedInputManager
15-
from opentuner.tuningrunmain import TuningRunMain
9+
from opentuner.search.manipulator import (ConfigurationManipulator,
10+
IntegerParameter)
1611

1712
log = logging.getLogger(__name__)
1813

@@ -29,7 +24,7 @@
2924
class HPLinpack(MeasurementInterface):
3025
def run(self, desired_result, input, limit):
3126
self.output_hpl_datfile(desired_result.configuration.data)
32-
import subprocess, os
27+
import subprocess
3328
binary = self.args.xhpl
3429
subprocess.call(["mpirun", "-np", str(self.args.nprocs), binary])
3530

examples/mario/adddeps.py

-7
This file was deleted.

examples/mario/mario.py

-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from builtins import range
1414
from past.utils import old_div
1515
from builtins import object
16-
import adddeps # fix sys.path
1716
import argparse
1817
import base64
1918
import pickle
@@ -31,9 +30,6 @@
3130
import opentuner
3231
from opentuner.search.manipulator import ConfigurationManipulator, IntegerParameter, EnumParameter, BooleanParameter
3332
from opentuner.measurement import MeasurementInterface
34-
from opentuner.measurement.inputmanager import FixedInputManager
35-
from opentuner.tuningrunmain import TuningRunMain
36-
from opentuner.search.objective import MinimizeTime
3733
from future.utils import with_metaclass
3834

3935

examples/petabricks/adddeps.py

-7
This file was deleted.

examples/petabricks/import_old_result.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python
22

33
from __future__ import print_function
4-
import adddeps # fix sys.path
54

65
import argparse
76
import json

examples/petabricks/pbtuner.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,24 @@
22

33
from __future__ import division
44
from __future__ import print_function
5-
from builtins import range
6-
from past.utils import old_div
7-
import adddeps # fix sys.path
85

9-
import re
106
import argparse
7+
import json
118
import logging
9+
import re
1210
import subprocess
1311
import tempfile
14-
import json
12+
from builtins import range
1513
from pprint import pprint
1614

15+
from past.utils import old_div
16+
1717
import opentuner
1818
from opentuner.search.manipulator import (ConfigurationManipulator,
1919
IntegerParameter,
2020
LogIntegerParameter,
21-
FloatParameter,
22-
LogFloatParameter,
2321
SelectorParameter,
24-
SwitchParameter,
25-
PermutationParameter, )
22+
SwitchParameter)
2623

2724
try:
2825
from lxml import etree

examples/py_api/adddeps.py

-7
This file was deleted.

examples/py_api/api_example.py

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from __future__ import print_function
99

1010
from builtins import range
11-
import adddeps # add opentuner to path in dev mode
1211

1312
import opentuner
1413
from opentuner.api import TuningRunManager

examples/py_api/multiple_tuning_runs.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from builtins import zip
1313
from builtins import range
14-
import adddeps # add opentuner to path in dev mode
1514

1615
import opentuner
1716
from opentuner.api import TuningRunManager

examples/rosenbrock/adddeps.py

-7
This file was deleted.

examples/rosenbrock/rosenbrock.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from __future__ import print_function
1212
from builtins import range
13-
import adddeps # fix sys.path
1413

1514
import argparse
1615
import logging

examples/tsp/adddeps.py

-7
This file was deleted.

examples/tsp/tsp.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@
55
# http://en.wikipedia.org/wiki/Travelling_salesman_problem
66
#
77

8-
from builtins import range
9-
import adddeps # fix sys.path
10-
118
import argparse
12-
import logging
9+
from builtins import range
1310

1411
import opentuner
12+
from opentuner.measurement import MeasurementInterface
1513
from opentuner.search.manipulator import (ConfigurationManipulator,
1614
PermutationParameter)
17-
from opentuner.search.objective import MinimizeTime
18-
from opentuner.measurement import MeasurementInterface
19-
from opentuner.measurement.inputmanager import FixedInputManager
20-
from opentuner.tuningrunmain import TuningRunMain
2115

2216
parser = argparse.ArgumentParser(parents=opentuner.argparsers())
2317
parser.add_argument('data', help='distance matrix file')

examples/tutorials/adddeps.py

-7
This file was deleted.

examples/tutorials/mmm_tuner.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# This is an extremely simplified version meant only for tutorials
66
#
77
from __future__ import print_function
8-
import adddeps # fix sys.path
98

109
import opentuner
1110
from opentuner import ConfigurationManipulator

examples/unitary/adddeps.py

-7
This file was deleted.

examples/unitary/unitary.py

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from __future__ import print_function
1515
from builtins import range
1616
from past.utils import old_div
17-
import adddeps # fix sys.path
1817

1918
import argparse
2019
import logging

gen-venv-bootstrap.py

-39
This file was deleted.

optional-requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
django
22
matplotlib
3-
virtualenv
3+
pytest
4+
pypandoc

0 commit comments

Comments
 (0)