rlgraph / rlgraph

RLgraph: Modular computation graphs for deep reinforcement learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Core] Make it optional for Components to describe which input-args they need in order to create their variables.

sven1977 opened this issue · comments

Currently this is done purely implicitly by the naming and organization of the set of all API-input args. E.g. a Component has the API-methods:
api_a(self, arg1, arg2) and api_b(arg2).

It hence needs both arg1 and arg2 in order to be input complete.
If for example, arg1 is not important for variable creation, one can already do:

@rlgraph_api(must_be_complete=False)
def api_a(self, arg1, arg2):

However, this is tedious and not intuitive (e.g. what if arg2 is not important, then both methods would have to be tagged via must_be_complete=False), which in turn would make this Component always "input-complete" even though it may not know it's Spaces yet and variable creation will fail.

Suggestion: Get rid of "must_be_complete" option and instead allow user to specify, which input args are needed for variable creation (maybe via a decorator of the create_variables method).
This specification will be optional. The auto-inference system will not be affected by this (most components are easily, automatically and intuitively input-completable).