Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2073 commits
Select commit Hold shift + click to select a range
55e769d
Apply suggestions from code review
hwpang Apr 12, 2024
22a458b
add todo issue template
kevingreenman Apr 12, 2024
1837388
separate v1 and v2 issues
kevingreenman Apr 12, 2024
ec55383
Merge pull request #734 from hwpang/v2/hyperparam_opt
KnathanM Apr 12, 2024
3ccff1d
Apply suggestions from code review
shihchengli Apr 12, 2024
9347784
remove pickle file as a fingerprint output format
shihchengli Apr 12, 2024
479cd2f
Merge branch 'v2/dev' into v2/feat/index-file
KnathanM Apr 12, 2024
fa452db
update docstring
shihchengli Apr 12, 2024
a5033b3
check `input_scalers` once
shihchengli Apr 12, 2024
6761e60
Merge branch 'v2/dev' into v2_fingerprint
shihchengli Apr 12, 2024
c56f487
Update environment.yml
donerancl Apr 12, 2024
d4e5a9e
check `input_scalers` once
shihchengli Apr 12, 2024
4875b11
Attempt TensorTransform and GraphTransform
hwpang Apr 12, 2024
4ebe942
update tests
shihchengli Apr 12, 2024
4ae62bd
Merge branch 'v2/dev' into v2/output-scaling
hwpang Apr 12, 2024
854c1db
V2: read training arguments through config file (#775)
hwpang Apr 12, 2024
27a21eb
Merge branch 'v2/dev' into v2/dev
donerancl Apr 12, 2024
1445265
Fix typo
hwpang Apr 12, 2024
d69602e
Change to use graphtransform and tensor transform
hwpang Apr 12, 2024
c2a124a
Merge branch 'v2/dev' into v2/output-scaling
hwpang Apr 12, 2024
d28ffa9
Formatting
hwpang Apr 12, 2024
db06b9f
No need for extra normalization
hwpang Apr 12, 2024
9a9014c
Merge branch 'v2/dev' into v2_fingerprint
shihchengli Apr 12, 2024
4baa1cc
toml isn't actually needed
hwpang Apr 12, 2024
22e72e1
Dont' track config.toml (generated by running chemprop tests)
hwpang Apr 12, 2024
25df16a
fix hpopt data creation
KnathanM Apr 12, 2024
c7015be
Merge branch 'v2/dev' into v2/feat/index-file
KnathanM Apr 12, 2024
442cfc1
add version numbers
donerancl Apr 12, 2024
833bb39
add more version numbers
donerancl Apr 12, 2024
afab6aa
fix rev_edge_indexes
KnathanM Apr 12, 2024
6142ce3
better names and also works for no edges based on #778
KnathanM Apr 12, 2024
ef386ec
fix merge artifact
KnathanM Apr 12, 2024
6290268
Update --save-preds to save metric value to log and tidy up naming.
am2145 Apr 12, 2024
048ab2c
Merge pull request #737 from KnathanM/v2/feat/index-file
KnathanM Apr 12, 2024
8661aeb
Merge branch 'v2/dev' into v2/full_test_metrics
am2145 Apr 12, 2024
bf91549
Format with black (I'll remember once I promise).
am2145 Apr 12, 2024
29f1fd9
remove repr mixin (#758)
KnathanM Apr 12, 2024
4985e44
Merge branch 'v2/dev' into v2/fix/rev_edge_indexes
KnathanM Apr 12, 2024
7318f1f
Merge branch 'v2/dev' into v2/full_test_metrics
am2145 Apr 13, 2024
eacf861
Modify test_metrics saving to work for Multicomponent case
am2145 Apr 13, 2024
a51f9b7
Merge pull request #786 from KnathanM/v2/fix/rev_edge_indexes
kevingreenman Apr 13, 2024
effb1df
Merge branch 'v2/dev' into v2/full_test_metrics
KnathanM Apr 13, 2024
a766699
Improve formatting of metric logging.
am2145 Apr 13, 2024
a897833
Fix bug with getting data from multicomponent case.
am2145 Apr 13, 2024
f3eb542
Merge branch 'v2/dev' into remove_outdated_toml
KnathanM Apr 13, 2024
93796a3
Merge branch 'v2/dev' into v2_fingerprint
shihchengli Apr 13, 2024
c92c1ad
Merge pull request #787 from hwpang/remove_outdated_toml
KnathanM Apr 13, 2024
9b6bd56
Delete chemprop_training/mol directory
am2145 Apr 13, 2024
e8eb3bf
Merge branch 'v2/dev' into v2/full_test_metrics
am2145 Apr 13, 2024
7f92ee7
Fix setting of lt and gt mask in save_preds.
am2145 Apr 13, 2024
eadef89
Both requested functions are not available anymore
hwpang Apr 13, 2024
b70e6a7
Add needed task for some metrics
hwpang Apr 13, 2024
006d504
Test all available metrics for classification
hwpang Apr 13, 2024
b457cc6
Merge branch 'v2/dev' into v2_fingerprint
shihchengli Apr 14, 2024
8882db9
Should be hidden dim, not hidden size
hwpang Apr 14, 2024
02e9c1f
Should be 4 as the upper bound is exclusive
hwpang Apr 14, 2024
70667f1
Should be quniform
hwpang Apr 14, 2024
b66c9ed
add a CI test using the conda environment
JacksonBurns Apr 15, 2024
1d439b6
add missing dependency
JacksonBurns Apr 15, 2024
8decffb
Use correct argument name and add an assertion
hwpang Apr 15, 2024
eb8aa5c
Make grace period and reduction factor accessible from cli
hwpang Apr 15, 2024
1262a5a
Should be message_hidden_dim
hwpang Apr 15, 2024
5b69afa
Formatting
hwpang Apr 15, 2024
b6018d1
typo
hwpang Apr 15, 2024
f54c492
correct argument name
hwpang Apr 15, 2024
b955f96
formatting
hwpang Apr 15, 2024
7f30243
Update chemprop/cli/hpopt.py
hwpang Apr 15, 2024
00d8b44
Add early stopping and sort imports
hwpang Apr 15, 2024
86c4165
Formatting
hwpang Apr 15, 2024
d08fa32
fix merge artifact
KnathanM Apr 15, 2024
555e299
Merge pull request #797 from chemprop/training-notebook-merge-artifact
KnathanM Apr 16, 2024
2a59e05
Merge branch 'v2/dev' into v2/fix_hpo
hwpang Apr 16, 2024
a447949
Change grace period to 10
hwpang Apr 16, 2024
ec0448d
Merge branch 'v2/fix_hpo' of https://github.com/hwpang/chemprop into …
hwpang Apr 16, 2024
3421d40
Merge branch 'v2/dev' into v2/fix_prc
hwpang Apr 16, 2024
99ba241
Add TaskMixin
hwpang Apr 16, 2024
e67efff
Merge branch 'v2/fix_prc' of https://github.com/hwpang/chemprop into …
hwpang Apr 16, 2024
80f43b0
Formatting
hwpang Apr 16, 2024
e7f9a3f
Sequence of inherency matters
hwpang Apr 16, 2024
ace1cdb
Formatting
hwpang Apr 16, 2024
9b7298e
Don't track config.toml generated from test
hwpang Apr 16, 2024
fde5d1f
Can't get mixin to inherent correctly. Use init instead.
hwpang Apr 16, 2024
29ca0f7
fix astartes and try removing torch audio and vision
kevingreenman Apr 16, 2024
ce4f6f0
Fix format
hwpang Apr 16, 2024
a4ee57b
Apply suggestions from code review
shihchengli Apr 16, 2024
a8b0b6c
Merge branch 'v2/dev' into v2/dev
kevingreenman Apr 16, 2024
731c391
Use either of the smaller
hwpang Apr 16, 2024
586dab9
Merge branch 'v2/dev' into v2/full_test_metrics
am2145 Apr 16, 2024
312f4d6
update code format
shihchengli Apr 16, 2024
7382172
cahnge the default value of `--ffn-block-index` to `-1`
shihchengli Apr 16, 2024
f9dd191
update docstring
shihchengli Apr 16, 2024
73f380b
Merge branch 'v2/dev' into v2_fingerprint
shihchengli Apr 16, 2024
6474cd3
Remove artifects
hwpang Apr 16, 2024
d216e1a
Apply suggestions from code review
shihchengli Apr 16, 2024
89f0f97
Add option of deterministic training (#789)
am2145 Apr 16, 2024
8cecbeb
Merge branch 'v2/dev' into v2/dev
kevingreenman Apr 16, 2024
7ffb832
Merge branch 'v2/dev' into v2/fix_hpo
hwpang Apr 16, 2024
338c287
Merge branch 'v2/dev' into v2/fix_prc
hwpang Apr 16, 2024
bc7ac9e
Merge branch 'v2/dev' into v2_fingerprint
shihchengli Apr 16, 2024
fd5f15e
add task weights to state dict in conversion
KnathanM Apr 16, 2024
c98b79b
Merge pull request #765 from donerancl/v2/dev
kevingreenman Apr 16, 2024
82319f1
Merge branch 'v2/dev' into v2_fingerprint
shihchengli Apr 16, 2024
cee37ee
fix get_column_names()
shihchengli Apr 14, 2024
f128115
Merge branch 'v2/dev' into v2/fix_hpo
hwpang Apr 16, 2024
c3b68df
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 16, 2024
c77995b
Change to quniform
hwpang Apr 16, 2024
537b058
Merge branch 'v2/fix_hpo' of https://github.com/hwpang/chemprop into …
hwpang Apr 16, 2024
1c557a1
Better initialization for transform
hwpang Apr 16, 2024
ce6ff49
Move argument order
hwpang Apr 16, 2024
19873ea
Add missing task type and update data path
hwpang Apr 16, 2024
48d47d7
update models
hwpang Apr 16, 2024
f4ddc66
Merge pull request #769 from shihchengli/v2_fingerprint
KnathanM Apr 16, 2024
fea3ec3
Merge branch 'v2/dev' into v2/output-scaling
hwpang Apr 16, 2024
893cd82
Add black version back
hwpang Apr 16, 2024
2596d61
Merge branch 'v2/dev' into fix_get_column_names
KnathanM Apr 16, 2024
12be9fd
Merge branch 'v2/dev' into v2/fix_hpo
hwpang Apr 16, 2024
718b410
Merge pull request #795 from shihchengli/fix_get_column_names
KnathanM Apr 16, 2024
fdd4118
put loc and scale are in checkpoint
KnathanM Apr 16, 2024
704958d
apply code review
KnathanM Apr 16, 2024
f0c6fb6
format
KnathanM Apr 16, 2024
71e4f76
Merge branch 'v2/dev' into v2/fix_hpo
hwpang Apr 16, 2024
faab5f0
add task_weights to multiclass
KnathanM Apr 17, 2024
507b67c
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 17, 2024
f61e05e
clean up column names
KnathanM Apr 17, 2024
94514eb
add test for split column save preds
KnathanM Apr 17, 2024
92e1aa2
Use scaled version of the data
hwpang Apr 17, 2024
a408881
Apply suggestions from code review
hwpang Apr 17, 2024
1fb0dee
Merge branch 'v2/dev' into v2/output-scaling
hwpang Apr 17, 2024
b7cc444
Turn GraphTransform into composed of two ScaleTransform, and add padd…
hwpang Apr 17, 2024
a7c9752
Add class method decoration
hwpang Apr 17, 2024
1d4c1e3
Merge pull request #803 from hwpang/v2/fix_rxn_scaling
am2145 Apr 17, 2024
c7c0fb0
Adapt rest of code to new class name and structure
hwpang Apr 17, 2024
1839464
Adapt review comments
hwpang Apr 17, 2024
a34e8bd
Merge branch 'v2/dev' into v2/output-scaling
hwpang Apr 17, 2024
224414a
Improve implementation
hwpang Apr 17, 2024
d0722c4
Rename classes
hwpang Apr 17, 2024
6409948
Initialize as nn.Identity()
hwpang Apr 17, 2024
20622cd
Apply suggestions from code review
hwpang Apr 17, 2024
6ea0a1f
Move graph transform into MessagePassing
hwpang Apr 17, 2024
d3d8ca3
Adapt to CLI
hwpang Apr 17, 2024
e0fbd05
Move graph_transform to _MessagePassingBase
hwpang Apr 17, 2024
8ca8adb
Remove unused imports, remove unneeded arguments, update model files
hwpang Apr 17, 2024
438c1b8
Put input transform at the right place
hwpang Apr 17, 2024
378127f
Sort imports
hwpang Apr 17, 2024
403a100
Update fingerprinting
hwpang Apr 17, 2024
c34f906
Get number of components correctly and add padding
hwpang Apr 17, 2024
f4b7746
Actually update extra atom fdim and extra bond fdim
hwpang Apr 17, 2024
041c240
Add padding
hwpang Apr 17, 2024
6cb2004
Formatting
hwpang Apr 17, 2024
1d1ac22
New model files
hwpang Apr 17, 2024
2c6d467
ignore nn modules
hwpang Apr 17, 2024
9e52493
Apply suggestions from code review
hwpang Apr 17, 2024
06f7a3e
update model files
hwpang Apr 17, 2024
ed1b847
update hpopt
hwpang Apr 17, 2024
7fd8604
Merge branch 'v2/output-scaling' of https://github.com/hwpang/chempro…
hwpang Apr 17, 2024
b7e8806
Fix error message
hwpang Apr 17, 2024
0d5395a
String formatting for numpy array + formatting
hwpang Apr 17, 2024
c30d7ba
formatting
hwpang Apr 17, 2024
828a187
Add output scaler and input transforms for hpopt
hwpang Apr 17, 2024
b33e2fe
Fix hpopt
hwpang Apr 17, 2024
d15a24e
Merge branch 'v2/dev' into v2/fix_prc
hwpang Apr 17, 2024
277e03c
Merge branch 'v2/dev' into v2/fix_hpo
hwpang Apr 17, 2024
15b083c
formatting
hwpang Apr 17, 2024
106aa10
update converter
hwpang Apr 17, 2024
9b2505c
formatting
hwpang Apr 17, 2024
bbc8d29
Update notebooks
hwpang Apr 18, 2024
39b595a
Merge pull request #796 from hwpang/v2/fix_hpo
KnathanM Apr 18, 2024
6c240d1
Merge branch 'v2/dev' into v2/full_test_metrics
am2145 Apr 18, 2024
5754406
Merge branch 'v2/dev' into v2/column-names
KnathanM Apr 18, 2024
7c24ae8
change default to use trainer.predict and always save preds.
am2145 Apr 18, 2024
0357228
Fix black formatting.
am2145 Apr 18, 2024
2a2c84b
Merge branch 'v2/dev' into v2/issue-templates
KnathanM Apr 18, 2024
a25d115
Merge pull request #784 from kevingreenman/v2/issue-templates
kevingreenman Apr 18, 2024
796e3f6
shorten code
KnathanM Apr 18, 2024
327d9b2
Merge branch 'v2/dev' into v2/column-names
KnathanM Apr 18, 2024
af7c9d6
Merge pull request #802 from KnathanM/v2/column-names
shihchengli Apr 18, 2024
2b9c4b3
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 18, 2024
76aac0b
Handle saving preds for multiclass and update tests.
am2145 Apr 18, 2024
32737b1
Merge branch 'v2/dev' into v2/full_test_metrics
am2145 Apr 18, 2024
dbe8fe2
Fix formatting and style changes
am2145 Apr 19, 2024
b3289dd
generate dataloader for each trial
shihchengli Apr 19, 2024
07189e4
Remove stray --save-preds from test.
am2145 Apr 19, 2024
6f58be2
pass kwargs through to DataLoader
KnathanM Apr 18, 2024
56e8add
update test
shihchengli Apr 19, 2024
18ed172
make `MolGraphDataLoader` as a function to return `DataLoader`
shihchengli Apr 19, 2024
1129a60
replace the `MolGraphDataLoader` class with a `build_dataloader` help…
shihchengli Apr 19, 2024
943fc5c
code formatting
shihchengli Apr 19, 2024
096647b
Merge pull request #788 from am2145/v2/full_test_metrics
KnathanM Apr 19, 2024
e4c3bf0
Merge branch 'v2/dev' into fix_hpopt_dataloader
hwpang Apr 19, 2024
92188f8
Remove artifects
hwpang Apr 19, 2024
93962f9
Apply suggestions from code review
hwpang Apr 19, 2024
c547bfe
Merge pull request #813 from shihchengli/fix_hpopt_dataloader
hwpang Apr 19, 2024
3f893f3
Merge branch 'v2/dev' into v2/fix-pred-batch
shihchengli Apr 19, 2024
f8104dc
solve merge conflict
shihchengli Apr 19, 2024
4bba677
Merge pull request #808 from KnathanM/v2/fix-pred-batch
KnathanM Apr 19, 2024
7825dbd
fix dataloader batch size
KnathanM Apr 19, 2024
eeb5fe0
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 19, 2024
cc98056
fix accidental changes
KnathanM Apr 19, 2024
cd3170b
Merge pull request #816 from KnathanM/v2/change-batch-size
KnathanM Apr 19, 2024
28843f0
Make output transform in main
hwpang Apr 19, 2024
74009e4
add threshold to predictors for building criterion that need it
KnathanM Apr 19, 2024
ea903bf
add repr for task_weights
KnathanM Apr 19, 2024
b3e25b4
Chagne AUPRC to binary
KnathanM Apr 19, 2024
e0bbc57
missed file for binary AUPRC
KnathanM Apr 19, 2024
b1b301a
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 19, 2024
f1bb6b4
Merge branch 'v2/dev' into v2/output-scaling
hwpang Apr 19, 2024
eca3d7f
Fix artifect & formatting
hwpang Apr 19, 2024
0b60ee9
Make output transform in hpopt
hwpang Apr 19, 2024
caabb4f
Formatting
hwpang Apr 19, 2024
3f5f3a5
No more MolGraphDataLoader
hwpang Apr 19, 2024
0c09408
Fix TypeError: Can't instantiate abstract class RegressionFFN with ab…
hwpang Apr 19, 2024
9c51462
Formatting
hwpang Apr 19, 2024
a1dc04c
Merge pull request #726 from hwpang/v2/output-scaling
KnathanM Apr 19, 2024
4abb13e
get build_dataloader from data module
KnathanM Apr 19, 2024
cdefec7
match output_transform creation in hpopt with train
KnathanM Apr 19, 2024
662fd7a
missed some
KnathanM Apr 19, 2024
b9f8f13
Merge branch 'v2/dev' into v2/fix_prc
hwpang Apr 19, 2024
9947750
Use auc from torchmetrics for consistency
hwpang Apr 19, 2024
8ac4bfc
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 19, 2024
8084f14
Remove redundancy
hwpang Apr 19, 2024
6611dae
Rename for clarity
hwpang Apr 19, 2024
dbfc28b
Don't past in last model so that we get predictions from best model
hwpang Apr 19, 2024
6e85e9e
normalize_targets always returns a scaler
KnathanM Apr 19, 2024
bf67a97
Also save a model file version of the best model
hwpang Apr 19, 2024
5635c1b
Change documentation, scripts, and tests to use the best.pt model file
hwpang Apr 19, 2024
95b365b
Merge remote-tracking branch 'origin/v2/move_task_weights' into v2/mo…
KnathanM Apr 19, 2024
b92cacd
fix merge artifacts
KnathanM Apr 19, 2024
0d71d82
Update chemprop/cli/train.py
hwpang Apr 19, 2024
2448a3d
rename default to show it is a class
KnathanM Apr 19, 2024
07f14a0
regenerate model files
KnathanM Apr 19, 2024
7fa1ab8
Merge pull request #790 from hwpang/v2/fix_prc
KnathanM Apr 19, 2024
f91e8aa
Merge branch 'v2/dev' into v2/couple-fixes
KnathanM Apr 19, 2024
6f1e75f
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 19, 2024
729d89a
Merge pull request #818 from KnathanM/v2/couple-fixes
hwpang Apr 19, 2024
4add8de
change two more metrics to binary
KnathanM Apr 19, 2024
07a61b2
Merge branch 'v2/dev' into v2/move_task_weights
KnathanM Apr 19, 2024
f4cd5b4
Apply suggestions from code review
hwpang Apr 19, 2024
bc3932f
missed a file
KnathanM Apr 19, 2024
f8b5784
lint
KnathanM Apr 19, 2024
1cd13eb
Merge pull request #779 from KnathanM/v2/move_task_weights
am2145 Apr 20, 2024
c5ee1af
Change last.ckpt to best*.ckpt
hwpang Apr 20, 2024
b4bebe9
Add keyword arg
hwpang Apr 20, 2024
ef09649
Merge branch 'v2/dev' into v2/best_vs_last
hwpang Apr 20, 2024
310d6f1
Merge pull request #819 from hwpang/v2/best_vs_last
shihchengli Apr 20, 2024
3467fa5
add default task weights
KnathanM Apr 21, 2024
9ba0e2e
Not unscaling the predictions on the validation set (#822)
shihchengli Apr 22, 2024
643098a
change task weight default to 1.0 from None
KnathanM Apr 22, 2024
3258986
Merge branch 'v2/dev' into v2/default-task-weights
KnathanM Apr 22, 2024
a0942aa
Apply suggestions from code review
KnathanM Apr 22, 2024
380edda
clean up Metric docstring
KnathanM Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 2 additions & 4 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[bumpversion]
current_version = 1.5.1
current_version = 2.0.0b1
commit = True
tag = True

[bumpversion:file:setup.cfg]

[bumpversion:file:setup.py]
[bumpversion:file:pyproject.toml]

[bumpversion:file:chemprop/__init__.py]

Expand Down
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[flake8]
ignore = E203, E266, E501, F403, E741, W503, W605
max-line-length = 100
max-complexity = 18
per-file-ignores =
__init__.py: F401
chemprop/nn/predictors.py: F405
chemprop/nn/metrics.py: F405
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: to-do
about: Add an item to the to-do list. More generic than a feature request
title: "[TODO]: "
labels: todo
assignees: ''

---

**Notes**
_these could be implementation or more specific details to keep in mind, if they'll be helpful for issue tracking_
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/v1_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: v1 Bug Report
about: Report a bug in v1 (will not be fixed)
title: "[v1 BUG]: "
labels: bug, v1-wontfix
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Example(s)**
Provide some examples of where the current code fails. Feel free to share your actual code for additional context, but a minimal and isolated example is preferred.

**Expected behavior**
A clear and concise description of what you expected to happen. If there is correct, expected output, include that here as well.

**Error Stack Trace**
If the bug is resulting in an error message, provide the _full_ stack trace (not just the last line). This is helpful for debugging, especially in cases where you aren't able to provide a minimum/isolated working example with accompanying files.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment**
- python version
- package versions: `conda list` or `pip list`
- OS

**Checklist**
- [ ] all dependencies are satisifed: `conda list` or `pip list` shows the packages listed in the `pyproject.toml`
- [ ] the unit tests are working: `pytest -v` reports no errors

**Additional context**
Add any other context about the problem here.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Question
about: Have a question about how to use Chemprop?
title: "[QUESTION]: "
name: v1 Question
about: Have a question about how to use Chemprop v1?
title: "[v1 QUESTION]: "
labels: question
assignees: ''

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug report
name: v2 Bug Report
about: Create a report to help us improve
title: "[BUG]: "
title: "[v2 BUG]: "
labels: bug
assignees: ''

Expand All @@ -16,6 +16,9 @@ Provide some examples of where the current code fails. Feel free to share your a
**Expected behavior**
A clear and concise description of what you expected to happen. If there is correct, expected output, include that here as well.

**Error Stack Trace**
If the bug is resulting in an error message, provide the _full_ stack trace (not just the last line). This is helpful for debugging, especially in cases where you aren't able to provide a minimum/isolated working example with accompanying files.

**Screenshots**
If applicable, add screenshots to help explain your problem.

Expand All @@ -25,7 +28,7 @@ If applicable, add screenshots to help explain your problem.
- OS

**Checklist**
- [ ] all dependencies are satisifed: `conda list` shows the packages listed in the `README`
- [ ] all dependencies are satisifed: `conda list` or `pip list` shows the packages listed in the `pyproject.toml`
- [ ] the unit tests are working: `pytest -v` reports no errors

**Additional context**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature request
name: v2 Feature Request
about: Suggest an idea for this project
title: "[FEATURE]: "
title: "[v2 FEATURE]: "
labels: enhancement
assignees: ''

Expand Down
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/v2_question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: v2 Question
about: Have a question about how to use Chemprop v2?
title: "[v2 QUESTION]: "
labels: question
assignees: ''

---

**What are you trying to do?**
Please tell us what you're trying to do with Chemprop, providing as much detail as possible

**Previous attempts**
If possible, provide some examples of what you've already tried and what the output was.

**Screenshots**
If applicable, add screenshots to help explain your problem.
156 changes: 156 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# ci.yml
#
# Continuous Integration for Chemprop - checks build, code formatting, and runs tests for all
# proposed changes and on a regular schedule
#
# Note: this file contains extensive inline documentation to aid with knowledge transfer.

name: Continuous Integration

on:
# run on pushes/pull requests to/against main or v2/dev
push:
branches: [main]
pull_request:
branches: [main, v2/dev]
# run this in the morning on weekdays to catch dependency issues
schedule:
- cron: "0 8 * * 1-5"
# allow manual runs
workflow_dispatch:

# cancel previously running tests if new commits are made
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
concurrency:
group: actions-id-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Check Build
runs-on: ubuntu-latest
steps:
# clone the repo, attempt to build
- uses: actions/checkout@v4
- run: python -m pip install build
- run: python -m build .

lint:
name: Check Formatting
needs: build
runs-on: ubuntu-latest
steps:
# clone the repo, run black and flake8 on it
- uses: actions/checkout@v4
- run: python -m pip install black==23.* flake8
- run: black --check .
- run: flake8 .

test:
name: Execute Tests
needs: lint
runs-on: ${{ matrix.os }}
defaults:
run:
# run with a login shell (so that the conda environment is activated)
# and echo the commands we run as we do them (for debugging purposes)
shell: bash -el {0}
strategy:
# if one platform/python version fails, continue testing the others
fail-fast: false
matrix:
# test on all platforms with both supported versions of Python
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.11, 3.12]
steps:
- uses: actions/checkout@v4
# use a version of the conda virtual environment manager to set up an
# isolated environment with the Python version we want
- uses: mamba-org/setup-micromamba@main
with:
environment-name: temp
condarc: |
channels:
- defaults
- conda-forge
channel_priority: flexible
create-args: |
python=${{ matrix.python-version }}
- name: Install dependencies
shell: bash -l {0}
run: |
python -m pip install nbmake
python -m pip install ".[dev,docs,test]"
- name: Install hyperopt optional dependencies (Python 3.11 only)
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install ".[hpopt]"
- name: Test with pytest
shell: bash -l {0}
run: |
pytest -v tests
- name: Test notebooks
shell: bash -l {0}
run: |
pytest --nbmake examples/training.ipynb
pytest --nbmake examples/predicting.ipynb
pytest --nbmake examples/convert_v1_to_v2.ipynb
pytest --nbmake examples/training_regression_multicomponent.ipynb
pytest --nbmake examples/predicting_regression_multicomponent.ipynb

conda-test:
name: Execute Tests with Conda-based Install
needs: lint
runs-on: ubuntu-latest
defaults:
run:
# run with a login shell (so that the conda environment is activated)
# and echo the commands we run as we do them (for debugging purposes)
shell: bash -el {0}
strategy:
# if one platform/python version fails, continue testing the others
fail-fast: false
matrix:
python-version: [3.11, 3.12]
steps:
- uses: actions/checkout@v4
# use a version of the conda virtual environment manager to set up an
# isolated environment with the Python version we want
- uses: mamba-org/setup-micromamba@main
with:
environment-file: environment.yml
condarc: |
channels:
- defaults
- conda-forge
- pytorch
channel_priority: flexible
create-args: |
python=${{ matrix.python-version }}
- name: Install Testing Dependencies
run: conda install -c conda-forge pytest>=6.2 pytest-cov
- name: Install Chemprop
run: python -m pip install . --no-deps
- name: Test with pytest
shell: bash -l {0}
run: |
pytest -v tests

# GitHub allows you to set checks as required before PRs can be merged, which is annoying to do
# for matrix jobs like the one above which have six actual jobs. Instead we have a summary job
# like this, which we mark as required.
# Copied in part from:
# https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
ci-report-status:
name: report CI status
needs: test
runs-on: ubuntu-latest
steps:
- run: |
result="${{ needs.test.result }}"
if test $result == "success"; then
exit 0
else
exit 1
fi

34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: publish

on:
push:
tags:
- v**

jobs:
publish:
name: build and publish to PyPI
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade build

- name: build package
run: python3 -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
57 changes: 0 additions & 57 deletions .github/workflows/tests.yml

This file was deleted.

Loading