Using callback for GAIL [question]
See original GitHub issueI am trying to save the GAIL model during training. I’m using the example code from the Callback documentation as reference:
from stable_baselines import GAIL
from stable_baselines.gail import ExpertDataset, generate_expert_traj
from stable_baselines.common.callbacks import CheckpointCallback
checkpoint_callback = CheckpointCallback(save_freq=1000, save_path='./logs/', name_prefix='gail')
dataset = ExpertDataset(expert_path='C:/IL_UAV/GAIL-TF-SB/stable_baselines/gail/dataset/expert_pendulum.npz', traj_limitation=10, verbose=1)
model = GAIL('MlpPolicy', 'Pendulum-v0', dataset, verbose=1)
model.learn(2000, callback=checkpoint_callback)
I get the following **AttributeError:** 'NoneType' object has no attribute 'process'
. What should I be doing?
PS: I am relatively new to both Stable Baselines and RL!
System Info
- Python 3.7.0
- Tensorflow 1.14.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Using Callback Best Practice Question
My question is what difference does it make whether I add my code in the main ISR routine or in the callback function?...
Read more >JavaScript Callback Functions – What are Callbacks in JS ...
Callbacks make sure that a function is not going to run before a task is completed but will run right after the task...
Read more >Callbacks — Stable Baselines 2.10.3a0 documentation
A callback function takes the locals() variables and the globals() variables from the model, then returns a boolean value for whether or not...
Read more >language agnostic - What is a callback function?
A not simple explanation is available on Wikipedia. However we can say it more simply: Using the callback principle is like giving a...
Read more >real estate compliance officer salary
Those relating to zoning and environmental should be listed in response to question 12. President, Hoag Hospital Foundation. 2,081 Real Estate Compliance ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @haochihlin!
You’re right, sincere apologies (just edited my earlier reply.) I checked things in a hurry, and wrote just
main
in place of__main__
so the code never really ran, and hence showed no errors. There are a quite a few mistakes and inefficiencies in this whole thread.@araffin, it would be great if you could delete this issue. I will open a new issue with a clear description of the error. Sorry for the trouble!
Hi. The issue is still unresolved. Closed this by mistake! (opened another better-worded issue)