Closed mhmgad closed 4 years ago
Hello @mhmgad, Note installation guide suggests minimum tf version is 1.14.0. TF version 1.4 is not supported.
Tried this on my end and it works OK: Can you please double-check on your side? Which tf version are you on?
import tensorflow as tf
print(tf.version.VERSION)
1.14.0
import ampligraph
ampligraph.__version__
'1.3.0'
import numpy as np
from ampligraph.latent_features import TransE
from ampligraph.utils import create_tensorboard_visualizations
X = np.array([['a', 'y', 'b'],
['b', 'y', 'a'],
['a', 'y', 'c'],
['c', 'y', 'a'],
['a', 'y', 'd'],
['c', 'y', 'd'],
['b', 'y', 'c'],
['f', 'y', 'e']])
model = TransE(batches_count=1, seed=555, epochs=20, k=10, loss='pairwise',
loss_params={'margin':5})
model.fit(X)
WARNING - All triples will be processed in the same batch (batches_count=1). When processing large graphs it is recommended to batch the input knowledge graph instead.
create_tensorboard_visualizations(model, 'tensorboard_files')
Thank you @lukostaz for the quick response. First 1.4 was a mistake it is 1.14
So, I found out that I have a conflict in the environment packages between conda and pip. pip was listing tensorflow 2.0 while conda showing 1.15 or 1.14. I created a clean environment and made sure that there is no tensorflow installed on the pip list and installed using conda, it works fine.
Thank you for your time, and sorry for the inconvenience.
No problem at all, glad you sorted that out.
Description
Unable to use the ampligraph 1.3 with Tensorflow 1.4 as recommended in the readme file Module model_utils imports tensorflow projector from a deprecated location
from tensorflow.contrib.tensorboard.plugins import projector
Actual Behavior
Would you issue any quick fix for this error the library is not usable? Add to that using Tensorflow 1.3 produces many warning.