Skip to content

Commit 41e9c2f

Browse files
authored
Merge branch 'master' into imjoy
2 parents 1b0ac50 + f9ed14f commit 41e9c2f

File tree

5 files changed

+24
-31
lines changed

5 files changed

+24
-31
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 20.2.0-alpha.5
2+
current_version = 20.2.0-alpha.6
33
parse = (?P<year>\d+)\.(?P<month>\d+)\.(?P<number>\d+)(\-(?P<release>[a-z]+)(\.(?P<build>\d+))?)?
44
serialize =
55
{year}.{month}.{number}-{release}.{build}

README.md

+18-28
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
11
# tiktorch
2-
[![CircleCI](https://circleci.com/gh/ilastik/tiktorch.svg?style=svg)](https://circleci.com/gh/ilastik/tiktorch)
2+
[![CircleCI](https://circleci.com/gh/ilastik/tiktorch.svg?style=shield)](https://circleci.com/gh/ilastik/tiktorch)
3+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
34

4-
Wrappers for Pytorch
5+
## Installation
6+
To install tiktorch and start server run:
7+
```
8+
conda create -n tiktorch-server-env -c ilastik-forge -c conda-forge -c pytorch tiktorch
59
6-
## tiktorch specification
10+
conda activate tiktorch-server-env
711
8-
Models saved for tiktorch must follow this specification:
12+
tiktorch-server
13+
```
914

10-
A folder containing the files
15+
## Development environment
1116

12-
- `model.py`: python file that defines the model.
13-
- `state.nn`: state dict of the model, as obtained by `torch.save(model.state_dict(), 'state.nn')`
14-
- `tiktorch_config.yml`: yaml file with metadata
17+
To create development environment run:
1518

16-
The config must contain the following keys:
19+
```
20+
conda env create --name tiktorch-env --file ./environment.yml
21+
```
1722

18-
- `input_shape`: shape of valid network input, must be either CHW (2D) or CDHW (3D)
19-
- `output_shape`: shape of network output given input with `input_shape`; same format
20-
- `dynamic_input_shape`: TODO explain
21-
- `model_class_name`: name of the model class in `model.py`
22-
- `model_init_kwargs`: keyword arguments to build model
23-
- `torch_version`: torch version used to train this model
24-
25-
In addition, the config may contain the following keys:
26-
27-
- `description`: Description of the pre-trained model
28-
- `data_source`: URL of the data used for pre-training
29-
30-
TODO explain how to generate with tiktorch.
31-
32-
Possible extensions:
33-
34-
- specification for training set-up
35-
- specifiying additional python modules necessary to run the model
36-
- load model saved via `torch.save(model, path)` instead of state dict
23+
Run tests:
24+
```
25+
pytest
26+
```

conda-recipe/meta.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ build:
1616
number: {{ GIT_DESCRIBE_NUMBER }}
1717
script: python -m pip install --no-deps --ignore-installed .
1818
string: np{{CONDA_NPY}}py{{CONDA_PY}}_{{PKG_BUILDNUM}}_h{{PKG_HASH}}_g{{GIT_FULL_HASH[:7]}}
19-
entrypoints:
19+
entry_points:
2020
- tiktorch-server = tiktorch.server.base:main
2121

2222
requirements:
@@ -29,6 +29,8 @@ requirements:
2929
- numpy >=1.14
3030
- python-bioimage-io
3131
- pytorch-bioimage-io
32+
- grpcio=1.16.0
33+
- protobuf=3.11.4
3234
- pyyaml
3335
- paramiko
3436
- inferno

environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies:
2323
- conda-build
2424
- anaconda-client
2525
- bump2version
26+
- pre_commit
2627
- pip:
2728
- pytest-grpc==0.7.0
2829
- git+https://github.com/bioimage-io/python-bioimage-io#egg=pybio # bump

setup.py

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

1212
setup(
1313
name="tiktorch",
14-
version="20.2.0-alpha.5",
14+
version="20.2.0-alpha.6",
1515
description="Tiktorch client/server",
1616
long_description=long_description,
1717
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)