rasa/nlu/classifiers/diet_classifier.py

Summary

Maintainability
F
4 days
Test Coverage
A
91%

File diet_classifier.py has 1438 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from __future__ import annotations
import copy
import logging
from collections import defaultdict
from pathlib import Path
Severity: Major
Found in rasa/nlu/classifiers/diet_classifier.py - About 3 days to fix

    Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(
    Severity: Major
    Found in rasa/nlu/classifiers/diet_classifier.py - About 1 hr to fix

      Function _load_model has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def _load_model(
      Severity: Major
      Found in rasa/nlu/classifiers/diet_classifier.py - About 50 mins to fix

        Function _load_model_class has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def _load_model_class(
        Severity: Major
        Found in rasa/nlu/classifiers/diet_classifier.py - About 50 mins to fix

          Function _mask_loss has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def _mask_loss(
          Severity: Minor
          Found in rasa/nlu/classifiers/diet_classifier.py - About 45 mins to fix

            Function load has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def load(
            Severity: Minor
            Found in rasa/nlu/classifiers/diet_classifier.py - About 45 mins to fix

              Function _load has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def _load(
              Severity: Minor
              Found in rasa/nlu/classifiers/diet_classifier.py - About 45 mins to fix

                Function _add_label_features has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def _add_label_features(
                Severity: Minor
                Found in rasa/nlu/classifiers/diet_classifier.py - About 45 mins to fix

                  Function _create_bow has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def _create_bow(
                  Severity: Minor
                  Found in rasa/nlu/classifiers/diet_classifier.py - About 35 mins to fix

                    Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def create(
                    Severity: Minor
                    Found in rasa/nlu/classifiers/diet_classifier.py - About 35 mins to fix

                      Function _batch_loss_entities has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def _batch_loss_entities(
                      Severity: Minor
                      Found in rasa/nlu/classifiers/diet_classifier.py - About 35 mins to fix

                        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def __init__(
                        Severity: Minor
                        Found in rasa/nlu/classifiers/diet_classifier.py - About 35 mins to fix

                          Function _create_model_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def _create_model_data(
                          Severity: Minor
                          Found in rasa/nlu/classifiers/diet_classifier.py - About 35 mins to fix

                            There are no issues that match your filters.

                            Category
                            Status