Skip to content

TRex package contains functions that do not work as expected. #4161

New issue

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

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

Already on GitHub? # to your account

Open
4gt-104 opened this issue Sep 26, 2024 · 1 comment · May be fixed by #4162
Open

TRex package contains functions that do not work as expected. #4161

4gt-104 opened this issue Sep 26, 2024 · 1 comment · May be fixed by #4162
Labels
triaged Issue has been triaged by maintainers

Comments

@4gt-104
Copy link

4gt-104 commented Sep 26, 2024

Description

The trex.df_preprocessing module contains two functions that do not perform as expected: clean_df and clean_for_display.

The clean_df function includes an unintended list comprehension that fails to properly clean up the dataframe by removing columns.
This issue also affects the clean_for_display function.

Environment

TensorRT Version: 8.2

NVIDIA GPU: Jetson Nano developer kit (4 GB RAM), Jetpack 4.6.4

NVIDIA Driver Version: Jetson Nano developer kit (4 GB RAM), Jetpack 4.6.4

CUDA Version: 10.2.300

CUDNN Version: 8.2.1.32

Operating System: Jetpack 4.6.4, L4T 32.7.4

Python Version (if applicable): 3.10.15

Baremetal or Container (if so, version): Baremetal

Steps To Reproduce

  • Generate an Engine Plan as described in tools/experimental/trt-engine-explorer/notebooks/tutorial.ipynb.
  • Check which columns should be deleted with clean_for_display function.

As an alternative execute the following block of code, which includes the list comprehension copied from clean_df function.

from trex.df_preprocessing import layer_attributes
columns = set([col for col_list in layer_attributes.keys() for col in col_list])
print(columns)
Result is:
     {'2', 'C', 'S', 'R', 'P', 'W', 'V', 'c', 'a', 'g', 'f', 'e', 'i', 'h', 'o', 'n', 'm', 'l', 's', 'r', 'v', 'u', 't', 'z'}
Should be:
    ['subtype', 'Groups', 'OutMaps', 'Stride', 'Kernel', 'HasBias', 'Activation', 'HasReLU', 'PaddingMode', 'PrePadding', 'PostPadding', 'Dilation', 'AllowSparse', 'Weights', 'Bias', 'Dimensions', 'ConvolutionTacticIndex', 'Operations', 'NbOperations', 'Operations', 'NbOperations', 'NbInputArgs', 'InputArgs', 'NbOutputVars', 'OutputVars', 'NbLiterals', 'Literals', 'NbParams', 'Params', 'Instructions', 'NbInstructions', 'NbInputs', 'InputArgs', 'NbOutputVars', 'OutputVars', 'NbLiterals', 'Literals', 'NbParams', 'Params', 'Origin', 'PoolingType', 'WindowSize', 'AverageCountExcludesPadding', 'PaddingMode', 'Stride', 'PrePadding', 'PostPadding', 'BlendFactor', 'Mode', 'Shift', 'Scale', 'Power', 'Activation', 'ChannelAxis', 'FirstTranspose', 'SecondTranspose', 'Reshape', 'ZeroIsPlaceholder', 'ParameterSubType', 'ResizeMode', 'ResizeScales', 'NNRounding', 'Start', 'CoordTransform', 'ResizeSelector', 'Start', 'Stride', 'Size', 'Mode', 'negativeInfinityPadding', 'ParameterType', 'weights', 'dimensions', 'TacticValue']
4gt-104 added a commit to 4gt-104/TensorRT that referenced this issue Sep 26, 2024
Fix 'clean_df' function in 'trex/df_preprocessing.py' module
which misbehaves not selecting any existing columns to delete
in order to cleanup dataframe for visualization.

Resolves: NVIDIA#4161
Signed-off-by: Tigran Grigoryan <grigoryan.tigran119@gmail.com>
@4gt-104 4gt-104 linked a pull request Sep 26, 2024 that will close this issue
@yuanyao-nv
Copy link
Collaborator

@nzmora-nvidia Can you please take a look at the issue and PR?

@yuanyao-nv yuanyao-nv added triaged Issue has been triaged by maintainers Tools: other labels Oct 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants