Is it possible to have a module without a __call__ or compact? #519
Unanswered
dieterichlawson
asked this question in
Q&A
Replies: 2 comments 5 replies
-
To answer my own question, it seem that having an empty
This is not ideal, however. In general, it seems that the user experience for modules that use multiple methods, and methods which are not named
This is verbose for my taste. Is there a way to have it be something more like
? |
Beta Was this translation helpful? Give feedback.
5 replies
-
Hey just wanted to let you know that I’m on vacation this week so won’t be
able to respond until next Monday. Thanks for considering this stuff!
…On Sun, Oct 11, 2020 at 7:32 AM Avital Oliver ***@***.***> wrote:
module.apply(params).other_method(arg1, arg2) might be reasonable -- it's
just currying our current apply method differently.
The upside is that we no longer have to supply a janky way to decide which
method to call.
The downside is that we would have to explain that if you special the
mutable argument to apply then the return value of other_method would be output,
updated_variables, not just the output.
Curious to hear @jheek <https://github.com/jheek> and @levskaya
<https://github.com/levskaya>'s thoughts. @shoyer
<https://github.com/shoyer> also liked this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#519 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABD74BEGYWC5RIOT6P5F4TSKGXX7ANCNFSM4SIBYISA>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am writing a module which has several methods which use the parameters of the module but where none of them are 'privileged' over the other. So it doesn't really make senses for one of them to be called
__call__
. Is it possible to write a module without__call__
orcompact
in this case?Beta Was this translation helpful? Give feedback.
All reactions