C-Accel-CRIPT / sdk-archive

CRIPT Python SDK
MIT License
11 stars 0 forks source link

Invalid conditions, and I don't know why. #71

Open InnocentBug opened 1 year ago

InnocentBug commented 1 year ago

I am unable to upload these conditions to CRIPT.

{
    "key": "temperature_rate",
    "unit": "Kelvin/picoseconds",
    "value": 0.01,
    "type": null,
    "uncertainty": null,
    "uncertainty_type": null,
    "material": null,
    "descriptor": null,
    "set_id": null,
    "measurement_id": null,
    "data": null
}
{
    "key": "temperature",
    "unit": "Kelvin",
    "value": 250.0,
    "type": "min",
    "uncertainty": null,
    "uncertainty_type": null,
    "material": null,
    "descriptor": null,
    "set_id": null,
    "measurement_id": null,
    "data": null
}

The error messages are not very helpful, so I don't know how to debug this further.


Traceback (most recent call last):
  File "/media/data/elwood/chimad/hongbo4/upload_cript.py", line 318, in <module>
    main(sys.argv[1:])
  File "/media/data/elwood/chimad/hongbo4/upload_cript.py", line 293, in main
    quench_equilibrate, quench_eq_data = get_quench_equilibrate(proj, uid, expt, prepare, opt, status, elwood_citation, elwood_config, python_config, openmm, packing_data)
  File "/media/data/elwood/chimad/hongbo4/upload_cript.py", line 237, in get_quench_equilibrate
    quench_equilibrate = cript.Computation.create(
  File "<@beartype(cript.data_model.nodes.base_node.BaseNode.create) at 0x7fc781ba7af0>", line 47, in create
  File "/home/ludwig/.local/lib/python3.9/site-packages/cript/data_model/nodes/base_node.py", line 148, in create
    node.save(get_level=get_level, update_existing=update_existing)
  File "<@beartype(cript.data_model.nodes.base_node.BaseNode.save) at 0x7fc781ba7670>", line 47, in save
  File "/home/ludwig/.local/lib/python3.9/site-packages/cript/data_model/nodes/base_node.py", line 81, in save
    self._generate_nested_nodes(get_level=get_level)
  File "/home/ludwig/.local/lib/python3.9/site-packages/cript/data_model/base.py", line 137, in _generate_nested_nodes
    subobject = node_class(**value[i])
  File "<@beartype(cript.data_model.subobjects.condition.Condition.__init__) at 0x7fc7813a8280>", line 245, in __init__
TypeError: __init__() missing 1 required positional argument: 'key'