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

Skip evaluation of TensorFlow model if inputs are empty #45139

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

valsdav
Copy link
Contributor

@valsdav valsdav commented Jun 5, 2024

PR description:

Solves: #44481

Evaluating TensorFlow models with empty tensors is problematic. We observed different behavior on different architectures. It crashes on machines with AVX512 registers available, whereas it works fine and returns empty tensors.
In some cases incompatible shapes for operators are reported by the TF engine.

Related issues: #45136, #44333

This PR introduces a simple check for empty inputs in the central TensorFlow interface to avoid evaluation of the model for empty tensors.

PR validation:

A new test has been added calling the TF inference with empty tensors.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45139/40483

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2024

A new Pull Request was created by @valsdav for master.

It involves the following packages:

  • PhysicsTools/TensorFlow (ml)

@wpmccormack, @valsdav, @cmsbuild can you please review it and eventually sign? Thanks.
@riga, @makortel this is something you requested to watch as well.
@antoniovilela, @sextonkennedy, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@valsdav
Copy link
Contributor Author

valsdav commented Jun 5, 2024

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2024

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-50c1e6/39709/summary.html
COMMIT: e5ab42f
CMSSW: CMSSW_14_1_X_2024-06-05-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45139/39709/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 3 lines from the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3338862
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3338842
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@mmusich
Copy link
Contributor

mmusich commented Jun 5, 2024

urgent

  • backport urgent for data-taking

@cmsbuild cmsbuild added the urgent label Jun 5, 2024
@valsdav
Copy link
Contributor Author

valsdav commented Jun 5, 2024

+ml

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2024

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 581c010 into cms-sw:master Jun 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants