-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added DVC, teamcity-messages and Julia TC integration (#1915)
Fixes #1879 This does three things - Adds teamcity-messages as a Python test dependency, enabling TC to keep track of pytest tests (number of tests, number of failures, linking to specific logs), making debugging much easier. <img width="652" alt="Screenshot 2024-10-21 at 22 35 54" src="https://github.com/user-attachments/assets/96f99290-bab3-4c78-a8ca-e1df6a929258"> - Adds teamcity specific logging in Julia (much like teamcity-messages) to keep track of the integration test time and differences with a previous model. These parameters are tracked by TC (and can be failed on), and can be plotted over time. <img width="732" alt="Screenshot 2024-10-21 at 22 38 31" src="https://github.com/user-attachments/assets/7e136e2b-284e-4546-ba1d-fe85cac13a2e"> - Finally, and biggest, this adds [DVC](https://dvc.org/) to our project, with the minio repo tracked, and the integration test as stage. It tracks a new default toml for that model (models/integration.toml), and like TC in 2, the time and differences. Once someone changes either the hws model, or the core code, or the integration.toml, the results are outdated and `dvc repro` will rerun the test. We can save these experiments over time, and compare results with the VS Code plugin: <img width="1346" alt="Screenshot 2024-10-21 at 22 09 27" src="https://github.com/user-attachments/assets/f313a159-fa96-4d20-a616-0b808f23210e"> This disables the threshold test in the integration test, and opts for monitoring results (could be done automatically) instead. I've also opted for keeping track of results and settings threshold _outside_ of Julia. This is a backwards compatible setup PR. Changes/additions for benchmark tuning can be made in another PR. --------- Co-authored-by: Martijn Visser <[email protected]>
- Loading branch information
Showing
20 changed files
with
229 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/config.local | ||
/tmp | ||
/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[core] | ||
remote = minio | ||
['remote "minio"'] # for tracking artifacts with unreadable names | ||
url = s3://ribasim/dvc | ||
endpointurl = https://s3.deltares.nl | ||
['remote "minio_readonly"'] # for readable named models in the top-dir | ||
url = s3://ribasim | ||
endpointurl = https://s3.deltares.nl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Add patterns of files dvc should ignore, which could improve | ||
# the performance. Learn more at | ||
# https://dvc.org/doc/user-guide/dvcignore | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
macro tcstatus(message) | ||
if haskey(ENV, "TEAMCITY_VERSION") | ||
return esc(:(println("##teamcity[buildStatus text='", $message, "']"))) | ||
else | ||
return esc(:(println($message))) | ||
end | ||
end | ||
|
||
macro tcstatistic(key, value) | ||
if haskey(ENV, "TEAMCITY_VERSION") | ||
return esc( | ||
:(println( | ||
"##teamcity[buildStatisticValue key='", | ||
$key, | ||
"' value='", | ||
$value, | ||
"']", | ||
)), | ||
) | ||
else | ||
return esc(:(println($key, '=', $value))) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/predict.dat | ||
/integration.csv | ||
/integration.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
schema: '2.0' | ||
stages: | ||
integration: | ||
cmd: pixi run model-integration-test | ||
deps: | ||
- path: core/ | ||
hash: md5 | ||
md5: 6228f56acef895eeb5d4fdcd479cd1ee.dir | ||
size: 474129 | ||
nfiles: 45 | ||
- path: models/hws_2024_7_0 | ||
hash: md5 | ||
md5: e88123c69a0f7e3590b94c55dbe0062e.dir | ||
size: 45421022 | ||
nfiles: 10 | ||
params: | ||
models/integration.toml: | ||
solver.abstol: 1e-07 | ||
solver.algorithm: QNDF | ||
solver.autodiff: false | ||
solver.reltol: 1e-07 | ||
outs: | ||
- path: data/integration.toml | ||
hash: md5 | ||
md5: aa6ff2820a6eda91df1073d3bc41755e | ||
size: 109 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
stages: | ||
integration: | ||
cmd: pixi run model-integration-test | ||
deps: | ||
- core/ | ||
- models/hws_2024_7_0 | ||
params: | ||
- models/integration.toml: | ||
- solver.algorithm | ||
- solver.abstol | ||
- solver.reltol | ||
- solver.autodiff | ||
outs: | ||
- data/integration.toml | ||
metrics: | ||
- data/integration.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
md5: 2fac758278d29071bb3e4632d69cbb0c | ||
frozen: true | ||
deps: | ||
- md5: 8620613cb3fc380a20bcbbb2bd36b28c.dir | ||
size: 187932 | ||
nfiles: 6 | ||
hash: md5 | ||
path: remote://minio_readonly/benchmark | ||
outs: | ||
- md5: ceb5e5e81c402510497da43d29dce099.dir | ||
size: 187932 | ||
nfiles: 6 | ||
hash: md5 | ||
path: benchmark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
md5: aa976a0658b5e52b211b9714c93b6a34 | ||
frozen: true | ||
deps: | ||
- md5: 24169f5a25b4c78f1868b8401a367117.dir | ||
size: 43269986 | ||
nfiles: 4 | ||
hash: md5 | ||
path: remote://minio_readonly/hws_2024_7_0 | ||
outs: | ||
- md5: bc02da0ad6e562f31ae8b61d34884a11.dir | ||
size: 43269986 | ||
nfiles: 4 | ||
hash: md5 | ||
path: hws_2024_7_0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
md5: bda2339cc165379b0f6da21aa67039d9 | ||
frozen: true | ||
deps: | ||
- md5: ab64e9bee55f9a7524f36ca317ade8fb.dir | ||
size: 43307158 | ||
nfiles: 2 | ||
hash: md5 | ||
path: remote://minio_readonly/hws_migration_test | ||
outs: | ||
- md5: 6ca6218661d0f021bc53bf468000a62b.dir | ||
size: 43307158 | ||
nfiles: 2 | ||
hash: md5 | ||
path: hws_migration_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
starttime = 2023-01-20 00:00:00 | ||
endtime = 2023-07-01 00:00:00 | ||
crs = "EPSG:28992" | ||
input_dir = "hws_2024_7_0" | ||
results_dir = "hws_2024_7_0/results" | ||
ribasim_version = "2024.10.0" | ||
|
||
[solver] | ||
algorithm = "QNDF" # optional, default "QNDF" | ||
abstol = 1e-7 # optional, default 1e-7 | ||
reltol = 1e-7 # optional, default 1e-7 | ||
autodiff = false # optional, default false |
Oops, something went wrong.