Accenture / Accenture/AmpliGraph
Continuous Training / Model tuning / Initialize with pre-trained Model
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
I want to continue/resume training a pre-trained model using new triples. We may assume that there are no new entities or relations but new instants.
What is the best way to load the pre-trained model?
Or is it possible to implement something like? where continue_training=True is a flag to skip initialization?
import numpy as np
from ampligraph.latent_features import ComplEx
model = ComplEx(batches_count=1, seed=555, epochs=20, k=10)
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.fit(X)
print(model.get_embeddings(['f','e'], embedding_type='entity'))
X2 = np.array([['a', 'y', 'b'],
['c', 'y', 'd'],
['b', 'y', 'c'],
['f', 'y', 'm'],
['f', 'y', 'n'],
['f', 'y', 'a'],
['f', 'y', 'c'],
['f', 'z', 'c']])
model.fit(X2, continue_training=True)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ComplEx.fit entry point and inspect how model initialization and entity or relation mappings are handled. Define behavior for fitting new triples with existing entities and relations, including the requested continue_training option or pre-trained model loading. Done means the chosen behavior is implemented and verified for the example workflow described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100