Skip to content

Commit

Permalink
Add FUNMAN test (#3482)
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis authored May 1, 2024
1 parent de31d8d commit 21573c8
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 25 deletions.
47 changes: 22 additions & 25 deletions testing/model-extraction.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
## Model extraction
Please go through __every__ steps of the test scenario.
When blocked, or an error, an UI/UX anomaly occurs, please report which scenario and step to [ #askem-testing](https://unchartedsoftware.slack.com/archives/C06FGLXB2CE).

Please go through __every__ step of the test scenario.\
When blocked, an error, or a UI/UX anomaly occurs, please report which scenario and step to [\#askem-testing](https://unchartedsoftware.slack.com/archives/C06FGLXB2CE).

### 1. Begin test
- [ ] a. login to https://app.staging.terarium.ai using the test account

```
email: [email protected]
password: askem-quality-assurance
```

- [ ] b. Create project named `Q&A [Your Name]`
1. Login to https://app.staging.terarium.ai using the test account
```
email: [email protected]
password: askem-quality-assurance
```
2. Create, or open, project named `Q&A [Your Name] [YYMMDD]`

### 2. Upload a PDF
- [ ] a. Upload _the Document_ [SIR](https://drive.google.com/file/d/1vN4sNR7IrRi5GsOQ9r_LgV4S5wwinXnG/view?usp=drive_link)
- [ ] b. Wait for final notification of document extraction
- [ ] c. Open _the Document_ and check that extractions are visible
1. Upload _the Document_ [SIR](https://drive.google.com/file/d/1vN4sNR7IrRi5GsOQ9r_LgV4S5wwinXnG/view?usp=drive_link)
2. Wait for final notification of document extraction
3. Open _the Document_ and check that extractions are visible

### 3. Extract model from document
- [ ] a. Create a new workflow named `Extract model from document`
- [ ] b. Drag and drop _the Document_ onto the workflow
- [ ] c. Add the operator `Create model from equations`
- [ ] d. Link _the Document_ and open the operator
- [ ] e. Select the equations `S`, `I` and `R` and create model
- [ ] f. Save model and name as `SIR`
1. Create a new workflow named `Extract model from document`
2. Drag and drop _the Document_ onto the workflow
3. Add the operator `Create model from equations`
4. Link _the Document_ and open the operator
5. Select the equations `S`, `I` and `R` and create model
6. Save model and name as `SIR`

### 4. Check extractions from document
- [ ] a. Open model `SIR`
- [ ] b. Is the TA1 _model card_, extracted with `mit-tr` available?
- [ ] c. Is the TA4 _model card_, extracted from `gollm-taskrunner` available?
- [ ] d. Are the _variables extractions_ available in the `Other` accordion?
1. Open model `SIR`
2. Is the TA1 _model card_, extracted with `mit-tr` available?
3. Is the TA4 _model card_, extracted from `gollm-taskrunner` available?
4. Are the _variables extractions_ available in the `Other` accordion?

### 5. End test
- [ ] a. logout of the application
1. logout of the application
64 changes: 64 additions & 0 deletions testing/validate-model-configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## Validate Model Configuration
Please go through __every__ step of the test scenario.\
When blocked, an error, or a UI/UX anomaly occurs, please report which scenario and step to [\#askem-testing](https://unchartedsoftware.slack.com/archives/C06FGLXB2CE).

### 1. Begin test
1. Login to https://app.staging.terarium.ai using the test account
```
email: [email protected]
password: askem-quality-assurance
```
2. Create, or open, project named `Q&A [Your Name] [YYMMDD]`

### 2. Workflow
1. Create a new workflow named `Validate Model Configuration`
2. Upload _the Model_ [Configured SIR.json](https://drive.google.com/file/d/144jN19MrMYbE_nwmOgk2VD-GpNzrcf9d/view?usp=drive_link)
3. Drag and drop _the Model_ onto the workflow
4. Link and open a _Configure Model_ operator
5. Verify that the model is configured correctly \
`β: 0.6, γ: 0.2, S: 1000, I: 2, R: 0`
6. Save the configuration by giving it a name and clicking `Run`

### 3. Operator setup
1. Link to a _Validate configuration_ operator
2. You should see an `additonal options` section, expand it
3. A tolerance/threshold input should be available
- set to `0.1`, this tells Funman to create smaller bounding boxes
4. A dropdown `parameters of interest` should be available populated with model parameters and states
- select `beta (β)` and `gamma (γ)`.

### 4. Compartmental constraint
It ensures non-negativity and mass conservation
1. The `Compartmental constraint` should be on by default
2. verify that the equation is correct `S + I + R = 1002`

### 5. Successful state constraint
1. Create a new constraint by clicking `Add constraint`
2. Set to `State constraint` and name it `Infected`
- set the target to `I` from the dropdown
- set the upper bound to `750`
- leave start/end time to `[0, 100]`
- leave the weight to `1.0`
3. Run validation
4. Verify that service returns **true** boxes as infected should not exceed 750

### 6. Failed state constraint
1. Change the upper bound of `Infected` constraint `100`
2. Run validation
3. Verify that service returns **false** boxes as infected should exceed 100 between time `[0, 100]`
4. Delete the constraint

### 7. Successful monotonicity constraint
1. Create a new constraint set to `Monotonicity constraint` and name it `Suceptible`
- set the target to `S` from the dropdown
- set the direction to `decreasing`
2. Run validation
3. Verify that service returns **true** boxes as susceptible should be **decreasing** over time

### 8. Failed monotonicity constraint
1. Change the direction of `Suceptible` constraint to `increasing`
2. Run validation
3. Verify that service returns **false** boxes as susceptible should be **decreasing** over time

### 5. End test
1. logout of the application

0 comments on commit 21573c8

Please sign in to comment.