Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception occured in ProgressCallback #119

Open
abdulsam opened this issue Aug 5, 2023 · 0 comments
Open

Exception occured in ProgressCallback #119

abdulsam opened this issue Aug 5, 2023 · 0 comments

Comments

@abdulsam
Copy link

abdulsam commented Aug 5, 2023

I'm trying to run this file by using google colab.

I followed all the steps, and run the file using the following command:
!python /content/train.py

I'm getting the following error

Traceback (most recent call last):
File "/content/train.py", line 124, in
train(args)
File "/content/train.py", line 100, in train
learn.fit_one_cycle(config.epochs, config.lr, cbs=cbs)
File "/usr/local/lib/python3.10/dist-packages/fastai/callback/schedule.py", line 119, in fit_one_cycle
self.fit(n_epoch, cbs=ParamScheduler(scheds)+L(cbs), reset_opt=reset_opt, wd=wd, start_epoch=start_epoch)
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 264, in fit
self._with_events(self._do_fit, 'fit', CancelFitException, self._end_cleanup)
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 199, in with_events
try: self(f'before
{event_type}'); f()
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 253, in _do_fit
self._with_events(self._do_epoch, 'epoch', CancelEpochException)
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 199, in with_events
try: self(f'before
{event_type}'); f()
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 247, in _do_epoch
self._do_epoch_train()
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 239, in _do_epoch_train
self._with_events(self.all_batches, 'train', CancelTrainException)
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 199, in with_events
try: self(f'before
{event_type}'); f()
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 172, in call
def call(self, event_name): L(event_name).map(self._call_one)
File "/usr/local/lib/python3.10/dist-packages/fastcore/foundation.py", line 156, in map
def map(self, f, *args, **kwargs): return self._new(map_ex(self, f, *args, gen=False, **kwargs))
File "/usr/local/lib/python3.10/dist-packages/fastcore/basics.py", line 840, in map_ex
return list(res)
File "/usr/local/lib/python3.10/dist-packages/fastcore/basics.py", line 825, in call
return self.func(*fargs, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/fastai/learner.py", line 176, in _call_one
for cb in self.cbs.sorted('order'): cb(event_name)
File "/usr/local/lib/python3.10/dist-packages/fastai/callback/core.py", line 62, in call
except Exception as e: raise modify_exception(e, f'Exception occured in {self.__class__.__name__} when calling event {event_name}:\n\t{e.args[0]}', replace=True)
File "/usr/local/lib/python3.10/dist-packages/fastai/callback/core.py", line 60, in call
try: res = getcallable(self, event_name)()
File "/usr/local/lib/python3.10/dist-packages/fastai/callback/progress.py", line 27, in before_train
def before_train(self): self._launch_pbar()
File "/usr/local/lib/python3.10/dist-packages/fastai/callback/progress.py", line 37, in _launch_pbar
self.pbar.update(0)
File "/usr/local/lib/python3.10/dist-packages/fastprogress/fastprogress.py", line 59, in update
self.update_bar(0)
File "/usr/local/lib/python3.10/dist-packages/fastprogress/fastprogress.py", line 81, in update_bar
self.on_update(val, f'{pct}[{val}/{tot} {elapsed_t}{self.lt}{remaining_t}{end}]')
File "/usr/local/lib/python3.10/dist-packages/fastprogress/fastprogress.py", line 134, in on_update
elif self.parent is not None: self.parent.show()
File "/usr/local/lib/python3.10/dist-packages/fastprogress/fastprogress.py", line 177, in show
self.out.update(HTML(self.html_code))
AttributeError: Exception occured in ProgressCallback when calling event before_train:
'NoneType' object has no attribute 'update'

Please help me to resolve this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant