prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Pass experiment tags to MLFlowLogger
  **Is your feature request related to a problem? Please describe.**
  When using MLFlowLogger, I'm unable to easily set experiment tags, like username or run name.
  
  **Describe the solution you'd like**
  Add parameter `tags=None` which is passed to `MLFlowLogger`. Tags will be passed to `create_run` method
  
  **Describe alternatives you've considered**
  Manually hack logger, get experiment from it and set tag there
  
  If you don't see any drawbacks, I can make a PR
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `pytorch_lightning/logging/mlflow_logger.py`
  Content:
  ```
  1 from time import time
  2 from logging import getLogger
  3 
  4 import mlflow
  5 
  6 from .base import LightningLoggerBase, rank_zero_only
  7 
  8 logger = getLogger(__name__)
  9 
  10 
  11 class MLFlowLogger(LightningLoggerBase):
  12     def __init__(self, experiment_name, tracking_uri=None):
  13         super().__init__()
  14         self.client = mlflow.tracking.MlflowClient(tracking_uri)
  15         self.experiment_name = experiment_name
  16         self._run_id = None
  17 
  18     @property
  19     def run_id(self):
  20         if self._run_id is not None:
  21             return self._run_id
  22 
  23         experiment = self.client.get_experiment_by_name(self.experiment_name)
  24         if experiment is None:
  25             logger.warning(
  26                 f"Experiment with name f{self.experiment_name} not found. Creating it."
  27             )
  28             self.client.create_experiment(self.experiment_name)
  29             experiment = self.client.get_experiment_by_name(self.experiment_name)
  30 
  31         run = self.client.create_run(experiment.experiment_id)
  32         self._run_id = run.info.run_id
  33         return self._run_id
  34 
  35     @rank_zero_only
  36     def log_hyperparams(self, params):
  37         for k, v in vars(params).items():
  38             self.client.log_param(self.run_id, k, v)
  39 
  40     @rank_zero_only
  41     def log_metrics(self, metrics, step_num=None):
  42         timestamp_ms = int(time() * 1000)
  43         for k, v in metrics.items():
  44             if isinstance(v, str):
  45                 logger.warning(
  46                     f"Discarding metric with string value {k}={v}"
  47                 )
  48                 continue
  49             self.client.log_metric(self.run_id, k, v, timestamp_ms, step_num)
  50 
  51     def save(self):
  52         pass
  53 
  54     @rank_zero_only
  55     def finalize(self, status="FINISHED"):
  56         if status == 'success':
  57             status = 'FINISHED'
  58         self.client.set_terminated(self.run_id, status)
  59
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/pytorch_lightning/logging/mlflow_logger.py b/pytorch_lightning/logging/mlflow_logger.py
  --- a/pytorch_lightning/logging/mlflow_logger.py
  +++ b/pytorch_lightning/logging/mlflow_logger.py
  @@ -9,11 +9,12 @@
   
   
   class MLFlowLogger(LightningLoggerBase):
  -    def __init__(self, experiment_name, tracking_uri=None):
  +    def __init__(self, experiment_name, tracking_uri=None, tags=None):
           super().__init__()
           self.client = mlflow.tracking.MlflowClient(tracking_uri)
           self.experiment_name = experiment_name
           self._run_id = None
  +        self.tags = tags
   
       @property
       def run_id(self):
  @@ -28,7 +29,7 @@
               self.client.create_experiment(self.experiment_name)
               experiment = self.client.get_experiment_by_name(self.experiment_name)
   
  -        run = self.client.create_run(experiment.experiment_id)
  +        run = self.client.create_run(experiment.experiment_id, tags=self.tags)
           self._run_id = run.info.run_id
           return self._run_id
  
verification_info: {"golden_diff": "diff --git a/pytorch_lightning/logging/mlflow_logger.py b/pytorch_lightning/logging/mlflow_logger.py\n--- a/pytorch_lightning/logging/mlflow_logger.py\n+++ b/pytorch_lightning/logging/mlflow_logger.py\n@@ -9,11 +9,12 @@\n \n \n class MLFlowLogger(LightningLoggerBase):\n-    def __init__(self, experiment_name, tracking_uri=None):\n+    def __init__(self, experiment_name, tracking_uri=None, tags=None):\n         super().__init__()\n         self.client = mlflow.tracking.MlflowClient(tracking_uri)\n         self.experiment_name = experiment_name\n         self._run_id = None\n+        self.tags = tags\n \n     @property\n     def run_id(self):\n@@ -28,7 +29,7 @@\n             self.client.create_experiment(self.experiment_name)\n             experiment = self.client.get_experiment_by_name(self.experiment_name)\n \n-        run = self.client.create_run(experiment.experiment_id)\n+        run = self.client.create_run(experiment.experiment_id, tags=self.tags)\n         self._run_id = run.info.run_id\n         return self._run_id\n", "issue": "Pass experiment tags to MLFlowLogger\n**Is your feature request related to a problem? Please describe.**\r\nWhen using MLFlowLogger, I'm unable to easily set experiment tags, like username or run name.\r\n\r\n**Describe the solution you'd like**\r\nAdd parameter `tags=None` which is passed to `MLFlowLogger`. Tags will be passed to `create_run` method\r\n\r\n**Describe alternatives you've considered**\r\nManually hack logger, get experiment from it and set tag there\r\n\r\nIf you don't see any drawbacks, I can make a PR\r\n\n", "before_files": [{"content": "from time import time\nfrom logging import getLogger\n\nimport mlflow\n\nfrom .base import LightningLoggerBase, rank_zero_only\n\nlogger = getLogger(__name__)\n\n\nclass MLFlowLogger(LightningLoggerBase):\n    def __init__(self, experiment_name, tracking_uri=None):\n        super().__init__()\n        self.client = mlflow.tracking.MlflowClient(tracking_uri)\n        self.experiment_name = experiment_name\n        self._run_id = None\n\n    @property\n    def run_id(self):\n        if self._run_id is not None:\n            return self._run_id\n\n        experiment = self.client.get_experiment_by_name(self.experiment_name)\n        if experiment is None:\n            logger.warning(\n                f\"Experiment with name f{self.experiment_name} not found. Creating it.\"\n            )\n            self.client.create_experiment(self.experiment_name)\n            experiment = self.client.get_experiment_by_name(self.experiment_name)\n\n        run = self.client.create_run(experiment.experiment_id)\n        self._run_id = run.info.run_id\n        return self._run_id\n\n    @rank_zero_only\n    def log_hyperparams(self, params):\n        for k, v in vars(params).items():\n            self.client.log_param(self.run_id, k, v)\n\n    @rank_zero_only\n    def log_metrics(self, metrics, step_num=None):\n        timestamp_ms = int(time() * 1000)\n        for k, v in metrics.items():\n            if isinstance(v, str):\n                logger.warning(\n                    f\"Discarding metric with string value {k}={v}\"\n                )\n                continue\n            self.client.log_metric(self.run_id, k, v, timestamp_ms, step_num)\n\n    def save(self):\n        pass\n\n    @rank_zero_only\n    def finalize(self, status=\"FINISHED\"):\n        if status == 'success':\n            status = 'FINISHED'\n        self.client.set_terminated(self.run_id, status)\n", "path": "pytorch_lightning/logging/mlflow_logger.py"}], "after_files": [{"content": "from time import time\nfrom logging import getLogger\n\nimport mlflow\n\nfrom .base import LightningLoggerBase, rank_zero_only\n\nlogger = getLogger(__name__)\n\n\nclass MLFlowLogger(LightningLoggerBase):\n    def __init__(self, experiment_name, tracking_uri=None, tags=None):\n        super().__init__()\n        self.client = mlflow.tracking.MlflowClient(tracking_uri)\n        self.experiment_name = experiment_name\n        self._run_id = None\n        self.tags = tags\n\n    @property\n    def run_id(self):\n        if self._run_id is not None:\n            return self._run_id\n\n        experiment = self.client.get_experiment_by_name(self.experiment_name)\n        if experiment is None:\n            logger.warning(\n                f\"Experiment with name f{self.experiment_name} not found. Creating it.\"\n            )\n            self.client.create_experiment(self.experiment_name)\n            experiment = self.client.get_experiment_by_name(self.experiment_name)\n\n        run = self.client.create_run(experiment.experiment_id, tags=self.tags)\n        self._run_id = run.info.run_id\n        return self._run_id\n\n    @rank_zero_only\n    def log_hyperparams(self, params):\n        for k, v in vars(params).items():\n            self.client.log_param(self.run_id, k, v)\n\n    @rank_zero_only\n    def log_metrics(self, metrics, step_num=None):\n        timestamp_ms = int(time() * 1000)\n        for k, v in metrics.items():\n            if isinstance(v, str):\n                logger.warning(\n                    f\"Discarding metric with string value {k}={v}\"\n                )\n                continue\n            self.client.log_metric(self.run_id, k, v, timestamp_ms, step_num)\n\n    def save(self):\n        pass\n\n    @rank_zero_only\n    def finalize(self, status=\"FINISHED\"):\n        if status == 'success':\n            status = 'FINISHED'\n        self.client.set_terminated(self.run_id, status)\n", "path": "pytorch_lightning/logging/mlflow_logger.py"}]}