Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ______________________________________________________________________ test_example[/home/brian/workspace/python-argbind-git-aur/src/python-argbind-git/examples/mnist/sweep_argbind.py] _______________________________________________________________________
- path = '/home/brian/workspace/python-argbind-git-aur/src/python-argbind-git/examples/mnist/sweep_argbind.py'
- @pytest.mark.parametrize("path", paths)
- def test_example(path):
- # Get help text
- help_args = []
- if "groups" in path:
- help_args.append("evaluate")
- output = subprocess.run(["python", path] + help_args + ["-h"],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- output = output.stdout.decode('utf-8')
- _path = path.split('examples/')[-1] + '.help'
- output_path = regression_path / _path
- # Ignore the bind_module ones for help text, as the PyTorch docstrings
- # might change on us, causing tests to fail.
- if "bind_module" not in path:
- > check(output, output_path)
- tests/test_examples.py:46:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- 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'
- output_path = PosixPath('/home/brian/workspace/python-argbind-git-aur/src/python-argbind-git/tests/regression/mnist/sweep_argbind.py.help')
- def check(output, output_path):
- if not os.path.exists(output_path) or OVERWRITE:
- output_path.parent.mkdir(exist_ok=True)
- with open(output_path, 'w') as f:
- f.write(output)
- else:
- with open(output_path, 'r') as f:
- reg_output = f.read()
- > assert output == reg_output
- 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'
- E
- E Experiment 1, batch size is 16, learning rate is 0.1.
- E main(
- E batch_size : int = 16
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 0.1
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E + Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
- E + Failed to download (trying next):
- E + HTTP Error 403: Forbidden
- E +
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz to ../data/MNIST/raw/train-images-idx3-ubyte.gz
- E + Extracting ../data/MNIST/raw/train-images-idx3-ubyte.gz to ../data/MNIST/raw
- E +
- E + Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
- E + Failed to download (trying next):
- E + HTTP Error 403: Forbidden
- E +
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz to ../data/MNIST/raw/train-labels-idx1-ubyte.gz
- E + Extracting ../data/MNIST/raw/train-labels-idx1-ubyte.gz to ../data/MNIST/raw
- E +
- E + Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
- E + Failed to download (trying next):
- E + HTTP Error 403: Forbidden
- E +
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz to ../data/MNIST/raw/t10k-images-idx3-ubyte.gz
- E + Extracting ../data/MNIST/raw/t10k-images-idx3-ubyte.gz to ../data/MNIST/raw
- E +
- E + Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
- E + Failed to download (trying next):
- E + HTTP Error 403: Forbidden
- E +
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz
- E + Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz to ../data/MNIST/raw/t10k-labels-idx1-ubyte.gz
- E + Extracting ../data/MNIST/raw/t10k-labels-idx1-ubyte.gz to ../data/MNIST/raw
- E +
- E
- E Experiment 2, batch size is 16, learning rate is 0.5.
- E main(
- E batch_size : int = 16
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 0.5
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E
- E Experiment 3, batch size is 16, learning rate is 1.0.
- E main(
- E batch_size : int = 16
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 1.0
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E
- E Experiment 4, batch size is 32, learning rate is 0.1.
- E main(
- E batch_size : int = 32
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 0.1
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E
- E Experiment 5, batch size is 32, learning rate is 0.5.
- E main(
- E batch_size : int = 32
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 0.5
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E
- E Experiment 6, batch size is 32, learning rate is 1.0.
- E main(
- E batch_size : int = 32
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 1.0
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E
- E Experiment 7, batch size is 64, learning rate is 0.1.
- E main(
- E batch_size : int = 64
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 0.1
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E
- E Experiment 8, batch size is 64, learning rate is 0.5.
- E main(
- E batch_size : int = 64
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 0.5
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- E
- E Experiment 9, batch size is 64, learning rate is 1.0.
- E main(
- E batch_size : int = 64
- E test_batch_size : int = 1000
- E epochs : int = 0
- E lr : float = 1.0
- E gamma : float = 0.7
- E no_cuda : bool = False
- E dry_run : bool = False
- E seed : int = 1
- E log_interval : int = 10
- E save_model : bool = False
- E )
- tests/test_examples.py:28: AssertionError
- ---------- coverage: platform linux, python 3.12.4-final-0 -----------
- Name Stmts Miss Cover Missing
- ---------------------------------------------------
- argbind/__init__.py 1 1 0% 1
- argbind/argbind.py 314 314 0% 1-499
- ---------------------------------------------------
- TOTAL 315 315 0%
- Coverage XML written to file coverage.xml
Advertisement
Add Comment
Please, Sign In to add comment