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

[PY3] unit test fixed for Aligenmnet #28286

Merged
merged 1 commit into from Oct 30, 2019
Merged

[PY3] unit test fixed for Aligenmnet #28286

merged 1 commit into from Oct 30, 2019

Conversation

smuzaffar
Copy link
Contributor

These changes are needed to fix unit tests for Alignment for python3

  • cPickle in python3 now comes from _pickle
  • set time out to 3600 s (1h) instead of sys.maxsize which is like forever
  • ConfigParser in python is renamed to configparser

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28286/12470

  • This PR adds an extra 40KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 28, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/3193/console Started: 2019/10/28 13:14

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

Alignment/CommonAlignment
Alignment/MillePedeAlignmentAlgorithm

@christopheralanwest, @tocheng, @cmsbuild, @franzoni, @tlampen, @pohsun can you please review it and eventually sign? Thanks.
@pakhotin, @adewit, @tocheng, @tlampen, @mschrode, @mmusich this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-32f368/3193/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2961036
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2960694
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@@ -363,14 +366,14 @@ def _request_dataset_information(self):
for d in self._datasets: print_msg("\t"+d)
print_msg("This may take a while...")

result = pool.map_async(get_events_per_dataset, self._datasets).get(sys.maxsize)
result = pool.map_async(get_events_per_dataset, self._datasets).get(3600)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smuzaffar sys.maxint has gone in python3, but isn't sys.maxsize still available, according to https://docs.python.org/3/library/sys.html ? What is the rationale behind this hardcoded value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ints are gone in python3. so maxsize is available but does not give the same answer as in python2.

The error is
OverflowError: timestamp too large to convert to C _PyTime_t (which instead is a 64-bit int in C)

but perhaps 2147483647 would conserve the old behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabiocos , sys.maxint and sys.maxsize are used here to set a timeout (i.e. 9223372036854775807 sec). There is no need to set such long timeouts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidlange6 according to the documentation sys.maxsize is now a variable of type Py_ssize_t so not what is desired here, I agree

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smuzaffar this argument is more related to the functionality of the unit test I would say, waiting for an infinite time is not what is desired

@fabiocos
Copy link
Contributor

@christopheralanwest @tlampen @pohsun the changes look technical, please check, I would like to integrate this after pre11 is built

@tlampen
Copy link
Contributor

tlampen commented Oct 29, 2019

+1

@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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@davidlange6
Copy link
Contributor

davidlange6 commented Oct 29, 2019 via email

@smuzaffar
Copy link
Contributor Author

yes it is in seconds. I leave it to alca developers to set it to some reasonable time. For IBs, we kill unit test after 30 mins anyway :-)

@mmusich
Copy link
Contributor

mmusich commented Oct 29, 2019

yes it is in seconds. I leave it to alca developers to set it to some reasonable time. For IBs, we kill unit test after 30 mins anyway :-)

This file (which is tested in a unit test) is also used for the actual aggregation of the data for running the alignment. Maybe waiting for an infinite amount of time is not OK for a unit test, but on the other hand I am not sure if the script is supposed to run for > 1h in real life applications. @adewit @connorpa.
Maybe that parameter can be made configurable and set to 1h for the unit test.

@davidlange6
Copy link
Contributor

davidlange6 commented Oct 29, 2019 via email

@fabiocos
Copy link
Contributor

@mmusich @connorpa @adewit @christopheralanwest can we clarify what is the real life need for this timeout? For the unit test purpose the solution by @smuzaffar is clearly ok, in case we have different use cases we should clarify a meaningful value, possibly before integrating this PR

@mmusich
Copy link
Contributor

mmusich commented Oct 30, 2019

can we clarify what is the real life need for this timeout?

The feedback I got in the meanwhile is that it usually takes few minutes to run, so 1h timeout sounds about reasonable also for the offline use-case.

@fabiocos
Copy link
Contributor

@mmusich thank you, I will move forward with the integration of this PR in next IB. In case we may update it further according to possible different needs

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 88f1911 into cms-sw:master Oct 30, 2019
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.

None yet

6 participants