Skip to content
This repository was archived by the owner on Nov 18, 2023. It is now read-only.
Merged
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- run: sudo apt-get update
- run: pyenv install 3.6.3
- run: pyenv global 3.6.3
- run: bazel run //:deploy-pip -- test $PYPI_TEST_SERVER_USERNAME $PYPI_TEST_SERVER_PASSWORD
- run: bazel run //:deploy-pip -- pypi $PYPI_USERNAME $PYPI_PASSWORD

workflows:
version: 2
Expand Down
4 changes: 1 addition & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ deploy_pip(
package_name = "grakn-kglib",
version_file = "//:VERSION",
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
Expand Down
3 changes: 1 addition & 2 deletions examples/kgcn/animal_trade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

**Requirements:**

- Python 3.6.3 < version < 3.7 ([tensorflow doesn't yet support Python 3.7](https://github.com/tensorflow/tensorflow/issues/17022))
- kglib installed from pip: `pip install grakn-kglib`
- The requirements listed in the [KGCN quickstart](https://github.com/graknlabs/kglib/tree/master/kglib/kgcn#quickstart)
- The source code in order to access the example `git clone https://github.com/graknlabs/kglib.git`
- 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`

Expand Down
6 changes: 3 additions & 3 deletions kglib/kgcn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This project introduces a novel model: the *Knowledge Graph Convolutional Networ

**Requirements:**

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

- kglib installed from pip: `pip install --extra-index-url https://test.pypi.org/simple/ grakn-kglib`
- 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`.

### Usage

Expand Down Expand Up @@ -47,7 +47,7 @@ transaction.close()
session.close()
```

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.
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.

## Methodology

Expand Down
4 changes: 4 additions & 0 deletions kglib/kgcn/encoder/tf_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
class TensorFlowHubEncoder:

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

Expand Down