You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This arose from pytorch errors during calibrate operations:
ERROR:root:
###############################
There was an exception in CIEMSS Service
job: e117565e-3f76-497d-a337-85c53dc4d136
<class 'ValueError'>: Expected parameter loc (Tensor of shape (4,)) of distribution LowRankMultivariateNormal(loc: torch.Size([4]), cov_factor: torch.Size([4, 2]), cov_diag: torch.Size([4])) to satisfy the constraint IndependentConstraint(Real(), 1), but found invalid values:
tensor([nan, nan, nan, nan], grad_fn=<SelectBackward0>)
Trace Shapes:
Param Sites:
AutoGuideList.1.scale 4
AutoGuideList.1.cov_factor 4 2
AutoGuideList.1.loc 4
Sample Sites:
################################
Moreover if the literal is not a float - e.g. if I use 1000 instead of 1000.00001 that also lead to a failed calibrate: TypeError: y0 must be a floating point Tensor but is a torch.LongTensor
The text was updated successfully, but these errors were encountered:
@mwdchang , I'm able to reproduce this (and similar shape mismatch) errors using this AMR, but I'm having a bit of trouble understanding the root cause. The thing that is perplexing is that we have other models in our tests that are successfully simulating, calibrating, etc. that have expressions for initials. For example, see the expression total_population-I0 for the initial value of "S" in https://raw.githubusercontent.com/DARPA-ASKEM/simulation-integration/main/data/models/SEIRHD_NPI_Type1_petrinet.json
Do you notice anything else different about these two files that might indicate what the issue is?
@SamWitty this is quite strange indeed - now that you are reproducing the error, I no longer see the torch problem anymore (with the SIR model in my link above). I also tried the SEIRHD in your message and that went through calibration as well.
I am running a new build of pyciemss-service as @fivegrant added some refactoring changes earlier today. However, building against the latest, as well as the commit I was using before seem to be okay now. And I imagine you are testing against pyciemss directly rather than pyciemss-service?
This arose from pytorch errors during calibrate operations:
Using the SIR petrinet (https://github.com/DARPA-ASKEM/Model-Representations/blob/main/petrinet/examples/sir.json) as an example here, it seems like if the state initials are not literals, the calibrate operation will fail. For example if S is specified as S0-expression:
But when the expression is a literal, then it works (at least there's no errors in the log) and a dill file was created.
Moreover if the literal is not a float - e.g. if I use 1000 instead of 1000.00001 that also lead to a failed calibrate:
TypeError:
y0must be a floating point Tensor but is a torch.LongTensor
The text was updated successfully, but these errors were encountered: