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

Improve lumi querying #41

Closed
dhaitz opened this issue Nov 25, 2015 · 4 comments
Closed

Improve lumi querying #41

dhaitz opened this issue Nov 25, 2015 · 4 comments

Comments

@dhaitz
Copy link
Contributor

dhaitz commented Nov 25, 2015

the current workflow of ssh-ing to lxplus and executing brilcalc does not work very well for people without CERN accounts. should we implement a manual override or sth.?

@ghost
Copy link

ghost commented Nov 25, 2015

In principle, it should be possible to transfer the cache files. Not a nice solution, since it requires mucking with the cache internals (even if not the actual code).

Possible solutions:

  • Make lumi calculation lazy evaluated, and have a modifier config that replaces it with a fixed value. Since the JSON object has run information, it should suffice to make a guess which can be updated every now and then. Current lumi values will not change much in the near future.
  • Make lumi calculation use a default lumi on failure of ssh. Not nice, since it would have to try again on every run, and would need explicit killing or timeouts that need tuning.
  • Make lumi calculation use a default lumi if EXCALIBURBRILSSH is not set. Doesn't require any hacking, but disables lumi calculation unless it's explicitly enabled. This may be prone to forgetting the feature.
  • Make lumi calculation use a default if an environment flag or CLI argument is specified. Probably the easiest solution. Would require hacking into the JSON serialization or Config creation, which might be useful for other things as well. Something like --overwrite-lumi or $EXACLIBUR_LUMI could do.

Either way, lumi calculation should be lazy evaluated. Personally, I favor the first or last solution.

@dhaitz
Copy link
Contributor Author

dhaitz commented Nov 25, 2015

I'm for the last solution

@ghost
Copy link

ghost commented Nov 25, 2015

Lumi can be lazy evaluated since a223c77, which is used for 2015 data since 228085a.

I've added an option to overwrite config settings in 2006d10. You can specify --set-opts Lumi 20.5 on the CLI to set the Lumi to 20.5, for example. This should work for the current problem.

Still pondering whether setting an explicit default in the config is worth it. In principle, it would mean writing the result of a successful query into the config. The same can be done by committing the cache file.
Cache files are in data/lumi/ and named lumi_path-<json basename>[_nt-<normtag basename>].pkl. It might be sufficient to explicitly note and print the cache path during access, so that it is clear which file to commit/exchange.

@ghost
Copy link

ghost commented Jun 2, 2016

In case of issues, please use the manual overwrite for now. For a long-term fix, see issue #49.

@ghost ghost closed this as completed Jun 2, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant