feat: add subset sim probs command for bayes for subset simulation results
Some checks failed
gitea-physics/deepdog/pipeline/head There was a failure building this commit
Some checks failed
gitea-physics/deepdog/pipeline/head There was a failure building this commit
This commit is contained in:
21
deepdog/results/filename.py
Normal file
21
deepdog/results/filename.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import re
|
||||
import typing
|
||||
|
||||
|
||||
FILE_SLUG_REGEXES = [
|
||||
re.compile(pattern)
|
||||
for pattern in [
|
||||
r"(?P<tag>\w+)-(?P<job_index>\d+)",
|
||||
r"mock_tarucha-(?P<job_index>\d+)",
|
||||
r"(?:(?P<mock>mock)_)?tarucha(?:_(?P<tarucha_run_id>\d+))?-(?P<job_index>\d+)",
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
def parse_file_slug(slug: str) -> typing.Optional[typing.Dict[str, str]]:
|
||||
for pattern in FILE_SLUG_REGEXES:
|
||||
match = pattern.match(slug)
|
||||
if match:
|
||||
return match.groupdict()
|
||||
else:
|
||||
return None
|
Reference in New Issue
Block a user