Skip to content

Commit 3f7be5f

Browse files
Added the ability to not run iisignature benchmarks.
1 parent 4e17a15 commit 3f7be5f

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

CHANGELOG.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1.1.7
1+
1.2.0
22
-----
33
Added support for PyTorch 1.4.0
44
Added 'scalar_term' argument to the 'signature' function (and by extension many other functions that take signatures as arguments.)
@@ -7,6 +7,7 @@ Made SignatureToLogSignature and LogSignature classes deepcopyable.
77
Fixed the repr for LogSignature and SignatureToLogSignature.
88
Fixed some parallelism to achieve even greater speedups.
99
Released the Global Interpreter Lock during execution of Signatory's functions.
10+
Bumped the minor version because frankly we've changed a lot since the 1.1.0 release!
1011

1112
1.1.6
1213
-----

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Install via:
3131
3232
pip install signatory==<SIGNATORY_VERSION>.<TORCH_VERSION>
3333
34-
where ``<SIGNATORY_VERSION>`` is the version of Signatory you would like to download (the most recent version is 1.1.7) and ``<TORCH_VERSION>`` is the version of PyTorch you are using.
34+
where ``<SIGNATORY_VERSION>`` is the version of Signatory you would like to download (the most recent version is 1.2.0) and ``<TORCH_VERSION>`` is the version of PyTorch you are using.
3535

3636

3737
For example, if you are using PyTorch 1.3.0 and want Signatory 1.1.4, then you should run:
@@ -75,7 +75,7 @@ For further examples, see the `documentation <https://signatory.readthedocs.io/e
7575

7676
Citation
7777
########
78-
If you found this library useful in your research, please consider citing
78+
If you found this library useful in your research, please consider citing `the paper <https://arxiv.org/abs/2001.00706>`__.
7979

8080
.. code-block:: bibtex
8181

benchmark/benchmark.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class small(object):
136136
class BenchmarkRunner(object):
137137
"""Runs all functions across all libraries and records their times or memory usage for multiple sizes and depths."""
138138

139-
def __init__(self, type_, test_esig, test_signatory_gpu, measure, fns, **kwargs):
139+
def __init__(self, type_, test_esig, test_iisignature, test_signatory_gpu, measure, fns, **kwargs):
140140
assert type_ in Types
141141
assert measure in Measurables
142142
assert fns in Functions
@@ -151,6 +151,7 @@ def __init__(self, type_, test_esig, test_signatory_gpu, measure, fns, **kwargs)
151151
self.sizes = type_.sizes
152152
self.depths = type_.depths
153153
self.test_esig = test_esig
154+
self.test_iisignature = test_iisignature
154155
self.test_signatory_gpu = test_signatory_gpu
155156
self.measure = measure
156157
self.fns = fns
@@ -199,6 +200,8 @@ def _run_test(self, fn_name, fn_dict, size, depth, running):
199200
continue
200201
if (not self.test_signatory_gpu) and (library_name is Columns.signatory_gpu_str):
201202
continue
203+
if (not self.test_iisignature) and (library_name is Columns.iisignature_str):
204+
continue
202205

203206
result = math.inf
204207
if running:
@@ -214,7 +217,9 @@ def _run_test(self, fn_name, fn_dict, size, depth, running):
214217
running = False
215218
column_results[library_name] = result
216219

217-
other_best = column_results[Columns.iisignature_str]
220+
other_best = math.inf
221+
if self.test_iisignature:
222+
other_best = min(column_results[Columns.iisignature_str], other_best)
218223
if self.test_esig:
219224
other_best = min(column_results[Columns.esig_str], other_best)
220225
try:

command.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def main():
6666
help="All other arguments are forwarded on to pytest.")
6767

6868
benchmark_parser.add_argument('-e', '--noesig', action='store_false', dest='test_esig',
69-
help="Skip esig tests as esig is typically very slow.")
69+
help="Skip esig tests.")
70+
benchmark_parser.add_argument('-i', '--noiisignature', action='store_false', dest='test_iisignature',
71+
help="Skip iisignature tests.")
7072
benchmark_parser.add_argument('-g', '--nogpu', action='store_false', dest='test_signatory_gpu',
7173
help="Skip Signatory GPU tests.")
7274
benchmark_parser.add_argument('-m', '--measure', choices=('time', 'memory'), default='time',
@@ -195,6 +197,7 @@ def benchmark(args):
195197
try:
196198
runner = bench.BenchmarkRunner(type_=type_,
197199
test_esig=args.test_esig,
200+
test_iisignature=args.test_iisignature,
198201
test_signatory_gpu=args.test_signatory_gpu,
199202
measure=measure,
200203
fns=fns)

docs/pages/miscellaneous/citation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Citation
44
########
5-
If you found this library useful in your research, please consider citing
5+
If you found this library useful in your research, please consider citing `the paper <https://arxiv.org/abs/2001.00706>`__.
66

77
.. code-block:: bibtex
88

src/signatory/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# =========================================================================
1515
"""Signatory: Differentiable computations of the signature and logsignature transforms, on both CPU and GPU.
1616
17-
Project homepage: github.com/patrick-kidger/signatory
18-
Documentation: signatory.readthedocs.io
17+
Project homepage: https://github.com/patrick-kidger/signatory
18+
Documentation: https://signatory.readthedocs.io
1919
"""
2020

2121

@@ -56,6 +56,6 @@
5656
all_words)
5757

5858

59-
__version__ = "1.1.7"
59+
__version__ = "1.2.0"
6060

6161
del torch

0 commit comments

Comments
 (0)