Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nächste Runde von Anpassungen #2

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a34629f
how to setup a venv
ulf1 Nov 14, 2020
ec746d5
relax version requirements
ulf1 Nov 14, 2020
68e8085
how to download data
ulf1 Nov 14, 2020
2babd51
dvc requires specific version range for networkx
ulf1 Nov 14, 2020
ec1bfaf
Unit tests with Github Actions
ulf1 Nov 14, 2020
a2d5905
install with extra_require
ulf1 Nov 14, 2020
94f23ea
split up stages
ulf1 Nov 14, 2020
d11455d
DVC configuration instructions
ulf1 Nov 16, 2020
5a2b28a
store model in a subfolder v1
ulf1 Nov 16, 2020
e2974e5
downgrade to 3.6
ulf1 Nov 17, 2020
06060f3
install python pkgs via requirements.txt to make use of the --use-fea…
ulf1 Nov 17, 2020
8fb449c
set odo.dwds.de as new SSH endpoint
ulf1 Nov 17, 2020
499bcfc
hash updated
ulf1 Nov 17, 2020
d30f624
comments about the packages' purpose
ulf1 Nov 17, 2020
9934160
Hinweis
ulf1 Nov 17, 2020
3597e19
DVC remote changed
ulf1 Nov 17, 2020
601b83e
version downgrade
ulf1 Nov 17, 2020
3935713
shebang was missing
ulf1 Nov 28, 2020
9ca61d8
path to package corrected
ulf1 Nov 28, 2020
a44049f
main.py as pkg script
ulf1 Nov 28, 2020
b06d98b
consult the requirements file for dependencies
ulf1 Nov 29, 2020
23909ee
readme updated
ulf1 Nov 29, 2020
111b24b
systests scripts refactored for a wider range of shells
ulf1 Nov 29, 2020
c2170f6
move global vars to systests folder
ulf1 Nov 29, 2020
8197352
python coding examples
ulf1 Nov 29, 2020
9b9c1b6
distributed examples evenly
ulf1 Nov 29, 2020
38de6cc
add missing deps to setup.py
ulf1 Nov 29, 2020
efc395e
avoid ray>=1
ulf1 Nov 29, 2020
8dcf03b
use ray 0.8
ulf1 Nov 29, 2020
0cc3210
set zip_safe=True
ulf1 Nov 29, 2020
b5b65ad
try ray==1.0.0
ulf1 Nov 29, 2020
fa0d008
install reqs files with resolver
ulf1 Nov 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dvc/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
['remote "imsnpars-data"']
url = ssh://odo.dwds.de/home/imsnpars/v1
27 changes: 27 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python application

on: [push]

jobs:
build:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python setup.py develop -q
- name: Download training data and the serialized model
run: |
dvc pull -r imsnpars-data
- name: Lint with flake8
run: |
flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')
- name: Unit Test with pytest
run: |
pytest
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,35 @@ Dependency Parsers](https://www.aclweb.org/anthology/P19-1012) (see [acl2019 bra

## Usage

### Install virtual env

```sh
python3.6 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt --use-feature=2020-resolver
pip install -r requirements-dev.txt --use-feature=2020-resolver
```

### Download training data and serialized model
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DVC benötigt SSH account.

  • Lösung 1: public www ordner auf odo
  • Lösung 2: persistent ID (Datenpublikation)

Please contact the System Administrator for an user account.

```sh
# initialize DVC in git repo
# dvc init

# set the DVC endpoint
dvc remote add imsnpars-data ssh://odo.dwds.de/home/imsnpars/v1

# configure your creds (You SSH username/password on odo.dwds.de)
dvc remote modify --local imsnpars-data port 22
dvc remote modify --local imsnpars-data user YOURNAME
dvc remote modify --local imsnpars-data password TOPSECRETPW

# dowload data
dvc pull -r imsnpars-data
```

### Transition-based parser

Training a new model:
Expand Down
2 changes: 1 addition & 1 deletion data/model/model.args.dvc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
outs:
- md5: 85b2857dacf64d93d72d8e7d3f91f24e
- md5: a31aa3da85c9f2c63d1bc522ef2307d6
path: model.args
2 changes: 1 addition & 1 deletion data/model/model.params.dvc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
outs:
- md5: 863c12671bbb309dc89310464407b688
- md5: 30766ff2c5620beb6f2d0c853f04d36f
path: model.params
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest
flake8
autoflake
18 changes: 18 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# neural network model
dynet>=2.0.0
networkx<2.5,>=2.1

# preprocessing
conllu>=3.1.1

# data management
dvc>=1.6.6
paramiko>=2.7.2

# computing
psutil>=5.7.2
ray>=0.8.7

# python tools
boltons>=20.2.1
Click>=7.1.2
20 changes: 11 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
author_email='[email protected]',
packages=find_packages(exclude=['tests']),
install_requires=[
'dvc==1.6.6',
'dynet @ git+https://github.com/clab/dynet@7c533e#egg=dynet',
'networkx==2.4',
'conllu==3.1.1',
'Click==7.1.2',
'psutil==5.7.2',
'ray==0.8.7',
'boltons==20.2.1'
'dvc>=1.6.6',
'dynet>=2.0.0',
'networkx<2.5,>=2.1',
'conllu>=3.1.1',
'Click>=7.1.2',
'psutil>=5.7.2',
'ray>=0.8.7',
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gibt es einen großen Unterschied (breaking change) zwischen ray=0.* und ray 1.*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

da kennt sich @gremid besser aus

'boltons>=20.2.1'
],
extras_require={
'test': [
Expand All @@ -30,4 +30,6 @@
'console_scripts': [
'ims-nparser = imsnpars.cli:main',
],
})
},
python_requires=">=3.6"
)