Pulser icon indicating copy to clipboard operation
Pulser copied to clipboard

[FEAT] Handle batches with partial results

Open MatthieuMoreau0 opened this issue 7 months ago • 1 comments

  • Stop raising an Exception if one of the job of the batch has no results after fetching.
  • Stop raising an exception when fetching results if the status of the batch is a termination status.

Currently if one of the job of a batch fails, it is impossible to retrieve the results for any jobs of the batch - this raises an exception. In this PR, I suggest instead to add None to the list of results for that submission when a job has no results. I don't know if returning None is the most idiomatic way to do this in pulser; I also contemplated creating a new subclass of Result called EmptyResult but I wanted to gather some feedback before going for that because it would imply some refactoring of the Result class and I'm not entirely convinced it would bring much.

MatthieuMoreau0 avatar Jul 10 '24 10:07 MatthieuMoreau0