用于在本地运行AnalysisProductions测试的工具
项目描述
LbAPLocal
LbAPLocal是用于在LHCb AnalysisProductions框架中运行离线测试的Python库。
用法
LbAPLocal默认与LHCb环境一起安装在lxplus上。对于外部集群的用户,可以从CVMFS中source LHCb环境以获取setup: source /cvmfs/lhcb.cern.ch/lib/LbEnv
安装后,可以使用以下选项从命令行运行LbAPLocal
Usage: lb-ap [OPTIONS] COMMAND [ARGS]...
Command line tool for the LHCb AnalysisProductions
Options:
--version
--help Show this message and exit.
Commands:
versions List the available tags of the Analysis Productions...
checkout Clean out the current copy of the specified production and...
clone Clone the AnalysisProductions repository and do lb-ap...
list List the available production folders by running 'lb-ap list'
list-checks List the checks for a specific production by running lb-ap...
render Render the info.yaml for a given production
validate Validate the configuration for a given production
test Execute a job locally
check Run checks for a production
debug Start an interactive session inside the job's environment
reproduce Reproduce an existing online test locally
parse-log Read a Gaudi log file and extract information
更新现有生产
$ lb-ap checkout <version> <working_group> <production> <branch>
其中 version
是与 production
对应的AnalysisProductions的最新版本,working_group
是该生产所属的工作组,production
是您要更新的生产,branch
是您要工作的分支名称。
如果您还没有AnalysisProductions的本地副本
$ lb-ap clone <version> <working_group> <production> <branch> <clone_type>
其中 version
、working_group
、production
和 branch
如上所述定义。clone_type
可以是 ssh
、https
或 krb5
,默认为 ssh
。
查看给定生产的仓库版本
$ lb-ap versions B2OC B02DKPi
The available versions for B02DKPi are:
v0r0p1674088
v0r0p1735460
.
.
.
查看本地可用的生产
$ lb-ap list
The available productions are:
* MyAnalysis
查看给定生产的可用作业
$ lb-ap list MyAnalysis
The available jobs for MyAnalysis are:
* My2016MagDownJob
* My2016MagUpJob
查看给定生产的定义检查
$ lb-ap list-checks MyAnalysis
The checks defined for MyAnalysis are:
* MyRangeCheck (type: range)
* MyOtherRangeCheck (type: range)
* MyNumEntriesCheck (type: num_entries)
查看给定生产中作业使用的检查
$ lb-ap list-checks MyAnalysis My2016MagDownJob
The checks defined for MyAnalysis that are required by My2016MagDownJob are:
* MyRangeCheck (type: range)
* MyNumEntriesCheck (type: num_entries)
为给定生产渲染 info.yaml
中的模板
$ lb-ap render MyAnalysis
验证给定生产的配置
$ lb-ap validate MyAnalysis
Rendering info.yaml for MyAnalysis
YAML parsed successfully
YAML validated successfully
以交互方式运行作业测试
$ lb-ap debug MyAnalysis My2016MagDownJob
Welcome to analysis productions debug mode:
The production can be tested by running:
gaudirun.py -T '$ANALYSIS_PRODUCTIONS_DYNAMIC/Lb2Lll/MC_2017_MagDown_Lb2PsiL_mm_strip_autoconf.py' '$ANALYSIS_PRODUCTIONS_BASE/Lb2Lll/stripping_seq.py' prodConf_DaVinci_00012345_00006789_1.py
[DaVinci v45r5] output $
非交互方式测试作业
$ lb-ap test MyAnalysis My2016MagDownJob
Success! Output can be found in xxxxxxxxxxxx
对于交互式和非交互式测试,当测试依赖于另一个作业提供输入文件的作业时,首先测试依赖的作业,并将其输出传递给请求的作业。如果依赖的作业已经运行,可以通过将 -i <output_file_path>
添加到 lb-ap test <production_name> <job_name>
将其输出位置传递给请求的作业。
在特定输入文件上测试作业
$ lb-ap test MyAnalysis My2016MagDownJob -i InputFileLocation
Success! Output can be found in xxxxxxxxxxxx
InputFileLocation 可以是 LFN 或本地文件的路径。这也适用于调试命令。
仅运行作业的检查(非交互式,需要早期成功 test
命令的输出)
$ lb-ap check MyAnalysis My2016MagDownJob local-tests/path/to/output/OUTPUT_NTUPLE.ROOT
All checks passed! Any output can be found in local-tests/path/to/output/checks
仅运行作业的检查,但将输出保存到不同的位置(非交互式,需要早期成功 test
命令的输出)
$ lb-ap check MyAnalysis My2016MagDownJob local-tests/path/to/output/OUTPUT_NTUPLE.ROOT another/file/path
All checks passed! Any output can be found in another/file/path
读取 Gaudi 日志文件并提取信息
$ lb-ap parse-log Job.log
Summary of log messages in: Job.log
Found 2659 ERROR messages
* 2649 instances of "*** Flag container MC/TrackInfo not found."
* 9 instances of "HltSelReportsDecoder:: Failed to add Hlt selection name Hlt2RecSummary to its container "
* 1 instances of "HltSelReportsDecoder:: The ERROR message is suppressed : ' Failed to add Hlt selection name Hlt2RecSummary to its container '"
Found 61 WARNING messages
* 7 instances of "TupleToolBremInfo:: TupleToolBremInfo requires fullDST - BremP and BremOrigin might not be reliable (Multiplicity is OK)"
and 54 others (50 unique), pass "--suppress=0" to show all messages
Errors have been detected!
* Lines: 3275, 3277, 3279, 3281, 3283 and 17 others
This message indicates the location specified for the information being accessed by
RelatedInfo does not exist. It is likely that either:
* The location specified is incorrect, try looking for it with dst-dump.
* The given information was never stored for that candidate, in which case the use of
RelatedInfo should be removed.
General explanations
* Line: 6318
Histograms are not being saved as no filename has been specified for storing them. This
message is harmless and normally ignored.
Error: Found issues in log
项目详情
下载文件
下载适合您平台的文件。如果您不确定要选择哪个,请了解有关 安装包 的更多信息。
源分布
构建分布
LbAPLocal-0.7.5.tar.gz 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 76f6d83e6ddea5f3e54b17aadef3e0066cadc39bf5a4de880202f22d1675b0b0 |
|
MD5 | 517dfb2c43bbaee2de6778ef8881add0 |
|
BLAKE2b-256 | b89ac2f5dd7f5e822a06d0e1cc0dd3efd2b43a8b67527ab650e4da734087da90 |
LbAPLocal-0.7.5-py3-none-any.whl的哈希值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 586a207d2bede12f2c59ffa9b57decc21534193e28aabccf8a8c3b59915b4444 |
|
MD5 | 7cdab751b83519d9eae5d363528eea33 |
|
BLAKE2b-256 | 8d9f3bc1b81319983f25761ec92640202bdde65a785c9cfbfb217b1270ca59e9 |