Repository: Lightning-AI/pytorch-lightning
File: pytorch_lightning/loggers/neptune.py (Python)

Code before:
    def log_metrics(self, metrics: Dict[str, Union[torch.Tensor, float]], step: Optional[int] = None) -> None:
        """
        Log metrics (numeric values) in Neptune experiments.

        Args:
            metrics: Dictionary with metric names as keys and measured quantities as values
            step: Step number at which the metrics should be recorded, currently ignored
        """
        assert rank_zero_only.rank == 0, "experiment tried to log from global_rank != 0"

        metrics = self._add_prefix(metrics)
        for key, val in metrics.items():
            # `step` is ignored because Neptune expects strictly increasing step values which
            # Lighting does not always guarantee.
            self.log_metric(key, val)

    @rank_zero_only
    def finalize(self, status: str) -> None:
        super().finalize(status)
        if self.close_after_fit:
            self.experiment.stop()

    @property
    def save_dir(self) -> Optional[str]:
        """
        Gets the save diectory of the experiment which in this case is None.

        Returns:
            None
        """
        # Neptune does not save any local files
        return None

    @property
    def name(self) -> str:
        """
        Gets the name of the experiment.

        Returns:
            The name of the experiment if not in offline mode else "offline-name".
        """
        if self.offline_mode:
            return "offline-name"
        return self.experiment.name

    @property
    def version(self) -> str:
        """
        Gets the id of the experiment.

        Returns:

Review comment (suggestion):
```suggestion
        Gets the save diectory of the experiment which in this case is ``None`` because Neptune does not save locally.
```

Code after:
    def log_metrics(self, metrics: Dict[str, Union[torch.Tensor, float]], step: Optional[int] = None) -> None:
        """
        Log metrics (numeric values) in Neptune experiments.

        Args:
            metrics: Dictionary with metric names as keys and measured quantities as values
            step: Step number at which the metrics should be recorded, currently ignored
        """
        assert rank_zero_only.rank == 0, "experiment tried to log from global_rank != 0"

        metrics = self._add_prefix(metrics)
        for key, val in metrics.items():
            # `step` is ignored because Neptune expects strictly increasing step values which
            # Lighting does not always guarantee.
            self.log_metric(key, val)

    @rank_zero_only
    def finalize(self, status: str) -> None:
        super().finalize(status)
        if self.close_after_fit:
            self.experiment.stop()

    @property
    def save_dir(self) -> Optional[str]:
        """
        Gets the save directory of the experiment which in this case is ``None`` because Neptune does not save locally.

        Returns:
            None
        """
        # Neptune does not save any local files
        return None

    @property
    def name(self) -> str:
        """
        Gets the name of the experiment.

        Returns:
            The name of the experiment if not in offline mode else "offline-name".
        """
        if self.offline_mode:
            return "offline-name"
        return self.experiment.name

    @property
    def version(self) -> str:
        """
        Gets the id of the experiment.

        Returns: