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

Compatible with tensorflow v2 #381

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ${GOBIN}/protoc-gen-gogo${EXE}:

ifneq ($(OS),Windows_NT)
internal/pb/pb.pb.go: internal/pb/pb.proto ${GOBIN}/protoc-gen-gogo
PATH=${PATH}:${GOBIN} protoc --gogo_out=internal/pb --proto_path=internal/pb internal/pb/pb.proto
PATH="${PATH}":${GOBIN} protoc --gogo_out=internal/pb --proto_path=internal/pb internal/pb/pb.proto
else
internal/pb/pb.pb.go: internal/pb/pb.proto ${GOBIN}/protoc-gen-gogo.exe
export PATH="${PATH};${GOBIN}" && \
Expand Down
2 changes: 1 addition & 1 deletion python/labours/_vendor/swivel.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
import time

import numpy as np
import tensorflow as tf
import tensorflow.compat.v1 as tf
from tensorflow.python.client import device_lib

flags = tf.app.flags
Expand Down
6 changes: 4 additions & 2 deletions python/labours/modes/devs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def show_devs(
days: Dict[int, Dict[int, DevDay]],
max_people: int = 50,
) -> None:
from scipy.signal import convolve, slepian
from scipy.signal import convolve
from scipy.signal.windows import slepian

if len(people) > max_people:
print("Picking top %s developers by commit count" % max_people)
Expand Down Expand Up @@ -247,7 +248,8 @@ def show_devs_efforts(
days: Dict[int, Dict[int, DevDay]],
max_people: int,
) -> None:
from scipy.signal import convolve, slepian
from scipy.signal import convolve
from scipy.signal.windows import slepian

start_date = datetime.fromtimestamp(start_date)
start_date = datetime(start_date.year, start_date.month, start_date.day)
Expand Down
3 changes: 2 additions & 1 deletion python/labours/modes/old_vs_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def show_old_vs_new(
people: List[str],
days: Dict[int, Dict[int, DevDay]],
) -> None:
from scipy.signal import convolve, slepian
from scipy.signal import convolve
from scipy.signal.windows import slepian

start_date = datetime.fromtimestamp(start_date)
start_date = datetime(start_date.year, start_date.month, start_date.day)
Expand Down
3 changes: 2 additions & 1 deletion python/labours/modes/sentiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@


def show_sentiment_stats(args, name, resample, start_date, data):
from scipy.signal import convolve, slepian
from scipy.signal import convolve
from scipy.signal.windows import slepian

matplotlib, pyplot = import_pyplot(args.backend, args.style)

Expand Down
4 changes: 2 additions & 2 deletions python/requirements.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
matplotlib>=2.0,<4.0
numpy>=1.12.0,<2.0
pandas>=0.20.0,<1.0
pandas>=0.20.0,<2.0
PyYAML>=3.0,<6.0
scipy>=0.19.0,<1.2.2
scipy>=0.19.0,<=2.0
protobuf>=3.5.0,<4.0
munch>=2.0,<3.0
hdbscan>=0.8.0,<2.0
Expand Down