You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will upload a Python Package to PyPI when a release is created
2
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+
# This workflow uses actions that are not certified by GitHub.
5
+
# They are provided by a third-party and are governed by
6
+
# separate terms of service, privacy policy, and support
7
+
# documentation.
8
+
9
+
name: Upload Python Package
10
+
11
+
on:
12
+
release:
13
+
types: [published]
14
+
15
+
permissions:
16
+
contents: read
17
+
18
+
jobs:
19
+
release-build:
20
+
runs-on: ubuntu-latest
21
+
22
+
steps:
23
+
- uses: actions/checkout@v4
24
+
25
+
- uses: actions/setup-python@v5
26
+
with:
27
+
python-version: "3.12"
28
+
29
+
- name: Build release distributions
30
+
run: |
31
+
python -m pip install build
32
+
python -m build
33
+
34
+
- name: Upload distributions
35
+
uses: actions/upload-artifact@v4
36
+
with:
37
+
name: release-dists
38
+
path: dist/
39
+
40
+
pypi-publish:
41
+
runs-on: ubuntu-latest
42
+
needs:
43
+
- release-build
44
+
permissions:
45
+
# IMPORTANT: this permission is mandatory for trusted publishing
46
+
id-token: write
47
+
48
+
# Dedicated environments with protections for publishing are strongly recommended.
49
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
50
+
environment:
51
+
name: pypi
52
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
53
+
url: https://pypi.org/p/chebai
54
+
#
55
+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
56
+
# ALTERNATIVE: exactly, uncomment the following line instead:
> **Note**: It is recommended to use `devices=1` and `num_nodes=1` during testing; multi-device settings use a `DistributedSampler`, which may replicate some samples to maintain equal batch sizes, so using a single device ensures that each sample or batch is evaluated exactly once.
103
+
77
104
78
105
## Cross-validation
79
106
You can do inner k-fold cross-validation, i.e., train models on k train-validation splits that all use the same test
@@ -87,3 +114,20 @@ and the fold to be used in the current optimisation run as
87
114
```
88
115
To train K models, you need to do K such calls, each with a different `fold_index`. On the first call with a given
89
116
`inner_k_folds`, all folds will be created and stored in the data directory
117
+
118
+
## Note for developers
119
+
120
+
If you have used ChEBai before PR #39, the file structure in which your ChEBI-data is saved has changed. This means that
121
+
datasets will be freshly generated. The data however is the same. If you want to keep the old data (including the old
122
+
splits), you can use a migration script. It copies the old data to the new location for a specific ChEBI class
123
+
(including chebi version and other parameters). The script can be called by specifying the data module from a config
0 commit comments