{"id":23340,"date":"2025-04-19T07:32:14","date_gmt":"2025-04-18T23:32:14","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/23340.html"},"modified":"2025-04-19T07:32:14","modified_gmt":"2025-04-18T23:32:14","slug":"%e4%bd%bf%e7%94%a8vscode%e8%bf%9b%e8%a1%8c%e6%9c%8d%e5%8a%a1%e5%99%a8python%e4%bb%a3%e7%a0%81%e8%b0%83%e8%af%95-%e4%bb%a5%e5%8f%8a%e4%bd%bf%e7%94%a8debugpy%e8%bf%9b%e8%a1%8c%e5%a4%8d%e6%9d%82%e4%bb%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/23340.html","title":{"rendered":"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5"},"content":{"rendered":"<\/p>\n<h4>\u4f7f\u7528vscode\u8fdb\u884c\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5<\/h4>\n<ul>\n<li>\u524d\u8a00&#xff1a;<\/li>\n<li>\u65b9\u6cd5\u4e00&#xff1a;\u4f7f\u7528ipdb\u5bf9\u7a0b\u5e8f\u8fdb\u884c\u8c03\u8bd5<\/li>\n<li>\n<ul>\n<li>1.1 \u76f4\u63a5\u547d\u4ee4\u884c\u8fd0\u884cipdb&#xff1a;&#xff08;\u4e0d\u5efa\u8bae\u76f4\u63a5\u547d\u4ee4\u884c\u8fd0\u884c&#xff0c;\u5efa\u8bae\u4ee3\u7801\u4e2d\u63d2\u5165&#xff09;<\/li>\n<li>1.2 \u76f4\u63a5\u5728\u4ee3\u7801\u7247\u6bb5\u4e2d\u63d2\u5165ipdb&#xff08;\u63a8\u8350\u4f7f\u7528\u8fd9\u4e2a\u65b9\u6cd5&#xff09;&#xff1a;<\/li>\n<li>1.3 ipdb\u547d\u4ee4\u884c\u8c03\u8bd5\u7684\u4e00\u4e9b\u5e38\u7528\u6307\u4ee4&#xff1a;<\/li>\n<\/ul>\n<\/li>\n<li>\u65b9\u6cd5\u4e8c&#xff1a;VScode\u4e2d\u7684python\u8c03\u8bd5<\/li>\n<li>\n<ul>\n<li>2.1 \u7b80\u5355\u8c03\u8bd5<\/li>\n<li>2.2 \u590d\u6742\u547d\u4ee4\u8c03\u8bd5&#xff08;\u547d\u4ee4\u884c\u8c03\u8bd5&#xff09;<\/li>\n<li>\n<ul>\n<li>2.21 debugpy\u76f4\u63a5\u63d2\u5165\u4ee3\u7801\u91cc&#xff1a;<\/li>\n<li>2.22 \u5982\u4f55\u4fee\u6539\u590d\u6742\u547d\u4ee4&#xff1f;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u53c2\u8003\u6587\u6863<\/li>\n<\/ul>\n<h2>\u524d\u8a00&#xff1a;<\/h2>\n<p>\u5927\u5bb6\u9996\u5148\u8981\u4f1a\u4f7f\u7528vscode\u8fde\u63a5\u670d\u52a1\u5668&#xff0c;\u4e4b\u540e\u518d\u8003\u8651\u8c03\u8bd5&#xff0c;\u8fde\u63a5\u670d\u52a1\u5668\u3002\u53ef\u4ee5\u53c2\u8003\u4e0b\u9762\u8fd9\u4e2a\u5e16\u5b50&#xff1a; ssh\u4f7f\u7528vscode\u8fde\u63a5linux\u670d\u52a1\u5668\u3010autodl\u670d\u52a1\u5668\u3011&#xff0c;\u5e76\u8c03\u51fa\u547d\u4ee4\u884c\u8fd0\u884c\u4ee3\u7801\u3010\u5141\u8bb8python\u4ee3\u7801\u8df3\u8f6c\u3011<\/p>\n<p>\u7b14\u8005\u5df2\u7ecf\u63d0\u524d\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86Python\u548cPython Debugger\u63d2\u4ef6\u3002\u5927\u5bb6\u4e5f\u63d0\u524d\u5b89\u88c5\u4e00\u4e0b\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233210-6802e0faa33c7.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u65b9\u6cd5\u4e00&#xff1a;\u4f7f\u7528ipdb\u5bf9\u7a0b\u5e8f\u8fdb\u884c\u8c03\u8bd5<\/h2>\n<h3>1.1 \u76f4\u63a5\u547d\u4ee4\u884c\u8fd0\u884cipdb&#xff1a;&#xff08;\u4e0d\u5efa\u8bae\u76f4\u63a5\u547d\u4ee4\u884c\u8fd0\u884c&#xff0c;\u5efa\u8bae\u4ee3\u7801\u4e2d\u63d2\u5165&#xff09;<\/h3>\n<p>\u9996\u5148\u9700\u8981\u5b89\u88c5 ipdb&#xff1a;<\/p>\n<p>pip <span class=\"token function\">install<\/span> ipdb<\/p>\n<p>\u4e4b\u540e\u6211\u4eec\u53ef\u4ee5\u8bd5\u7740\u521b\u5efa\u4e00\u4e2a\u4ee3\u7801\u6587\u4ef6&#xff0c;\u5c31\u53eb\u5b83test.py \u5427\u3002<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Book<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">__init__<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> title<span class=\"token punctuation\">,<\/span> author<span class=\"token punctuation\">,<\/span> year<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        self<span class=\"token punctuation\">.<\/span>title <span class=\"token operator\">&#061;<\/span> title<br \/>\n        self<span class=\"token punctuation\">.<\/span>author <span class=\"token operator\">&#061;<\/span> author<br \/>\n        self<span class=\"token punctuation\">.<\/span>year <span class=\"token operator\">&#061;<\/span> year<\/p>\n<p>    <span class=\"token keyword\">def<\/span> <span class=\"token function\">__str__<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;&#039;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>self<span class=\"token punctuation\">.<\/span>title<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#039; by <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>self<span class=\"token punctuation\">.<\/span>author<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> (<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>self<span class=\"token punctuation\">.<\/span>year<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">)&#034;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Library<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">__init__<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        self<span class=\"token punctuation\">.<\/span>books <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><\/p>\n<p>    <span class=\"token keyword\">def<\/span> <span class=\"token function\">add_book<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> book<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        self<span class=\"token punctuation\">.<\/span>books<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span>book<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">def<\/span> <span class=\"token function\">remove_book<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> title<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        self<span class=\"token punctuation\">.<\/span>books <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span>book <span class=\"token keyword\">for<\/span> book <span class=\"token keyword\">in<\/span> self<span class=\"token punctuation\">.<\/span>books <span class=\"token keyword\">if<\/span> book<span class=\"token punctuation\">.<\/span>title <span class=\"token operator\">!&#061;<\/span> title<span class=\"token punctuation\">]<\/span><\/p>\n<p>    <span class=\"token keyword\">def<\/span> <span class=\"token function\">find_books_by_author<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> author<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">[<\/span>book <span class=\"token keyword\">for<\/span> book <span class=\"token keyword\">in<\/span> self<span class=\"token punctuation\">.<\/span>books <span class=\"token keyword\">if<\/span> book<span class=\"token punctuation\">.<\/span>author <span class=\"token operator\">&#061;&#061;<\/span> author<span class=\"token punctuation\">]<\/span><\/p>\n<p>    <span class=\"token keyword\">def<\/span> <span class=\"token function\">list_books<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> book <span class=\"token keyword\">in<\/span> self<span class=\"token punctuation\">.<\/span>books<span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>book<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    library <span class=\"token operator\">&#061;<\/span> Library<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6dfb\u52a0\u4e66\u7c4d<\/span><br \/>\n    library<span class=\"token punctuation\">.<\/span>add_book<span class=\"token punctuation\">(<\/span>Book<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1984&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;George Orwell&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1949<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    library<span class=\"token punctuation\">.<\/span>add_book<span class=\"token punctuation\">(<\/span>Book<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;To Kill a Mockingbird&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Harper Lee&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1960<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    library<span class=\"token punctuation\">.<\/span>add_book<span class=\"token punctuation\">(<\/span>Book<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;The Great Gatsby&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;F. Scott Fitzgerald&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1925<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    library<span class=\"token punctuation\">.<\/span>add_book<span class=\"token punctuation\">(<\/span>Book<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Brave New World&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Aldous Huxley&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1932<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u5217\u51fa\u6240\u6709\u4e66\u7c4d<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;All books in the library:&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    library<span class=\"token punctuation\">.<\/span>list_books<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u67e5\u627e\u67d0\u4e2a\u4f5c\u8005\u7684\u4e66\u7c4d<\/span><br \/>\n    author <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;George Orwell&#034;<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;Books by <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>author<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">:&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n    books_by_author <span class=\"token operator\">&#061;<\/span> library<span class=\"token punctuation\">.<\/span>find_books_by_author<span class=\"token punctuation\">(<\/span>author<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> book <span class=\"token keyword\">in<\/span> books_by_author<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>book<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u5220\u9664\u4e66\u7c4d<\/span><br \/>\n    library<span class=\"token punctuation\">.<\/span>remove_book<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1984&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;After removing &#039;1984&#039;:&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    library<span class=\"token punctuation\">.<\/span>list_books<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u4f7f\u7528\u5faa\u73af\u8fdb\u884c\u4e00\u4e9b\u590d\u6742\u64cd\u4f5c<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\\\\nBooks published before 1950:&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> book <span class=\"token keyword\">in<\/span> library<span class=\"token punctuation\">.<\/span>books<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> book<span class=\"token punctuation\">.<\/span>year <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">1950<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>book<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">if<\/span> __name__ <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#034;__main__&#034;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    main<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5728\u7ec8\u7aef\u4e0a\u8f93\u5165<\/p>\n<p>python <span class=\"token operator\">&#8211;<\/span>m ipdb test<span class=\"token punctuation\">.<\/span>py<\/p>\n<p>\u5c31\u53ef\u4ee5\u4ece\u7a0b\u5e8f\u5f00\u5934\u4e00\u884c\u4e00\u884c\u7684\u8c03\u8bd5\u4e86&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233210-6802e0fac3c25.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>1.2 \u76f4\u63a5\u5728\u4ee3\u7801\u7247\u6bb5\u4e2d\u63d2\u5165ipdb&#xff08;\u63a8\u8350\u4f7f\u7528\u8fd9\u4e2a\u65b9\u6cd5&#xff09;&#xff1a;<\/h3>\n<p>\u4f46\u662f\u76f4\u63a5\u5728\u4ee3\u7801\u4e2d\u8fd0\u884cipdb\u7684\u8bdd&#xff0c;\u53ef\u80fd\u4e0d\u80fd\u76f4\u63a5\u547d\u4e2d\u6211\u4eec\u9700\u8981\u8c03\u8bd5\u7684\u7247\u6bb5&#xff0c;\u7279\u522b\u662f\u5982\u679c\u6211\u4eec\u8dd1\u4e00\u4e2a\u975e\u5e38\u5927\u7684\u9879\u76ee\u7684\u65f6\u5019&#xff0c;\u53ea\u5e0c\u671b\u5728\u9879\u76ee\u4e2d\u7684\u67d0\u4e00\u4e2a\u4ee3\u7801\u6587\u4ef6\u7684\u67d0\u4e00\u7247\u6bb5\u68c0\u67e5\u4e00\u4e0b&#xff0c;\u6211\u4eec\u9700\u8981\u5728\u90a3\u4e2a\u9700\u8981\u4e2d\u65ad\u7684\u5730\u65b9\u63d2\u5165\u4e0a\u5982\u4e0b\u4ee3\u7801\u3002<\/p>\n<p><span class=\"token keyword\">import<\/span> ipdb<span class=\"token punctuation\">;<\/span>ipdb<span class=\"token punctuation\">.<\/span>set_trace<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u7a0b\u5e8f\u8dd1\u7684\u65f6\u5019\u5c31\u4f1a\u5728\u4f60\u8bbe\u7f6e\u65ad\u70b9\u7684\u4f4d\u7f6e\u505c\u4e0b\u6765\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233210-6802e0fae2ab6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6211\u4eec\u5728#\u5220\u9664\u4e66\u7c4d\u4e0a\u9762\u63d2\u5165\u4e86import ipdb;ipdb.set_trace(); \u7a0b\u5e8f\u4e5f\u521a\u597d\u8fd0\u884c\u5230\u8fd9\u91cc\u505c\u4e86\u4e0b\u6765\u3002\u5982\u679c\u662f\u5927\u9879\u76ee\u4e2d\u7684\u67d0\u4e00\u4e2a\u4ee3\u7801\u6587\u4ef6&#xff0c;\u8fd9\u6837\u63d2\u5165\u4e5f\u6709\u7528\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233211-6802e0fb0cf0c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>1.3 ipdb\u547d\u4ee4\u884c\u8c03\u8bd5\u7684\u4e00\u4e9b\u5e38\u7528\u6307\u4ee4&#xff1a;<\/h3>\n<ul>\n<li>h&#xff1a;\u5e2e\u52a9\u547d\u4ee4(help)<\/li>\n<li>s&#xff1a;(step into)\u8fdb\u5165\u51fd\u6570\u5185\u90e8<\/li>\n<li>n&#xff1a;(next)\u6267\u884c\u4e0b\u4e00\u884c<\/li>\n<li>b: (break)b line_number\u5bf9\u67d0\u884c\u53f7\u6253\u65ad\u70b9<\/li>\n<li>cl: (clear)\u6e05\u9664\u65ad\u70b9<\/li>\n<li>c: (continue)\u4e00\u76f4\u6267\u884c\u5230\u65ad\u70b9<\/li>\n<li>r: (return)\u4ece\u5f53\u524d\u51fd\u6570\u8fd4\u56de<\/li>\n<li>j: (jump)j line_number&#xff0c;\u8df3\u8fc7\u4ee3\u7801\u7247\u6bb5&#xff0c;\u76f4\u63a5\u6267\u884c\u6307\u5b9a\u884c\u53f7\u6240\u5728\u7684\u4ee3\u7801<\/li>\n<li>l: (list)\u5217\u51fa\u4e0a\u4e0b\u6587\u4ee3\u7801<\/li>\n<li>a: (argument)\u5217\u51fa\u4f20\u5165\u51fd\u6570\u6240\u6709\u7684\u53c2\u6570\u503c<\/li>\n<li>p\/pp: print \u548c pretty print \u6253\u5370\u51fa\u53d8\u91cf\u503c<\/li>\n<li>r: (restart)\u91cd\u542f\u8c03\u8bd5\u5668<\/li>\n<li>q: (quit)\u9000\u51fa\u8c03\u8bd5&#xff0c;\u6e05\u9664\u6240\u6709\u4fe1\u606f<\/li>\n<\/ul>\n<h2>\u65b9\u6cd5\u4e8c&#xff1a;VScode\u4e2d\u7684python\u8c03\u8bd5<\/h2>\n<h3>2.1 \u7b80\u5355\u8c03\u8bd5<\/h3>\n<p>\u6211\u4eec\u73b0\u5728\u4ecd\u7136\u4f7f\u7528\u4e0a\u9762\u521b\u5efa\u7684test.py\u6587\u4ef6\u4f5c\u4e3a\u6848\u4f8b\u6765\u8bb2\u89e3\u3002<\/p>\n<p>\u4ece\u670d\u52a1\u5668\u6587\u4ef6\u4e2d\u70b9\u5f00test.py&#xff0c;\u540c\u65f6\u6253\u4e0a\u65ad\u70b9&#xff08;\u5c0f\u7ea2\u70b9&#xff09;\u3002<\/p>\n<p>\u4e4b\u540e&#xff0c;\u4ece\u5de6\u4fa7\u201c\u8fd0\u884c\u201d\u9009\u9879\u5361\u8bbf\u95ee\u8c03\u8bd5\u7a0b\u5e8f\u3002\u70b9\u51fb\u201c\u8fd0\u884c\u548c\u8c03\u8bd5\u201d\u4e4b\u540e&#xff0c;\u5728\u4e0a\u65b9\u9009\u62e9\u8c03\u8bd5\u5668\u5904&#xff0c;\u6211\u9009\u62e9\u4e86\u201cPython Debugger\u201d\u8c03\u8bd5\u5668\u3002&#xff08;\u56e0\u4e3a\u6211\u60f3\u8c03\u8bd5\u7684\u662fpython\u4ee3\u7801&#xff0c;\u5982\u679c\u662f\u5176\u4ed6\u7684\u4ee3\u7801&#xff0c;\u6bd4\u5982Node.js&#xff0c;\u4e5f\u8981\u66f4\u6362\u76f8\u5e94\u7684\u8c03\u8bd5\u5de5\u5177\u3002&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233211-6802e0fb2c66a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4e4b\u540e\u9009\u62e9\u5f53\u524dpython\u6587\u4ef6&#xff08;\u7b2c\u4e00\u6761&#xff0c;\u4e5f\u5c31\u662f\u6211\u4eec\u73b0\u5728\u70b9\u5f00\u7684test.py\u6587\u4ef6&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233211-6802e0fb60b79.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7136\u540e\u7a0b\u5e8f\u8fd0\u884c\u5230\u65ad\u70b9\u5c31\u505c\u4e0b\u6765\u4e86\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233211-6802e0fbd614b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u81f3\u4e8e\u8c03\u8bd5\u7684\u6309\u94ae&#xff0c;\u5927\u5bb6\u6709\u8fc7\u8c03\u8bd5\u7ecf\u9a8c\u7684&#xff0c;\u5c1d\u8bd5\u4e00\u4e0b\u5c31\u77e5\u9053\u4e86&#xff0c;\u5c31\u4e0d\u7ec6\u8bf4\u4e86\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233212-6802e0fc21ab7.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5f53\u7136\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4ecevscode\u7a0b\u5e8f\u7684\u53f3\u4e0a\u89d2&#xff0c;\u8fdb\u884cpython\u4ee3\u7801\u8fd0\u884c\u548c\u8c03\u8bd5\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233212-6802e0fc38a64.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>2.2 \u590d\u6742\u547d\u4ee4\u8c03\u8bd5&#xff08;\u547d\u4ee4\u884c\u8c03\u8bd5&#xff09;<\/h3>\n<p>\u5728vsocde\u4e2d&#xff0c;\u6709\u4e24\u79cd\u6838\u5fc3\u8c03\u8bd5\u6a21\u5f0f&#xff1a;Launch\u548cAttach\u3002\u6211\u901a\u5e38\u4f7f\u7528Attach\u6a21\u5f0f\u8fdb\u884c\u590d\u6742\u547d\u4ee4\u7684\u8c03\u8bd5\u3002<\/p>\n<p>\u6709\u7684\u65f6\u5019&#xff0c;\u6211\u4e0d\u662f\u53ea\u8dd1\u4e00\u4e2a\u6587\u4ef6&#xff0c;\u800c\u662f\u8dd1\u4e00\u4e2a\u975e\u5e38\u5927\u7684\u9879\u76ee&#xff0c;\u540c\u65f6\u9879\u76ee\u7684\u6267\u884c\u547d\u4ee4\u975e\u5e38\u590d\u6742&#xff0c;\u8fd9\u4e2a\u65f6\u5019\u5982\u4f55\u8c03\u8bd5\u5462&#xff1f;<\/p>\n<p>\u6bd4\u5982\u6211\u73b0\u5728\u60f3\u8c03\u8bd5scene graph generation benchmark\u9879\u76ee\u3002<\/p>\n<p>\u5176\u8fd0\u884c\u547d\u4ee4\u5982\u4e0b&#xff1a;<\/p>\n<p>CUDA_VISIBLE_DEVICES&#061;0,1 python -m torch.distributed.launch &#8211;master_port 10026 &#8211;nproc_per_node&#061;2 tools\/relation_train_net.py &#8211;config-file \u201cconfigs\/e2e_relation_X_101_32_8_FPN_1x.yaml\u201d MODEL.ROI_RELATION_HEAD.USE_GT_BOX True MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL False MODEL.ROI_RELATION_HEAD.PREDICTOR CausalAnalysisPredictor MODEL.ROI_RELATION_HEAD.CAUSAL.EFFECT_TYPE none MODEL.ROI_RELATION_HEAD.CAUSAL.FUSION_TYPE sum MODEL.ROI_RELATION_HEAD.CAUSAL.CONTEXT_LAYER motifs SOLVER.IMS_PER_BATCH 12 TEST.IMS_PER_BATCH 2 DTYPE \u201cfloat16\u201d SOLVER.MAX_ITER 50000 SOLVER.VAL_PERIOD 2000 SOLVER.CHECKPOINT_PERIOD 2000 GLOVE_DIR \/home\/kaihua\/glove MODEL.PRETRAINED_DETECTOR_CKPT \/home\/kaihua\/checkpoints\/pretrained_faster_rcnn\/model_final.pth OUTPUT_DIR \/home\/kaihua\/checkpoints\/causal-motifs-sgcls-exmp<\/p>\n<p>\u8fd9\u79cd\u60c5\u51b5&#xff0c;\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u901a\u8fc7\u8c03\u8bd5\u6309\u94ae\u8fdb\u884c\u8fd0\u884c\u3002\u4e0d\u8fc7\u5e78\u8fd0\u7684\u662f&#xff0c;\u5982\u679c\u5728\u60a8\u7684 Python \u73af\u5883\u4e2d\u5b89\u88c5\u4e86debugpy&#xff0c;\u8c03\u8bd5\u5668\u4e5f\u53ef\u4ee5\u4ece\u547d\u4ee4\u884c\u8fd0\u884c\u3002 \u8c03\u8bd5\u5668\u547d\u4ee4\u884c\u8bed\u6cd5\u5982\u4e0b&#xff1a;<\/p>\n<p>python <span class=\"token operator\">&#8211;<\/span>m debugpy<br \/>\n    <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>listen <span class=\"token operator\">|<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>connect<br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&lt;<\/span>host<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">:<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&lt;<\/span>port<span class=\"token operator\">&gt;<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>wait<span class=\"token operator\">&#8211;<\/span><span class=\"token keyword\">for<\/span><span class=\"token operator\">&#8211;<\/span>client<span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>configure<span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&lt;<\/span>name<span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">&lt;<\/span>value<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>log<span class=\"token operator\">&#8211;<\/span>to <span class=\"token operator\">&lt;<\/span>path<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>log<span class=\"token operator\">&#8211;<\/span>to<span class=\"token operator\">&#8211;<\/span>stderr<span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token operator\">&lt;<\/span>filename<span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token operator\">&#8211;<\/span>m <span class=\"token operator\">&lt;<\/span>module<span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token operator\">&#8211;<\/span>c <span class=\"token operator\">&lt;<\/span>code<span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>pid <span class=\"token operator\">&lt;<\/span>pid<span class=\"token operator\">&gt;<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&lt;<\/span>arg<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><\/p>\n<p>\u63a5\u4e0b\u6765\u6211\u4f1a\u89e3\u91ca\u5982\u4f55\u4f7f\u7528\u547d\u4ee4\u884c\u8c03\u8bd5\u529f\u80fd\u3002<\/p>\n<li>\u5b89\u88c5debugpy&#xff1a;<\/li>\n<p>pip install debugpy<\/p>\n<li>\u70b9\u51fb\u521b\u5efalaunch.json\u6587\u4ef6\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233212-6802e0fc56d8e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u6211\u4eec\u9009\u62e9Python Debugger\u3002\u5e76\u4e14\u7ee7\u7eed\u9009\u62e9\u5f53\u524dpython\u6587\u4ef6\u3002\u6253\u5f00launch.json\u6587\u4ef6\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233212-6802e0fc89b7b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u521a\u624d\u662f\u6ca1\u6709\u8fdb\u5165\u8c03\u8bd5\u5668\u65f6\u7684\u64cd\u4f5c&#xff0c;\u5982\u679c\u4f60\u5df2\u7ecf\u8fdb\u5165\u4e86\u8c03\u8bd5\u5668&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u70b9\u51fb\u6dfb\u52a0\u914d\u7f6e\u3002\u6253\u5f00launch.json\u6587\u4ef6\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233212-6802e0fca6530.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> 4\u2026 \u4fee\u6539launch.json\u6587\u4ef6\u3002 \u521d\u59cb\u65f6\u7684launch.json\u6587\u4ef6\u662f\u8fd9\u6837\u7684&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233212-6802e0fcd852c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> launch.json\u4e2d\u53ef\u9009\u7684\u8c03\u8bd5\u65b9\u5f0f\u6709\u4e24\u79cd&#xff0c;\u4e00\u79cd\u662flaunch&#xff0c;\u4e00\u79cd\u662fattach&#xff0c;\u4e4b\u540e\u6211\u4eec\u628arequest\u4fee\u6539\u6210attach\u7684\u6a21\u5f0f\u3002\u5373\u5982\u4e0b&#xff1a;&#xff08;\u6ce8\u610f&#xff0c;\u7aef\u53e3\u53f7\u8981\u9009\u62e9\u81ea\u5df1\u670d\u52a1\u5668\u7684\u7aef\u53e3\u53f7\u3002\u6211\u662f\u7528\u7684autodl\u670d\u52a1\u5668&#xff0c;\u8fd9\u4e2a\u670d\u52a1\u5668\u53ef\u9009\u7684\u7aef\u53e3\u53f7\u662f6006 &#xff08;\u5982\u679c\u4f7f\u7528\u7684\u5546\u4e1a\u670d\u52a1\u5668\u6bd4\u5982autodl&#xff0c;\u53ef\u80fd\u8fde\u63a5\u7684\u65f6\u5019\u4e0d\u80fd\u7ffb\u5899&#xff09;&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233213-6802e0fd0567e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token string-property property\">&#034;version&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;0.2.0&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-property property\">&#034;configurations&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token string-property property\">&#034;name&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;Python \u8c03\u8bd5\u7a0b\u5e8f: \u5f53\u524d\u6587\u4ef6&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            <span class=\"token string-property property\">&#034;type&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;debugpy&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            <span class=\"token string-property property\">&#034;request&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;attach&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            <span class=\"token string-property property\">&#034;connect&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n              <span class=\"token string-property property\">&#034;host&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;localhost&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n              <span class=\"token string-property property\">&#034;port&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">6006<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4e4b\u540e\u6211\u4eec\u5728\u547d\u4ee4\u884c\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4&#xff08;\u56e0\u4e3await-for-client\u670d\u52a1\u5668\u7aef\u5f00\u59cb\u53d7\u5230\u8c03\u8bd5\u6307\u4ee4&#xff0c;\u5e76\u7b49\u5f85\u5ba2\u6237\u7aef\u7684\u8fdb\u4e00\u6b65\u547d\u4ee4&#xff09;&#xff1a;<\/p>\n<p>python <span class=\"token operator\">&#8211;<\/span>m debugpy <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>listen <span class=\"token number\">6006<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&#8211;<\/span>wait<span class=\"token operator\">&#8211;<\/span><span class=\"token keyword\">for<\/span><span class=\"token operator\">&#8211;<\/span>client <span class=\"token punctuation\">.<\/span><span class=\"token operator\">\/<\/span>test<span class=\"token punctuation\">.<\/span>py<\/p>\n<p>\u63a5\u7740\u6211\u4eec\u70b9\u51fbF5\u3002\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u6210\u529f\u8fde\u63a5&#xff0c;\u5e76\u4e14\u53ef\u4ee5\u4ece\u6211\u4eec\u6253\u65ad\u70b9\u7684\u5730\u65b9\u5f00\u59cb\u8c03\u8bd5&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233213-6802e0fd33c8e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u8fd0\u884c\u5927\u9879\u76ee\u7684\u65f6\u5019&#xff0c;\u4f7f\u7528attach\u8c03\u8bd5\u6a21\u5f0f\u4f1a\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<h4>2.21 debugpy\u76f4\u63a5\u63d2\u5165\u4ee3\u7801\u91cc&#xff1a;<\/h4>\n<p>\u5b9e\u9645\u4e0a\u53ef\u4ee5\u76f4\u63a5\u628adebugpy\u653e\u5728\u4ee3\u7801\u91cc\u8fd0\u884c&#xff08;\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u7528\u4fee\u6539\u547d\u4ee4\u884c\u7684\u547d\u4ee4&#xff0c;\u53ef\u80fd\u4f1a\u7b80\u5355\u4e00\u70b9&#xff1f;&#xff09;&#xff1a;<\/p>\n<p>\u5728\u4ee3\u7801\u5165\u53e3\u653e\u5165&#xff1a;<\/p>\n<p>    <span class=\"token keyword\">import<\/span> debugpy<br \/>\n    debugpy<span class=\"token punctuation\">.<\/span>listen<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;localhost&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">5678<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Waiting for debugger attach&#8230;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    debugpy<span class=\"token punctuation\">.<\/span>wait_for_client<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token comment\"># debugpy.breakpoint()<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Debugger attached.&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token comment\"># \u4f60\u7684\u7a0b\u5e8f\u4ee3\u7801<\/span><\/p>\n<p>\u4e4b\u540e\u672c\u5730\u8fd0\u884c\u4f60\u7684Python\u811a\u672c&#xff0c;\u70b9\u51fbF5&#xff1a;<\/p>\n<p>    python your_script<span class=\"token punctuation\">.<\/span>py<\/p>\n<p>&#xff08;\u6211\u4e00\u6b65\u76f4\u63a5\u4fee\u6539\u547d\u4ee4&#xff0c;\u8fd9\u4e2a\u65b9\u6cd5\u6ca1\u6709\u5c1d\u8bd5\u8fc7&#xff09;<\/p>\n<h4>2.22 \u5982\u4f55\u4fee\u6539\u590d\u6742\u547d\u4ee4&#xff1f;<\/h4>\n<p>\u6bd4\u5982\u6211\u4eec\u8fd0\u884c\u7684\u7a0b\u5e8f\u547d\u4ee4\u5982\u4e0b&#xff0c;\u5982\u4f55\u4fee\u6539\u6210attach\u53ef\u4ee5\u8bc6\u522b\u5e76\u8c03\u8bd5\u7684\u547d\u4ee4\u5462&#xff1f;<\/p>\n<p>CUDA_VISIBLE_DEVICES&#061;0,1 python -m torch.distributed.launch &#8211;master_port 10026 &#8211;nproc_per_node&#061;2 tools\/relation_train_net.py &#8211;config-file \u201cconfigs\/e2e_relation_X_101_32_8_FPN_1x.yaml\u201d MODEL.ROI_RELATION_HEAD.USE_GT_BOX True MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL False MODEL.ROI_RELATION_HEAD.PREDICTOR CausalAnalysisPredictor MODEL.ROI_RELATION_HEAD.CAUSAL.EFFECT_TYPE none MODEL.ROI_RELATION_HEAD.CAUSAL.FUSION_TYPE sum MODEL.ROI_RELATION_HEAD.CAUSAL.CONTEXT_LAYER motifs SOLVER.IMS_PER_BATCH 12 TEST.IMS_PER_BATCH 2 DTYPE \u201cfloat16\u201d SOLVER.MAX_ITER 50000 SOLVER.VAL_PERIOD 2000 SOLVER.CHECKPOINT_PERIOD 2000 GLOVE_DIR \/home\/kaihua\/glove MODEL.PRETRAINED_DETECTOR_CKPT \/home\/kaihua\/checkpoints\/pretrained_faster_rcnn\/model_final.pth OUTPUT_DIR \/home\/kaihua\/checkpoints\/causal-motifs-sgcls-exmp<\/p>\n<p>\u65b9\u6cd5\u4e00&#xff1a; \u5728\u9879\u76ee\u5165\u53e3\u4ee3\u7801\u91cc\u76f4\u63a5\u653e\u4e0adebugpy&#xff0c;\u5c31\u4e0d\u7528\u4fee\u6539\u590d\u6742\u547d\u4ee4\u4e86\u3002 \u65b9\u6cd5\u4e8c&#xff1a;\u4ea4\u7ed9gpt\u5c31\u597d\u5566\u3002\u8ba9GPT\u53bb\u4fee\u6539\u3002<\/p>\n<p>\u6211\u95eegpt&#xff1a;<\/p>\n<p>\u6211\u73b0\u5728\u60f3\u8981\u4f7f\u7528vscode\u7684debugpy\u8c03\u8bd5\u4e00\u4e2a\u9879\u76ee&#xff0c;\u9879\u76ee\u7684\u8fd0\u884c\u547d\u4ee4\u5982\u4e0b&#xff1a; CUDA_VISIBLE_DEVICES&#061;0,1 python -m torch.distributed.launch &#8211;master_port 10026 &#8211;nproc_per_node&#061;2 tools\/relation_train_net.py &#8211;config-file \u201cconfigs\/e2e_relation_X_101_32_8_FPN_1x.yaml\u201d MODEL.ROI_RELATION_HEAD.USE_GT_BOX True MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL False MODEL.ROI_RELATION_HEAD.PREDICTOR CausalAnalysisPredictor MODEL.ROI_RELATION_HEAD.CAUSAL.EFFECT_TYPE none MODEL.ROI_RELATION_HEAD.CAUSAL.FUSION_TYPE sum MODEL.ROI_RELATION_HEAD.CAUSAL.CONTEXT_LAYER motifs SOLVER.IMS_PER_BATCH 12 TEST.IMS_PER_BATCH 2 DTYPE \u201cfloat16\u201d SOLVER.MAX_ITER 50000 SOLVER.VAL_PERIOD 2000 SOLVER.CHECKPOINT_PERIOD 2000 GLOVE_DIR \/home\/kaihua\/glove MODEL.PRETRAINED_DETECTOR_CKPT \/home\/kaihua\/checkpoints\/pretrained_faster_rcnn\/model_final.pth OUTPUT_DIR \/home\/kaihua\/checkpoints\/causal-motifs-sgcls-exmp<\/p>\n<p>\u6211\u73b0\u5728\u60f3\u8981\u4f7f\u7528vscode\u7684attach\u8c03\u8bd5\u529f\u80fd&#xff0c;\u4f7f\u75286006\u7aef\u53e3\u53f7&#xff0c;\u50cf\u8fd0\u884c\u8fd9\u4e2a\u5c0f\u6587\u4ef6\u4e00\u6837\u8fd0\u884c\u8fd9\u4e2a\u9879\u76ee&#xff1a; python -m debugpy &#8211;listen 6006 &#8211;wait-for-client .\/test.py<\/p>\n<p>\u90a3\u6211\u5e94\u8be5\u5982\u4f55\u4fee\u6539\u8fd9\u4e2a\u9879\u76ee\u7684\u8fd0\u884c\u6307\u4ee4\u5462&#xff1f;\u6211\u8bf4\u7684\u4e0d\u662f\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0debugpy\u4ee3\u7801&#xff0c;\u800c\u662f\u547d\u4ee4\u884c\u76f4\u63a5\u8fd0\u884c\u5e76\u8c03\u8bd5\u3002<\/p>\n<p>gpt\u56de\u7b54&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233213-6802e0fd7d4a4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> gpt\u56de\u7b54&#xff1a;<\/p>\n<p>CUDA_VISIBLE_DEVICES&#061;0,1 python -m debugpy &#8211;listen 6006 &#8211;wait-for-client -m torch.distributed.launch &#8211;master_port 10026 &#8211;nproc_per_node&#061;2 tools\/relation_train_net.py &#8211;config-file \u201cconfigs\/e2e_relation_X_101_32_8_FPN_1x.yaml\u201d MODEL.ROI_RELATION_HEAD.USE_GT_BOX True MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL False MODEL.ROI_RELATION_HEAD.PREDICTOR CausalAnalysisPredictor MODEL.ROI_RELATION_HEAD.CAUSAL.EFFECT_TYPE none MODEL.ROI_RELATION_HEAD.CAUSAL.FUSION_TYPE sum MODEL.ROI_RELATION_HEAD.CAUSAL.CONTEXT_LAYER motifs SOLVER.IMS_PER_BATCH 12 TEST.IMS_PER_BATCH 2 DTYPE \u201cfloat16\u201d SOLVER.MAX_ITER 50000 SOLVER.VAL_PERIOD 2000 SOLVER.CHECKPOINT_PERIOD 2000 GLOVE_DIR \/home\/kaihua\/glove MODEL.PRETRAINED_DETECTOR_CKPT \/home\/kaihua\/checkpoints\/pretrained_faster_rcnn\/model_final.pth OUTPUT_DIR \/home\/kaihua\/checkpoints\/causal-motifs-sgcls-exmp<\/p>\n<p>\u4e4b\u540e\u6211\u4eec\u518d\u5bf9master_port\u7684\u7aef\u53e3\u53f7\u505a\u4e00\u4e9b\u4fee\u6539&#xff0c;\u6bd4\u5982\u4fee\u6539\u62106006\u8fd9\u6837&#xff0c;\u7a0d\u5fae\u6539\u4e00\u6539&#xff0c;\u590d\u6742\u547d\u4ee4\u7684\u9879\u76ee\u5c31\u80fd\u6210\u529f\u8fd0\u884c\u5566\u3002<\/p>\n<p>\u6211\u5728\u8fd9\u91cc\u8d34\u4e00\u4e0b\u6211\u7684\u6e90\u547d\u4ee4\u548c\u4fee\u6539\u8fc7\u540e\u7684\u547d\u4ee4&#xff0c;\u65b9\u4fbf\u5927\u5bb6\u53c2\u8003(\u8fd9\u91cc\u53bb\u6389\u4e86master_port \u548c nproc_per_node &#xff0c;\u5b9e\u9645\u4e0a\u6211\u89c9\u5f97\u4fee\u6539\u8fc7\u5c31\u53ef\u4ee5\u4e86&#xff0c;\u91cd\u65b0\u52a0\u4e0a\u4e5f\u53ef\u4ee5&#xff0c;\u53ef\u80fd\u662f\u6211\u5f53\u65f6\u8dd1\u7684\u65f6\u5019\u7ebf\u7a0b\u4e0d\u591f\u7528\u4e86\u3002)&#xff1a;<\/p>\n<p>\u539f\u547d\u4ee4&#xff1a;<\/p>\n<p>CUDA_VISIBLE_DEVICES&#061;0 python -m torch.distributed.launch &#8211;master_port 10027 &#8211;nproc_per_node&#061;1 tools\/relation_test_net.py &#8211;config-file \u201cconfigs\/e2e_relation_X_101_32_8_FPN_1x.yaml\u201d MODEL.ROI_RELATION_HEAD.USE_GT_BOX True MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL True MODEL.ROI_RELATION_HEAD.PREDICTOR TransformerPredictor TEST.IMS_PER_BATCH 1 DTYPE \u201cfloat16\u201d GLOVE_DIR \/home\/Scene-Graph-Benchmark.pytorch\/glove MODEL.PRETRAINED_DETECTOR_CKPT \/home\/Scene-Graph-Benchmark.pytorch\/checkpoints\/rtpb-precls-exmp OUTPUT_DIR \/home\/Scene-Graph-Benchmark.pytorch\/checkpoints\/rtpb-precls-exmp<\/p>\n<p>\u4fee\u6539\u540e\u7684\u547d\u4ee4&#xff1a;<\/p>\n<p>CUDA_VISIBLE_DEVICES&#061;1 python -m debugpy &#8211;listen 45396 &#8211;wait-for-client tools\/relation_test_net.py &#8211;config-file \u201cconfigs\/e2e_relation_X_101_32_8_FPN_1x.yaml\u201d MODEL.ROI_RELATION_HEAD.USE_GT_BOX True MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL True MODEL.ROI_RELATION_HEAD.PREDICTOR TransformerPredictor TEST.IMS_PER_BATCH 1 DTYPE \u201cfloat16\u201d GLOVE_DIR \/home\/Scene-Graph-Benchmark.pytorch\/glove MODEL.PRETRAINED_DETECTOR_CKPT \/home\/Scene-Graph-Benchmark.pytorch\/checkpoints\/rtpb-precls-exmp OUTPUT_DIR \/home\/Scene-Graph-Benchmark.pytorch\/checkpoints\/rtpb-precls-exmp<\/p>\n<h2>\u53c2\u8003\u6587\u6863<\/h2>\n<li>VS Code \u4e2d\u7684 Python \u8c03\u8bd5<\/li>\n<li>VS Code \u4e2d\u7684 Python \u8c03\u8bd5<\/li>\n<li>\u5728 VS Code \u4e2d\u5f00\u59cb\u4f7f\u7528 Python<\/li>\n<p>\u547d\u4ee4\u884c\u53ef\u9009\u9879&#xff08;\u53ef\u4ee5\u54a8\u8be2gpt\u5206\u522b\u90fd\u662f\u4ec0\u4e48\u610f\u601d&#xff09;&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233213-6802e0fd98438.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf30\u6b21\u3002ssh\u4f7f\u7528vscode\u8fde\u63a5linux\u670d\u52a1\u5668\u3010autodl\u670d\u52a1\u5668\u3011\uff0c\u5e76\u8c03\u51fa\u547d\u4ee4\u884c\u8fd0\u884c\u4ee3\u7801\u3010\u5141\u8bb8python\u4ee3\u7801\u8df3\u8f6c\u3011\u7b14\u8005\u5df2\u7ecf\u63d0\u524d\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86Python\u548c\u63d2\u4ef6\u3002\u5927\u5bb6\u4e5f\u63d0\u524d\u5b89\u88c5\u4e00\u4e0b\u3002_vscode \u8c03\u8bd5python<\/p>\n","protected":false},"author":2,"featured_media":23323,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1784,81,76,1783],"topic":[],"class_list":["post-23340","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ipdb","tag-python","tag-vscode","tag-1783"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/23340.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf30\u6b21\u3002ssh\u4f7f\u7528vscode\u8fde\u63a5linux\u670d\u52a1\u5668\u3010autodl\u670d\u52a1\u5668\u3011\uff0c\u5e76\u8c03\u51fa\u547d\u4ee4\u884c\u8fd0\u884c\u4ee3\u7801\u3010\u5141\u8bb8python\u4ee3\u7801\u8df3\u8f6c\u3011\u7b14\u8005\u5df2\u7ecf\u63d0\u524d\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86Python\u548c\u63d2\u4ef6\u3002\u5927\u5bb6\u4e5f\u63d0\u524d\u5b89\u88c5\u4e00\u4e0b\u3002_vscode \u8c03\u8bd5python\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/23340.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T23:32:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233210-6802e0faa33c7.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/23340.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/23340.html\",\"name\":\"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T23:32:14+00:00\",\"dateModified\":\"2025-04-18T23:32:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/23340.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/23340.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/23340.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/23340.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf30\u6b21\u3002ssh\u4f7f\u7528vscode\u8fde\u63a5linux\u670d\u52a1\u5668\u3010autodl\u670d\u52a1\u5668\u3011\uff0c\u5e76\u8c03\u51fa\u547d\u4ee4\u884c\u8fd0\u884c\u4ee3\u7801\u3010\u5141\u8bb8python\u4ee3\u7801\u8df3\u8f6c\u3011\u7b14\u8005\u5df2\u7ecf\u63d0\u524d\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86Python\u548c\u63d2\u4ef6\u3002\u5927\u5bb6\u4e5f\u63d0\u524d\u5b89\u88c5\u4e00\u4e0b\u3002_vscode \u8c03\u8bd5python","og_url":"https:\/\/www.wsisp.com\/helps\/23340.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T23:32:14+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418233210-6802e0faa33c7.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/23340.html","url":"https:\/\/www.wsisp.com\/helps\/23340.html","name":"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T23:32:14+00:00","dateModified":"2025-04-18T23:32:14+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/23340.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/23340.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/23340.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528vscode\u8fdb\u884c\u670d\u52a1\u5668python\u4ee3\u7801\u8c03\u8bd5\/\u4ee5\u53ca\u4f7f\u7528debugpy\u8fdb\u884c\u590d\u6742\u4ee3\u7801\u8c03\u8bd5"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/23340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=23340"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/23340\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/23323"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=23340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=23340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=23340"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=23340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}