Skip to content
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

add name parameter to the DeepLabCutInterface #917

Merged
merged 13 commits into from
Jul 11, 2024
Merged

add name parameter to the DeepLabCutInterface #917

merged 13 commits into from
Jul 11, 2024

Conversation

vigji
Copy link
Contributor

@vigji vigji commented Jun 19, 2024

This PR should fix the issue described in #915.

It consists in the small addition of a name argument to the DeepLabCutInterface that allows users to specify names different from the nwb-pose default PoseEstimation (https://github.com/rly/ndx-pose/blob/a847ad4be75e60ef9e413b8cbfc99c616fc9fd05/spec/ndx-pose.extensions.yaml#L71).

To work, the call to dlc2nwb. _write_pes_to_nwbfile() should accept additional arguments, as described in DeepLabCut/DLC2NWB#24. At the moment, and until dlc2nwb people give feedback on that issue, this functionality would require a different fork of dlc2nwb: https://github.com/vigji/DLC2NWB.

@vigji
Copy link
Contributor Author

vigji commented Jun 19, 2024

Reasonable suggestion! Let me know if there is anything else I should do

@CodyCBakerPhD
Copy link
Member

CodyCBakerPhD commented Jun 20, 2024

Last thing to do would be to add a new test case that uses this new feature after the current test case: https://github.com/catalystneuro/neuroconv/blob/main/tests/test_on_data/test_behavior_interfaces.py#L317

Which would also require setting developer dependencies (in the form of git+https://github.com/vigji/dlc2nwb.git@main to https://github.com/catalystneuro/neuroconv/blob/main/src/neuroconv/datainterfaces/behavior/deeplabcut/requirements.txt) to install the version of the DLC tools that allow for it so we can make sure both packages work well together

@vigji
Copy link
Contributor Author

vigji commented Jun 20, 2024

Last thing to do would be to add a new test case that uses this new feature after the current test case: https://github.com/catalystneuro/neuroconv/blob/main/tests/test_on_data/test_behavior_interfaces.py#L317

Hope I did this correctly

Which would also require setting developer dependencies (in the form of git+https://github.com/vigji/dlc2nwb.git@main to https://github.com/catalystneuro/neuroconv/blob/main/src/neuroconv/datainterfaces/behavior/deeplabcut/requirements.txt) to install the version of the DLC tools that allow for it so we can make sure both packages work well together

I changed this in requirements-testing.txt, is this correct?

@CodyCBakerPhD
Copy link
Member

Test looks good! Will need to wait a bit to merge upstream before getting this through

Thanks for all the work

@vigji
Copy link
Contributor Author

vigji commented Jul 4, 2024

Perfect, let me know if there's anything more I need to take care of, and thank you :)

@vigji
Copy link
Contributor Author

vigji commented Jul 5, 2024

After having tested this in parallel with the VideoInterface for the conversion project, I have to say I am slightly annoyed by the different approaches to solve the same issue: an argument to the object instantiation there, an optional parameter to the conversion function call here. Should I change this to be consistent with VideoInterface? What would be your approach? Am I missing something?

@CodyCBakerPhD
Copy link
Member

The usual excuse for that is that various decisions were made for the sake of maintaining back-compatibility; the video interfaces is one of our oldest and most used interfaces after all (since it is so generic) - so if we were to change something fundamental about it, it might cause problems for a number of conversion pipelines

That said, we do try to standardize these things with slow deprecation cycles every now and again. Enhancing the video interfaces is something we've wanted to do for a while now but no one has had the time to implement all improvements

@vigji
Copy link
Contributor Author

vigji commented Jul 8, 2024

Perfectly reasonable! So the strategy used here for the DeeplacutInterface is the way to go, correct?

@CodyCBakerPhD
Copy link
Member

Yes, something like a container name seems to me something more relevant as a conversion option (this is also the case in ophys/ecephys modules here)

Just waiting on the upstream repo to respond to PR and we can get this through. I'll inject myself there soon otherwise just to get this done

@CodyCBakerPhD CodyCBakerPhD changed the base branch from main to port_dlc2nwb July 10, 2024 18:31
@CodyCBakerPhD
Copy link
Member

@vigji Sorry this took so long; we're just taking matters into our own hands at this point

There should be a box somewhere on this PR about giving reviewers permission to push code or something like that - if you check that box I'd be happy to make the required changes to get this through

@vigji
Copy link
Contributor Author

vigji commented Jul 10, 2024

Great! thanks! Could not find such button but I should have applied all changes.

@CodyCBakerPhD
Copy link
Member

@vigji There is a remaining merge conflict which must be resolved via the CLI (be sure to try to merge port_dlc2nwb on our end)

@CodyCBakerPhD CodyCBakerPhD merged commit d3ea2a1 into catalystneuro:port_dlc2nwb Jul 11, 2024
4 checks passed
@CodyCBakerPhD
Copy link
Member

Thanks again @vigji !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants