diff --git a/.circleci/config.yml b/.circleci/config.yml index bbd5e46..b3b43db 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,7 +27,7 @@ jobs: - run: name: Upload coverage command: | - tox -e coverage + tox -e coverage -- xml bash <(curl -s https://codecov.io/bash) deploy: parameters: @@ -64,10 +64,8 @@ workflows: requires: - tests filters: - branches: - only: master tags: - only: v* + only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ twine_repository: pypi twine_password: $PYPI_TOKEN - deploy: @@ -75,6 +73,6 @@ workflows: - tests filters: tags: - only: v* + only: /^v[0-9]+\.[0-9]+.[0-9]+\.dev[0-9]*$/ twine_repository: testpypi twine_password: $TESTPYPI_TOKEN \ No newline at end of file diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a849608..dd47d32 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,9 +1,17 @@ # Changelog All notable changes to this project will be documented in this file. +## [1.1.0] - 2020-12-26 +### Added +- usage of shared-memory for process-based prefetching (requires python >= 3.8) + +### Removed +- 'sharedmem' prefetching backend +- support for python <= 3.5 + ## [1.0.0] - 2019-12-27 ### Added -- prefteching using shared memory for zero-copy data transfer +- prefetching using shared memory for zero-copy data transfer - case and switch functions ### Changed @@ -17,7 +25,7 @@ All notable changes to this project will be documented in this file. ## [0.9.0] - 2018-09-10 ### Added -- improved documention +- improved documentation ### Changed - changed user-code error reporting (more idiomatic) diff --git a/docs/examples/dataloader.py b/docs/examples/dataloader.py index d68f3a6..d493693 100644 --- a/docs/examples/dataloader.py +++ b/docs/examples/dataloader.py @@ -87,6 +87,8 @@ def __init__( transfers between workers and the main process. That shared memory is divided into num_worker * prefetch_factor slots. - timeout is not implemented + - a pool of shared memory with a fixed size (shm_size) is used for + zero-copy buffer transfers from workers. """ # sampling/batching self.dataset = dataset @@ -113,6 +115,7 @@ def __len__(self): def make_sequence(self): """Build a sequence that looks like a dataloader when iterated over.""" + # shuffling if self.batch_sampler: batch_indices = list(self.batch_sampler) out = seqtools.smap(lambda bi: [self.dataset[i] for i in bi], batch_indices) diff --git a/tests/test_release.py b/tests/test_release.py index ceed076..28f49b4 100644 --- a/tests/test_release.py +++ b/tests/test_release.py @@ -38,6 +38,6 @@ def candidate_for_release(): def test_version(): version = pkg_resources.require("seqtools")[0].version - tag = check_output("git describe --exact-match --tags") + tag = check_output("git describe --exact-match --tags").lstrip('v') assert tag == version, "Package version and commit tag do not match" diff --git a/version.py b/version.py index 4e63c73..4b35b00 100644 --- a/version.py +++ b/version.py @@ -4,7 +4,7 @@ # This line is updated automatically -version = "1.0.0-r18-geb95003" +version = "1.1.0" # If we are in the repo, the following script will update the version # number and update this file, otherwise, we are probably in the source @@ -12,7 +12,7 @@ thisdir = os.path.dirname(__file__) try: description = subprocess.check_output( - "git describe --tags ".split(), + "git describe --tags".split(), stderr=subprocess.STDOUT, cwd=os.path.dirname(__file__), universal_newlines=True)