You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learner for regression models does not have the vocab parameter as it is generally a list of labels. While tracking experiments with neptune-ai for fastai/tsai the experiment fails as the vocab parameter is expected by neptune callback.
The training starts and neptune logs everything normally.
Traceback
For the above snippet
Partial Traceback:
AttributeError: 'InceptionTime' object has no attribute '_vocab'
Complete Traceback:
Info (NVML): NVML Shared Library Not Found. GPU usage metrics may not be reported. For more information, see https://docs.neptune.ai/you-should-know/what-can-you-log-and-display#hardware-consumption
119it [00:03, 39.47it/s]
66it [00:01, 43.77it/s]
epoch train_loss valid_loss mae _rmse time
Traceback (most recent call last):
File "/Users/abhijitramesh/Development/DeepLearning/example.py", line 20, in <module>
main()
File "/Users/abhijitramesh/Development/DeepLearning/example.py", line 16, in main
learn.fit_one_cycle(50, 1e-2)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastai/callback/schedule.py", line 116, in fit_one_cycle
self.fit(n_epoch, cbs=ParamScheduler(scheds)+L(cbs), reset_opt=reset_opt, wd=wd)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastai/learner.py", line 221, in fit
self._with_events(self._do_fit, 'fit', CancelFitException, self._end_cleanup)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastai/learner.py", line 163, in _with_events
try: self(f'before_{event_type}'); f()
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastai/learner.py", line 141, in __call__
def __call__(self, event_name): L(event_name).map(self._call_one)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastcore/foundation.py", line 155, in map
def map(self, f, *args, gen=False, **kwargs): return self._new(map_ex(self, f, *args, gen=gen, **kwargs))
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastcore/basics.py", line 698, in map_ex
return list(res)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastcore/basics.py", line 683, in __call__
return self.func(*fargs, **kwargs)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastai/learner.py", line 145, in _call_one
for cb in self.cbs.sorted('order'): cb(event_name)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastai/callback/core.py", line 45, in __call__
if self.run and _run: res = getattr(self, event_name, noop)()
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/neptune_fastai/impl/__init__.py", line 163, in before_fit
self._log_model_configuration()
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/neptune_fastai/impl/__init__.py", line 139, in _log_model_configuration
'details': self._vocab,
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastcore/basics.py", line 389, in __getattr__
if attr is not None: return getattr(attr,k)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/fastcore/basics.py", line 389, in __getattr__
if attr is not None: return getattr(attr,k)
File "/Users/abhijitramesh/Development/DeepLearning/Theta-Tech-ai/Semler-Consulting-local/Semler-Consulting-local/Semler-Consulting/integration/qf_plus_trained/env/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'InceptionTime' object has no attribute '_vocab'
Shutting down background jobs, please wait a moment...
Done!
Waiting for the remaining 86 operations to synchronize with Neptune. Do not kill this process.
All 86 operations synced, thanks for waiting!
Describe the bug
Learner for regression models does not have the vocab parameter as it is generally a list of labels. While tracking experiments with neptune-ai for fastai/tsai the experiment fails as the vocab parameter is expected by neptune callback.
neptune-fastai/neptune_fastai/impl/__init__.py
Line 200 in b8e0f3c
neptune-fastai/neptune_fastai/impl/__init__.py
Line 249 in b8e0f3c
This should be an optional parameter since fastai and tsai by default exclude
_vocab
for regression models.Reproduction
This code is taken from https://timeseriesai.github.io/tsai/tutorials.html#Time-series-regression with modification to include neptune tracking.
Run the above snippet.
Expected behavior
The training starts and neptune logs everything normally.
Traceback
For the above snippet
Partial Traceback:
Complete Traceback:
Environment
The output of
pip list
:The operating system you're using: macOS 12.0.1
The output of
python --version
: Python 3.9.5Additional context
I found hotfix's for the problem but its not ideal:
neptune-fastai/neptune_fastai/impl/__init__.py
Line 249 in b8e0f3c
This is not ideal we need vocab for classification.
learn._vocab=[]
These fixes are not ideal, vocab should be optional parameter in the init.py for the neptune_fastai implementation.
The text was updated successfully, but these errors were encountered: