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

Improved options handling for TensorFlow sessions #41276

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

valsdav
Copy link
Contributor

@valsdav valsdav commented Apr 4, 2023

PR description:

This PR is a follow up from PR #40551, #40551 (comment).

The PR improves the handling of the TF interface options by creating a new struct:

Options {
    int _nThreads;
    Backend _backend;
    SessionOptions _options;
}

This change allows to have always a well defined default backend for TF sessions created with default options.
Moreover it simplifies the multiple overloaded functions for TF graph loading and session creation.

We will try to make the interface to ONNX more similar to the TF one in a separate PR, as in #39402

PR validation:

Technical PR: no changes on the reconstruction output are expected.

@riga @yongbinfeng

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 4, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41276/35039

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 4, 2023

A new Pull Request was created by @valsdav (Davide Valsecchi) for master.

It involves the following packages:

  • PhysicsTools/TensorFlow (reconstruction)
  • RecoTauTag/RecoTau (reconstruction)

@cmsbuild, @mandrenguyen, @clacaputo can you please review it and eventually sign? Thanks.
@mbluj, @missirol, @riga, @azotz, @makortel this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@valsdav
Copy link
Contributor Author

valsdav commented Apr 12, 2023

Hi @clacaputo @mandrenguyen, just a kind ping for sending out tests for this technical PR... Thanks!

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1f822c/31929/summary.html
COMMIT: 8a546bc
CMSSW: CMSSW_13_1_X_2023-04-11-2300/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/41276/31929/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 9 lines from the logs
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3459609
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3459584
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 207 log files, 159 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@mandrenguyen
Copy link
Contributor

+1
technical, no changes to reco comparisons

@cmsbuild
Copy link
Contributor

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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

@smuzaffar
Copy link
Contributor

@valsdav , I am testing TF 2.11 (cms-sw/cmsdist#8258) and looks like all the TF-CUdA tests are crashing see details https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-39ea0b/31966/unitTests/failed.html. I do see some warnings like [a] , any idea?

[a]

Running .WARNING:tensorflow:From /scratch/cmsbuild/jenkins_a/workspace/ib-run-pr-tests/testBuildDir/el8_ppc64le_gcc11/external/py3-cmsml/0.1.2-29bd4c560ef9ea2cce051815781d3ff4/lib/python3.9/site-packages/cmsml/tensorflow/tools.py:120: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2.
WARNING:tensorflow:From /scratch/cmsbuild/jenkins_a/workspace/ib-run-pr-tests/testBuildDir/el8_ppc64le_gcc11/external/py3-tensorflow/2.11.0-ce371cbe783600d67100f17a915f5d3f/lib/python3.9/site-packages/tensorflow/python/framework/convert_to_constants.py:943: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2.

@valsdav
Copy link
Contributor Author

valsdav commented Apr 13, 2023

Hi @smuzaffar I'm having a look. Thanks for testing TF2.11!

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.

5 participants