Skip to content

Commit

Permalink
Merge pull request #76 from arnor-sigurdsson/minor-target-label-optim…
Browse files Browse the repository at this point in the history
…izations

Minor target label optimizations
  • Loading branch information
arnor-sigurdsson authored Apr 13, 2024
2 parents 172ddc5 + 62bef82 commit 1bc1082
Show file tree
Hide file tree
Showing 236 changed files with 13,778 additions and 13,202 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
name: Test group ${{ matrix.group }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: x64
Expand All @@ -22,7 +22,8 @@ jobs:
pip install tox==4.14.1
pip install poetry==1.8.2
tox -e py_partial
- name: Publish coverage to Codecov
uses: codecov/codecov-action@v3
- name: Generate report
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ['3.11']
group: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Release
id: release
Expand All @@ -68,8 +68,8 @@ jobs:
needs: [build]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: x64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
python-version: ['3.11']
group: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion docs/acknowledgements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ and so on:

- ``tomlkit`` – Sébastien Eustace: Style preserving TOML library

- ``gdown`` – Kentaro Wada: Google Drive direct download of big files.
- ``gdown`` : Google Drive Public File/Folder Downloader

- ``hypothesis`` – David R. MacIver and Zac Hatfield-Dodds: A library for property-based testing

Expand Down
2 changes: 2 additions & 0 deletions docs/doc_modules/a_using_eir/h_array_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ def plot_validation_perf_average(data: pd.DataFrame) -> plt.Figure:
color_index = 1
elif model_type == "TRANSFORMER":
color_index = 2
else:
raise ValueError(f"Unknown model type: {model_type}")

line_style = line_style_dict[model_dim.lower()]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
eirserve \
--model-path eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/saved_models/tutorial_01_run_model_600_perf-average=0.8834.pt
--model-path eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/saved_models/tutorial_01_run_model_600_perf-average=0.8764.pt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ eirpredict \
--global_configs eir_tutorials/a_using_eir/01_basic_tutorial/conf/tutorial_01_globals.yaml \
--input_configs eir_tutorials/a_using_eir/01_basic_tutorial/conf/tutorial_01_input.yaml \
--output_configs eir_tutorials/a_using_eir/01_basic_tutorial/conf/tutorial_01_outputs.yaml \
--model_path eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/saved_models/tutorial_01_run_model_600_perf-average=0.8834.pt \
--model_path eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/saved_models/tutorial_01_run_model_600_perf-average=0.8764.pt \
--evaluate \
--output_folder eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/test_predictions/known_outputs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ eirpredict \
--global_configs eir_tutorials/a_using_eir/01_basic_tutorial/conf/tutorial_01_globals.yaml \
--input_configs eir_tutorials/a_using_eir/01_basic_tutorial/conf/tutorial_01_input.yaml \
--output_configs eir_tutorials/a_using_eir/01_basic_tutorial/conf/tutorial_01_outputs_unknown.yaml \
--model_path eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/saved_models/tutorial_01_run_model_600_perf-average=0.8834.pt \
--model_path eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/saved_models/tutorial_01_run_model_600_perf-average=0.8764.pt \
--output_folder eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/test_predictions/unknown_outputs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
06:51:34 - INFO - eir.train_utils.utils - Global random seed set to 0.
14:39:24 - INFO - eir.train_utils.utils - Global random seed set to 0.
usage: eirpredict [-h] [--global_configs [GLOBAL_CONFIGS ...]]
[--input_configs [INPUT_CONFIGS ...]]
[--fusion_configs [FUSION_CONFIGS ...]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
06:51:27 - INFO - eir.train_utils.utils - Global random seed set to 0.
14:39:17 - INFO - eir.train_utils.utils - Global random seed set to 0.
usage: eirtrain [-h] --global_configs GLOBAL_CONFIGS [GLOBAL_CONFIGS ...]
[--input_configs [INPUT_CONFIGS ...]]
[--fusion_configs [FUSION_CONFIGS ...]] --output_configs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,18 @@ eir_tutorials/tutorial_runs/a_using_eir/tutorial_01_run/
│   ├── training_curve_MCC.pdf
│   └── training_curve_ROC-AUC-MACRO.pdf
├── saved_models
├── test_predictions
│   ├── known_outputs
│   │   ├── ancestry_output
│   │   │   └── Origin
│   │   │   ├── confusion_matrix.pdf
│   │   │   ├── mc_pr_curve.pdf
│   │   │   ├── mc_roc_curve.pdf
│   │   │   └── predictions.csv
│   │   └── calculated_metrics.json
│   └── unknown_outputs
│   └── ancestry_output
│   └── Origin
│   └── predictions.csv
├── training_curve_LOSS-AVERAGE.pdf
└── training_curve_PERF-AVERAGE.pdf
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,59 @@
</thead>
<tbody>
<tr>
<td>A306</td>
<td>Europe</td>
<td>2</td>
<td>0.56</td>
<td>-2.86</td>
<td>3.78</td>
<td>-1.07</td>
<td>1.51</td>
<td>-2.90</td>
<td>MAL-005</td>
<td>Sub-Saharan_Africa</td>
<td>5</td>
<td>-1.61</td>
<td>-1.88</td>
<td>-2.82</td>
<td>0.81</td>
<td>-0.37</td>
<td>4.79</td>
</tr>
<tr>
<td>A325</td>
<td>Europe</td>
<td>2</td>
<td>0.66</td>
<td>-2.69</td>
<td>2.85</td>
<td>-1.91</td>
<td>2.80</td>
<td>-2.72</td>
<td>MAL-009</td>
<td>Sub-Saharan_Africa</td>
<td>5</td>
<td>-1.92</td>
<td>-2.09</td>
<td>-2.75</td>
<td>0.75</td>
<td>0.03</td>
<td>4.65</td>
</tr>
<tr>
<td>A343</td>
<td>Europe</td>
<td>2</td>
<td>0.52</td>
<td>-2.22</td>
<td>2.57</td>
<td>-2.39</td>
<td>3.27</td>
<td>-2.18</td>
<td>MAL-011</td>
<td>Sub-Saharan_Africa</td>
<td>5</td>
<td>-1.91</td>
<td>-2.12</td>
<td>-2.75</td>
<td>1.32</td>
<td>-0.56</td>
<td>4.68</td>
</tr>
<tr>
<td>A362</td>
<td>Europe</td>
<td>2</td>
<td>2.12</td>
<td>-2.69</td>
<td>3.00</td>
<td>-1.51</td>
<td>0.75</td>
<td>-3.09</td>
<td>MAL-012</td>
<td>Sub-Saharan_Africa</td>
<td>5</td>
<td>-1.53</td>
<td>-1.95</td>
<td>-2.84</td>
<td>0.56</td>
<td>-0.20</td>
<td>4.67</td>
</tr>
<tr>
<td>A374</td>
<td>Europe</td>
<td>2</td>
<td>0.16</td>
<td>-2.47</td>
<td>3.08</td>
<td>-1.93</td>
<td>2.75</td>
<td>-2.60</td>
<td>MAL-014</td>
<td>Sub-Saharan_Africa</td>
<td>5</td>
<td>-1.56</td>
<td>-2.02</td>
<td>-2.85</td>
<td>0.73</td>
<td>-0.27</td>
<td>4.80</td>
</tr>
</tbody>
</table><br>
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,48 @@
<tbody>
<tr>
<td>HGDP01358</td>
<td>0.29</td>
<td>-2.02</td>
<td>4.00</td>
<td>-1.76</td>
<td>1.01</td>
<td>-2.96</td>
<td>-0.48</td>
<td>-2.05</td>
<td>4.80</td>
<td>-0.62</td>
<td>-0.21</td>
<td>-2.98</td>
</tr>
<tr>
<td>HG04182.SG</td>
<td>4.82</td>
<td>-0.38</td>
<td>-1.41</td>
<td>-1.28</td>
<td>-2.03</td>
<td>-1.59</td>
<td>4.23</td>
<td>0.50</td>
<td>-1.97</td>
<td>-0.91</td>
<td>-2.86</td>
<td>-1.24</td>
</tr>
<tr>
<td>HG02870.SG</td>
<td>-1.56</td>
<td>-2.16</td>
<td>-2.62</td>
<td>1.95</td>
<td>-1.53</td>
<td>4.26</td>
<td>-1.68</td>
<td>-2.06</td>
<td>-2.74</td>
<td>1.93</td>
<td>-1.36</td>
<td>4.48</td>
</tr>
<tr>
<td>HGDP00720</td>
<td>2.62</td>
<td>2.31</td>
<td>1.28</td>
<td>-2.43</td>
<td>-2.29</td>
<td>-2.79</td>
<td>2.44</td>
<td>3.63</td>
<td>-0.12</td>
<td>-2.71</td>
<td>-2.34</td>
<td>-2.55</td>
</tr>
<tr>
<td>S_Kinh-1.DG</td>
<td>3.73</td>
<td>2.17</td>
<td>0.08</td>
<td>-2.93</td>
<td>-2.16</td>
<td>-2.66</td>
<td>3.01</td>
<td>3.51</td>
<td>-1.06</td>
<td>-2.78</td>
<td>-2.39</td>
<td>-2.51</td>
</tr>
</tbody>
</table><br>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"result": {
"ancestry_output": {
"Origin": {
"Asia": 0.03028767555952072,
"Eastern_Asia": 0.002180263167247176,
"Europe": 0.5578079223632812,
"Latin_America_and_the_Caribbean": 0.0037452145479619503,
"Middle_East": 0.40406593680381775,
"Sub-Saharan_Africa": 0.0019129770807921886
"Asia": 0.010410779155790806,
"Eastern_Asia": 0.0011356589384377003,
"Europe": 0.854654848575592,
"Latin_America_and_the_Caribbean": 0.008827924728393555,
"Middle_East": 0.1237422451376915,
"Sub-Saharan_Africa": 0.00122847652528435
}
}
}
Expand All @@ -26,12 +26,12 @@
"result": {
"ancestry_output": {
"Origin": {
"Asia": 0.0014066740404814482,
"Eastern_Asia": 0.002691845176741481,
"Europe": 0.0021231011487543583,
"Latin_America_and_the_Caribbean": 0.012312699109315872,
"Middle_East": 0.05595624819397926,
"Sub-Saharan_Africa": 0.9255093932151794
"Asia": 0.0017986423335969448,
"Eastern_Asia": 0.0030721763614565134,
"Europe": 0.0034481489565223455,
"Latin_America_and_the_Caribbean": 0.026503251865506172,
"Middle_East": 0.1034306138753891,
"Sub-Saharan_Africa": 0.861747145652771
}
}
}
Expand All @@ -45,12 +45,12 @@
"result": {
"ancestry_output": {
"Origin": {
"Asia": 0.02939583733677864,
"Eastern_Asia": 0.0008371166186407208,
"Europe": 0.9306607246398926,
"Latin_America_and_the_Caribbean": 0.018582025542855263,
"Middle_East": 0.01969936117529869,
"Sub-Saharan_Africa": 0.0008249731035903096
"Asia": 0.008015047758817673,
"Eastern_Asia": 0.0006639149505645037,
"Europe": 0.9414306282997131,
"Latin_America_and_the_Caribbean": 0.03938961401581764,
"Middle_East": 0.009529098868370056,
"Sub-Saharan_Africa": 0.0009716283529996872
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ancestry_output": {"Origin": {"ancestry_output_Origin_mcc": 0.8737133375559296, "ancestry_output_Origin_acc": 0.8966221232368226, "ancestry_output_Origin_roc-auc-macro": 0.9888789446399321, "ancestry_output_Origin_ap-macro": 0.9429769802215945, "ancestry_output_Origin_loss": 0.3044101297855377}}, "average": {"average": {"loss-average": 0.3044101297855377, "perf-average": 0.9351897541391521}}}
{"ancestry_output": {"Origin": {"ancestry_output_Origin_mcc": 0.8746216045087754, "ancestry_output_Origin_acc": 0.8966221232368226, "ancestry_output_Origin_roc-auc-macro": 0.9891791491808976, "ancestry_output_Origin_ap-macro": 0.9453594382357499, "ancestry_output_Origin_loss": 0.3013431131839752}}, "average": {"average": {"loss-average": 0.3013431131839752, "perf-average": 0.9363867306418076}}}
Loading

0 comments on commit 1bc1082

Please sign in to comment.