question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using callback for GAIL [question]

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
prabhasakcommented, Apr 26, 2020

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!

1reaction
prabhasakcommented, Apr 26, 2020

Hi. The issue is still unresolved. Closed this by mistake! (opened another better-worded issue)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found