-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat(api): Support changing return tip height by tip size type #13157
feat(api): Support changing return tip height by tip size type #13157
Conversation
Codecov Report
@@ Coverage Diff @@
## internal-release_0.14.0 #13157 +/- ##
===========================================================
- Coverage 72.58% 72.54% -0.05%
===========================================================
Files 2372 2395 +23
Lines 65437 66123 +686
Branches 7202 7387 +185
===========================================================
+ Hits 47500 47967 +467
- Misses 16197 16404 +207
- Partials 1740 1752 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
When executing this on a Flex, I'm getting a KeyError
at the load_pipette()
step.
Jul 25 16:19:52.526304 737c08 opentrons-api[715]: Execution of ce6e8252-703a-4e36-89f2-27de164cc71b failed
Traceback (most recent call last):
File "/opt/opentrons-robot-server/opentrons/protocol_engine/execution/command_executor.py", line 108, in execute
result = await command_impl.execute(command.params) # type: ignore[arg-type]
File "/opt/opentrons-robot-server/opentrons/protocol_engine/commands/load_pipette.py", line 58, in execute
loaded_pipette = await self._equipment.load_pipette(
File "/opt/opentrons-robot-server/opentrons/protocol_engine/execution/equipment.py", line 215, in load_pipette
static_pipette_config = pipette_data_provider.get_pipette_static_config(
File "/opt/opentrons-robot-server/opentrons/protocol_engine/resources/pipette_data_provider.py", line 84, in get_pipette_static_config
k.value: v for k, v in pipette_dict["supported_tips"].items()
KeyError: 'supported_tips'
Jul 25 16:19:52.541784 737c08 opentrons-api[715]: Exception raised by protocol
Traceback (most recent call last):
File "/opt/opentrons-robot-server/opentrons/protocol_runner/task_queue.py", line 72, in _run
await self._run_func()
File "/opt/opentrons-robot-server/opentrons/protocol_runner/legacy_wrappers.py", line 171, in execute
await to_thread.run_sync(run_protocol, protocol, context)
File "/opt/opentrons-robot-server/anyio/to_thread.py", line 28, in run_sync
return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable,
File "/opt/opentrons-robot-server/anyio/_backends/_asyncio.py", line 802, in run_sync_in_worker_thread
return await future
File "/opt/opentrons-robot-server/anyio/_backends/_asyncio.py", line 740, in run
result = func(*args)
File "/opt/opentrons-robot-server/opentrons/protocols/execution/execute.py", line 27, in run_protocol
run_python(protocol, context)
File "/opt/opentrons-robot-server/opentrons/protocols/execution/execute_python.py", line 61, in run_python
exec("run(__context)", new_globs)
File "<string>", line 1, in <module>
File "laura_pick_up_return_test.py", line 8, in run
File "/opt/opentrons-robot-server/opentrons/protocols/api_support/util.py", line 383, in _check_version_wrapper
return decorated_obj(*args, **kwargs)
File "/opt/opentrons-robot-server/opentrons/protocol_api/protocol_context.py", line 782, in load_instrument
instrument_core = self._core.load_instrument(
File "/opt/opentrons-robot-server/opentrons/protocol_api/core/engine/protocol.py", line 414, in load_instrument
load_result = self._engine_client.load_pipette(instrument_name, engine_mount)
File "/opt/opentrons-robot-server/opentrons/protocol_engine/clients/sync_client.py", line 176, in load_pipette
result = self._transport.execute_command(request=request)
File "/opt/opentrons-robot-server/opentrons/protocol_engine/clients/transports.py", line 62, in execute_command
raise ProtocolCommandFailedError(
opentrons.protocol_engine.errors.error_occurrence.ProtocolCommandFailedError: Error 4000 GENERAL_ERROR (ProtocolCommandFailedError): PythonException: KeyError: 'supported_tips'
Here's my protocol:
requirements = {
"apiLevel": "2.15",
"robotType": "Flex",
}
def run(protocol):
pipette = protocol.load_instrument("p1000_multi_flex", mount="right")
tip_racks = [
protocol.load_labware(n, s)
for s, n in [
("C1", "opentrons_flex_96_tiprack_1000ul"),
("C2", "opentrons_flex_96_tiprack_200ul"),
("C3", "opentrons_flex_96_tiprack_50ul"),
]
]
for t in tip_racks:
pipette.pick_up_tip(t["A1"])
pipette.drop_tip(t["A12"])
tip_configuration = static_config.tip_configuration_lookup_table[ | ||
attached_tip.volume | ||
] |
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.
Does this need a fallback, e.g. for custom tip racks?
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.
No not right now. See my long-ish comment in this ticket.
The liquid settings are mapped by pipette tip volume rather than tiprack URI.
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.
The liquid settings are mapped by pipette tip volume rather than tiprack URI.
Hmm, but even then, what guarantees that the tip volume will be one of the keys in this dict? Like, what if I have a weird tip rack with 140 µL tips? Or 300µL tips that actually only have a 270µL volume
because they have a filter?
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.
Happy to fallback to a default value that is equivalent to the max volume of the pipette, however, we aren't supporting 3rd party tips at launch and this shouldn't be a concern imo.
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.
Discussed on Slack: Although the Flex isn't supporting 3rd-party tips at launch, the OT-2 runs through this same codepath, so we'll add a fallback so the OT-2 keeps working.
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.
Tested again on an OT-3 with the latest changes. Still works, yay!
Approving now so we can merge this to unblock ABR testing. Separately, I'll test on an OT-2 with custom tip racks and review the code more closely.
Overview
Closes RSS-275 although not specifically as the ticket requested. Please see the comment in the ticket for more details.
Test Plan
Using a P1000 pipette on the flex, pick up and return tip from the following tipracks:
(Tested by @SyntaxColoring)
And observe that the return tip heights do not cause any crashes into the tipracks.
Changelog
Review requests
Check to see if anything seems weird or icky.
Risk assessment