Skip to content
Snippets Groups Projects

Don't contact myMdC to get run creation time

Merged Thomas Kluyver requested to merge feat/dir-creation-time-no-mymdc into master
1 unresolved thread

Description

The code to get the creation time of a run preferred getting it from myMdC if possible, with a fallback to looking at the files. Talking to an external service is a problem for reproducibility - when you re-run it, the response from the external service might be different, the API you're using might have changed, or you might be running it without the credentials (configured per user) to access myMdC. The fallback mitigates this, but might give a different answer from myMdC.

It's also easier for people to try running the calibration code if there's no need to configure an Oauth token for myMdC.

Files from 2020 onwards appear to have the INDEX/timestamp dataset; Luis has told me that the start time in myMdC is taken from the timestamp of the first train, so this should reliably give us the same answer. For older files, it falls back to finding the earliest modification time of the .h5 files in the directory.

How Has This Been Tested?

The functions this uses were already used as fallbacks, and are covered by tests.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.

Reviewers

@ahmedk @maial @schmidtp

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Q: The cal_tools get_run_info function (to query myMdC for a given proposal & run) is now unused, as far as I can tell. Do we foresee any uses for it in the near future, or shall I remove that as well?

  • Could we force the reproducibility package to not use myMDC by withholding the tokens from it? Then it would at least use whatever fallback the source was using at the time.

    Edited by Philipp Schmidt
    • I'm not exactly sure what you mean with that.

      This is part of the code that runs inside the notebooks, so the machinery running the notebooks doesn't specifically know about it. We could certainly come up with a way for the machinery to block this specific mechanism, but I'm not sure what that would achieve.

      If we block this only while trying to reproduce a calibration, then we're forcing it to take a different code path and potentially get a different result to what originally happened. To be consistent, we'd want to block it for the original run as well - but then we may as well just remove the mechanism entirely.

    • If we block this only while trying to reproduce a calibration, then we're forcing it to take a different code path and potentially get a different result to what originally happened.

      I did not consider that. I'm probably slightly frustrated all these small things start showing up after we cracked the big questions about reproducibility.

    • 'fraid so. We've got the machinery in place, but actually making the code behave consistently is a fair bit of work.

      In fairness, this one probably doesn't matter that much. The creation time should be the same whether it comes from myMdC or the files, and if we've saved the chosen constans, we shouldn't even need to use the calibration time. It's just a potential loose end that I wanted to clean up.

    • Please register or sign in to reply
  • Thomas Kluyver added 1 commit

    added 1 commit

    • 1acd1854 - Remove unused get_run_info() function

    Compare with previous version

  • I've removed the unused get_run_info() function, following a conversation in a meeting last week.

  • Thomas Kluyver changed milestone to %3.7.0

    changed milestone to %3.7.0

  • Thank you, LGTM

  • Karim Ahmed approved this merge request

    approved this merge request

  • Thomas Kluyver mentioned in commit 0ccaffac

    mentioned in commit 0ccaffac

Please register or sign in to reply
Loading