-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataConsistency and 2D plotting support #152
base: dev
Are you sure you want to change the base?
Conversation
vikashplus
commented
Nov 17, 2024
•
edited
Loading
edited
- FEATURE: Explicitely marks the closure of the trace
- BUGFIX: Introduces create_datum. create_dataset is updated and is now reserved for adding full datasets (shouldn't be edited later). If appending is needed first create_datum() and then follow it with repeated calls to append_datum().
- BUGFIX: verify_type is stricter now. It goes beyond checking for root dtypes. It thoroughly checks for type, shapes, keys - even for nested structures. This implies that dict{datum} also needs to maintain its internal keys to support append leading to further consistency
- FEATURE: Much like rendering of rgb datasets, now trace supports plotting of numerical datasets using a list(grp_keys)_ng and list(list(dataset_keys))_ng
- TESTS: Adds multiple tests to check for data consistency and plotting consistency
1. FEATURE: Explicitely marks the closure of the trace 2. BUGFIX: Introduces create_datum. create_dataset is updated and is now reserved for adding full datasets (shouldn't be edited later). If appending is needed first create_datum() and then follow it with repeated calls to append_datum(). 3. BUGFIX: verify_type is stricter now. It goes beyond checking for root dtypes. It thoroughly checks for type, shapes, keys - even for nested structures. This implies that dict{datum} also needs to maintain its internal keys to support append leading to further consistency 4. FEATURE: Much like rendering of rgb datasets, now trace supports plotting of numerical datasets using a list(grp_keys)_ng and list(list(dataset_keys))_ng 5. Adds multiple tests to check for data consistency and plotting consistency
assert np.issubdtype(ds_val.dtype, np.number), ValueError(f"Dataset for plotting needs to of numerical dtype. Provided dtype: {ds_val.dtype}") | ||
assert len(ds_val.shape)<3, ValueError(f"Plotting is only supported for 1D and 2D Dataset. Provided data dims: {ds_val.shape}") | ||
|
||
# print(f"g:{grp_key}/ d:{ds_key}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this comment?
|
||
# print(f"g:{grp_key}/ d:{ds_key}") | ||
h_axis = plt.subplot(n_subplot, 1, i_grp+1) | ||
# h_axis.set_prop_cycle(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this comment?
|
||
# Check for group and datasets sizes | ||
assert len(datasets)==n_subplot, ValueError(f"len(groups):{n_subplot} has to match len(datasets):{len(datasets)}") | ||
# print(groups) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove these comments?