Skip to content

Commit b0b5767

Browse files
apivovarovGoogle-ML-Automation
authored andcommitted
PR #17828: Fix pylint C0301: Line too long in xla_client_test.py
Imported from GitHub PR #17828 Currently Tensorflow CI build (triggered by XLA copybara-service bot) fails with the following pylint errors: ```bash ************* Module python.xla_client_test third_party/xla/xla/python/xla_client_test.py:3182:0: C0301: Line too long (99/80) (line-too-long) third_party/xla/xla/python/xla_client_test.py:3185:0: C0301: Line too long (86/80) (line-too-long) third_party/xla/xla/python/xla_client_test.py:3360:0: C0301: Line too long (87/80) (line-too-long) ``` links: - tensorflow/tensorflow@dd2c1e9 - https://github.com/tensorflow/tensorflow/actions/runs/11130353052/job/30929504884 This PR fixes the issue Copybara import of the project: -- 481b02d by Alexander Pivovarov <[email protected]>: Fix pylint C0301: Line too long in xla_client_test.py Merging this change closes #17828 COPYBARA_INTEGRATE_REVIEW=#17828 from apivovarov:fix_pylint_xla_client_test.py 481b02d PiperOrigin-RevId: 681204159
1 parent b30b420 commit b0b5767

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

xla/python/xla_client_test.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3169,17 +3169,12 @@ def testCompileOptionsSerialization(self):
31693169
options.compile_portable_executable = True
31703170
executable_build_options.num_replicas = 3
31713171
executable_build_options.num_partitions = 2
3172-
executable_build_options.debug_options.xla_cpu_enable_fast_math = True
3173-
executable_build_options.debug_options.xla_test_all_input_layouts = True
3174-
executable_build_options.debug_options.xla_gpu_kernel_cache_file = (
3175-
"/foo/bar"
3176-
)
3177-
executable_build_options.debug_options.xla_gpu_enable_llvm_module_compilation_parallelism = (
3178-
True
3179-
)
3180-
executable_build_options.debug_options.xla_gpu_per_fusion_autotune_cache_dir = (
3181-
"/bar/foo/"
3182-
)
3172+
deb_opt = executable_build_options.debug_options
3173+
deb_opt.xla_cpu_enable_fast_math = True
3174+
deb_opt.xla_test_all_input_layouts = True
3175+
deb_opt.xla_gpu_kernel_cache_file = "/foo/bar"
3176+
deb_opt.xla_gpu_enable_llvm_module_compilation_parallelism = True
3177+
deb_opt.xla_gpu_per_fusion_autotune_cache_dir = "/bar/foo/"
31833178

31843179
b = options.SerializeAsString()
31853180
restored = xla_client.CompileOptions.ParseFromString(b)
@@ -3352,8 +3347,9 @@ def testExecuteShardedOnLocalDevicesWithTokens(self):
33523347
options.num_replicas = num_replicas
33533348
compiled_c = self.backend.compile(
33543349
xla_computation_to_mlir_module(c.build()), compile_options=options)
3355-
results, sharded_token = compiled_c.execute_sharded_on_local_devices_with_tokens(
3356-
[])
3350+
results, sharded_token = (
3351+
compiled_c.execute_sharded_on_local_devices_with_tokens([])
3352+
)
33573353
sharded_token.block_until_ready()
33583354
self.assertLen(results, 1)
33593355
self.assertLen(results[0], 1)

0 commit comments

Comments
 (0)