Skip to content

Develop #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 56 commits into from
Nov 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6518593
:construction: return alc datasets
ferzcam Feb 19, 2024
9515e29
Merge branch 'ontoem' into alc
ferzcam Jun 2, 2024
17623b7
:bookmark: ontoem
ferzcam Jul 17, 2024
9960d98
:art: ontoem: added opa2vec-ppi
ferzcam Nov 4, 2024
4796a3c
:art: opa2vec ppi_yeast
ferzcam Nov 4, 2024
adadb28
:art: opa2vec-nn ppi_yeast
ferzcam Nov 4, 2024
d3e45bc
Merge branch 'main' into ontoem
ferzcam Nov 5, 2024
0503b14
⚗️ ":art: owl2vec*-sim ppi_yeast"
ferzcam Nov 5, 2024
5058dcd
:whiteband: set logging level to INFO for jvm
ferzcam Nov 5, 2024
c180dde
⚗️ Owl2vec* with KGs
ferzcam Nov 6, 2024
370b7c8
🐛 KGE triples factory includes validation and testing entities that a…
ferzcam Nov 6, 2024
694f3f8
🩹 Fix in wandb config
ferzcam Nov 6, 2024
735d0ef
⚗️ OPA2Vec: subsumption go and foodon
ferzcam Nov 10, 2024
ac484cc
⚗️ OPA2Vec-NN go and foodon
ferzcam Nov 10, 2024
3e8a478
⚗️ OPA2Vec-NN go and foodon
ferzcam Nov 10, 2024
d758ad4
🐛 Fixed FoodOn classes lookup
ferzcam Nov 10, 2024
42c3e16
⚗️ OWL2VecStar Sim GO and FoodOn
ferzcam Nov 10, 2024
e536be5
⚗️ OWL2Vec*-KG GO and FoodOn
ferzcam Nov 11, 2024
b00f1cc
:art: box2el subsumption
ferzcam Nov 11, 2024
b21894e
:art: box2el subsumption
ferzcam Nov 11, 2024
398c94d
🔀 Resolve conflicts
ferzcam Nov 11, 2024
7e247b8
⚰️ Clean code
ferzcam Nov 11, 2024
5126867
⚗️ ELEmbeddings subsumption
ferzcam Nov 11, 2024
1e6936c
⚗️ Run EL models for GO and FoodOn
ferzcam Nov 11, 2024
4d22982
🐛 Added negative logits to EL models
ferzcam Nov 11, 2024
885be2c
⚗️ BoxEL GO and FoodOn
ferzcam Nov 11, 2024
4dc6d19
⚗️ OPA2Vec PPI Human
ferzcam Nov 11, 2024
bf48ab5
⚗️ OPA2Vec PPI human
ferzcam Nov 11, 2024
f4bffc5
⚗️ OPA2Vec-NN PPI human
ferzcam Nov 11, 2024
9c83829
⚗️ OWL2VecStar Sim PPI Human
ferzcam Nov 12, 2024
7f4e0b4
⚗️ OWL2Vec*-KG PPI Human
ferzcam Nov 12, 2024
8ccbaed
⚗️ ELEmbeddings PPI Human
ferzcam Nov 12, 2024
ebf2e24
⚗️ BoxEL and Box2EL PPI Human
ferzcam Nov 12, 2024
b3cd4ed
🎨 CatE updated with latest version (NeSy 2024) (#59)
ferzcam Nov 13, 2024
c1d6f3e
⚗️ CatE GO
ferzcam Nov 13, 2024
5f5257e
⚗️ CatE PPI Yeast and Human
ferzcam Nov 13, 2024
9c808ae
🧐 Updatea PPI dataset creation scripts
ferzcam Nov 13, 2024
964ab3c
:fire:
ferzcam Nov 13, 2024
c5279f9
🔧 Updated Python version support, Changelog, Readme...
ferzcam Nov 13, 2024
c1743e2
🔀 Fix merge conflicts between ontoem and develop
ferzcam Nov 13, 2024
cf60497
🩹 Minor changes
ferzcam Nov 14, 2024
11f2863
🔀 Revolve merging conflicts: ontoem --> develop
ferzcam Nov 14, 2024
a5b27a5
🐛 Fix multiple bindings to slf4j java logging library
ferzcam Nov 14, 2024
8622a99
✅ Updated tests for CatE (#59)
ferzcam Nov 18, 2024
71ff459
♻️ Improved evaluation module. Added several evaluators.
ferzcam Nov 18, 2024
2d06da0
🎨 Updated ALC dataset tests. (:construction: #71)
ferzcam Nov 18, 2024
a52a3b8
🎨 Minor update to dataset module
ferzcam Nov 18, 2024
0fdc06f
🔧 Updated README, setup.py, docs, etc...
ferzcam Nov 18, 2024
cf098df
🌱 Added missing file
ferzcam Nov 18, 2024
2b89c34
💚 Fixed Github actions scripts
ferzcam Nov 18, 2024
fda4505
Merge branch 'main' into develop
ferzcam Nov 18, 2024
f3b0a4c
⬆️ Updated scipy dependencies
ferzcam Nov 18, 2024
3b21dc3
:fire:
ferzcam Nov 18, 2024
0497b7e
🔧 Updated setup.cfg
ferzcam Nov 18, 2024
d3e2c8c
🔧 Dependencies gensim, scipy and numpy moved to pip instead of conda
ferzcam Nov 18, 2024
6e32dc5
🐛 Updated server url for datasets
ferzcam Nov 18, 2024
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
Prev Previous commit
Next Next commit
⚗️ ELEmbeddings subsumption
  • Loading branch information
ferzcam committed Nov 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 51268673d7fc92cf2c45127101281ed26702c4bb
18 changes: 6 additions & 12 deletions experiments/elembeddings/subsumption.py
Original file line number Diff line number Diff line change
@@ -62,17 +62,14 @@ def main(dataset_name, embed_dim, batch_size, module_margin,
wandb_logger.log({"dataset_name": dataset_name,
"embed_dim": embed_dim,
"module_margin": module_margin,
"loss_margin": loss_margin,
"learning_rate": learning_rate
})
else:
dataset_name = wandb.config.dataset_name
embed_dim = wandb.config.embed_dim
module_margin = wandb.config.module_margin
loss_margin = wandb.config.loss_margin
learning_rate = wandb.config.learning_rate



root_dir, dataset = dataset_resolver(dataset_name)

model_dir = f"{root_dir}/../models/"
@@ -137,10 +134,7 @@ def __init__(self, evaluator_name, dataset, batch_size, embed_dim,
self.wandb_logger = wandb_logger


def tbox_forward(self, *args, **kwargs):
return self.module(*args, **kwargs)



def train(self):

dls = {gci_name: DataLoader(ds, batch_size=self.batch_size, shuffle=True)
@@ -174,22 +168,22 @@ def train(self):
for batch_data in main_dl:

batch_data = batch_data.to(self.device)
pos_logits = self.tbox_forward(batch_data, "gci0")
pos_logits = self.module(batch_data, "gci0")
neg_idxs = th.randint(0, num_classes, (len(batch_data),), device=self.device)
neg_batch = th.cat([batch_data[:, :1], neg_idxs.unsqueeze(1)], dim=1)
neg_logits = self.tbox_forward(neg_batch, "gci0")
neg_logits = self.module(neg_batch, "gci0")
loss = - F.logsigmoid(-pos_logits + neg_logits - self.loss_margin).mean() * dls_weights["gci0"]

for gci_name, gci_dl in dls.items():
if gci_name == "gci0":
continue

batch_data = next(gci_dl).to(self.device)
pos_logits = self.tbox_forward(batch_data, gci_name)
pos_logits = self.module(batch_data, gci_name)
neg_idxs = th.randint(0, num_classes, (len(batch_data),), device=self.device)
neg_batch = th.cat([batch_data[:, :2], neg_idxs.unsqueeze(1)], dim=1)

neg_logits = self.tbox_forward(neg_batch, gci_name)
neg_logits = self.module(neg_batch, gci_name)
loss += - F.logsigmoid(-pos_logits + neg_logits - self.loss_margin).mean() * dls_weights[gci_name]