Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
7cfe3c34
"README.md" did not exist on "2f8526e66506a2571e09e403b6aea27c00058a88"
Commit
7cfe3c34
authored
3 years ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Improve warnings/errors around concurrency parameter
parent
d784e473
No related branches found
No related tags found
1 merge request
!575
Refactor parsing arguments and loading main notebook
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xfel_calibrate/calibrate.py
+8
-1
8 additions, 1 deletion
src/xfel_calibrate/calibrate.py
with
8 additions
and
1 deletion
src/xfel_calibrate/calibrate.py
+
8
−
1
View file @
7cfe3c34
...
...
@@ -609,7 +609,9 @@ def run(argv=None):
run_uuid
=
f
"
t
{
datetime
.
now
().
strftime
(
'
%y%m%d_%H%M%S
'
)
}
"
# check if concurrency parameter is given and we run concurrently
if
not
any
(
p
.
name
==
"
parameter
"
for
p
in
nb_details
.
default_params
)
and
concurrency_par
is
not
None
:
if
concurrency_par
is
not
None
and
not
any
(
p
.
name
==
concurrency_par
for
p
in
nb_details
.
default_params
):
msg
=
f
"
Notebook cannot be run concurrently: no
{
concurrency_par
}
parameter
"
warnings
.
warn
(
msg
,
RuntimeWarning
)
...
...
@@ -764,6 +766,11 @@ def run(argv=None):
cvals
=
f
(
*
callargs
)
print
(
f
"
Split concurrency into
{
cvals
}
"
)
if
cvals
is
None
:
raise
ValueError
(
f
"
No values found for
{
concurrency_par
}
(concurrency parameter)
"
)
# get expected type
cvtype
=
get_par_attr
(
parms
,
concurrency_par
,
'
type
'
,
list
)
cvals
=
remove_duplications
(
cvals
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment