Skip to content

Commit

Permalink
Merge branch 'rlhf_2' of github.com:Delaunay/milabench into rlhf_2
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Aug 21, 2024
2 parents 63e78c4 + 70df378 commit 424ea99
Show file tree
Hide file tree
Showing 20 changed files with 121 additions and 91 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ scripts/article/cuda/
scripts/article/xpu/

dependencies/
benchmarks/gflownet/gflownet
benchmarks/recursiongfn/gflownet
benchmarks/recursiongfn/logs/

scripts/inventory.yaml
output/
Expand Down
43 changes: 20 additions & 23 deletions .pin/constraints-cuda-gnn.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions .pin/constraints-cuda-torch.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions benchmarks/brax/requirements.cuda.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions benchmarks/diffusion/requirements.cuda.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions benchmarks/geo_gnn/bench/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ def register_model(fn):
def DimeNet(args, sample, **extras):
# The directional message passing neural network (DimeNet) from the “Directional Message Passing for Molecular Graphs” paper.
# DimeNet transforms messages based on the angle between them in a rotation-equivariant fashion.
batch_size, out_channels = sample.y.shape


# PCQM4Mv2Subset: Data(x=[18, 9], edge_index=[2, 40], edge_attr=[40, 3], y=3.0476751256, pos=[18, 3], smiles='Cc1ccc([C@H]2[CH]c3cnccc3[N]C2=O)cc1')
# QM9: Data(x=[5, 11], edge_index=[2, 8], edge_attr=[8, 4], y=[1, 19], pos=[5, 3], z=[5], smiles='[H]C([H])([H])[H]', name='gdb_1', idx=[1])
try:
batch_size, out_channels = sample.y.shape
except:
out_channels = 1

return NS(
category="3d",
model=_DimeNet(
Expand Down
16 changes: 10 additions & 6 deletions benchmarks/geo_gnn/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ def batch_size(x):

observer = BenchObserver(batch_size_fn=batch_size)

train_dataset = PCQM4Mv2Subset(args.num_samples, args.root)
# train_dataset = QM9(args.root)
# train_dataset = PCQM4Mv2Subset(args.num_samples, args.root)
train_dataset = QM9(args.root)

sample = train_dataset[0]
sample = next(iter(train_dataset))

info = models[args.model](args,
sample=sample,
Expand All @@ -137,8 +137,6 @@ def batch_size(x):
device = accelerator.fetch_device(0)
model = info.model.to(device)

print(model)

criterion = nn.L1Loss()

# set up optimizer
Expand All @@ -159,7 +157,13 @@ def batch_size(x):
batch = batch.to(device)

if args.use3d:
molecule_repr = model(z=batch.z, pos=batch.pos, batch=batch.batch)

if hasattr(batch, "z"):
z = batch.z
else:
z = batch.batch

molecule_repr = model(z=z, pos=batch.pos, batch=batch.batch)
else:
molecule_repr = model(x=batch.x, batch=batch.batch, edge_index=batch.edge_index, batch_size=batch_size(batch))

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/geo_gnn/requirements-pre.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=benchmarks/geo_gnn/requirements-pre.cuda.txt .pin/tmp-constraints-cuda-gnn.txt benchmarks/geo_gnn/requirements-pre.in
# pip-compile --output-file=benchmarks/geo_gnn/requirements-pre.cuda.txt .pin/tmp-constraints-cuda-geo_gnn.txt benchmarks/geo_gnn/requirements-pre.in
#
--extra-index-url https://download.pytorch.org/whl/cu121

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/geo_gnn/requirements.cuda.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benchmarks/huggingface/requirements.cuda.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benchmarks/huggingface/voirfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Config:
stop: int = 20

# Number of seconds between each gpu poll
gpu_poll: int = 3
gpu_poll: int = 1


@configurable
Expand Down
Loading

0 comments on commit 424ea99

Please sign in to comment.