Skip to content

Commit

Permalink
Merge branch 'release/1.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukostaz committed May 25, 2021
2 parents a4e7afc + a204f32 commit 97a0bb6
Show file tree
Hide file tree
Showing 66 changed files with 1,930 additions and 259 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
name: Install package
command: |
. venv/bin/activate
venv/bin/python3 -m pip install tensorflow==1.15.3
venv/bin/python3 -m pip install tensorflow==1.15.5
venv/bin/python3 -m pip install .
version: 2
Expand Down Expand Up @@ -64,6 +64,7 @@ jobs:
command: |
. venv/bin/activate
venv/bin/python3 -m pytest tests
no_output_timeout: 60m
lint:
docker:
- image: *docker-image
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ AmpliGraph includes the following submodules:
### Prerequisites

* Linux, macOS, Windows
* Python 3.7
* Python 3.7

#### Provision a Virtual Environment

Expand Down Expand Up @@ -116,7 +116,7 @@ pip install -e .
```python
>> import ampligraph
>> ampligraph.__version__
'1.3.2'
'1.4.0'
```


Expand Down
4 changes: 2 additions & 2 deletions ampligraph/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 The AmpliGraph Authors. All Rights Reserved.
# Copyright 2019-2021 The AmpliGraph Authors. All Rights Reserved.
#
# This file is Licensed under the Apache License, Version 2.0.
# A copy of the Licence is available in LICENCE, or at:
Expand All @@ -12,7 +12,7 @@
import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

__version__ = '1.3.2'
__version__ = '1.4.0'
__all__ = ['datasets', 'latent_features', 'discovery', 'evaluation', 'utils']

logging.config.fileConfig(pkg_resources.resource_filename(__name__, 'logger.conf'), disable_existing_loggers=False)
5 changes: 3 additions & 2 deletions ampligraph/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 The AmpliGraph Authors. All Rights Reserved.
# Copyright 2019-2021 The AmpliGraph Authors. All Rights Reserved.
#
# This file is Licensed under the Apache License, Version 2.0.
# A copy of the Licence is available in LICENCE, or at:
Expand All @@ -8,7 +8,7 @@
"""Helper functions to load knowledge graphs."""

from .datasets import load_from_csv, load_from_rdf, load_fb15k, load_wn18, load_fb15k_237, load_from_ntriples, \
load_yago3_10, load_wn18rr, load_wn11, load_fb13
load_yago3_10, load_wn18rr, load_wn11, load_fb13, load_onet20k, load_ppi5k, load_nl27k, load_cn15k

from .abstract_dataset_adapter import AmpligraphDatasetAdapter
from .sqlite_adapter import SQLiteAdapter
Expand All @@ -17,4 +17,5 @@

__all__ = ['load_from_csv', 'load_from_rdf', 'load_from_ntriples', 'load_wn18', 'load_fb15k',
'load_fb15k_237', 'load_yago3_10', 'load_wn18rr', 'load_wn11', 'load_fb13',
'load_onet20k', 'load_ppi5k', 'load_nl27k', 'load_cn15k',
'AmpligraphDatasetAdapter', 'NumpyDatasetAdapter', 'SQLiteAdapter', 'OneToNDatasetAdapter']
9 changes: 9 additions & 0 deletions ampligraph/datasets/abstract_dataset_adapter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2019-2021 The AmpliGraph Authors. All Rights Reserved.
#
# This file is Licensed under the Apache License, Version 2.0.
# A copy of the Licence is available in LICENCE, or at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
import abc


Expand All @@ -16,6 +23,8 @@ def __init__(self):
self.ent_to_idx = {}
# Mapped status of each dataset
self.mapped_status = {}
# link weights for focusE
self.focusE_numeric_edge_values = {}

def use_mappings(self, rel_to_idx, ent_to_idx):
"""Use an existing mapping with the datasource.
Expand Down
Loading

0 comments on commit 97a0bb6

Please sign in to comment.