We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ENHANCEMENT] There should be a way to list all integrations with dependencies
**Is your enhancement request related to a problem? Please describe.**
Not easy to see the list of supported integrations -> For example: is it `zenml[torch]` or `zenml[pytorch]`

**Describe the enhancement you'd like**
A way to list all integrations with dependencies they would install.

**How do you solve your current problem with the current status-quo of ZenML?**
Have to look at source code

**Additional context**
Thank you @JoyZhou for pointing it out

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `zenml/cli/base.py`
Content:
```
1 #  Copyright (c) maiot GmbH 2020. All Rights Reserved.
2 #
3 #  Licensed under the Apache License, Version 2.0 (the "License");
4 #  you may not use this file except in compliance with the License.
5 #  You may obtain a copy of the License at:
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #  Unless required by applicable law or agreed to in writing, software
10 #  distributed under the License is distributed on an "AS IS" BASIS,
11 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12 #  or implied. See the License for the specific language governing
13 #  permissions and limitations under the License.
14 
15 import os
16 from typing import Text
17 
18 import click
19 import git
20 
21 from zenml.cli.cli import cli
22 from zenml.cli.utils import confirmation
23 from zenml.cli.utils import pass_repo
24 from zenml.repo import Repository
25 from zenml.utils.analytics_utils import track, INITIALIZE
26 
27 
28 @cli.command('init')
29 @click.option('--repo_path', type=click.Path(exists=True))
30 @click.option('--pipelines_dir', type=click.Path(exists=True))
31 @click.option('--analytics_opt_in', '-a', type=click.BOOL)
32 @track(event=INITIALIZE)
33 def init(repo_path: Text, pipelines_dir: Text = None,
34          analytics_opt_in: bool = None):
35     """Initialize ZenML on given path."""
36     if repo_path is None:
37         repo_path = os.getcwd()
38 
39     if analytics_opt_in is None:
40         analytics_opt_in = confirmation(
41             "ZenML collects anonymized usage information. This data helps us "
42             "create a better product and understand the needs of the "
43             "community better. You can find more information about exactly "
44             "why, what and how we collect usage analytics statistics at: "
45             "https://docs.zenml.io/misc/usage-analytics.html. "
46             "Would you like to opt-in to usage analytics?")
47 
48     try:
49         Repository.init_repo(
50             repo_path,
51             None,
52             None,
53             pipelines_dir,
54             analytics_opt_in,
55         )
56         click.echo(f'ZenML repo initialized at {repo_path}')
57     except git.InvalidGitRepositoryError:
58         click.echo(f'{repo_path} is not a valid git repository! Please '
59                    f'initialize ZenML within a git repository.')
60 
61 
62 @cli.command('clean')
63 @click.option('--yes', '-y', type=click.BOOL, default=False)
64 @pass_repo
65 def clean(repo: Repository, yes: bool = False):
66     """Clean everything in repository."""
67     if not yes:
68         confirm = confirmation(
69             "This will completely delete all pipelines, their associated "
70             "artifacts and metadata ever created in this ZenML repository. "
71             "Are you sure you want to proceed?")
72     else:
73         confirm = True
74 
75     click.echo("Not implemented for this version")
76     # if confirm:
77     #     repo.clean()
78
```

