Closed ivallesp closed 3 years ago
In case somebody else faces this issue, the workaround is to downgrade to ray===1.0.0
. In this version the same warnings are dropped but the UnliftableError
disappears.
Thanks work the issue and workaround @ivallesp. cc @sven1977 have you seen this one?
There is an extra problem here. When you call trainer.export_policy_model("exported_model", "policy_01")
in the example above, the weights of all the defined policies are stored in the exported_model
folder, not only the ones of policy_01
as specified.
I have been reviewing the code and I have seen that the add_meta_graph_and_variables
function here adds the variables of all the policies defined in the tf session, although the signature_def_map
defined two lines above is correctly built. I don't find any workaround for now.
Thanks for filing this @ivallesp! Taking a look rn. I can reproduce the above error.
Could you try this fix here? It's working for me. The problem is apparently that for some reason, the timestep
placeholder must be one with default value. I'm not understanding fully, why that's the case. The example is further reducable to non multi-agent (e.g. CartPole and no multiagent
config), num_workers=0, simple_optimizer=True (I thought it may have had something to do with the multi-GPU optimizer's copying the policies, but it doesn't).
https://github.com/ray-project/ray/pull/12786
@ivallesp
Could simply be a tf1.x quirk.
Closing this issue. Feel free to re-open if the above solution does not fix the problem on your end.
I was also able to make these Unable to create a python object for variable <tf.Variabl...
warnings go away. But these were unrelated to the actual error/crash.
What is the problem?
Ray version: 1.0.1 Tensorflow version: 2.3.1 Operative systems tested: Ubuntu 18.04 and MacOS Mojave
Hi, I am trying to export a trained policy in a multiagent environment as a tensorflow model, but it is dropping me an
UnliftableError
. I tried to simplify the reproduction script as much as possible.Reproduction (REQUIRED)
Once the model is saved, try to restore it in tensorflow with the following 2 lines.
This drops me the following error: