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
Not sure if this is a bug or intended functionality.
I create a model and write it to the database. (v1)
I decide I want to change the parameters of that model and adjust the values, then write it to the database. (v2)
I load the model from the database, and the output shows the model for v1.
Sample code to reproduce:
# Create an initial model
model = FairModel('System 1, Risk A')
model.bulk_import_data({
'Loss Event Frequency': {'mean':.3, 'stdev':.1},
'Loss Magnitude': {'constant': 5_000_000}
})
model.calculate_all()
# Create a database file and store that model
db = FairDatabase('pyfair.sqlite3')
db.store(model)
# Create a new version of that model
model = FairModel('System 1, Risk 1')
model.bulk_import_data({
'Threat Event Frequency': {'low':.3, 'mode':.6, 'high':.9},
'Vulnerability':{'constant':.5},
'Loss Magnitude': {'constant': 5_000_000}
})
model.calculate_all()
# Write the updated version of that model to the database
db.store(model)
# Load the model
reconstituted_model = db.load('System 1, Risk A')
reconstituted_model.calculate_all()
fsr = FairSimpleReport([reconstituted_model])
fsr.to_html('output.html')
This also might just be a style/documentation issue? Since we read and write based on the model name, but the database reads and writes based on the UID, it's just unexpected behavior for a new user.
The text was updated successfully, but these errors were encountered:
Not sure if this is a bug or intended functionality.
I create a model and write it to the database. (v1)
I decide I want to change the parameters of that model and adjust the values, then write it to the database. (v2)
I load the model from the database, and the output shows the model for v1.
Sample code to reproduce:
This also might just be a style/documentation issue? Since we read and write based on the model name, but the database reads and writes based on the UID, it's just unexpected behavior for a new user.
The text was updated successfully, but these errors were encountered: