Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bc_uab_rstudio_server
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
rc
bc_uab_rstudio_server
Commits
2a86e434
Commit
2a86e434
authored
1 year ago
by
Eesaan Atluri
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-form-js' into 'master'
Fix gpu selection Closes
#13
See merge request
!17
parents
6d287850
40b594cd
No related branches found
Branches containing commit
Tags
v1.6.1
Tags containing commit
1 merge request
!17
Fix gpu selection
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
form.js
+14
-10
14 additions, 10 deletions
form.js
form.yml.erb
+1
-1
1 addition, 1 deletion
form.yml.erb
with
15 additions
and
11 deletions
form.js
+
14
−
10
View file @
2a86e434
const
table
=
{
"
interactive
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
2
,
"
max_gpu
"
:
-
1
},
"
express
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
2
,
"
max_gpu
"
:
-
1
},
"
short
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
12
,
"
max_gpu
"
:
-
1
},
"
interactive
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
2
,
"
max_gpu
"
:
0
},
"
express
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
2
,
"
max_gpu
"
:
0
},
"
short
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
12
,
"
max_gpu
"
:
0
},
"
pascalnodes
"
:
{
"
max_cpu
"
:
28
,
"
max_hour
"
:
12
,
"
max_gpu
"
:
4
},
"
pascalnodes-medium
"
:
{
"
max_cpu
"
:
28
,
"
max_hour
"
:
48
,
"
max_gpu
"
:
4
},
"
medium
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
50
,
"
max_gpu
"
:
-
1
},
"
long
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
-
1
},
"
intel-dcb
"
:
{
"
max_cpu
"
:
24
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
-
1
},
"
amd-hdr100
"
:
{
"
max_cpu
"
:
128
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
-
1
},
"
largemem
"
:
{
"
max_cpu
"
:
24
,
"
max_hour
"
:
50
,
"
max_gpu
"
:
-
1
},
"
largemem-long
"
:
{
"
max_cpu
"
:
24
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
-
1
},
"
medium
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
50
,
"
max_gpu
"
:
0
},
"
long
"
:
{
"
max_cpu
"
:
48
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
0
},
"
intel-dcb
"
:
{
"
max_cpu
"
:
24
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
0
},
"
amd-hdr100
"
:
{
"
max_cpu
"
:
128
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
0
},
"
largemem
"
:
{
"
max_cpu
"
:
24
,
"
max_hour
"
:
50
,
"
max_gpu
"
:
0
},
"
largemem-long
"
:
{
"
max_cpu
"
:
24
,
"
max_hour
"
:
150
,
"
max_gpu
"
:
0
},
"
amperenodes
"
:
{
"
max_cpu
"
:
128
,
"
max_hour
"
:
12
,
"
max_gpu
"
:
2
},
"
amperenodes-medium
"
:
{
"
max_cpu
"
:
128
,
"
max_hour
"
:
48
,
"
max_gpu
"
:
2
},
}
const
gpu_part_regex
=
/pascal|ampere/
;
function
set_max_value
(
form_id
,
value
)
{
const
form_element
=
$
(
form_id
);
form_element
.
attr
({
'
max
'
:
value
});
if
(
form_element
.
val
()
>
value
)
form_element
.
val
(
value
)
}
function
set_partition_change_handler
()
{
...
...
@@ -32,7 +36,7 @@ function toggle_gpu_visibility(event) {
const
gpu_selector
=
'
#batch_connect_session_context_bc_num_gpus
'
;
const
hour_selector
=
'
#batch_connect_session_context_bc_num_hours
'
;
toggle_visibilty_of_form_group
(
gpu_selector
,
table
[
partition
][
"
max_gpu
"
]
!=
-
1
);
toggle_visibilty_of_form_group
(
gpu_selector
,
gpu_part_regex
.
test
(
partition
)
);
set_max_value
(
cpu_selector
,
table
[
partition
][
"
max_cpu
"
]);
set_max_value
(
gpu_selector
,
table
[
partition
][
"
max_gpu
"
]);
set_max_value
(
hour_selector
,
table
[
partition
][
"
max_hour
"
]);
...
...
This diff is collapsed.
Click to expand it.
form.yml.erb
+
1
−
1
View file @
2a86e434
...
...
@@ -38,7 +38,7 @@ attributes:
widget: "number_field"
label: Number of GPUs
value: 1
min:
1
min:
0
max: 4
step: 1
...
...
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