Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop Algorithm #57

Open
miriamkw opened this issue Mar 1, 2024 · 0 comments
Open

Loop Algorithm #57

miriamkw opened this issue Mar 1, 2024 · 0 comments

Comments

@miriamkw
Copy link
Owner

miriamkw commented Mar 1, 2024

The loop model currently runs without errors and follows the pyloopkit detailed instructions for implementation. However, we should add tests to ensure that the output is the same as in the Loop Swift implementation. The work is slightly started in tests/test_pyloopkit.

Here are the answers from Pete:
There isn’t currently a command line interface, but some of the tests run a full top to bottom exercise of the algorithm using a json input file and compare to the contents of a json output file, so a command line program would essentially wrap that.

The loadScenario ones load an input and the output (recommendation). https://github.com/tidepool-org/LoopAlgorithm/blob/main/Tests/LoopAlgorithmTests/LoopAlgorithmTests.swift#L28
LoopAlgorithmTests.swift
let (input, recommendation) = loadScenario("suspend")
tidepool-org/LoopAlgorithm

Test live capture also tests the predicted glucose curve: https://github.com/tidepool-org/LoopAlgorithm/blob/main/Tests/LoopAlgorithmTests/LoopAlgorithmTests.swift#L148
LoopAlgorithmTests.swift
func testLiveCapture() {

We can use these instructions to check the swift model output using different mock data files and compare the loop predictions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant