Error while executing "tlt-export" command inside docker "tlt-streamanalytics: v3.0-dp-py3"

Hi! I have some problems with “tlt-export” tool.
I working inside docker-image . Firstly, I trained my model through command tlt-train and I received model file with .tlt extension. But when I try execute command tlt-export for generating .etlt file, I receive error message, as shown below:

root@65507a588031:/workspace/tlt-experiments/trained_model# tlt-export -m 2classes_first120epoch_freeze012.tlt -k tlt_encode -o 2classes_first120epoch_freeze012.etlt
Using TensorFlow backend.
2021-05-25 14:14:40.718789: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library
WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.
Traceback (most recent call last):
File “/usr/local/bin/tlt-export”, line 5, in
from import main
ImportError: cannot import name ‘main’

After it, I checked list of tlt binaries through ll command, as shown below:

root@65507a588031:/workspace/tlt-experiments/trained_model# ll /usr/local/bin/tlt*
-rwxr-xr-x 1 root root 241 Feb 6 01:46 /usr/local/bin/tlt-dataset-convert*
-rwxr-xr-x 1 root root 227 Feb 6 01:46 /usr/local/bin/tlt-evaluate*
-rwxr-xr-x 1 root root 222 Feb 6 01:46 /usr/local/bin/tlt-export*
-rwxr-xr-x 1 root root 224 Feb 6 01:46 /usr/local/bin/tlt-infer*
-rwxr-xr-x 1 root root 229 Feb 6 01:46 /usr/local/bin/tlt-int8-tensorfile*
-rwxr-xr-x 1 root root 224 Feb 6 01:46 /usr/local/bin/tlt-prune*
-rwxrwxr-x 1 root root 741 Oct 20 2020 /usr/local/bin/tlt-train*
-rwxr-xr-x 1 root root 224 Feb 6 01:46 /usr/local/bin/tlt-train-g1*

I have tlt-export tool, but it doesn’t work…

In TLT 3.0, the tlt-export command is deprecated.
See Migrating to TLT 3.0 — Transfer Learning Toolkit 3.0 documentation

With TLT v3.0, note that running the following commands from TLT v2.0 from Docker have been deprecated.

  • tlt-train
  • tlt-prune
  • tlt-evaluate
  • tlt-infer
  • tlt-export

I opened docker-image “tlt-streamanalytics: v3.0-dp-py3” and executed these commands inside the docker:

pip3 install nvidia-pyindex
pip3 install nvidia-tlt

After it, I checked installation, using this command:

tlt --help

What is the problem?

I wrote previous post with a solution to the problem for other people who may face a similar problem

Thanks for the info.