Skip to content

Commit 65b80f1

Browse files
DrJStrudwickGitHub Enterprise
authored andcommitted
Merge pull request #65 from BiomedSciAI-Innersource/test
OS Release
2 parents 20d53b5 + b0642cc commit 65b80f1

18 files changed

+159
-118
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,18 @@ repos:
1818
- id: black
1919
language_version: python3.9
2020
args: [--line-length=120]
21+
22+
- repo: https://github.com/ibm/detect-secrets
23+
# If you desire to use a specific version of detect-secrets, you can replace `master` with other git revisions such as branch, tag or commit sha.
24+
# You are encouraged to use static refs such as tags, instead of branch name
25+
#
26+
# Running "pre-commit autoupdate" automatically updates rev to latest tag
27+
rev: 0.13.1+ibm.61.dss
28+
hooks:
29+
- id: detect-secrets # pragma: whitelist secret
30+
# Add options for detect-secrets-hook binary. You can run `detect-secrets-hook --help` to list out all possible options.
31+
# You may also run `pre-commit run detect-secrets` to preview the scan result.
32+
# when "--baseline" without "--use-all-plugins", pre-commit scan with just plugins in baseline file
33+
# when "--baseline" with "--use-all-plugins", pre-commit scan with all available plugins
34+
# add "--fail-on-unaudited" to fail pre-commit for unaudited potential secrets
35+
args: [--baseline, .secrets.baseline, --use-all-plugins]

.secrets.baseline

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"exclude": {
3+
"files": "^.secrets.baseline$",
4+
"lines": null
5+
},
6+
"generated_at": "2024-01-15T10:01:47Z",
7+
"plugins_used": [
8+
{
9+
"name": "AWSKeyDetector"
10+
},
11+
{
12+
"name": "ArtifactoryDetector"
13+
},
14+
{
15+
"name": "AzureStorageKeyDetector"
16+
},
17+
{
18+
"base64_limit": 4.5,
19+
"name": "Base64HighEntropyString"
20+
},
21+
{
22+
"name": "BasicAuthDetector"
23+
},
24+
{
25+
"name": "BoxDetector"
26+
},
27+
{
28+
"name": "CloudantDetector"
29+
},
30+
{
31+
"ghe_instance": "github.ibm.com",
32+
"name": "GheDetector"
33+
},
34+
{
35+
"name": "GitHubTokenDetector"
36+
},
37+
{
38+
"hex_limit": 3,
39+
"name": "HexHighEntropyString"
40+
},
41+
{
42+
"name": "IbmCloudIamDetector"
43+
},
44+
{
45+
"name": "IbmCosHmacDetector"
46+
},
47+
{
48+
"name": "JwtTokenDetector"
49+
},
50+
{
51+
"keyword_exclude": null,
52+
"name": "KeywordDetector"
53+
},
54+
{
55+
"name": "MailchimpDetector"
56+
},
57+
{
58+
"name": "NpmDetector"
59+
},
60+
{
61+
"name": "PrivateKeyDetector"
62+
},
63+
{
64+
"name": "SlackDetector"
65+
},
66+
{
67+
"name": "SoftlayerDetector"
68+
},
69+
{
70+
"name": "SquareOAuthDetector"
71+
},
72+
{
73+
"name": "StripeDetector"
74+
},
75+
{
76+
"name": "TwilioKeyDetector"
77+
}
78+
],
79+
"results": {},
80+
"version": "0.13.1+ibm.62.dss",
81+
"word_list": {
82+
"file": null,
83+
"hash": null
84+
}
85+
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222

2323
env:
2424
global:
25-
- IMAGE_NAME=omixai
25+
- IMAGE_NAME=autoxai4omics
2626

2727
# safelist - only work with these github branches
2828
branches:

.whitesource

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"settingsInheritedFrom": "whitesource-config/whitesource-config@issues_none",
33
"scanSettings": {
4-
"baseBranches": [
5-
"DEV"
6-
]
4+
"configMode": "LOCAL"
75
}
8-
}
6+
}

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Change log for the codebase. Initialised from the developments following version
8080
- tests_mode grabbing the wrong file at times when lots present
8181
- Arm fixes for previous security fix
8282
- test_modes bugfix
83-
- name change within code base & repo (from `Auto-Omics` to `OmiXai`)
83+
- name change within code base & repo (from `Auto-Omics` to `AutoXAI4Omics`)
8484
- provided example data & config users can run
8585
- corrected test_model_outputs
8686
- added skip conditions for test_omic_datasets
@@ -92,3 +92,5 @@ Change log for the codebase. Initialised from the developments following version
9292
- tests requiring a container marked and fixture added to build the container
9393
- `CONTRIBUTING.md` added and info added to `DEV_MANUAL.md`
9494
- `DEV_MANUAL.md` updated
95+
- Detect secrets added
96+
- Upgraded python base image from `3.9.14` to `3.9.18` for additional security fixes

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
-->
1616
# Contributing
1717

