-
Notifications
You must be signed in to change notification settings - Fork 28
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
file fails validation #1031
Comments
sorry @bendichter for the late response, I might have been traveling (back then) ;-) Usually I say we recommend/rely on users running
which is I guess was the one. Note that now we gather it from nwb-inspector whenever before it was plain invocation to pynwb.validate AFAIK. and nwbinspector indeed lists it as CRITICAL ATM❯ nwbinspector /tmp/ecephys_tutorial.nwb
/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3/lib/python3.10/site-packages/hdmf/spec/namespace.py:531: UserWarning: Ignoring cached namespace 'core' version 2.4.0 because version 2.5.0 is already loaded.
warn("Ignoring cached namespace '%s' version %s because version %s is already loaded."
/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3/lib/python3.10/site-packages/pynwb/ecephys.py:90: UserWarning: ElectricalSeries 'ElectricalSeries': The second dimension of data does not match the length of electrodes. Your data may be transposed.
warnings.warn("%s '%s': The second dimension of data does not match the length of electrodes. "
Inspecting NWBFiles...: 0%| | 0/1 [00:00<?, ?it/s]/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3/lib/python3.10/site-packages/pynwb/ecephys.py:90: UserWarning: ElectricalSeries 'ElectricalSeries': The second dimension of data does not match the length of electrodes. Your data may be transposed.
warnings.warn("%s '%s': The second dimension of data does not match the length of electrodes. "
**************************************************
NWBInspector Report Summary
Timestamp: 2022-11-03 14:56:11.522285-04:00
Platform: Linux-5.19.0-2-amd64-x86_64-with-glibc2.35
NWBInspector version: 0.4.17
Found 7 issues over 1 files:
1 - CRITICAL
6 - BEST_PRACTICE_SUGGESTION
**************************************************
0 CRITICAL
===========
0.0 /tmp/ecephys_tutorial.nwb: check_electrical_series_dims - 'ElectricalSeries' object at location '/acquisition/ElectricalSeries'
Message: The second dimension of data does not match the length of electrodes. Your data may be transposed.
1 BEST_PRACTICE_SUGGESTION
===========================
1.1 /tmp/ecephys_tutorial.nwb: check_description - 'Subject' object at location '/general/subject'
Message: Description is missing.
1.2 /tmp/ecephys_tutorial.nwb: check_description - 'ElectricalSeries' object at location '/acquisition/ElectricalSeries'
Message: Description ('no description') is a placeholder.
1.3 /tmp/ecephys_tutorial.nwb: check_experimenter_form - 'NWBFile' object at location '/'
Message: The name of experimenter 'Dr. Bilbo Baggins' does not match any of the accepted DANDI forms: 'LastName, Firstname', 'LastName, FirstName MiddleInitial.' or 'LastName, FirstName, MiddleName'.
1.4 /tmp/ecephys_tutorial.nwb: check_keywords - 'NWBFile' object at location '/'
Message: Metadata /general/keywords is missing.
1.5 /tmp/ecephys_tutorial.nwb: check_subject_sex - 'Subject' object at location '/general/subject'
Message: Subject.sex is missing.
1.6 /tmp/ecephys_tutorial.nwb: check_col_not_nan - 'DynamicTable' object with name 'electrodes'
Message: Column 'imp' has all NaN values. Consider removing it from the table.
|
Thanks @yarikoptic this helped identify an issue in the tutorial |
@bendichter - I just had a similar issue, I thought that |
@djarecka Can you elaborate on your issue (including, ideally, the report in your case)? The point is that a failure in |
I have an error from Do you want me to open an issue in the inspector repo?
|
Sure - it looks like it's not being properly elevated from that usage, will investigate |
Hm, looking at https://github.com/dandi/dandi-schema/blob/71a8ea3f8231cc8bf4fadcc51ea76db86171925f/dandischema/models.py#L818 where it is
and we even test https://github.com/dandi/dandi-cli/blob/HEAD/dandi/tests/test_metadata.py#L237 with And it seems to be not required but rather "good practice" according to nwbinspector. Having upgraded all versions of dandi-cli, nwbinspector, pynwb, and hdmf I see following dandi validate exits with non-0 but with another error ()❯ dandi validate ecephys_tutorial.nwb
/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3/lib/python3.10/site-packages/pynwb/ecephys.py:90: UserWarning: ElectricalSeries 'ElectricalSeries': The second dimension of data does not match the length of electrodes. Your data may be transposed.
warnings.warn("%s '%s': The second dimension of data does not match the length of electrodes. "
[NWBI.check_electrical_series_dims] ecephys_tutorial.nwb — The second dimension of data does not match the length of electrodes. Your data may be transposed.
[NWBI.check_subject_sex] ecephys_tutorial.nwb — Subject.sex is missing.
2022-11-09 17:38:48,387 [ INFO] Logs saved in /home/yoh/.cache/dandi-cli/log/20221109223846Z-1414634.log
❯ echo $?
1 colors aren't copy/pasted but nwbinspector also has the same CRITICAL error and sex among other recommended practices issues (not sure why we have only sex warning and not the others,,, need to check)❯ nwbinspector ecephys_tutorial.nwb
/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3/lib/python3.10/site-packages/hdmf/spec/namespace.py:531: UserWarning: Ignoring cached namespace 'core' version 2.4.0 because version 2.5.0 is already loaded.
warn("Ignoring cached namespace '%s' version %s because version %s is already loaded."
/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3/lib/python3.10/site-packages/pynwb/ecephys.py:90: UserWarning: ElectricalSeries 'ElectricalSeries': The second dimension of data does not match the length of electrodes. Your data may be transposed.
warnings.warn("%s '%s': The second dimension of data does not match the length of electrodes. "
Inspecting NWBFiles...: 0%| | 0/1 [00:00<?, ?it/s]/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3/lib/python3.10/site-packages/pynwb/ecephys.py:90: UserWarning: ElectricalSeries 'ElectricalSeries': The second dimension of data does not match the length of electrodes. Your data may be transposed.
warnings.warn("%s '%s': The second dimension of data does not match the length of electrodes. "
**************************************************
NWBInspector Report Summary
Timestamp: 2022-11-09 17:46:36.829704-05:00
Platform: Linux-5.19.0-2-amd64-x86_64-with-glibc2.35
NWBInspector version: 0.4.17
Found 7 issues over 1 files:
1 - CRITICAL
6 - BEST_PRACTICE_SUGGESTION
**************************************************
0 CRITICAL
===========
0.0 ecephys_tutorial.nwb: check_electrical_series_dims - 'ElectricalSeries' object at location '/acquisition/ElectricalSeries'
Message: The second dimension of data does not match the length of electrodes. Your data may be transposed.
1 BEST_PRACTICE_SUGGESTION
===========================
1.1 ecephys_tutorial.nwb: check_description - 'Subject' object at location '/general/subject'
Message: Description is missing.
1.2 ecephys_tutorial.nwb: check_description - 'ElectricalSeries' object at location '/acquisition/ElectricalSeries'
Message: Description ('no description') is a placeholder.
1.3 ecephys_tutorial.nwb: check_experimenter_form - 'NWBFile' object at location '/'
Message: The name of experimenter 'Dr. Bilbo Baggins' does not match any of the accepted DANDI forms: 'LastName, Firstname', 'LastName, FirstName MiddleInitial.' or 'LastName, FirstName, MiddleName'.
1.4 ecephys_tutorial.nwb: check_keywords - 'NWBFile' object at location '/'
Message: Metadata /general/keywords is missing.
1.5 ecephys_tutorial.nwb: check_subject_sex - 'Subject' object at location '/general/subject'
Message: Subject.sex is missing.
1.6 ecephys_tutorial.nwb: check_col_not_nan - 'DynamicTable' object with name 'electrodes'
Message: Column 'imp' has all NaN values. Consider removing it from the table.
so -- the question remains - how are we getting absent sex to be an error? |
That was upgraded to CRITICAL a while back at the discretion of @bendichter at @satra's request, I believe: NeurodataWithoutBorders/nwbinspector#247 We've required subject species, age, and sex ever since that was merged. That's also the state it was left in (and checked by me last time I worked with this stuff) after #1108 (in which I also mentioned the heightened metadata requirements).
I'm unsure about all this newfangled display of the suggestion-level stuff or coloration, but you'd expect to see both of them there as CRITICAL level things preventing dandi validation. The first is a problem with the tutorial itself, though.
As @djarecka pointed out, you need to run it with |
Fix is now merged and available in NWB Inspector v0.4.18 |
I am trying to upload this file
ecephys_tutorial.nwb.zip
but when I run
dandi upload
I getThe log does not appear to give me any useful information about why validation failed
20220616060840Z-86009.log
The standard way of validating NWB files,
python -m pynwb.validate sub-001/sub-001_ecephys.nwb
yields no errors.Running nwbinspector does not help either, as all of the messages are "best practice suggestions" and should not prevent an upload:
Two separate issues here.
The text was updated successfully, but these errors were encountered: