Skip to content

Conversation

@oameye
Copy link
Contributor

@oameye oameye commented Aug 5, 2025

At the moment it is just a copy of epmap with a result dictionary catching the results. I think this can be annoying for maintenance. So probably, we should make a kwarg in epmap_map that optionally saves the results in the dictionary. That way, we have more code reuse.

resolves #120

@samtkaplan
Copy link
Member

samtkaplan commented Aug 5, 2025

I agree, the duplicate code here doesn't seem quite right. Should we worry about type stability here (maybe we shouldn't since there is not really any performance critical code here)? That is, if it is controlled by a kwarg, then the return-type of epmap will depend on the value of that kwarg.

@oameye
Copy link
Contributor Author

oameye commented Aug 5, 2025

I don't think type stability would matter as epmap_map still has the same output. It would be a kwarg that mutates the result dictionary or not.

@oameye oameye marked this pull request as draft August 5, 2025 13:09
@oameye
Copy link
Contributor Author

oameye commented Aug 5, 2025

Could you run CI to see if the tests pass. Locally it ran fine, but it would like to know if there are any problems with CI

@samtkaplan
Copy link
Member

Presently, the epmap returns journal and eloop.task_pool_timed_out here. I was thinking that this would be changed to now return either journal,eloop.task_pool_timed_out or journal,eloop.task_pool_timed_out,results depending on the kwarg. But sounds like you have something else in mind? Were you thinking to change what is returned to a single dictionary? I think that would be fine. It would be a breaking change, but might be worth it.

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.

how to save the result with epmap.

2 participants