18-
This file provides general guidance for anyone contributing to IBM OmiXai. For technical details on improving the code base please see the `DEV_MANUAL.md`, this contains general information on how to contibute to this repositry.
18+
This file provides general guidance for anyone contributing to IBM AutoXAI4Omics. For technical details on improving the code base please see the `DEV_MANUAL.md`, this contains general information on how to contibute to this repositry.
1919

2020
## Branch managment
2121

@@ -62,7 +62,7 @@ and "help wanted" is open to whoever wants to implement it.
6262

6363
### Write Documentation/tests
6464

65-
OmiXai could always use more documentation, whether as part of the
65+
AutoXAI4Omics could always use more documentation, whether as part of the
6666
official docs, in docstrings, or more tests to increase the reliability and coverage.
6767

6868
## Developer's Certificate of Origin 1.1

DEV_MANUAL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,7 @@ Each subclass should has a `nickname` class attribute, which is the model's alia
7676
To add a new measure, simply register the function in the dictionary in `src/metrics/metric_defs.py`.
7777
7878
The only caveat here is that the sklearn convention is that a higher value is better. This convention is used in the hyperparameter tuning, and so when specifying a loss or an error, then when calling `make_scorer()` then you need to pass `greater_is_better=False`. In this case, the values become negative, so when plotting the absolute value needs to be taken (this can also be done for the .csv results if desired, but is not currently).
79+
80+
## Container security
81+
82+
If you need to have a image with less vunerabilities/other requirments the base image can be changed in the dockerfile to whatever works for your personal requirments. All the only requirement is that `python3.9` is installed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Set base image and key env vars
16-
FROM python:3.9.14
16+
FROM python:3.9.18
1717
# ENV DEBIAN_FRONTEND="noninteractive"
1818

1919
# Default 1001 - non privileged uid
@@ -25,7 +25,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get clean
2525
RUN apt-get install -y software-properties-common git
2626

2727
# upgrade pip
28-
RUN python -m pip install --upgrade pip
28+
RUN python -m pip install --upgrade pip setuptools
2929

3030
# Add omicuser and set env vars
3131
# Give omicsuser gid 0 so has root group permissions to read files,

Dockerfile.gpu

Lines changed: 0 additions & 75 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
limitations under the License.
1515
-->
1616

17-
# OmiXai: an Explainable Auto-AI tool for omics and tabular data
17+
# Automated Explainable AI for Omics (AutoXAI4Omics): an Explainable Auto-AI tool for omics and tabular data
1818

19-
OmiXai is a command line automated explainable AI tool that easily enable researchers to perform phenotype prediction from omics data (e.g., gene expression; microbiome data; or any tabular data) and any tabular data (e.g., clinical) using a range of ML models.
19+
AutoXAI4Omics is a command line automated explainable AI tool that easily enable researchers to perform phenotype prediction from omics data (e.g., gene expression; microbiome data; or any tabular data) and any tabular data (e.g., clinical) using a range of ML models.
2020

2121
*Key features include*:
2222

@@ -31,13 +31,9 @@ OmiXai is a command line automated explainable AI tool that easily enable resear
3131
* prediction on new data using the best model
3232
* packaged as a Docker container
3333

34-
## Important note
35-
36-
This tool is for IBM internal use ONLY.
37-
3834
## Citation
3935

40-
For general IBM internal use of the tool please cite this article:
36+
For citation of this tool, please reference this article:
4137

4238
* Carrieri, A.P., Haiminen, N., Maudsley-Barton, S. et al. Explainable AI reveals changes in skin microbiome composition linked to phenotypic differences. Sci Rep 11, 4565 (2021). <https://doi.org/10.1038/s41598-021-83922-6>
4339

@@ -49,49 +45,49 @@ For general IBM internal use of the tool please cite this article:
4945
* installation: `https://github.com/git-guides/install-git`
5046
* Python 3.9 (only required if the user is planning on contributing to the development of the tool)
5147

52-
## How to install OmiXai
48+
## How to install AutoXAI4Omics
5349

54-
1. Clone this repo however you choose (cli command: `git clone --single-branch --branch main [email protected]:BiomedSciAI-Innersource/OmiXai.git`)
50+
1. Clone this repo however you choose (cli command: `git clone --single-branch --branch main [email protected]:BiomedSciAI-Innersource/AutoXAI4Omics.git`)
5551
2. Make sure `docker` is running (cli command: `docker version`, if installed the version information will be given)
56-
3. Within the `OmiXai` folder:
52+
3. Within the `AutoXAI4Omics` folder:
5753
1. Run the following cli command to build the image: `./build.sh -r`
5854
2. Manually create a new folder called `experiments`
5955