Path: `zenml/utils/requirement_utils.py`
Content:
```
1 import re
2 
3 import subprocess
4 import sys
5 
6 ########
7 # BASE #
8 ########
9 BASE_REQUIREMENTS = ["absl-py==0.10.0",
10                      "pip-check-reqs>=2.0.1,<3",
11                      "click>=7.0,<8",
12                      "setuptools>=38.4.0",
13                      "nbformat>=5.0.4",
14                      "panel==0.8.3",
15                      "plotly==4.0.0",
16                      "tabulate==0.8.7",
17                      "numpy==1.18.0",
18                      "httplib2==0.17.0",
19                      "tfx==0.26.1",
20                      "fire==0.3.1",
21                      "gitpython==3.1.11",
22                      "analytics-python==1.2.9",
23                      "distro==1.5.0",
24                      "tensorflow>=2.3.0,<2.4.0",
25                      "tensorflow-serving-api==2.3.0"]
26 
27 #####################
28 # EXTRAS: PROVIDERS #
29 #####################
30 GCP_INTEGRATION = 'gcp'
31 GCP_REQUIREMENTS = ["apache-beam[gcp]==2.27.0",
32                     "apache-beam==2.27.0",
33                     "google-apitools==0.5.31"]
34 
35 AWS_INTEGRATION = 'aws'
36 AWS_REQUIREMENTS = ["boto3==1.16.62"]
37 
38 AZURE_INTEGRATION = 'azure'
39 AZURE_REQUIREMENTS = []
40 
41 ###################
42 # EXTRAS: TOOLING #
43 ###################
44 PYTORCH_INTEGRATION = 'pytorch'
45 PYTORCH_REQUIREMENTS = ['torch==1.7.0']
46 
47 CORTEX_INTEGRATION = 'cortex'
48 CORTEX_REQUIREMENTS = ['cortex==0.29.0']
49 
50 ###############
51 # DATASOURCES #
52 ###############
53 POSTGRES_INTEGRATION = 'postgres'
54 POSTGRES_REQUIREMENTS = ['beam-nuggets==0.17.0', 'pg8000==1.16.5',
55                          'sqlalchemy==1.3.22']
56 
57 #######################
58 # NLP via HuggingFace #
59 #######################
60 HUGGINGFACE_INTEGRATION = 'huggingface'
61 HUGGINGFACE_REQUIREMENTS = ['transformers==4.3.3', 'tokenizers==0.10.1']
62 
63 ###############
64 # EXTRAS: ALL #
65 ###############
66 ALL_INTEGRATION = 'all'
67 ALL_REQUIREMENTS = BASE_REQUIREMENTS + \
68                    GCP_REQUIREMENTS + \
69                    PYTORCH_REQUIREMENTS + \
70                    AZURE_REQUIREMENTS + \
71                    AWS_REQUIREMENTS + \
72                    POSTGRES_REQUIREMENTS + \
73                    CORTEX_REQUIREMENTS + \
74                    HUGGINGFACE_REQUIREMENTS
75 
76 EXTRAS_REQUIRE = {GCP_INTEGRATION: GCP_REQUIREMENTS,
77                   AWS_INTEGRATION: AWS_REQUIREMENTS,
78                   # AZURE_INTEGRATION: AZURE_REQUIREMENTS,
79                   PYTORCH_INTEGRATION: PYTORCH_REQUIREMENTS,
80                   CORTEX_INTEGRATION: CORTEX_REQUIREMENTS,
81                   POSTGRES_INTEGRATION: POSTGRES_REQUIREMENTS,
82                   HUGGINGFACE_INTEGRATION: HUGGINGFACE_REQUIREMENTS,
83                   ALL_INTEGRATION: ALL_REQUIREMENTS}
84 
85 
86 ##################
87 # UTIL FUNCTIONS #
88 ##################
89 def check_integration(integration):
90     # Get the installed packages
91     reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])
92     installed_packages = [r.decode().split('==')[0] for r in reqs.split()]
93 
94     # Get the required extra packages for the integration
95     assert integration in EXTRAS_REQUIRE, \
96         f'At this moment, there is no integration for {integration}. ' \
97         f'Possible integrations for ZenML ' \
98         f'include: {list(EXTRAS_REQUIRE.keys())}.'
99 
100     specs = EXTRAS_REQUIRE[integration]
101 
102     for s in specs:
103         # Decouple from the version
104         pattern = r"([a-zA-Z0-9\-]+)(\[.+\])*(.*)"
105         s = re.search(pattern, s)[1]
106 
107         # TODO: We can also validate the version
108         if s not in installed_packages:
109             raise ModuleNotFoundError(
110                 f"{integration} integration not installed. "
111                 f"Please install zenml[{integration}] via "
112                 f"`pip install zenml[{integration}]`")
113
```
--- 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/zenml/cli/base.py b/zenml/cli/base.py
--- a/zenml/cli/base.py
+++ b/zenml/cli/base.py
@@ -31,20 +31,11 @@
 @click.option('--analytics_opt_in', '-a', type=click.BOOL)
 @track(event=INITIALIZE)
 def init(repo_path: Text, pipelines_dir: Text = None,
-         analytics_opt_in: bool = None):
+         analytics_opt_in: bool = True):
     """Initialize ZenML on given path."""
     if repo_path is None:
         repo_path = os.getcwd()
 
-    if analytics_opt_in is None:
-        analytics_opt_in = confirmation(
-            "ZenML collects anonymized usage information. This data helps us "
-            "create a better product and understand the needs of the "
-            "community better. You can find more information about exactly "
-            "why, what and how we collect usage analytics statistics at: "
-            "https://docs.zenml.io/misc/usage-analytics.html. "
-            "Would you like to opt-in to usage analytics?")
-
     try:
         Repository.init_repo(
             repo_path,
diff --git a/zenml/utils/requirement_utils.py b/zenml/utils/requirement_utils.py
--- a/zenml/utils/requirement_utils.py
+++ b/zenml/utils/requirement_utils.py
@@ -110,3 +110,11 @@
                 f"{integration} integration not installed. "
                 f"Please install zenml[{integration}] via "
                 f"`pip install zenml[{integration}]`")
+
+
+def list_integrations():
+    """Prints integrations in an easy to read format."""
+    for k, v in EXTRAS_REQUIRE.items():
+        print("*********")
+        print(f"The integration {k} has the following dependencies: {v}")
+        print(f'To install: pip install zenml[{k}]')

{"golden_diff": "diff --git a/zenml/cli/base.py b/zenml/cli/base.py\n--- a/zenml/cli/base.py\n+++ b/zenml/cli/base.py\n@@ -31,20 +31,11 @@\n @click.option('--analytics_opt_in', '-a', type=click.BOOL)\n @track(event=INITIALIZE)\n def init(repo_path: Text, pipelines_dir: Text = None,\n-         analytics_opt_in: bool = None):\n+         analytics_opt_in: bool = True):\n     \"\"\"Initialize ZenML on given path.\"\"\"\n     if repo_path is None:\n         repo_path = os.getcwd()\n \n-    if analytics_opt_in is None:\n-        analytics_opt_in = confirmation(\n-            \"ZenML collects anonymized usage information. This data helps us \"\n-            \"create a better product and understand the needs of the \"\n-            \"community better. You can find more information about exactly \"\n-            \"why, what and how we collect usage analytics statistics at: \"\n-            \"https://docs.zenml.io/misc/usage-analytics.html. \"\n-            \"Would you like to opt-in to usage analytics?\")\n-\n     try:\n         Repository.init_repo(\n             repo_path,\ndiff --git a/zenml/utils/requirement_utils.py b/zenml/utils/requirement_utils.py\n--- a/zenml/utils/requirement_utils.py\n+++ b/zenml/utils/requirement_utils.py\n@@ -110,3 +110,11 @@\n                 f\"{integration} integration not installed. \"\n                 f\"Please install zenml[{integration}] via \"\n                 f\"`pip install zenml[{integration}]`\")\n+\n+\n+def list_integrations():\n+    \"\"\"Prints integrations in an easy to read format.\"\"\"\n+    for k, v in EXTRAS_REQUIRE.items():\n+        print(\"*********\")\n+        print(f\"The integration {k} has the following dependencies: {v}\")\n+        print(f'To install: pip install zenml[{k}]')\n", "issue": "[ENHANCEMENT] There should be a way to list all integrations with dependencies\n**Is your enhancement request related to a problem? Please describe.**\r\nNot easy to see the list of supported integrations -> For example: is it `zenml[torch]` or `zenml[pytorch]`\r\n\r\n**Describe the enhancement you'd like**\r\nA way to list all integrations with dependencies they would install.\r\n\r\n**How do you solve your current problem with the current status-quo of ZenML?**\r\nHave to look at source code\r\n\r\n**Additional context**\r\nThank you @JoyZhou for pointing it out\n", "before_files": [{"content": "#  Copyright (c) maiot GmbH 2020. All Rights Reserved.\n#\n#  Licensed under the Apache License, Version 2.0 (the \"License\");\n#  you may not use this file except in compliance with the License.\n#  You may obtain a copy of the License at:\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#  Unless required by applicable law or agreed to in writing, software\n#  distributed under the License is distributed on an \"AS IS\" BASIS,\n#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n#  or implied. See the License for the specific language governing\n#  permissions and limitations under the License.\n\nimport os\nfrom typing import Text\n\nimport click\nimport git\n\nfrom zenml.cli.cli import cli\nfrom zenml.cli.utils import confirmation\nfrom zenml.cli.utils import pass_repo\nfrom zenml.repo import Repository\nfrom zenml.utils.analytics_utils import track, INITIALIZE\n\n\n@cli.command('init')\n@click.option('--repo_path', type=click.Path(exists=True))\n@click.option('--pipelines_dir', type=click.Path(exists=True))\n@click.option('--analytics_opt_in', '-a', type=click.BOOL)\n@track(event=INITIALIZE)\ndef init(repo_path: Text, pipelines_dir: Text = None,\n         analytics_opt_in: bool = None):\n    \"\"\"Initialize ZenML on given path.\"\"\"\n    if repo_path is None:\n        repo_path = os.getcwd()\n\n    if analytics_opt_in is None:\n        analytics_opt_in = confirmation(\n            \"ZenML collects anonymized usage information. This data helps us \"\n            \"create a better product and understand the needs of the \"\n            \"community better. You can find more information about exactly \"\n            \"why, what and how we collect usage analytics statistics at: \"\n            \"https://docs.zenml.io/misc/usage-analytics.html. \"\n            \"Would you like to opt-in to usage analytics?\")\n\n    try:\n        Repository.init_repo(\n            repo_path,\n            None,\n            None,\n            pipelines_dir,\n            analytics_opt_in,\n        )\n        click.echo(f'ZenML repo initialized at {repo_path}')\n    except git.InvalidGitRepositoryError:\n        click.echo(f'{repo_path} is not a valid git repository! Please '\n                   f'initialize ZenML within a git repository.')\n\n\n@cli.command('clean')\n@click.option('--yes', '-y', type=click.BOOL, default=False)\n@pass_repo\ndef clean(repo: Repository, yes: bool = False):\n    \"\"\"Clean everything in repository.\"\"\"\n    if not yes:\n        confirm = confirmation(\n            \"This will completely delete all pipelines, their associated \"\n            \"artifacts and metadata ever created in this ZenML repository. \"\n            \"Are you sure you want to proceed?\")\n    else:\n        confirm = True\n\n    click.echo(\"Not implemented for this version\")\n    # if confirm:\n    #     repo.clean()\n", "path": "zenml/cli/base.py"}, {"content": "import re\n\nimport subprocess\nimport sys\n\n########\n# BASE #\n########\nBASE_REQUIREMENTS = [\"absl-py==0.10.0\",\n                     \"pip-check-reqs>=2.0.1,<3\",\n                     \"click>=7.0,<8\",\n                     \"setuptools>=38.4.0\",\n                     \"nbformat>=5.0.4\",\n                     \"panel==0.8.3\",\n                     \"plotly==4.0.0\",\n                     \"tabulate==0.8.7\",\n                     \"numpy==1.18.0\",\n                     \"httplib2==0.17.0\",\n                     \"tfx==0.26.1\",\n                     \"fire==0.3.1\",\n                     \"gitpython==3.1.11\",\n                     \"analytics-python==1.2.9\",\n                     \"distro==1.5.0\",\n                     \"tensorflow>=2.3.0,<2.4.0\",\n                     \"tensorflow-serving-api==2.3.0\"]\n\n#####################\n# EXTRAS: PROVIDERS #\n#####################\nGCP_INTEGRATION = 'gcp'\nGCP_REQUIREMENTS = [\"apache-beam[gcp]==2.27.0\",\n                    \"apache-beam==2.27.0\",\n                    \"google-apitools==0.5.31\"]\n\nAWS_INTEGRATION = 'aws'\nAWS_REQUIREMENTS = [\"boto3==1.16.62\"]\n\nAZURE_INTEGRATION = 'azure'\nAZURE_REQUIREMENTS = []\n\n###################\n# EXTRAS: TOOLING #\n###################\nPYTORCH_INTEGRATION = 'pytorch'\nPYTORCH_REQUIREMENTS = ['torch==1.7.0']\n\nCORTEX_INTEGRATION = 'cortex'\nCORTEX_REQUIREMENTS = ['cortex==0.29.0']\n\n###############\n# DATASOURCES #\n###############\nPOSTGRES_INTEGRATION = 'postgres'\nPOSTGRES_REQUIREMENTS = ['beam-nuggets==0.17.0', 'pg8000==1.16.5',\n                         'sqlalchemy==1.3.22']\n\n#######################\n# NLP via HuggingFace #\n#######################\nHUGGINGFACE_INTEGRATION = 'huggingface'\nHUGGINGFACE_REQUIREMENTS = ['transformers==4.3.3', 'tokenizers==0.10.1']\n\n###############\n# EXTRAS: ALL #\n###############\nALL_INTEGRATION = 'all'\nALL_REQUIREMENTS = BASE_REQUIREMENTS + \\\n                   GCP_REQUIREMENTS + \\\n                   PYTORCH_REQUIREMENTS + \\\n                   AZURE_REQUIREMENTS + \\\n                   AWS_REQUIREMENTS + \\\n                   POSTGRES_REQUIREMENTS + \\\n                   CORTEX_REQUIREMENTS + \\\n                   HUGGINGFACE_REQUIREMENTS\n\nEXTRAS_REQUIRE = {GCP_INTEGRATION: GCP_REQUIREMENTS,\n                  AWS_INTEGRATION: AWS_REQUIREMENTS,\n                  # AZURE_INTEGRATION: AZURE_REQUIREMENTS,\n                  PYTORCH_INTEGRATION: PYTORCH_REQUIREMENTS,\n                  CORTEX_INTEGRATION: CORTEX_REQUIREMENTS,\n                  POSTGRES_INTEGRATION: POSTGRES_REQUIREMENTS,\n                  HUGGINGFACE_INTEGRATION: HUGGINGFACE_REQUIREMENTS,\n                  ALL_INTEGRATION: ALL_REQUIREMENTS}\n\n\n##################\n# UTIL FUNCTIONS #\n##################\ndef check_integration(integration):\n    # Get the installed packages\n    reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])\n    installed_packages = [r.decode().split('==')[0] for r in reqs.split()]\n\n    # Get the required extra packages for the integration\n    assert integration in EXTRAS_REQUIRE, \\\n        f'At this moment, there is no integration for {integration}. ' \\\n        f'Possible integrations for ZenML ' \\\n        f'include: {list(EXTRAS_REQUIRE.keys())}.'\n\n    specs = EXTRAS_REQUIRE[integration]\n\n    for s in specs:\n        # Decouple from the version\n        pattern = r\"([a-zA-Z0-9\\-]+)(\\[.+\\])*(.*)\"\n        s = re.search(pattern, s)[1]\n\n        # TODO: We can also validate the version\n        if s not in installed_packages:\n            raise ModuleNotFoundError(\n                f\"{integration} integration not installed. \"\n                f\"Please install zenml[{integration}] via \"\n                f\"`pip install zenml[{integration}]`\")\n", "path": "zenml/utils/requirement_utils.py"}], "after_files": [{"content": "#  Copyright (c) maiot GmbH 2020. All Rights Reserved.\n#\n#  Licensed under the Apache License, Version 2.0 (the \"License\");\n#  you may not use this file except in compliance with the License.\n#  You may obtain a copy of the License at:\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#  Unless required by applicable law or agreed to in writing, software\n#  distributed under the License is distributed on an \"AS IS\" BASIS,\n#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n#  or implied. See the License for the specific language governing\n#  permissions and limitations under the License.\n\nimport os\nfrom typing import Text\n\nimport click\nimport git\n\nfrom zenml.cli.cli import cli\nfrom zenml.cli.utils import confirmation\nfrom zenml.cli.utils import pass_repo\nfrom zenml.repo import Repository\nfrom zenml.utils.analytics_utils import track, INITIALIZE\n\n\n@cli.command('init')\n@click.option('--repo_path', type=click.Path(exists=True))\n@click.option('--pipelines_dir', type=click.Path(exists=True))\n@click.option('--analytics_opt_in', '-a', type=click.BOOL)\n@track(event=INITIALIZE)\ndef init(repo_path: Text, pipelines_dir: Text = None,\n         analytics_opt_in: bool = True):\n    \"\"\"Initialize ZenML on given path.\"\"\"\n    if repo_path is None:\n        repo_path = os.getcwd()\n\n    try:\n        Repository.init_repo(\n            repo_path,\n            None,\n            None,\n            pipelines_dir,\n            analytics_opt_in,\n        )\n        click.echo(f'ZenML repo initialized at {repo_path}')\n    except git.InvalidGitRepositoryError:\n        click.echo(f'{repo_path} is not a valid git repository! Please '\n                   f'initialize ZenML within a git repository.')\n\n\n@cli.command('clean')\n@click.option('--yes', '-y', type=click.BOOL, default=False)\n@pass_repo\ndef clean(repo: Repository, yes: bool = False):\n    \"\"\"Clean everything in repository.\"\"\"\n    if not yes:\n        confirm = confirmation(\n            \"This will completely delete all pipelines, their associated \"\n            \"artifacts and metadata ever created in this ZenML repository. \"\n            \"Are you sure you want to proceed?\")\n    else:\n        confirm = True\n\n    click.echo(\"Not implemented for this version\")\n    # if confirm:\n    #     repo.clean()\n", "path": "zenml/cli/base.py"}, {"content": "import re\n\nimport subprocess\nimport sys\n\n########\n# BASE #\n########\nBASE_REQUIREMENTS = [\"absl-py==0.10.0\",\n                     \"pip-check-reqs>=2.0.1,<3\",\n                     \"click>=7.0,<8\",\n                     \"setuptools>=38.4.0\",\n                     \"nbformat>=5.0.4\",\n                     \"panel==0.8.3\",\n                     \"plotly==4.0.0\",\n                     \"tabulate==0.8.7\",\n                     \"numpy==1.18.0\",\n                     \"httplib2==0.17.0\",\n                     \"tfx==0.26.1\",\n                     \"fire==0.3.1\",\n                     \"gitpython==3.1.11\",\n                     \"analytics-python==1.2.9\",\n                     \"distro==1.5.0\",\n                     \"tensorflow>=2.3.0,<2.4.0\",\n                     \"tensorflow-serving-api==2.3.0\"]\n\n#####################\n# EXTRAS: PROVIDERS #\n#####################\nGCP_INTEGRATION = 'gcp'\nGCP_REQUIREMENTS = [\"apache-beam[gcp]==2.27.0\",\n                    \"apache-beam==2.27.0\",\n                    \"google-apitools==0.5.31\"]\n\nAWS_INTEGRATION = 'aws'\nAWS_REQUIREMENTS = [\"boto3==1.16.62\"]\n\nAZURE_INTEGRATION = 'azure'\nAZURE_REQUIREMENTS = []\n\n###################\n# EXTRAS: TOOLING #\n###################\nPYTORCH_INTEGRATION = 'pytorch'\nPYTORCH_REQUIREMENTS = ['torch==1.7.0']\n\nCORTEX_INTEGRATION = 'cortex'\nCORTEX_REQUIREMENTS = ['cortex==0.29.0']\n\n###############\n# DATASOURCES #\n###############\nPOSTGRES_INTEGRATION = 'postgres'\nPOSTGRES_REQUIREMENTS = ['beam-nuggets==0.17.0', 'pg8000==1.16.5',\n                         'sqlalchemy==1.3.22']\n\n#######################\n# NLP via HuggingFace #\n#######################\nHUGGINGFACE_INTEGRATION = 'huggingface'\nHUGGINGFACE_REQUIREMENTS = ['transformers==4.3.3', 'tokenizers==0.10.1']\n\n###############\n# EXTRAS: ALL #\n###############\nALL_INTEGRATION = 'all'\nALL_REQUIREMENTS = BASE_REQUIREMENTS + \\\n                   GCP_REQUIREMENTS + \\\n                   PYTORCH_REQUIREMENTS + \\\n                   AZURE_REQUIREMENTS + \\\n                   AWS_REQUIREMENTS + \\\n                   POSTGRES_REQUIREMENTS + \\\n                   CORTEX_REQUIREMENTS + \\\n                   HUGGINGFACE_REQUIREMENTS\n\nEXTRAS_REQUIRE = {GCP_INTEGRATION: GCP_REQUIREMENTS,\n                  AWS_INTEGRATION: AWS_REQUIREMENTS,\n                  # AZURE_INTEGRATION: AZURE_REQUIREMENTS,\n                  PYTORCH_INTEGRATION: PYTORCH_REQUIREMENTS,\n                  CORTEX_INTEGRATION: CORTEX_REQUIREMENTS,\n                  POSTGRES_INTEGRATION: POSTGRES_REQUIREMENTS,\n                  HUGGINGFACE_INTEGRATION: HUGGINGFACE_REQUIREMENTS,\n                  ALL_INTEGRATION: ALL_REQUIREMENTS}\n\n\n##################\n# UTIL FUNCTIONS #\n##################\ndef check_integration(integration):\n    # Get the installed packages\n    reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])\n    installed_packages = [r.decode().split('==')[0] for r in reqs.split()]\n\n    # Get the required extra packages for the integration\n    assert integration in EXTRAS_REQUIRE, \\\n        f'At this moment, there is no integration for {integration}. ' \\\n        f'Possible integrations for ZenML ' \\\n        f'include: {list(EXTRAS_REQUIRE.keys())}.'\n\n    specs = EXTRAS_REQUIRE[integration]\n\n    for s in specs:\n        # Decouple from the version\n        pattern = r\"([a-zA-Z0-9\\-]+)(\\[.+\\])*(.*)\"\n        s = re.search(pattern, s)[1]\n\n        # TODO: We can also validate the version\n        if s not in installed_packages:\n            raise ModuleNotFoundError(\n                f\"{integration} integration not installed. \"\n                f\"Please install zenml[{integration}] via \"\n                f\"`pip install zenml[{integration}]`\")\n\n\ndef list_integrations():\n    \"\"\"Prints integrations in an easy to read format.\"\"\"\n    for k, v in EXTRAS_REQUIRE.items():\n        print(\"*********\")\n        print(f\"The integration {k} has the following dependencies: {v}\")\n        print(f'To install: pip install zenml[{k}]')\n", "path": "zenml/utils/requirement_utils.py"}]}