-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Unitary hack] Improve Docstrings in "task/batch" #972
Conversation
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.
I appreciate the contribution to the code base but I think it would be a bit beyond the scope of the unitary hack issue. If you want to contribute a change to something other than the docs we should have this be a separate PR.
def __str__(self) -> str: | ||
output = "" | ||
for task_index, task_error in self.task_errors.items(): | ||
output += ( | ||
f"Task {task_index} failed to submit with error: " | ||
f"{task_error.exception_type}\n" | ||
f"{task_error.stack_trace}" | ||
) | ||
|
||
return output | ||
|
||
|
||
@BatchErrors.set_serializer | ||
def _serialize(self: BatchErrors) -> Dict[str, List]: | ||
return { | ||
"task_errors": [ | ||
(task_number, task_error) | ||
for task_number, task_error in self.task_errors.items() | ||
] | ||
} | ||
|
||
|
||
@BatchErrors.set_deserializer | ||
def _deserialize(obj: dict) -> BatchErrors: | ||
return BatchErrors(task_errors=OrderedDict(obj["task_errors"])) |
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.
why did you delete this code? this is making the CI fail. Please add this code back.
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.
I realize I made a mistake while merging conflicts. I was updating the docstrings as part of the unitary hack issue. I will resolve it. Thanks for correcting me.
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 problem, if you need help setting up your development environment take a look at our docs page on that: https://bloqade.quera.com/latest/contributing/developing-bloqade/
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.
@shubhusion can I close this PR? I haven't seen any updates on it
Fixes #957
Improve function docstrings and Remove markdown errors