This repository was archived by the owner on Apr 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
DMF example(s) fail with NameError: name 'dmf_params' is not defined #122
Copy link
Copy link
Closed
Labels
Priority:HighHigh Priority Issue or PRHigh Priority Issue or PR
Description
------------------
# save to DMF
# create resources
name = "BT NRTL est param1"
ds_s1 = _dmf.find_one(name=name)
if not ds_s1:
ds_s1 = _dmf.new(name=name, desc="Solution for data subset 1", data={'SSE': obj_value_1, 'parameters':
{'tau': {'benzene,toluene': dmf_params["1:bt"],
'toluene,benzene': dmf_params["1:tb"]}}})
create_relation(ds_s1, Predicates.derived, ds_splits[0])
name = "BT NRTL est param2"
ds_s2 = _dmf.find_one(name=name)
if not ds_s2:
ds_s2 = _dmf.new(name=name, desc="Solution for data subset 2", data={'SSE': obj_value_2, 'parameters':
{'tau': {'benzene,toluene': dmf_params["2:bt"],
'toluene,benzene': dmf_params["2:tb"]}}})
create_relation(ds_s2, Predicates.derived, ds_splits[1])
# save relations (prints number of objects processed)
_dmf.update()
------------------
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_5112/4039786833.py in <cell line: 5>()
5ifnotds_s1:
6 ds_s1 = _dmf.new(name=name, desc="Solution for data subset 1", data={'SSE': obj_value_1, 'parameters':
----> 7 {'tau': {'benzene,toluene': dmf_params["1:bt"],
8 'toluene,benzene': dmf_params["1:tb"]}}})
9create_relation(ds_s1,Predicates.derived,ds_splits[0])
NameError: name 'dmf_params' is not definedLooking at recent commits, it seems eb4d22d might be related with this error; more specifically, moving the definition of dmf_params to a cell having the testing and/or remove_cell tags, which causes it to be undefined when the cell is removed during certain modes of programmatic execution such as the one used for the idaes-pse "Run notebooks" CI checks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority:HighHigh Priority Issue or PRHigh Priority Issue or PR