MCPcopy Create free account
hub / github.com/pytorch/pytorch / open_html_model

Method open_html_model

test/test_model_dump.py:102–106  ·  view source on GitHub ↗
(self, wd, model, extra_files=None)

Source from the content-addressed store, hash-verified

100 assert info is not None
101
102 def open_html_model(self, wd, model, extra_files=None):
103 buf = io.BytesIO()
104 torch.jit.save(model, buf, _extra_files=extra_files)
105 page = torch.utils.model_dump.get_info_and_burn_skeleton(buf)
106 wd.get("data:text/html;charset=utf-8," + urllib.parse.quote(page))
107
108 def open_section_and_get_body(self, wd, name):
109 container = wd.find_element_by_xpath(f"//div[@data-hider-title='{name}']")

Callers 1

check_memoryMethod · 0.95

Calls 3

quoteMethod · 0.80
saveMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected