Hi, and sorry for what looks like a trivial question.
I am trying to export my learner, including the data loaders. I have noticed that export
explicitly resets this information. See the line, from the source code of Learner.export
:
self.dls = self.dls.new_empty()
So it is no wonder that after using load_learner
(and then learner.load
for good measure) my data loaders are empty (print(len(learner.dls.train))
returns 0).
So my two questions are:
- What is the logic behind this? It does not look like accidental behaviour or a bug!
- Is there a proper way to export my data loaders or do I need to create them each time?