Skip to content

Zoo #4

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

Open
wants to merge 103 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
99f45f6
Adding pIC50 dataset.
miretchin Feb 5, 2022
426c234
Adding a sequential acquisition notebook and fixing a deprecation error.
miretchin Feb 6, 2022
7c16580
Experimenting with Thompson Sampling.
miretchin Feb 6, 2022
3ad34c6
Adding thompson sampling.
miretchin Feb 6, 2022
d36fb1d
Adding random and thompson sampling.
miretchin Feb 7, 2022
58d1704
Verified random now works.
miretchin Feb 7, 2022
a0472c9
Added a random player without model.
miretchin Feb 7, 2022
90f4809
Added thompson sampling policy.
miretchin Feb 7, 2022
42d20af
New data structure that has a more flexible atch and iew for use in…
miretchin Feb 11, 2022
d5a6472
Adding a little interactive playground for understanding use-cases of…
miretchin Feb 15, 2022
5f10de1
Generalized the Point object into a Molecule object.
miretchin Feb 15, 2022
2026f21
Generalizing the Molecule, adding slicing, enforcing values of same l…
miretchin Feb 16, 2022
4b104d1
Made Molecule base class less opinionated. Just accepts a dictionary …
miretchin Feb 16, 2022
22de00a
Further generalize the Molecule base class.
miretchin Feb 16, 2022
8a116ab
Fixed batch to work with new Molecule class.
miretchin Feb 17, 2022
85cb907
Removed the commented out __getitem__ that was old.
miretchin Feb 17, 2022
a0076c7
Generalized dataset to handle either a Molecule or AssayedMolecule (o…
miretchin Feb 17, 2022
1d9f867
Added tests that pass.
miretchin Feb 18, 2022
27c6449
Creating a Gpytorch playground.
miretchin Feb 19, 2022
f178385
removed some data files, added a gpytorch playground.
miretchin Feb 19, 2022
0ec6651
Created a minimal example from the GPyTorch website for exact GPs wit…
miretchin Feb 20, 2022
9b6935a
Got our DGL graph conv nets working with GPytorch for exact GPs!
miretchin Feb 20, 2022
5685de7
Merge pull request #1 from choderalab/bayesopt
miretchin Feb 22, 2022
d156ae2
Fixed datastructure and added some scripts for demonstrating pIC50 an…
miretchin Feb 22, 2022
c9cd248
Merge pull request #2 from choderalab/data
miretchin Feb 22, 2022
54ce788
Delete lipophilicity_dglgraph.bin
miretchin Feb 22, 2022
00f0fdd
Added a better collate function.
miretchin Feb 22, 2022
c9ede1d
Update trainer.py
miretchin Feb 22, 2022
e0d6a9c
Merge pull request #3 from choderalab/data
miretchin Feb 22, 2022
dbc0961
Updating the exact GP notebook for GPyTorch.
miretchin Feb 22, 2022
f85b656
Fixed the tests!
miretchin Mar 26, 2022
8f84ab7
Merge branch 'main' into gpytorch
miretchin Mar 26, 2022
8dfdade
Fixed the training loop to accommodate new inclusive API for GPyTorch…
miretchin Mar 28, 2022
6c16601
Added some scripts for comparing hardcoded vs. GPyTorch. Biggest take…
miretchin Apr 10, 2022
9d57d7d
Created gpytorch tests! Fixed the training loop, player, regressor, a…
miretchin May 8, 2022
d787948
Added more working tests.
miretchin May 8, 2022
afc7f14
Fixed a bunch of tests. Still a few that need to be fixed.
miretchin May 29, 2022
9000a67
Fixed ALL the tests! The only thing we need to investigate is the app…
miretchin May 30, 2022
e05d6db
Removed binary files.
miretchin May 30, 2022
1689891
Make is so that you can define the exact GP models without providing …
miretchin May 31, 2022
e7c8c30
delete binary
yuanqing-wang Jun 13, 2022
066eeb7
added doctests to molecule
yuanqing-wang Jun 13, 2022
7a56b45
dataset docstring
yuanqing-wang Jun 14, 2022
808b769
added doctests for dataset
yuanqing-wang Jun 14, 2022
09dc51b
delete scripts
yuanqing-wang Jun 14, 2022
14dbf8a
core function
yuanqing-wang Jun 15, 2022
99d705a
make y a special key
yuanqing-wang Jun 15, 2022
9daa8b4
simplify dataset implementation
yuanqing-wang Jun 15, 2022
9bd78cd
dataset tests passed
yuanqing-wang Jun 15, 2022
b52d13c
representation example
yuanqing-wang Jun 15, 2022
fbfe32e
get rid of hard-coded version if that's no longered needed
yuanqing-wang Jun 15, 2022
b851f36
deleted hard-code gpytorch
yuanqing-wang Jun 15, 2022
ceb224b
keep data 1d for now
yuanqing-wang Jun 15, 2022
d038a81
get rid of the hand-coded one
yuanqing-wang Jun 20, 2022
7e2723e
get rid of marginal likelihood
yuanqing-wang Jun 20, 2022
99f0674
passed tests
yuanqing-wang Jun 20, 2022
e025ac5
rename CI
yuanqing-wang Jun 21, 2022
78f2084
expand dimensions in NN regression
yuanqing-wang Jun 21, 2022
3f561a3
training script
yuanqing-wang Jun 21, 2022
1ba4725
Merge pull request #5 from choderalab/refactor
yuanqing-wang Jun 22, 2022
30e2e0e
Merge pull request #4 from choderalab/gpytorch
yuanqing-wang Jun 22, 2022
1753cf6
supervised test
yuanqing-wang Oct 5, 2022
cfad8a0
Removing reference to unexisting conda-installer in matrix.
ijpulidos Oct 5, 2022
3237750
Merge pull request #6 from choderalab/fix-ci
yuanqing-wang Oct 5, 2022
00a16bb
get rid of metrics
yuanqing-wang Oct 5, 2022
c05ccfa
Merge branch 'main' of https://github.com/choderalab/malt
yuanqing-wang Oct 5, 2022
ceb368f
get rid of rbf
yuanqing-wang Oct 5, 2022
cefcc5a
feed train_targets
yuanqing-wang Oct 7, 2022
e4ba727
refactor to hide likelihood
yuanqing-wang Oct 12, 2022
b9d4761
passing tests
yuanqing-wang Oct 12, 2022
7c5ca65
passing tests
yuanqing-wang Oct 12, 2022
2e2b9cc
clean up trainer
yuanqing-wang Oct 12, 2022
35d8946
supervised training script
yuanqing-wang Oct 12, 2022
9e24911
Merge pull request #7 from choderalab/gp_debug
yuanqing-wang Oct 12, 2022
7054da4
running scripts
yuanqing-wang Oct 13, 2022
89ec4b8
scripts
yuanqing-wang Oct 13, 2022
8ddb4de
lsf scripts
yuanqing-wang Oct 13, 2022
3aa28d0
scripts
yuanqing-wang Oct 13, 2022
4373468
Merge pull request #8 from choderalab/gp_debug
yuanqing-wang Oct 13, 2022
88e204e
scrtips
yuanqing-wang Oct 13, 2022
6dea83f
NN debug
yuanqing-wang Oct 16, 2022
c5ddead
use pip, not conda
yuanqing-wang Oct 16, 2022
eb28c86
Merge pull request #9 from choderalab/gp_debug
yuanqing-wang Oct 16, 2022
f42fb78
dist
yuanqing-wang Oct 16, 2022
c9cd045
old pep440
yuanqing-wang Oct 16, 2022
a3fd514
unsqueeze
yuanqing-wang Oct 17, 2022
d888ad5
no thompson sampling to pass tests
yuanqing-wang Oct 17, 2022
e9e2cc5
require gpytorch
yuanqing-wang Oct 17, 2022
7b97243
pytest + github actions
yuanqing-wang Oct 17, 2022
5a656d1
fix docs
yuanqing-wang Oct 17, 2022
70b6b35
no need for a random player
yuanqing-wang Oct 17, 2022
658bd48
passing tests
yuanqing-wang Oct 17, 2022
742ac29
Update DOC.yml
yuanqing-wang Oct 17, 2022
70eb450
Update setup.py
yuanqing-wang Oct 17, 2022
e3e6f66
delete devtools
yuanqing-wang Oct 17, 2022
678bdda
Update index.rst
yuanqing-wang Oct 17, 2022
c967774
Update conf.py
yuanqing-wang Oct 17, 2022
75b99b6
Update conf.py
yuanqing-wang Oct 17, 2022
63ddfe8
documentation titles
yuanqing-wang Oct 17, 2022
1e843f3
model zoo
yuanqing-wang Oct 17, 2022
89f7b8d
model zoo
yuanqing-wang Oct 17, 2022
5e6221a
fix imports
yuanqing-wang Oct 17, 2022
59883bb
requirements
yuanqing-wang Oct 18, 2022
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
Binary file modified .DS_Store
Binary file not shown.
26 changes: 11 additions & 15 deletions .github/workflows/python-package.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
name: CI

on:
push:
Expand All @@ -17,30 +17,26 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]




steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
installer-url: ${{ matrix.conda-installer }}
python-version: ${{ matrix.python-version }}
activate-environment: test
channel-priority: true
environment-file: devtools/conda-envs/malt.yaml
auto-activate-base: false
use-mamba: true
- name: Install dependencies
# - uses: conda-incubator/setup-miniconda@v2
# with:
# python-version: ${{ matrix.python-version }}
# activate-environment: test
# channel-priority: true
# environment-file: devtools/conda-envs/malt.yaml
# auto-activate-base: false
# use-mamba: true
- name: Install dependencies and package
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest versioneer
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py install
python -m pip install . --no-deps
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/sphinx.yml → .github/workflows/DOC.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Build Doc"
on:
name: "DOC"
on:
- push

jobs:
Expand All @@ -14,10 +14,8 @@ jobs:
- name: Install dependencies and compile
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest versioneer sphinx sphinx_rtd_theme
python -m pip install flake8 pytest versioneer sphinx sphinx_rtd_theme pyyaml networkx m2r2
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install rdkit-pypi
pip install -e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
python setup.py install
cd docs && make html && cd _build/html && echo 'malt.wangyq.net' > CNAME
- name: Deploy
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ dmypy.json
.pyre/

# data
.bin
*.bin

# pytorch model
.th

# mac
.DS_Store

# performance
*.csv
Binary file removed devtools/.DS_Store
Binary file not shown.
60 changes: 0 additions & 60 deletions devtools/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions devtools/conda-envs/malt.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions devtools/gh-actions/initialize_conda.sh

This file was deleted.

96 changes: 0 additions & 96 deletions devtools/scripts/create_conda_env.py

This file was deleted.

8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
sys.path.insert(0, os.path.abspath('..'))

import malt
from malt import agents, data, models, point, policy, trainer, utility_functions
from malt import data, models, molecule, trainer, policy, agents, utils

import os
os.system("bash download_experiments.sh")
# os.system("bash download_experiments.sh")

# -- Project information -----------------------------------------------------

project = 'malt'
copyright = ("2020, Yuanqing Wang @ choderalab // MSKCC.")
copyright = ("2022, Yuanqing Wang @ choderalab // MSKCC.")
author = 'Yuanqing Wang'

# The short X.Y version
Expand Down Expand Up @@ -171,7 +171,7 @@
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'malt', 'malt Documentation',
author, 'malt', 'Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm',
author, 'malt', 'Molecular Active Learning Testbed',
'Miscellaneous'),
]

Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ MALT: Molecular Active Learning Testbed

getting_started
api
experiments/index



Expand Down
Binary file removed lipophilicity_dglgraph.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions malt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from . import data, models, point, trainer, policy, agents, metrics, utils
from .point import Point
from . import data, models, molecule, trainer, policy, agents, utils
from .molecule import Molecule
from .data.dataset import Dataset
4 changes: 2 additions & 2 deletions malt/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def get_config():
cfg.VCS = "git"
cfg.style = "pep440"
cfg.tag_prefix = ""
cfg.parentdir_prefix = "pinot-"
cfg.versionfile_source = "pinot/_version.py"
cfg.parentdir_prefix = "malt-"
cfg.versionfile_source = "malt/_version.py"
cfg.verbose = False
return cfg

Expand Down
1 change: 1 addition & 0 deletions malt/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""High-level abstraction of parties in molecular discovery."""
from . import agent, assayer, merchant, player
from .agent import Agent
from .assayer import Assayer, DatasetAssayer
Expand Down
1 change: 1 addition & 0 deletions malt/agents/agent.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Base class of all agents."""
import abc

class Agent(abc.ABC):
Expand Down
16 changes: 11 additions & 5 deletions malt/agents/assayer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Agents that characterizes compounds."""
import abc
from .agent import Agent
from malt.data.dataset import Dataset
Expand Down Expand Up @@ -45,7 +46,7 @@ def __init__(self, dataset: Dataset):
super(DatasetAssayer, self).__init__()
self.dataset = dataset

def assay(self, dataset):
def assay(self, dataset, by=['y']):
""" Assay based on a given dataset.

Parameters
Expand All @@ -59,10 +60,15 @@ def assay(self, dataset):
Assayed dataset, with all `y` annotated.

"""
for point in dataset:
assert point in self.dataset
point.y = self.dataset[point].y
point.extra = self.dataset[point].extra
for molecule in dataset:

assert molecule in self.dataset

if molecule.metadata is None:
molecule.metadata = {}

for key in by:
molecule.metadata[key] = self.dataset[molecule].metadata[key]

return dataset

Expand Down
3 changes: 2 additions & 1 deletion malt/agents/merchant.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Agents that provide access to chemical spaces."""
import abc
from malt.data.dataset import Dataset
from .agent import Agent
Expand Down Expand Up @@ -43,7 +44,7 @@ class DatasetMerchant(Merchant):
>>> assert catalogue == dataset.clone().erase_annotation()
>>> dataset_with_the_first_point = Dataset([dataset[0]])
>>> dataset_merchant.merchandize(dataset_with_the_first_point)
Dataset with 1 points
Dataset with 1 molecules
>>> assert len(dataset_merchant.dataset) == len(dataset) - 1

"""
Expand Down
Loading