Pete

Results 208 comments of Pete

Ah, I see what the issue is. Thanks for bringing that up. #21 should solve this, but requires a small breaking change: Instead of: ```rust let handler = batched_fn! {...

Ugh, actually that won't work. There might be another way around this, but I'll have to put some more thought into it. I'll get back to you.

So, the reason configuration options need to be static is because the `batched_fn!` macro expands to define a `BatchedFn` instance and worker thread statically. These things need to be defined...

The handler function must return the results in the same order of the corresponding inputs.

In particular, when a new input is received, [`evaluate_in_batch()`](https://github.com/epwalsh/batched-fn/blob/402b978696208c3284dddba5dd11a3770993c76f/src/lib.rs#L361) is called, which [creates a new channel](https://github.com/epwalsh/batched-fn/blob/402b978696208c3284dddba5dd11a3770993c76f/src/lib.rs#L246) and then [sends the input and the sender](https://github.com/epwalsh/batched-fn/blob/402b978696208c3284dddba5dd11a3770993c76f/src/lib.rs#L250) to the background batch worker through...

Hi @RohanGautam, you are correct that the `handler` closure cannot be async. The `batched_fn!` macro was designed with the assumption that the `handler` would be blocking, and so `handler` is...

Hi @bb-1357, it seems that the issues with `ParameterList` won't be fixed anytime soon. https://github.com/pytorch/pytorch/issues/36035#issuecomment-770960405 This is unfortunate, but as far as I can tell, the only place in our...

Hi @shimengfeng, it's not on our immediate roadmap to add this to CopyNet, but I think it would be a great feature to have. Contributions definitely welcome on this.

It's certainly possible and shouldn't be too difficult. Contributions welcome!

Hi @HOZHENWAI, yes this would be a good fix to have. Feel free to open a PR when you're ready.