Skip to content
This repository was archived by the owner on Nov 18, 2023. It is now read-only.

Commit 995772f

Browse files
authored
Build corrections (#45)
- Corrects applicable Python versions for PyPi deployment - Corrects installation instructions, and makes the `animaltrade` example requirements reference the general KGCN requirements - Fixes the broken link to the `animaltrade` example in the KGCN README - Prints warnings at runtime to warn the user that the TensorFlow Hub module used may take some time to download, so that they know the process hasn't hung Addresses #37 #38
1 parent 43daa3c commit 995772f

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- run: sudo apt-get update
7272
- run: pyenv install 3.6.3
7373
- run: pyenv global 3.6.3
74-
- run: bazel run //:deploy-pip -- test $PYPI_TEST_SERVER_USERNAME $PYPI_TEST_SERVER_PASSWORD
74+
- run: bazel run //:deploy-pip -- pypi $PYPI_USERNAME $PYPI_PASSWORD
7575

7676
workflows:
7777
version: 2

BUILD

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ deploy_pip(
1111
package_name = "grakn-kglib",
1212
version_file = "//:VERSION",
1313
classifiers = [
14-
"Programming Language :: Python",
14+
"Programming Language :: Python :: 3",
1515
"Programming Language :: Python :: 3.6",
16-
"Programming Language :: Python :: 3.7",
17-
"Programming Language :: Python :: 3.8",
1816
"License :: OSI Approved :: Apache Software License",
1917
"Operating System :: OS Independent",
2018
"Intended Audience :: Developers",

examples/kgcn/animal_trade/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
**Requirements:**
66

7-
- Python 3.6.3 < version < 3.7 ([tensorflow doesn't yet support Python 3.7](https://github.com/tensorflow/tensorflow/issues/17022))
8-
- kglib installed from pip: `pip install grakn-kglib`
7+
- The requirements listed in the [KGCN quickstart](https://github.com/graknlabs/kglib/tree/master/kglib/kgcn#quickstart)
98
- The source code in order to access the example `git clone https://github.com/graknlabs/kglib.git`
109
- The `grakn-animaltrade.zip` dataset from the [latest release](https://github.com/graknlabs/kglib/releases/latest). This is a dataset that has been pre-loaded into Grakn v1.5 (so you don't have to run the data import yourself), with two keyspaces: `animaltrade_train` and `animaltrade_test`
1110

kglib/kgcn/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This project introduces a novel model: the *Knowledge Graph Convolutional Networ
66

77
**Requirements:**
88

9-
- Python 3.6.3 < version < 3.7 ([tensorflow doesn't yet support Python 3.7](https://github.com/tensorflow/tensorflow/issues/17022))
9+
- Python 3.6.3 <= version < 3.7 ([tensorflow doesn't yet support Python 3.7](https://github.com/tensorflow/tensorflow/issues/17022))
1010

11-
- kglib installed from pip: `pip install --extra-index-url https://test.pypi.org/simple/ grakn-kglib`
11+
- kglib installed from pip: `pip install grakn-kglib`. Ensure that `pip` use the Python version listed above. Find out using 'pip --version'. By default `pip` may use Python 2, in which case you may need either `pip3`, or to create an isolated environment using `pipenv`/`virtualenv`, or change your global Python with `pyenv`.
1212

1313
### Usage
1414

@@ -47,7 +47,7 @@ transaction.close()
4747
session.close()
4848
```
4949

50-
There is also a [full example](https://github.com/graknlabs/kglib/examples/kgcn/animal_trade) which outlines retrieving sample concepts with labels and working with separate keyspaces for training and testing.
50+
There is also a [full example](https://github.com/graknlabs/kglib/tree/master/examples/kgcn/animal_trade) which outlines retrieving sample concepts with labels and working with separate keyspaces for training and testing.
5151

5252
## Methodology
5353

kglib/kgcn/encoder/tf_hub.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
class TensorFlowHubEncoder:
2525

2626
def __init__(self, module_url, output_feature_length, name='tf_hub_encoder'):
27+
print(f'Initialising TensorFlow Hub Encoder op\n'
28+
f'This may take a long time on its first run, as a pre-trained network module ({module_url}) needs to be '
29+
f'downloaded...')
2730
self._embed = hub.Module(module_url)
31+
print('...Encoder op initialised')
2832
self._name = name
2933
self._output_feature_length = output_feature_length
3034

0 commit comments

Comments
 (0)