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

Pin pycromanager and MicroManager versions #119

Merged
merged 5 commits into from
Jun 24, 2022
Merged

Conversation

talonchandler
Copy link
Collaborator

@talonchandler talonchandler commented Jun 3, 2022

Two changes:

  1. This addresses [BUG] ZMQ < 4.0.0 fails --- check for MM version and block user if MM is too old #115 by warning the user about MicroManager compatibility issues and explicitly recommends the 20210713 nightly build (the build we're currently using on all scopes in the lab).
  2. This downgrades and pins pycromanager to version 0.13.2, the latest version that is compatible with the MM 20210713 nightly build (ZMQ version 4.0.0). The ZMQ warnings disappear.

Important related pycromanager discussion: micro-manager/pycro-manager#260

Instead of the approach I'm suggesting here, @ieivanov suggested that we always pull the latest pycromanager version and manually update whichever MM install we're using by copy-pasting .jars. I tried this approach and it works, but I'm hesitant to use it because it requires managing the .jars and Henry recommended against it.

Instead, I think we should do periodic updates like Henry suggests. We pick the latest MM version that works with our hardware and use the compatible pycromanager version. Every ~6 months, we can go through the effort of updating MM, testing our hardware, and updating pycromanager and recOrder. This means that each version of recOrder will be associated with a specific recommended version of MM and PM.

I think one of Ivan's concerns is that we might want the latest features of MM and PM, but the MM device adaptors aren't compatible. If this is the case, then I think we should document and report the incompatibilities like Nico suggests.

I will do more testing and wait for @ieivanov's comments (I hope I'm doing your concerns justice) before moving forward with this.

@deprecated-napari-hub-preview-bot
Copy link

deprecated-napari-hub-preview-bot bot commented Jun 3, 2022

Preview page for your plugin is ready here:
https://preview.napari-hub.org/mehta-lab/recOrder/119
Updated: 2022-06-23T23:43:41.927350

@ieivanov
Copy link
Contributor

I now agree that this is the most viable solution, thanks for testing @talonchandler.

As a way of mitigating some of these issues, I would occasionally only upgrade specific device adapters - I would compile a new version and paste it in the MM 20210713 folder, or I would download the latest MM version and move the new device adapter to MM 20210713. This work as long as the MM Core version doesn't change between these nightly builds. We should keep a long of which device adapters we update in this manner, which can also guide when to update to a new MM nightly build.

Comment on lines 1546 to 1548
if version.parse(reply_json['version']) < version.parse('4.0.0'):
print('WARNING: MicroManager version is incompatible with recOrder. Please upgrade to the latest tested MicroManager nightly build 20210713.')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This checks if the MM ZMQ version is lower than 4.0.0. It's also possible to install a newer MM version and try to use it with recorder. We should add a check for ZMQ version grater than 4.0.0 and recommend downgrading to MM 20210713

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I've fixed this in the latest commits.

@talonchandler talonchandler changed the title Fix pycromanager and MicroManager versions Pin pycromanager and MicroManager versions Jun 23, 2022
@talonchandler
Copy link
Collaborator Author

talonchandler commented Jun 23, 2022

Thanks Ivan!

I also tested recOrder's warning behavior with a few versions of micromanager before and after 20210713.

MM versions before ~2021 will not establish a bridge. To help with these cases I added a warning message that hints at reasons why the bridge may not be connecting:

Could not establish pycromanager bridge.
Is micromanager open?
Is Tools > Options > Run server on port 4827 checked?
Are you using nightly build 20210713?"

MM versions throughout ~2021 will "work" and prompt an MM upgrade.
MM versions newer than 20210713 will warn the user to downgrade, and different ZMQ versions give different behaviour: sometimes failing immediately, sometimes failing at acquisition time (like the serial spewing Soorya and I observed), and sometimes working okay.

@talonchandler
Copy link
Collaborator Author

We should keep a log of which device adapters we update in this manner, which can also guide when to update to a new MM nightly build.

All sounds good to me. My current plan for managing device drivers is to put them in the github release for each recOrder version. As a start, I've added the Meadowlark device drivers to the 0.1.0 release, and I'm happy to add other relevant drivers to this release if you think it makes sense.

I've also linked to these drivers in the new and improved installation guide that I'm using to support an installation at UW.

@talonchandler talonchandler merged commit 776769c into main Jun 24, 2022
@talonchandler talonchandler deleted the PM-MM-versioning branch June 24, 2022 00:17
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.

[BUG] ZMQ < 4.0.0 fails --- check for MM version and block user if MM is too old
2 participants