We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to built docker pi image on raspberry pi 3
Hi, 

I don't succeed building the image on a rasberry pi 3.

OS "Raspbian GNU/Linux 9 (stretch)"

```
> pi@GP-RB-FRONT:~/freqtrade/freqtrade $ docker build . -f Dockerfile.pi -t freqtrade
> Sending build context to Docker daemon  19.51MB
> Step 1/15 : FROM balenalib/raspberrypi3-debian:stretch
>  ---> 72b8e4ae9043
> Step 2/15 : RUN [ "cross-build-start" ]
>  ---> Running in 66dfc8472a92
> standard_init_linux.go:211: exec user process caused "exec format error"
> The command 'cross-build-start' returned a non-zero code: 1
```

Have a nice day.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 from sys import version_info
2 from setuptools import setup
3 
4 if version_info.major == 3 and version_info.minor < 6 or \
5         version_info.major < 3:
6     print('Your Python interpreter must be 3.6 or greater!')
7     exit(1)
8 
9 from pathlib import Path  # noqa: E402
10 from freqtrade import __version__  # noqa: E402
11 
12 
13 readme_file = Path(__file__).parent / "README.md"
14 readme_long = "Crypto Trading Bot"
15 if readme_file.is_file():
16     readme_long = (Path(__file__).parent / "README.md").read_text()
17 
18 # Requirements used for submodules
19 api = ['flask']
20 plot = ['plotly>=4.0']
21 
22 develop = [
23     'coveralls',
24     'flake8',
25     'flake8-type-annotations',
26     'flake8-tidy-imports',
27     'mypy',
28     'pytest',
29     'pytest-asyncio',
30     'pytest-cov',
31     'pytest-mock',
32     'pytest-random-order',
33 ]
34 
35 jupyter = [
36     'jupyter',
37     'nbstripout',
38     'ipykernel',
39     ]
40 
41 all_extra = api + plot + develop + jupyter
42 
43 setup(name='freqtrade',
44       version=__version__,
45       description='Crypto Trading Bot',
46       long_description=readme_long,
47       long_description_content_type="text/markdown",
48       url='https://github.com/freqtrade/freqtrade',
49       author='Freqtrade Team',
50       author_email='michael.egger@tsn.at',
51       license='GPLv3',
52       packages=['freqtrade'],
53       setup_requires=['pytest-runner', 'numpy'],
54       tests_require=['pytest', 'pytest-mock', 'pytest-cov'],
55       install_requires=[
56           # from requirements-common.txt
57           'ccxt>=1.18.1080',
58           'SQLAlchemy',
59           'python-telegram-bot',
60           'arrow',
61           'cachetools',
62           'requests',
63           'urllib3',
64           'wrapt',
65           'scikit-learn',
66           'joblib',
67           'jsonschema',
68           'TA-Lib',
69           'tabulate',
70           'coinmarketcap',
71           'scikit-optimize',
72           'filelock',
73           'py_find_1st',
74           'python-rapidjson',
75           'sdnotify',
76           'colorama',
77           # from requirements.txt
78           'numpy',
79           'pandas',
80           'scipy',
81       ],
82       extras_require={
83           'api': api,
84           'dev': all_extra,
85           'plot': plot,
86           'all': all_extra,
87           'jupyter': jupyter,
88 
89       },
90       include_package_data=True,
91       zip_safe=False,
92       entry_points={
93           'console_scripts': [
94               'freqtrade = freqtrade.main:main',
95           ],
96       },
97       classifiers=[
98           'Programming Language :: Python :: 3.6',
99           'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
100           'Topic :: Office/Business :: Financial :: Investment',
101           'Intended Audience :: Science/Research',
102       ])
103
```

Path: `freqtrade/optimize/__init__.py`
Content:
```
1 import logging
2 from typing import Any, Dict
3 
4 from filelock import FileLock, Timeout
5 
6 from freqtrade import DependencyException, constants
7 from freqtrade.state import RunMode
8 from freqtrade.utils import setup_utils_configuration
9 
10 
11 logger = logging.getLogger(__name__)
12 
13 
14 def setup_configuration(args: Dict[str, Any], method: RunMode) -> Dict[str, Any]:
15     """
16     Prepare the configuration for the Hyperopt module
17     :param args: Cli args from Arguments()
18     :return: Configuration
19     """
20     config = setup_utils_configuration(args, method)
21 
22     if method == RunMode.BACKTEST:
23         if config['stake_amount'] == constants.UNLIMITED_STAKE_AMOUNT:
24             raise DependencyException('stake amount could not be "%s" for backtesting' %
25                                       constants.UNLIMITED_STAKE_AMOUNT)
26 
27     return config
28 
29 
30 def start_backtesting(args: Dict[str, Any]) -> None:
31     """
32     Start Backtesting script
33     :param args: Cli args from Arguments()
34     :return: None
35     """
36     # Import here to avoid loading backtesting module when it's not used
37     from freqtrade.optimize.backtesting import Backtesting
38 
39     # Initialize configuration
40     config = setup_configuration(args, RunMode.BACKTEST)
41 
42     logger.info('Starting freqtrade in Backtesting mode')
43 
44     # Initialize backtesting object
45     backtesting = Backtesting(config)
46     backtesting.start()
47 
48 
49 def start_hyperopt(args: Dict[str, Any]) -> None:
50     """
51     Start hyperopt script
52     :param args: Cli args from Arguments()
53     :return: None
54     """
55     # Import here to avoid loading hyperopt module when it's not used
56     from freqtrade.optimize.hyperopt import Hyperopt
57 
58     # Initialize configuration
59     config = setup_configuration(args, RunMode.HYPEROPT)
60 
61     logger.info('Starting freqtrade in Hyperopt mode')
62 
63     lock = FileLock(Hyperopt.get_lock_filename(config))
64 
65     try:
66         with lock.acquire(timeout=1):
67 
68             # Remove noisy log messages
69             logging.getLogger('hyperopt.tpe').setLevel(logging.WARNING)
70             logging.getLogger('filelock').setLevel(logging.WARNING)
71 
72             # Initialize backtesting object
73             hyperopt = Hyperopt(config)
74             hyperopt.start()
75 
76     except Timeout:
77         logger.info("Another running instance of freqtrade Hyperopt detected.")
78         logger.info("Simultaneous execution of multiple Hyperopt commands is not supported. "
79                     "Hyperopt module is resource hungry. Please run your Hyperopts sequentially "
80                     "or on separate machines.")
81         logger.info("Quitting now.")
82         # TODO: return False here in order to help freqtrade to exit
83         # with non-zero exit code...
84         # Same in Edge and Backtesting start() functions.
85 
86 
87 def start_edge(args: Dict[str, Any]) -> None:
88     """
89     Start Edge script
90     :param args: Cli args from Arguments()
91     :return: None
92     """
93     from freqtrade.optimize.edge_cli import EdgeCli
94     # Initialize configuration
95     config = setup_configuration(args, RunMode.EDGE)
96     logger.info('Starting freqtrade in Edge mode')
97 
98     # Initialize Edge object
99     edge_cli = EdgeCli(config)
100     edge_cli.start()
101
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/freqtrade/optimize/__init__.py b/freqtrade/optimize/__init__.py
--- a/freqtrade/optimize/__init__.py
+++ b/freqtrade/optimize/__init__.py
@@ -1,9 +1,7 @@
 import logging
 from typing import Any, Dict
 
-from filelock import FileLock, Timeout
-
-from freqtrade import DependencyException, constants
+from freqtrade import DependencyException, constants, OperationalException
 from freqtrade.state import RunMode
 from freqtrade.utils import setup_utils_configuration
 
@@ -53,8 +51,12 @@
     :return: None
     """
     # Import here to avoid loading hyperopt module when it's not used
-    from freqtrade.optimize.hyperopt import Hyperopt
-
+    try:
+        from filelock import FileLock, Timeout
+        from freqtrade.optimize.hyperopt import Hyperopt
+    except ImportError as e:
+        raise OperationalException(
+            f"{e}. Please ensure that the hyperopt dependencies are installed.") from e
     # Initialize configuration
     config = setup_configuration(args, RunMode.HYPEROPT)
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -18,6 +18,13 @@
 # Requirements used for submodules
 api = ['flask']
 plot = ['plotly>=4.0']
+hyperopt = [
+    'scipy',
+    'scikit-learn',
+    'scikit-optimize',
+    'filelock',
+    'joblib',
+    ]
 
 develop = [
     'coveralls',
@@ -38,7 +45,7 @@
     'ipykernel',
     ]
 
-all_extra = api + plot + develop + jupyter
+all_extra = api + plot + develop + jupyter + hyperopt
 
 setup(name='freqtrade',
       version=__version__,
@@ -62,14 +69,10 @@
           'requests',
           'urllib3',
           'wrapt',
-          'scikit-learn',
-          'joblib',
           'jsonschema',
           'TA-Lib',
           'tabulate',
           'coinmarketcap',
-          'scikit-optimize',
-          'filelock',
           'py_find_1st',
           'python-rapidjson',
           'sdnotify',
@@ -77,15 +80,14 @@
           # from requirements.txt
           'numpy',
           'pandas',
-          'scipy',
       ],
       extras_require={
           'api': api,
           'dev': all_extra,
           'plot': plot,
-          'all': all_extra,
           'jupyter': jupyter,
-
+          'hyperopt': hyperopt,
+          'all': all_extra,
       },
       include_package_data=True,
       zip_safe=False,

{"golden_diff": "diff --git a/freqtrade/optimize/__init__.py b/freqtrade/optimize/__init__.py\n--- a/freqtrade/optimize/__init__.py\n+++ b/freqtrade/optimize/__init__.py\n@@ -1,9 +1,7 @@\n import logging\n from typing import Any, Dict\n \n-from filelock import FileLock, Timeout\n-\n-from freqtrade import DependencyException, constants\n+from freqtrade import DependencyException, constants, OperationalException\n from freqtrade.state import RunMode\n from freqtrade.utils import setup_utils_configuration\n \n@@ -53,8 +51,12 @@\n     :return: None\n     \"\"\"\n     # Import here to avoid loading hyperopt module when it's not used\n-    from freqtrade.optimize.hyperopt import Hyperopt\n-\n+    try:\n+        from filelock import FileLock, Timeout\n+        from freqtrade.optimize.hyperopt import Hyperopt\n+    except ImportError as e:\n+        raise OperationalException(\n+            f\"{e}. Please ensure that the hyperopt dependencies are installed.\") from e\n     # Initialize configuration\n     config = setup_configuration(args, RunMode.HYPEROPT)\n \ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -18,6 +18,13 @@\n # Requirements used for submodules\n api = ['flask']\n plot = ['plotly>=4.0']\n+hyperopt = [\n+    'scipy',\n+    'scikit-learn',\n+    'scikit-optimize',\n+    'filelock',\n+    'joblib',\n+    ]\n \n develop = [\n     'coveralls',\n@@ -38,7 +45,7 @@\n     'ipykernel',\n     ]\n \n-all_extra = api + plot + develop + jupyter\n+all_extra = api + plot + develop + jupyter + hyperopt\n \n setup(name='freqtrade',\n       version=__version__,\n@@ -62,14 +69,10 @@\n           'requests',\n           'urllib3',\n           'wrapt',\n-          'scikit-learn',\n-          'joblib',\n           'jsonschema',\n           'TA-Lib',\n           'tabulate',\n           'coinmarketcap',\n-          'scikit-optimize',\n-          'filelock',\n           'py_find_1st',\n           'python-rapidjson',\n           'sdnotify',\n@@ -77,15 +80,14 @@\n           # from requirements.txt\n           'numpy',\n           'pandas',\n-          'scipy',\n       ],\n       extras_require={\n           'api': api,\n           'dev': all_extra,\n           'plot': plot,\n-          'all': all_extra,\n           'jupyter': jupyter,\n-\n+          'hyperopt': hyperopt,\n+          'all': all_extra,\n       },\n       include_package_data=True,\n       zip_safe=False,\n", "issue": "Unable to built docker pi image on raspberry pi 3\nHi, \r\n\r\nI don't succeed building the image on a rasberry pi 3.\r\n\r\nOS \"Raspbian GNU/Linux 9 (stretch)\"\r\n\r\n```\r\n> pi@GP-RB-FRONT:~/freqtrade/freqtrade $ docker build . -f Dockerfile.pi -t freqtrade\r\n> Sending build context to Docker daemon  19.51MB\r\n> Step 1/15 : FROM balenalib/raspberrypi3-debian:stretch\r\n>  ---> 72b8e4ae9043\r\n> Step 2/15 : RUN [ \"cross-build-start\" ]\r\n>  ---> Running in 66dfc8472a92\r\n> standard_init_linux.go:211: exec user process caused \"exec format error\"\r\n> The command 'cross-build-start' returned a non-zero code: 1\r\n```\r\n\r\nHave a nice day.\r\n\n", "before_files": [{"content": "from sys import version_info\nfrom setuptools import setup\n\nif version_info.major == 3 and version_info.minor < 6 or \\\n        version_info.major < 3:\n    print('Your Python interpreter must be 3.6 or greater!')\n    exit(1)\n\nfrom pathlib import Path  # noqa: E402\nfrom freqtrade import __version__  # noqa: E402\n\n\nreadme_file = Path(__file__).parent / \"README.md\"\nreadme_long = \"Crypto Trading Bot\"\nif readme_file.is_file():\n    readme_long = (Path(__file__).parent / \"README.md\").read_text()\n\n# Requirements used for submodules\napi = ['flask']\nplot = ['plotly>=4.0']\n\ndevelop = [\n    'coveralls',\n    'flake8',\n    'flake8-type-annotations',\n    'flake8-tidy-imports',\n    'mypy',\n    'pytest',\n    'pytest-asyncio',\n    'pytest-cov',\n    'pytest-mock',\n    'pytest-random-order',\n]\n\njupyter = [\n    'jupyter',\n    'nbstripout',\n    'ipykernel',\n    ]\n\nall_extra = api + plot + develop + jupyter\n\nsetup(name='freqtrade',\n      version=__version__,\n      description='Crypto Trading Bot',\n      long_description=readme_long,\n      long_description_content_type=\"text/markdown\",\n      url='https://github.com/freqtrade/freqtrade',\n      author='Freqtrade Team',\n      author_email='michael.egger@tsn.at',\n      license='GPLv3',\n      packages=['freqtrade'],\n      setup_requires=['pytest-runner', 'numpy'],\n      tests_require=['pytest', 'pytest-mock', 'pytest-cov'],\n      install_requires=[\n          # from requirements-common.txt\n          'ccxt>=1.18.1080',\n          'SQLAlchemy',\n          'python-telegram-bot',\n          'arrow',\n          'cachetools',\n          'requests',\n          'urllib3',\n          'wrapt',\n          'scikit-learn',\n          'joblib',\n          'jsonschema',\n          'TA-Lib',\n          'tabulate',\n          'coinmarketcap',\n          'scikit-optimize',\n          'filelock',\n          'py_find_1st',\n          'python-rapidjson',\n          'sdnotify',\n          'colorama',\n          # from requirements.txt\n          'numpy',\n          'pandas',\n          'scipy',\n      ],\n      extras_require={\n          'api': api,\n          'dev': all_extra,\n          'plot': plot,\n          'all': all_extra,\n          'jupyter': jupyter,\n\n      },\n      include_package_data=True,\n      zip_safe=False,\n      entry_points={\n          'console_scripts': [\n              'freqtrade = freqtrade.main:main',\n          ],\n      },\n      classifiers=[\n          'Programming Language :: Python :: 3.6',\n          'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',\n          'Topic :: Office/Business :: Financial :: Investment',\n          'Intended Audience :: Science/Research',\n      ])\n", "path": "setup.py"}, {"content": "import logging\nfrom typing import Any, Dict\n\nfrom filelock import FileLock, Timeout\n\nfrom freqtrade import DependencyException, constants\nfrom freqtrade.state import RunMode\nfrom freqtrade.utils import setup_utils_configuration\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef setup_configuration(args: Dict[str, Any], method: RunMode) -> Dict[str, Any]:\n    \"\"\"\n    Prepare the configuration for the Hyperopt module\n    :param args: Cli args from Arguments()\n    :return: Configuration\n    \"\"\"\n    config = setup_utils_configuration(args, method)\n\n    if method == RunMode.BACKTEST:\n        if config['stake_amount'] == constants.UNLIMITED_STAKE_AMOUNT:\n            raise DependencyException('stake amount could not be \"%s\" for backtesting' %\n                                      constants.UNLIMITED_STAKE_AMOUNT)\n\n    return config\n\n\ndef start_backtesting(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Start Backtesting script\n    :param args: Cli args from Arguments()\n    :return: None\n    \"\"\"\n    # Import here to avoid loading backtesting module when it's not used\n    from freqtrade.optimize.backtesting import Backtesting\n\n    # Initialize configuration\n    config = setup_configuration(args, RunMode.BACKTEST)\n\n    logger.info('Starting freqtrade in Backtesting mode')\n\n    # Initialize backtesting object\n    backtesting = Backtesting(config)\n    backtesting.start()\n\n\ndef start_hyperopt(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Start hyperopt script\n    :param args: Cli args from Arguments()\n    :return: None\n    \"\"\"\n    # Import here to avoid loading hyperopt module when it's not used\n    from freqtrade.optimize.hyperopt import Hyperopt\n\n    # Initialize configuration\n    config = setup_configuration(args, RunMode.HYPEROPT)\n\n    logger.info('Starting freqtrade in Hyperopt mode')\n\n    lock = FileLock(Hyperopt.get_lock_filename(config))\n\n    try:\n        with lock.acquire(timeout=1):\n\n            # Remove noisy log messages\n            logging.getLogger('hyperopt.tpe').setLevel(logging.WARNING)\n            logging.getLogger('filelock').setLevel(logging.WARNING)\n\n            # Initialize backtesting object\n            hyperopt = Hyperopt(config)\n            hyperopt.start()\n\n    except Timeout:\n        logger.info(\"Another running instance of freqtrade Hyperopt detected.\")\n        logger.info(\"Simultaneous execution of multiple Hyperopt commands is not supported. \"\n                    \"Hyperopt module is resource hungry. Please run your Hyperopts sequentially \"\n                    \"or on separate machines.\")\n        logger.info(\"Quitting now.\")\n        # TODO: return False here in order to help freqtrade to exit\n        # with non-zero exit code...\n        # Same in Edge and Backtesting start() functions.\n\n\ndef start_edge(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Start Edge script\n    :param args: Cli args from Arguments()\n    :return: None\n    \"\"\"\n    from freqtrade.optimize.edge_cli import EdgeCli\n    # Initialize configuration\n    config = setup_configuration(args, RunMode.EDGE)\n    logger.info('Starting freqtrade in Edge mode')\n\n    # Initialize Edge object\n    edge_cli = EdgeCli(config)\n    edge_cli.start()\n", "path": "freqtrade/optimize/__init__.py"}], "after_files": [{"content": "from sys import version_info\nfrom setuptools import setup\n\nif version_info.major == 3 and version_info.minor < 6 or \\\n        version_info.major < 3:\n    print('Your Python interpreter must be 3.6 or greater!')\n    exit(1)\n\nfrom pathlib import Path  # noqa: E402\nfrom freqtrade import __version__  # noqa: E402\n\n\nreadme_file = Path(__file__).parent / \"README.md\"\nreadme_long = \"Crypto Trading Bot\"\nif readme_file.is_file():\n    readme_long = (Path(__file__).parent / \"README.md\").read_text()\n\n# Requirements used for submodules\napi = ['flask']\nplot = ['plotly>=4.0']\nhyperopt = [\n    'scipy',\n    'scikit-learn',\n    'scikit-optimize',\n    'filelock',\n    'joblib',\n    ]\n\ndevelop = [\n    'coveralls',\n    'flake8',\n    'flake8-type-annotations',\n    'flake8-tidy-imports',\n    'mypy',\n    'pytest',\n    'pytest-asyncio',\n    'pytest-cov',\n    'pytest-mock',\n    'pytest-random-order',\n]\n\njupyter = [\n    'jupyter',\n    'nbstripout',\n    'ipykernel',\n    ]\n\nall_extra = api + plot + develop + jupyter + hyperopt\n\nsetup(name='freqtrade',\n      version=__version__,\n      description='Crypto Trading Bot',\n      long_description=readme_long,\n      long_description_content_type=\"text/markdown\",\n      url='https://github.com/freqtrade/freqtrade',\n      author='Freqtrade Team',\n      author_email='michael.egger@tsn.at',\n      license='GPLv3',\n      packages=['freqtrade'],\n      setup_requires=['pytest-runner', 'numpy'],\n      tests_require=['pytest', 'pytest-mock', 'pytest-cov'],\n      install_requires=[\n          # from requirements-common.txt\n          'ccxt>=1.18.1080',\n          'SQLAlchemy',\n          'python-telegram-bot',\n          'arrow',\n          'cachetools',\n          'requests',\n          'urllib3',\n          'wrapt',\n          'jsonschema',\n          'TA-Lib',\n          'tabulate',\n          'coinmarketcap',\n          'py_find_1st',\n          'python-rapidjson',\n          'sdnotify',\n          'colorama',\n          # from requirements.txt\n          'numpy',\n          'pandas',\n      ],\n      extras_require={\n          'api': api,\n          'dev': all_extra,\n          'plot': plot,\n          'jupyter': jupyter,\n          'hyperopt': hyperopt,\n          'all': all_extra,\n      },\n      include_package_data=True,\n      zip_safe=False,\n      entry_points={\n          'console_scripts': [\n              'freqtrade = freqtrade.main:main',\n          ],\n      },\n      classifiers=[\n          'Programming Language :: Python :: 3.6',\n          'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',\n          'Topic :: Office/Business :: Financial :: Investment',\n          'Intended Audience :: Science/Research',\n      ])\n", "path": "setup.py"}, {"content": "import logging\nfrom typing import Any, Dict\n\nfrom freqtrade import DependencyException, constants, OperationalException\nfrom freqtrade.state import RunMode\nfrom freqtrade.utils import setup_utils_configuration\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef setup_configuration(args: Dict[str, Any], method: RunMode) -> Dict[str, Any]:\n    \"\"\"\n    Prepare the configuration for the Hyperopt module\n    :param args: Cli args from Arguments()\n    :return: Configuration\n    \"\"\"\n    config = setup_utils_configuration(args, method)\n\n    if method == RunMode.BACKTEST:\n        if config['stake_amount'] == constants.UNLIMITED_STAKE_AMOUNT:\n            raise DependencyException('stake amount could not be \"%s\" for backtesting' %\n                                      constants.UNLIMITED_STAKE_AMOUNT)\n\n    return config\n\n\ndef start_backtesting(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Start Backtesting script\n    :param args: Cli args from Arguments()\n    :return: None\n    \"\"\"\n    # Import here to avoid loading backtesting module when it's not used\n    from freqtrade.optimize.backtesting import Backtesting\n\n    # Initialize configuration\n    config = setup_configuration(args, RunMode.BACKTEST)\n\n    logger.info('Starting freqtrade in Backtesting mode')\n\n    # Initialize backtesting object\n    backtesting = Backtesting(config)\n    backtesting.start()\n\n\ndef start_hyperopt(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Start hyperopt script\n    :param args: Cli args from Arguments()\n    :return: None\n    \"\"\"\n    # Import here to avoid loading hyperopt module when it's not used\n    try:\n        from filelock import FileLock, Timeout\n        from freqtrade.optimize.hyperopt import Hyperopt\n    except ImportError as e:\n        raise OperationalException(\n            f\"{e}. Please ensure that the hyperopt dependencies are installed.\") from e\n    # Initialize configuration\n    config = setup_configuration(args, RunMode.HYPEROPT)\n\n    logger.info('Starting freqtrade in Hyperopt mode')\n\n    lock = FileLock(Hyperopt.get_lock_filename(config))\n\n    try:\n        with lock.acquire(timeout=1):\n\n            # Remove noisy log messages\n            logging.getLogger('hyperopt.tpe').setLevel(logging.WARNING)\n            logging.getLogger('filelock').setLevel(logging.WARNING)\n\n            # Initialize backtesting object\n            hyperopt = Hyperopt(config)\n            hyperopt.start()\n\n    except Timeout:\n        logger.info(\"Another running instance of freqtrade Hyperopt detected.\")\n        logger.info(\"Simultaneous execution of multiple Hyperopt commands is not supported. \"\n                    \"Hyperopt module is resource hungry. Please run your Hyperopts sequentially \"\n                    \"or on separate machines.\")\n        logger.info(\"Quitting now.\")\n        # TODO: return False here in order to help freqtrade to exit\n        # with non-zero exit code...\n        # Same in Edge and Backtesting start() functions.\n\n\ndef start_edge(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Start Edge script\n    :param args: Cli args from Arguments()\n    :return: None\n    \"\"\"\n    from freqtrade.optimize.edge_cli import EdgeCli\n    # Initialize configuration\n    config = setup_configuration(args, RunMode.EDGE)\n    logger.info('Starting freqtrade in Edge mode')\n\n    # Initialize Edge object\n    edge_cli = EdgeCli(config)\n    edge_cli.start()\n", "path": "freqtrade/optimize/__init__.py"}]}