Standard way to retrieve data fails if no dependencies exist
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
The function `get_data_by_id`, which is also being used by `get_shaped_data_by_runid`, only looks for dependent variables. That means that a flat/dependency-less run can not have its data retrieved by this function. Is this really what we want?
Here is a small example:
```python
import numpy as np
from qcodes.dataset.data_export import get_data_by_id
from qcodes.dataset.measurements import Measurement
from qcodes import Parameter
x = Parameter('x')
y = Parameter('y')
meas = Measurement()
meas.register_parameter(x)
meas.register_parameter(y) # no data retrieved
# meas.register_parameter(y, setpoints=(x,)) # yes data retrieved
with meas.run() as datasaver:
for x_val, y_val in enumerate(np.random.randn(25)):
datasaver.add_result((x, x_val), (y, y_val))
data = get_data_by_id(datasaver.run_id)
print(data)
```
Contributor guide
Research direction
Start at the `get_data_by_id` function and reproduce the dependency-less measurement shown in the issue. Check how `get_shaped_data_by_runid` uses the same path; done means retrieving data from a flat run as well as from runs with dependent variables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100