brianrobt

argbind - sweep_argbind.py test failure

Jul 14th, 2024
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.53 KB | None | 0 0
  1. ______________________________________________________________________ test_example[/home/brian/workspace/python-argbind-git-aur/src/python-argbind-git/examples/mnist/sweep_argbind.py] _______________________________________________________________________
  2.  
  3. path = '/home/brian/workspace/python-argbind-git-aur/src/python-argbind-git/examples/mnist/sweep_argbind.py'
  4.  
  5. @pytest.mark.parametrize("path", paths)
  6. def test_example(path):
  7. # Get help text
  8. help_args = []
  9.  
  10. if "groups" in path:
  11. help_args.append("evaluate")
  12. output = subprocess.run(["python", path] + help_args + ["-h"],
  13. stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  14. output = output.stdout.decode('utf-8')
  15.  
  16. _path = path.split('examples/')[-1] + '.help'
  17. output_path = regression_path / _path
  18. # Ignore the bind_module ones for help text, as the PyTorch docstrings
  19. # might change on us, causing tests to fail.
  20. if "bind_module" not in path:
  21. > check(output, output_path)
  22.  
  23. tests/test_examples.py:46:
  24. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  25.  
  26. output = 'Experiment 1, batch size is 16, learning rate is 0.1.\nmain(\n batch_size : int = 16\n test_batch_size : int = 1000...ool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\n'
  27. output_path = PosixPath('/home/brian/workspace/python-argbind-git-aur/src/python-argbind-git/tests/regression/mnist/sweep_argbind.py.help')
  28.  
  29. def check(output, output_path):
  30. if not os.path.exists(output_path) or OVERWRITE:
  31. output_path.parent.mkdir(exist_ok=True)
  32. with open(output_path, 'w') as f:
  33. f.write(output)
  34. else:
  35. with open(output_path, 'r') as f:
  36. reg_output = f.read()
  37. > assert output == reg_output
  38. E AssertionError: assert 'Experiment 1, batch size is 16, learning rate is 0.1.\nmain(\n batch_size : int = 16\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.1\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run :bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\nDownloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\nFailed to download (trying next):\nHTTP Error 403: Forbidden\n\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz to ../data/MNIST/raw/train-images-idx3-ubyte.gz\nExtracting ../data/MNIST/raw/train-images-idx3-ubyte.gz to ../data/MNIST/raw\n\nDownloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz\nFailed to download (trying next):\nHTTP Error 403: Forbidden\n\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz to ../data/MNIST/raw/train-labels-idx1-ubyte.gz\nExtracting ../data/MNIST/raw/train-labels-idx1-ubyte.gz to ../data/MNIST/raw\n\nDownloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz\nFailed to download (trying next):\nHTTP Error 403: Forbidden\n\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz to ../data/MNIST/raw/t10k-images-idx3-ubyte.gz\nExtracting ../data/MNIST/raw/t10k-images-idx3-ubyte.gz to ../data/MNIST/raw\n\nDownloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz\nFailed to download (trying next):\nHTTP Error 403: Forbidden\n\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz\nDownloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz to ../data/MNIST/raw/t10k-labels-idx1-ubyte.gz\nExtracting ../data/MNIST/raw/t10k-labels-idx1-ubyte.gz to ../data/MNIST/raw\n\n\nExperiment 2, batch size is 16, learning rate is 0.5.\nmain(\n batch_size : int = 16\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.5\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 3, batch size is 16, learning rate is 1.0.\nmain(\n batch_size : int = 16\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 1.0\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 4, batch size is 32, learning rate is 0.1.\nmain(\n batch_size : int = 32\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.1\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 5, batch size is 32, learning rateis 0.5.\nmain(\n batch_size : int = 32\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.5\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 6, batch size is 32, learning rate is 1.0.\nmain(\n batch_size : int = 32\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 1.0\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 7, batch size is 64, learning rate is 0.1.\nmain(\n batch_size : int = 64\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.1\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 8, batch size is 64, learning rate is 0.5.\nmain(\n batch_size : int = 64\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.5\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 9, batch size is 64, learning rate is 1.0.\nmain(\n batch_size : int = 64\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 1.0\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\n' == 'Experiment1, batch size is 16, learning rate is 0.1.\nmain(\n batch_size : int = 16\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.1\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval: int = 10\n save_model : bool = False\n)\n\nExperiment 2, batch size is 16, learning rate is 0.5.\nmain(\n batch_size : int = 16\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.5\n gamma : float = 0.7\n no_cuda : bool = False\ndry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 3, batch size is 16, learning rate is 1.0.\nmain(\n batch_size : int = 16\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 1.0\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 4, batch size is 32, learning rate is 0.1.\nmain(\n batch_size : int = 32\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.1\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 5, batch size is 32, learning rate is 0.5.\nmain(\n batch_size : int = 32\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.5\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 6, batch size is 32, learning rate is 1.0.\nmain(\n batch_size : int = 32\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 1.0\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 7, batch size is 64, learning rate is 0.1.\nmain(\n batch_size : int = 64\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.1\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 8, batch size is 64, learning rate is 0.5.\nmain(\n batch_size : int = 64\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 0.5\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\nExperiment 9, batch size is 64, learning rate is 1.0.\nmain(\n batch_size : int = 64\n test_batch_size : int = 1000\n epochs : int = 0\n lr : float = 1.0\n gamma : float = 0.7\n no_cuda : bool = False\n dry_run : bool = False\n seed : int = 1\n log_interval : int = 10\n save_model : bool = False\n)\n\n'
  39. E
  40. E Experiment 1, batch size is 16, learning rate is 0.1.
  41. E main(
  42. E batch_size : int = 16
  43. E test_batch_size : int = 1000
  44. E epochs : int = 0
  45. E lr : float = 0.1
  46. E gamma : float = 0.7
  47. E no_cuda : bool = False
  48. E dry_run : bool = False
  49. E seed : int = 1
  50. E log_interval : int = 10
  51. E save_model : bool = False
  52. E )
  53. E + Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
  54. E + Failed to download (trying next):
  55. E + HTTP Error 403: Forbidden
  56. E +
  57. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz
  58. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz to ../data/MNIST/raw/train-images-idx3-ubyte.gz
  59. E + Extracting ../data/MNIST/raw/train-images-idx3-ubyte.gz to ../data/MNIST/raw
  60. E +
  61. E + Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
  62. E + Failed to download (trying next):
  63. E + HTTP Error 403: Forbidden
  64. E +
  65. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz
  66. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz to ../data/MNIST/raw/train-labels-idx1-ubyte.gz
  67. E + Extracting ../data/MNIST/raw/train-labels-idx1-ubyte.gz to ../data/MNIST/raw
  68. E +
  69. E + Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
  70. E + Failed to download (trying next):
  71. E + HTTP Error 403: Forbidden
  72. E +
  73. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz
  74. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz to ../data/MNIST/raw/t10k-images-idx3-ubyte.gz
  75. E + Extracting ../data/MNIST/raw/t10k-images-idx3-ubyte.gz to ../data/MNIST/raw
  76. E +
  77. E + Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
  78. E + Failed to download (trying next):
  79. E + HTTP Error 403: Forbidden
  80. E +
  81. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz
  82. E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz to ../data/MNIST/raw/t10k-labels-idx1-ubyte.gz
  83. E + Extracting ../data/MNIST/raw/t10k-labels-idx1-ubyte.gz to ../data/MNIST/raw
  84. E +
  85. E
  86. E Experiment 2, batch size is 16, learning rate is 0.5.
  87. E main(
  88. E batch_size : int = 16
  89. E test_batch_size : int = 1000
  90. E epochs : int = 0
  91. E lr : float = 0.5
  92. E gamma : float = 0.7
  93. E no_cuda : bool = False
  94. E dry_run : bool = False
  95. E seed : int = 1
  96. E log_interval : int = 10
  97. E save_model : bool = False
  98. E )
  99. E
  100. E Experiment 3, batch size is 16, learning rate is 1.0.
  101. E main(
  102. E batch_size : int = 16
  103. E test_batch_size : int = 1000
  104. E epochs : int = 0
  105. E lr : float = 1.0
  106. E gamma : float = 0.7
  107. E no_cuda : bool = False
  108. E dry_run : bool = False
  109. E seed : int = 1
  110. E log_interval : int = 10
  111. E save_model : bool = False
  112. E )
  113. E
  114. E Experiment 4, batch size is 32, learning rate is 0.1.
  115. E main(
  116. E batch_size : int = 32
  117. E test_batch_size : int = 1000
  118. E epochs : int = 0
  119. E lr : float = 0.1
  120. E gamma : float = 0.7
  121. E no_cuda : bool = False
  122. E dry_run : bool = False
  123. E seed : int = 1
  124. E log_interval : int = 10
  125. E save_model : bool = False
  126. E )
  127. E
  128. E Experiment 5, batch size is 32, learning rate is 0.5.
  129. E main(
  130. E batch_size : int = 32
  131. E test_batch_size : int = 1000
  132. E epochs : int = 0
  133. E lr : float = 0.5
  134. E gamma : float = 0.7
  135. E no_cuda : bool = False
  136. E dry_run : bool = False
  137. E seed : int = 1
  138. E log_interval : int = 10
  139. E save_model : bool = False
  140. E )
  141. E
  142. E Experiment 6, batch size is 32, learning rate is 1.0.
  143. E main(
  144. E batch_size : int = 32
  145. E test_batch_size : int = 1000
  146. E epochs : int = 0
  147. E lr : float = 1.0
  148. E gamma : float = 0.7
  149. E no_cuda : bool = False
  150. E dry_run : bool = False
  151. E seed : int = 1
  152. E log_interval : int = 10
  153. E save_model : bool = False
  154. E )
  155. E
  156. E Experiment 7, batch size is 64, learning rate is 0.1.
  157. E main(
  158. E batch_size : int = 64
  159. E test_batch_size : int = 1000
  160. E epochs : int = 0
  161. E lr : float = 0.1
  162. E gamma : float = 0.7
  163. E no_cuda : bool = False
  164. E dry_run : bool = False
  165. E seed : int = 1
  166. E log_interval : int = 10
  167. E save_model : bool = False
  168. E )
  169. E
  170. E Experiment 8, batch size is 64, learning rate is 0.5.
  171. E main(
  172. E batch_size : int = 64
  173. E test_batch_size : int = 1000
  174. E epochs : int = 0
  175. E lr : float = 0.5
  176. E gamma : float = 0.7
  177. E no_cuda : bool = False
  178. E dry_run : bool = False
  179. E seed : int = 1
  180. E log_interval : int = 10
  181. E save_model : bool = False
  182. E )
  183. E
  184. E Experiment 9, batch size is 64, learning rate is 1.0.
  185. E main(
  186. E batch_size : int = 64
  187. E test_batch_size : int = 1000
  188. E epochs : int = 0
  189. E lr : float = 1.0
  190. E gamma : float = 0.7
  191. E no_cuda : bool = False
  192. E dry_run : bool = False
  193. E seed : int = 1
  194. E log_interval : int = 10
  195. E save_model : bool = False
  196. E )
  197.  
  198. tests/test_examples.py:28: AssertionError
  199.  
  200. ---------- coverage: platform linux, python 3.12.4-final-0 -----------
  201. Name Stmts Miss Cover Missing
  202. ---------------------------------------------------
  203. argbind/__init__.py 1 1 0% 1
  204. argbind/argbind.py 314 314 0% 1-499
  205. ---------------------------------------------------
  206. TOTAL 315 315 0%
  207. Coverage XML written to file coverage.xml
Advertisement
Add Comment
Please, Sign In to add comment