Backend kwargs

something that Guy Burroughes suggested to me is that we should put backend kwargs in objects rather than using python kwargs

lh.aspirate(
  containers,
  vols,
  params,
  kwarg1=X,
  kwarg2=Y,
)

is difficult to make this code hardware agnostic, since it’s not clear which are params are kwargs vs just normal parameters.

it is better to have sth like this:

lh.aspirate(
  containers,
  vols,
  params,
  backend_params=STARAspirateParams(
    kwarg1=X,
    kwarg2=Y,
  ),
)

so that it is obvious which params are which and also makes it easy to switch robots around:

lh.aspirate(
  containers,
  vols,
  params,
  backend_params=EVOAspirateParams(
    kwarg1=X,
    kwarg2=Y,
  ),
)

I plan on implementing this since in v1 it’s a good suggestion. The type for backend_params should just be Serializable, the backends will deal with the rest.

Thoughts?

2 Likes

In favor!

2 Likes