fix: updates test marking to use nodeid instead of name

pull/425/head
jaydrennan 6 months ago committed by Bryce Drennan
parent 0c01cd690f
commit d39486af54

@ -148,9 +148,9 @@ def detect_cuda_tests(request):
end_memory = torch.cuda.max_memory_allocated()
memory_diff = end_memory - start_memory
if memory_diff > 0:
test_name = request.node.name
print(f"Test {test_name} used {memory_diff} bytes of GPU memory")
cuda_tests_node_ids.append(test_name)
test_id = request.node.nodeid
print(f"Test {test_id} used {memory_diff} bytes of GPU memory")
cuda_tests_node_ids.append(test_id)
torch.cuda.empty_cache()
gc.collect()
@ -162,7 +162,9 @@ def pytest_collection_modifyitems(config, items):
node_ids_to_mark = read_stored_cuda_test_nodes()
for item in items:
print(item.nodeid)
if item.nodeid in node_ids_to_mark:
print(f"Marking {item.nodeid} as gputest")
item.add_marker(pytest.mark.gputest)
filtered_node_ids = set()

@ -1,55 +1 @@
test_cache_ordering
test_clip_masking
test_clip_text_comparison
test_cliptext_inpainting_pearl_doctor
test_colorize_cmd
test_compare_depth_maps
test_control_images[depth-create_depth_map]
test_control_images[hed-create_hed_edges]
test_control_images[normal-create_normal_map]
test_control_images[openpose-create_pose_map]
test_control_images[qrcode-adaptive_threshold_binarize]
test_controlnet[canny]
test_controlnet[colorize]
test_controlnet[depth]
test_controlnet[edit]
test_controlnet[hed]
test_controlnet[inpaint]
test_controlnet[normal]
test_controlnet[openpose]
test_controlnet[qrcode]
test_controlnet[shuffle]
test_create_depth_map
test_describe_cmd
test_describe_picture
test_edit_cmd
test_edit_demo
test_fix_faces
test_get_existing_move_to_gpu
test_imagine[ddim]
test_imagine[dpmpp]
test_imagine_cmd
test_img2img_beach_to_sunset[ddim]
test_img2img_beach_to_sunset[dpmpp]
test_img2img_low_noise[ddim]
test_img2img_low_noise[dpmpp]
test_img_to_file
test_img_to_img_from_url_cats[ddim]
test_img_to_img_from_url_cats[dpmpp]
test_img_to_img_fruit_2_gold[ddim-0.05]
test_img_to_img_fruit_2_gold[ddim-0.2]
test_img_to_img_fruit_2_gold[ddim-0]
test_img_to_img_fruit_2_gold[ddim-1]
test_img_to_img_fruit_2_gold[dpmpp-0.05]
test_img_to_img_fruit_2_gold[dpmpp-0.2]
test_img_to_img_fruit_2_gold[dpmpp-0]
test_img_to_img_fruit_2_gold[dpmpp-1]
test_img_to_img_fruit_2_gold_repeat
test_inpainting_bench
test_large_image
test_model_versions[SD-1.5]
test_nonlinearity
test_outpainting_outpaint
test_set_cpu_full
test_text_conditioning
test_tile_mode
tests/test_outpaint.py::test_outpainting_outpaint

1 test_cache_ordering tests/test_outpaint.py::test_outpainting_outpaint
test_clip_masking
test_clip_text_comparison
test_cliptext_inpainting_pearl_doctor
test_colorize_cmd
test_compare_depth_maps
test_control_images[depth-create_depth_map]
test_control_images[hed-create_hed_edges]
test_control_images[normal-create_normal_map]
test_control_images[openpose-create_pose_map]
test_control_images[qrcode-adaptive_threshold_binarize]
test_controlnet[canny]
test_controlnet[colorize]
test_controlnet[depth]
test_controlnet[edit]
test_controlnet[hed]
test_controlnet[inpaint]
test_controlnet[normal]
test_controlnet[openpose]
test_controlnet[qrcode]
test_controlnet[shuffle]
test_create_depth_map
test_describe_cmd
test_describe_picture
test_edit_cmd
test_edit_demo
test_fix_faces
test_get_existing_move_to_gpu
test_imagine[ddim]
test_imagine[dpmpp]
test_imagine_cmd
test_img2img_beach_to_sunset[ddim]
test_img2img_beach_to_sunset[dpmpp]
test_img2img_low_noise[ddim]
test_img2img_low_noise[dpmpp]
test_img_to_file
test_img_to_img_from_url_cats[ddim]
test_img_to_img_from_url_cats[dpmpp]
test_img_to_img_fruit_2_gold[ddim-0.05]
test_img_to_img_fruit_2_gold[ddim-0.2]
test_img_to_img_fruit_2_gold[ddim-0]
test_img_to_img_fruit_2_gold[ddim-1]
test_img_to_img_fruit_2_gold[dpmpp-0.05]
test_img_to_img_fruit_2_gold[dpmpp-0.2]
test_img_to_img_fruit_2_gold[dpmpp-0]
test_img_to_img_fruit_2_gold[dpmpp-1]
test_img_to_img_fruit_2_gold_repeat
test_inpainting_bench
test_large_image
test_model_versions[SD-1.5]
test_nonlinearity
test_outpainting_outpaint
test_set_cpu_full
test_text_conditioning
test_tile_mode
Loading…
Cancel
Save