Exemplo n.º 1
0
def test_cli():
    cli_args = ["flash", "graph_classification", "--trainer.fast_dev_run", "True"]
    with mock.patch("sys.argv", cli_args):
        try:
            main()
        except SystemExit:
            pass
Exemplo n.º 2
0
def test_cli():
    cli_args = ["flash", "instance_segmentation", "--trainer.fast_dev_run", "True"]
    with mock.patch("sys.argv", cli_args):
        try:
            main()
        except SystemExit:
            pass
Exemplo n.º 3
0
def test_cli():
    cli_args = ["flash", "style_transfer", "--trainer.fast_dev_run", "True"]
    with mock.patch("sys.argv", cli_args):
        try:
            main()
        except SystemExit:
            pass
Exemplo n.º 4
0
def _test_cli(self, extra_args: List):
    """Tests that the default Flash zero configuration runs for the task."""
    cli_args = ["flash", self.cli_command, "--trainer.fast_dev_run", "True"] + extra_args
    with mock.patch("sys.argv", cli_args):
        try:
            main()
        except SystemExit:
            pass
Exemplo n.º 5
0
def test_cli():
    cli_args = [
        "flash", "question_answering", "--trainer.fast_dev_run", "True"
    ]
    with mock.patch("sys.argv", cli_args):
        try:
            main()
        except SystemExit:
            pass
Exemplo n.º 6
0
def test_cli():
    cli_args = [
        "flash", "speech_recognition", "--trainer.fast_dev_run", "True"
    ]
    with mock.patch("sys.argv", cli_args):
        try:
            main()
        except SystemExit:
            pass
Exemplo n.º 7
0
def test_cli(cli_args):
    with mock.patch("sys.argv", cli_args):
        try:
            main()
        except SystemExit:
            pass