6056
NOTE: if training is run by mistake without first creating the `experiments` directory, and the directory is created while training, the directory needs to be removed and then created again before running training (has to do with access permissions)
6157

6258
## User manual
6359

64-
Everything is controlled through a config dictionary, examples of which can be found in the `configs/exmaples` folder. For an explanation of all parameters, please see the [***CONFIG MANUAL***](https://github.ibm.com/BiomedSciAI-Innersource/OmiXai/blob/main/configs/CONFIG_MANUAL.md).
60+
Everything is controlled through a config dictionary, examples of which can be found in the `configs/exmaples` folder. For an explanation of all parameters, please see the [***CONFIG MANUAL***](https://github.ibm.com/BiomedSciAI-Innersource/AutoXAI4Omics/blob/main/configs/CONFIG_MANUAL.md).
6561

66-
The tool is launched in the cli using `omixai.sh` which has multiple flags, examples will be given below:
62+
The tool is launched in the cli using `autoxai4omics.sh` which has multiple flags, examples will be given below:
6763

68-
* `-m` this specifies what mode you want to run OmiXai in the options are:
64+
* `-m` this specifies what mode you want to run AutoXAI4Omics in the options are:
6965
* `feature` - Run feature selection on a input data set
7066
* `train` - Tune and train various machine learning models, generate plots and results
7167
* `test` - To test and evaluate the tuned and trained machine learning models on a completely different holdout dataset
7268
* `predict` - Use trained models to predict on unseen data
7369
* `plotting` - If the models have been tuned and trained (and therefore saved), the plots and results can be generated in isolation
7470
* `bash` - Use to open up a bash shell into the tool
75-
* `-c` this is the filename of the config json within the `OmiXai/configs` folder that is going to be given to OmiXai
71+
* `-c` this is the filename of the config json within the `AutoXAI4Omics/configs` folder that is going to be given to AutoXAI4Omics
7672
* `-r` this sets the contain to run as root. Only possibly required if you are running in `bash` mode
7773
* `-d` this detatches the cli running the container in the background
78-
* `-g` this specifies if you want OmiXai to use the gpus that are available on the machine (UNDER TESTING)
74+
* `-g` this specifies if you want AutoXAI4Omics to use the gpus that are available on the machine (UNDER TESTING)
7975

80-
Data to be used by OmiXai needs to be stored in the `OmiXai/data` folder.
76+
Data to be used by AutoXAI4Omics needs to be stored in the `AutoXAI4Omics/data` folder.
8177

8278
### Examples
8379

84-
* Run OmiXai in training mode with a config called `my_fun_config.json` within the `configs` folder:
85-
* `./omixai.sh -m train -c my_fun_config.json`
80+
* Run AutoXAI4Omics in training mode with a config called `my_fun_config.json` within the `configs` folder:
81+
* `./autoxai4omics.sh -m train -c my_fun_config.json`
8682

8783
* We have provided and example config and dataset that you can run to get going. The components are:
8884
* config: `configs/examples/50k_barley_SHAP.json`
8985
* data: `data/geno_row_type_BRIDGE_50k_w.hetero.csv`
9086
* metadata: `data/row_type_BRIDGE_pheno_50k_metadata_w.hetero.csv`
91-
* cli command to run: `./omixai.sh -m train -c examples/50k_barley_SHAP.json`
87+
* cli command to run: `./autoxai4omics.sh -m train -c examples/50k_barley_SHAP.json`
9288

93-
* If you wish to run a bash shell within the OmiXai image then you can do it using the following. In addition if you wish to be logged in as root add the `-r` flag:
94-
* `./omixai.sh -m bash -r`
89+
* If you wish to run a bash shell within the AutoXAI4Omics image then you can do it using the following. In addition if you wish to be logged in as root add the `-r` flag:
90+
* `./autoxai4omics.sh -m bash -r`
9591

96-
* **UNDER TESTING** If you wish to utilise any gpus that are available on your machine during your OmiXai run then you can add the `-g` flag:
97-
* `./omixai.sh -m train -c my_fun_config.json -g`
92+
* **UNDER DEVELOPMENT** If you wish to utilise any gpus that are available on your machine during your AutoXAI4Omics run then you can add the `-g` flag:
93+
* `./autoxai4omics.sh -m train -c my_fun_config.json -g`

0 commit comments

Comments
 (0)