Skip to content

Commit

Permalink
Fix memory_profiler in dev reqs and back to pickle highest protocol b…
Browse files Browse the repository at this point in the history
…y default
  • Loading branch information
paoloq committed Mar 16, 2021
1 parent 4285404 commit 22948c3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ A `WikiGraph` can be created from command line, specifying which Wikipedia dump

```bash
spikex create-wikigraph \
--wiki <WIKI-NAME, default: en> \
--version <DUMP-VERSION, default: latest> \
--output-path <YOUR-OUTPUT-PATH> \
--dumps-path <DUMPS-BACKUP-PATH> \
<YOUR-OUTPUT-PATH> \
--wiki <WIKI-NAME, default: en> \
--version <DUMP-VERSION, default: latest> \
--dumps-path <DUMPS-BACKUP-PATH> \
```

Then it needs to be packed and installed:

```bash
spikex package-wikigraph \
--input-path <WIKIGRAPH-RAW-PATH> \
--output-path <YOUR-OUTPUT-PATH>
<WIKIGRAPH-RAW-PATH> \
<YOUR-OUTPUT-PATH>
```

Follow the instructions at the end of the packing process and install the distribution package in your virtual environment.
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ coverage
flake8
invoke
isort
memory-profiler
mock
py-spy
pytest
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cyac
ftfy
gensim
jsonschema
memory-profiler
python-igraph
regex
smart-open
Expand Down
4 changes: 2 additions & 2 deletions spikex/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ def _idx2i(_idx, start, end):
return _idx2i(idx, 0, max_i)


def pickle_dumps(data, protocol=4):
def pickle_dumps(data, protocol=None):
return srsly.pickle_dumps(data, protocol=protocol)


def pickle_dump(data, path, protocol=4, compress=None):
def pickle_dump(data, path, protocol=None, compress=None):
open = gzip.open if compress else io.open
with open(path, "wb") as fd:
fd.write(pickle_dumps(data, protocol=protocol))
Expand Down

0 comments on commit 22948c3

Please sign in to comment.