File tree 4 files changed +116
-0
lines changed
4 files changed +116
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is a work-in-progress.
2
+ # The idea is to generate a combination of builds
3
+ # with different parameters.
4
+
5
+ from pathlib import Path
6
+ import yaml
7
+ import itertools
8
+
9
+ base_dir = Path ('../' )
10
+ config_path = Path ('build_config.yml' )
11
+
12
+ config = yaml .load (open (config_path ))
13
+ matrix = config ['matrix' ]
14
+ excluded = config ['exclude' ]
15
+
16
+ # List all possible combinations
17
+ matrix_keys = sorted (matrix )
18
+ temp_builds = list (itertools .product (* (matrix [key ] for key in matrix_keys )))
19
+
20
+ # Exclude unwanted builds.
21
+ builds = []
22
+ for temp_build in temp_builds :
23
+ build = dict (zip (matrix_keys , temp_build ))
24
+
25
+ do_exclude = False
26
+ for exclude_build in excluded :
27
+ exclude_count = 0
28
+ for k , v in exclude_build .items ():
29
+ if build [k ] == v :
30
+ exclude_count += 1
31
+ if exclude_count == len (exclude_build ):
32
+ do_exclude = True
33
+
34
+ if not do_exclude :
35
+ builds .append (build )
36
+
37
+ print (builds )
Original file line number Diff line number Diff line change
1
+ matrix :
2
+ python_version :
3
+ - 3.6
4
+ - 3.7
5
+ tf_version :
6
+ - v1.13.1
7
+ - v2.0.0-alpha0
8
+ use_gpu :
9
+ - True
10
+ - False
11
+ cuda_version :
12
+ - 9.2
13
+ - 10.0
14
+ cudnn_version :
15
+ - 7.1
16
+ - 7.5
17
+ exclude :
18
+ - tf_version : v1.13.1
19
+ cuda_version : 10.0
20
+ - cudnn_version : 7.1
21
+ cuda_version : 10.0
Original file line number Diff line number Diff line change
1
+ # This is a work-in-progress.
2
+ # The idea is to generate a combination of builds
3
+ # with different parameters.
4
+
5
+ from pathlib import Path
6
+ import yaml
7
+ import itertools
8
+
9
+ base_dir = Path ('../' )
10
+ config_path = Path ('build_config.yml' )
11
+
12
+ config = yaml .load (open (config_path ))
13
+ matrix = config ['matrix' ]
14
+ excluded = config ['exclude' ]
15
+
16
+ # List all possible combinations
17
+ matrix_keys = sorted (matrix )
18
+ temp_builds = list (itertools .product (* (matrix [key ] for key in matrix_keys )))
19
+
20
+ # Exclude unwanted builds.
21
+ builds = []
22
+ for temp_build in temp_builds :
23
+ build = dict (zip (matrix_keys , temp_build ))
24
+
25
+ do_exclude = False
26
+ for exclude_build in excluded :
27
+ exclude_count = 0
28
+ for k , v in exclude_build .items ():
29
+ if build [k ] == v :
30
+ exclude_count += 1
31
+ if exclude_count == len (exclude_build ):
32
+ do_exclude = True
33
+
34
+ if not do_exclude :
35
+ builds .append (build )
36
+
37
+ print (builds )
Original file line number Diff line number Diff line change
1
+ matrix :
2
+ python_version :
3
+ - 3.6
4
+ - 3.7
5
+ tf_version :
6
+ - v1.13.1
7
+ - v2.0.0-alpha0
8
+ use_gpu :
9
+ - True
10
+ - False
11
+ cuda_version :
12
+ - 9.2
13
+ - 10.0
14
+ cudnn_version :
15
+ - 7.1
16
+ - 7.5
17
+ exclude :
18
+ - tf_version : v1.13.1
19
+ cuda_version : 10.0
20
+ - cudnn_version : 7.1
21
+ cuda_version : 10.0
You can’t perform that action at this time.
0 commit comments