============================= test session starts ==============================
platform linux -- Python 3.7.7, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: /home/aryaman4/tpot
collected 6 items / 1 skipped / 5 selected

tests/stats_test.py ...                                                  [ 50%]
tests/test_log_file.py ..F                                               [100%]

=================================== FAILURES ===================================
___________________________ test_log_file_verbose_3 ____________________________

sourcecode = 'xgboost.XGBClassifier', verbose = 3

    def source_decode(sourcecode, verbose=0):
        """Decode operator source and import operator class.
    
        Parameters
        ----------
        sourcecode: string
            a string of operator source (e.g 'sklearn.feature_selection.RFE')
        verbose: int, optional (default: 0)
            How much information TPOT communicates while it's running.
            0 = none, 1 = minimal, 2 = high, 3 = all.
            if verbose > 2 then ImportError will rasie during initialization
    
    
        Returns
        -------
        import_str: string
            a string of operator class source (e.g. 'sklearn.feature_selection')
        op_str: string
            a string of operator class (e.g. 'RFE')
        op_obj: object
            operator class (e.g. RFE)
    
        """
        tmp_path = sourcecode.split('.')
        op_str = tmp_path.pop()
        import_str = '.'.join(tmp_path)
        try:
            if sourcecode.startswith('tpot.'):
                exec('from {} import {}'.format(import_str[4:], op_str))
            else:
>               exec('from {} import {}'.format(import_str, op_str))

tpot/operator_utils.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ModuleNotFoundError: No module named 'xgboost'

<string>:1: ModuleNotFoundError

During handling of the above exception, another exception occurred:

    def test_log_file_verbose_3():
      """ Set verbosity as 3. Assert log_file parameter to generate log file. """
      file_name = "progress_verbosity_3.log"
      tracking_progress_file = open(file_name, "w")
      tpot_obj = TPOTClassifier(
                    population_size=POP_SIZE,
                    generations=GEN_SIZE,
                    verbosity=3,
                    log_file=tracking_progress_file
                )
>     tpot_obj.fit(X, y)

tests/test_log_file.py:76: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tpot/base.py:642: in fit
    self._fit_init()
tpot/base.py:526: in _fit_init
    verbose=self.verbosity
tpot/operator_utils.py:175: in TPOTOperatorClassFactory
    import_str, op_str, op_obj = source_decode(opsourse, verbose=verbose)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

sourcecode = 'xgboost.XGBClassifier', verbose = 3

    def source_decode(sourcecode, verbose=0):
        """Decode operator source and import operator class.
    
        Parameters
        ----------
        sourcecode: string
            a string of operator source (e.g 'sklearn.feature_selection.RFE')
        verbose: int, optional (default: 0)
            How much information TPOT communicates while it's running.
            0 = none, 1 = minimal, 2 = high, 3 = all.
            if verbose > 2 then ImportError will rasie during initialization
    
    
        Returns
        -------
        import_str: string
            a string of operator class source (e.g. 'sklearn.feature_selection')
        op_str: string
            a string of operator class (e.g. 'RFE')
        op_obj: object
            operator class (e.g. RFE)
    
        """
        tmp_path = sourcecode.split('.')
        op_str = tmp_path.pop()
        import_str = '.'.join(tmp_path)
        try:
            if sourcecode.startswith('tpot.'):
                exec('from {} import {}'.format(import_str[4:], op_str))
            else:
                exec('from {} import {}'.format(import_str, op_str))
            op_obj = eval(op_str)
        except Exception as e:
            if verbose > 2:
>               raise ImportError('Error: could not import {}.\n{}'.format(sourcecode, e))
E               ImportError: Error: could not import xgboost.XGBClassifier.
E               No module named 'xgboost'

tpot/operator_utils.py:85: ImportError
=============================== warnings summary ===============================
tpot/base.py:31
  /home/aryaman4/tpot/tpot/base.py:31: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

tpot/builtins/__init__.py:36
  /home/aryaman4/tpot/tpot/builtins/__init__.py:36: UserWarning: Warning: optional dependency `torch` is not available. - skipping import of NN models.
    warnings.warn("Warning: optional dependency `torch` is not available. - skipping import of NN models.")

tests/stats_test.py::test_dict_initialization
  /home/aryaman4/anaconda3/envs/tpot/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
    return f(*args, **kwds)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================ slowest test durations ============================
1.37s call     tests/test_log_file.py::test_log_file_verbosity_1
1.08s call     tests/test_log_file.py::test_log_file_verbosity_2
0.05s call     tests/stats_test.py::test_mate_operator_stats_update
0.04s call     tests/stats_test.py::test_mut_operator_stats_update
0.04s call     tests/stats_test.py::test_dict_initialization

(0.00 durations hidden.  Use -vv to show these durations.)
=========================== short test summary info ============================
FAILED tests/test_log_file.py::test_log_file_verbose_3 - ImportError: Error: ...
============== 1 failed, 5 passed, 1 skipped, 3 warnings in 3.41s ==============
