aimacode / aima-python

Python implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
MIT License
7.98k stars 3.77k forks source link

Build Failing #416

Closed articuno12 closed 7 years ago

articuno12 commented 7 years ago

Build is failing as test_text_models in test_text.py is not getting passed. Result of running tests on the current repository :

tests/test_agents.py::test_move_forward PASSED
tests/test_agents.py::test_add PASSED
tests/test_agents.py::test_ReflexVacuumAgent PASSED
tests/test_agents.py::test_ModelBasedVacuumAgent PASSED
tests/test_csp.py::test_csp_assign PASSED
tests/test_csp.py::test_csp_unassign PASSED
tests/test_csp.py::test_csp_nconflits PASSED
tests/test_csp.py::test_csp_actions PASSED
tests/test_csp.py::test_csp_result PASSED
tests/test_csp.py::test_csp_goal_test PASSED
tests/test_csp.py::test_csp_support_pruning PASSED
tests/test_csp.py::test_csp_suppose PASSED
tests/test_csp.py::test_csp_prune PASSED
tests/test_csp.py::test_csp_choices PASSED
tests/test_csp.py::test_csp_infer_assignement PASSED
tests/test_csp.py::test_csp_restore PASSED
tests/test_csp.py::test_csp_conflicted_vars PASSED
tests/test_csp.py::test_revise PASSED
tests/test_csp.py::test_AC3 PASSED
tests/test_csp.py::test_first_unassigned_variable PASSED
tests/test_csp.py::test_num_legal_values PASSED
tests/test_csp.py::test_mrv PASSED
tests/test_csp.py::test_backtracking_search PASSED
tests/test_csp.py::test_universal_dict PASSED
tests/test_csp.py::test_parse_neighbours PASSED
tests/test_csp.py::test_topological_sort PASSED
tests/test_games.py::test_minimax_decision PASSED
tests/test_games.py::test_alphabeta_full_search PASSED
tests/test_games.py::test_random_tests PASSED
tests/test_grid.py::test_distance PASSED
tests/test_grid.py::test_distance_squared PASSED
tests/test_grid.py::test_vector_clip PASSED
tests/test_learning.py::test_exclude PASSED
tests/test_learning.py::test_parse_csv PASSED
tests/test_learning.py::test_weighted_mode PASSED
tests/test_learning.py::test_weighted_replicate PASSED
tests/test_learning.py::test_plurality_learner PASSED
tests/test_learning.py::test_naive_bayes PASSED
tests/test_learning.py::test_k_nearest_neighbors PASSED
tests/test_learning.py::test_decision_tree_learner PASSED
tests/test_learning.py::test_neural_network_learner PASSED
tests/test_learning.py::test_perceptron PASSED
tests/test_logic.py::test_expr PASSED
tests/test_logic.py::test_extend PASSED
tests/test_logic.py::test_PropKB PASSED
tests/test_logic.py::test_KB_wumpus PASSED
tests/test_logic.py::test_definite_clause PASSED
tests/test_logic.py::test_pl_true PASSED
tests/test_logic.py::test_tt_true PASSED
tests/test_logic.py::test_dpll PASSED
tests/test_logic.py::test_unify PASSED
tests/test_logic.py::test_pl_fc_entails PASSED
tests/test_logic.py::test_tt_entails PASSED
tests/test_logic.py::test_eliminate_implications PASSED
tests/test_logic.py::test_dissociate PASSED
tests/test_logic.py::test_associate PASSED
tests/test_logic.py::test_move_not_inwards PASSED
tests/test_logic.py::test_to_cnf PASSED
tests/test_logic.py::test_standardize_variables PASSED
tests/test_logic.py::test_fol_bc_ask PASSED
tests/test_logic.py::test_d PASSED
tests/test_logic.py::test_WalkSAT PASSED
tests/test_logic.py::test_SAT_plan PASSED
tests/test_mdp.py::test_value_iteration PASSED
tests/test_mdp.py::test_policy_iteration PASSED
tests/test_mdp.py::test_best_policy PASSED
tests/test_nlp.py::test_rules PASSED
tests/test_nlp.py::test_lexicon PASSED
tests/test_nlp.py::test_stripRawHTML PASSED
tests/test_nlp.py::test_determineInlinks PASSED
tests/test_nlp.py::test_findOutlinks_wiki PASSED
tests/test_nlp.py::test_expand_pages PASSED
tests/test_nlp.py::test_relevant_pages PASSED
tests/test_nlp.py::test_normalize PASSED
tests/test_nlp.py::test_detectConvergence PASSED
tests/test_nlp.py::test_getInlinks PASSED
tests/test_nlp.py::test_getOutlinks PASSED
tests/test_nlp.py::test_HITS PASSED
tests/test_planning.py::test_action PASSED
tests/test_planning.py::test_air_cargo PASSED
tests/test_planning.py::test_spare_tire PASSED
tests/test_planning.py::test_three_block_tower PASSED
tests/test_planning.py::test_have_cake_and_eat_cake_too PASSED
tests/test_planning.py::test_graph_call PASSED
tests/test_probability.py::tests PASSED
tests/test_probability.py::test_probdist_basic PASSED
tests/test_probability.py::test_probdist_frequency PASSED
tests/test_probability.py::test_probdist_normalize PASSED
tests/test_probability.py::test_jointprob PASSED
tests/test_probability.py::test_event_values PASSED
tests/test_probability.py::test_enumerate_joint PASSED
tests/test_probability.py::test_enumerate_joint_ask PASSED
tests/test_probability.py::test_bayesnode_p PASSED
tests/test_probability.py::test_bayesnode_sample PASSED
tests/test_probability.py::test_enumeration_ask PASSED
tests/test_probability.py::test_elemination_ask PASSED
tests/test_probability.py::test_rejection_sampling PASSED
tests/test_probability.py::test_likelihood_weighting PASSED
tests/test_probability.py::test_forward_backward PASSED
tests/test_probability.py::test_fixed_lag_smoothing PASSED
tests/test_probability.py::test_particle_filtering PASSED
tests/test_search.py::test_breadth_first_tree_search PASSED
tests/test_search.py::test_breadth_first_search PASSED
tests/test_search.py::test_uniform_cost_search PASSED
tests/test_search.py::test_depth_first_graph_search PASSED
tests/test_search.py::test_iterative_deepening_search PASSED
tests/test_search.py::test_depth_limited_search PASSED
tests/test_search.py::test_astar_search PASSED
tests/test_search.py::test_recursive_best_first_search PASSED
tests/test_search.py::test_BoggleFinder PASSED
tests/test_search.py::test_and_or_graph_search PASSED
tests/test_search.py::test_LRTAStarAgent PASSED
tests/test_text.py::test_text_models FAILED
tests/test_text.py::test_viterbi_segmentation PASSED
tests/test_text.py::test_shift_encoding PASSED
tests/test_text.py::test_shift_decoding PASSED
tests/test_text.py::test_rot13_encoding PASSED
tests/test_text.py::test_rot13_decoding PASSED
tests/test_text.py::test_counting_probability_distribution PASSED
tests/test_text.py::test_ir_system PASSED
tests/test_text.py::test_words PASSED
tests/test_text.py::test_canonicalize PASSED
tests/test_text.py::test_translate PASSED
tests/test_text.py::test_bigrams PASSED
tests/test_utils.py::test_removeall_list PASSED
tests/test_utils.py::test_removeall_string PASSED
tests/test_utils.py::test_unique PASSED
tests/test_utils.py::test_product PASSED
tests/test_utils.py::test_first PASSED
tests/test_utils.py::test_is_in PASSED
tests/test_utils.py::test_argminmax PASSED
tests/test_utils.py::test_histogram PASSED
tests/test_utils.py::test_dotproduct PASSED
tests/test_utils.py::test_element_wise_product PASSED
tests/test_utils.py::test_matrix_multiplication PASSED
tests/test_utils.py::test_vector_to_diagonal PASSED
tests/test_utils.py::test_vector_add PASSED
tests/test_utils.py::test_scalar_vector_product PASSED
tests/test_utils.py::test_scalar_matrix_product PASSED
tests/test_utils.py::test_inverse_matrix PASSED
tests/test_utils.py::test_rounder PASSED
tests/test_utils.py::test_num_or_str PASSED
tests/test_utils.py::test_normalize PASSED
tests/test_utils.py::test_clip PASSED
tests/test_utils.py::test_sigmoid PASSED
tests/test_utils.py::test_step PASSED
tests/test_utils.py::test_Expr PASSED
tests/test_utils.py::test_expr PASSED
antmarakis commented 7 years ago

For quick reference, tests/test_text.py::test_text_models FAILED is the one that failed


It seems that NgramTextModel misses the last word. The build failed after #413 got merged.

rodrigogiraoserrao commented 7 years ago

This should be fixed with #420

Chipe1 commented 7 years ago

@RojerGS That fixed the problem but the build still fails due to flake8 errors. Could you update your PR fixing flake8 so that we can have a single PR which makes the build pass

articuno12 commented 7 years ago

@Chipe1 flake8 issue solved in #418

sofmonk commented 7 years ago

PR #418 fixes flake8 errors but has test errors. PR #420 fixes the test errors but has flake8 errors.

@RojerGS @articuno12 Can either of you please get the build passing in one PR so that we start getting merge commits?

PS: I can do that but it would again mean creating a new PR for your joint work. So let me know if I can do that.

articuno12 commented 7 years ago

I was working on the build fail already but when @RojerGS made the pr I restricted myself to flake8 errors. I don't find any problem if two consecutive prs fix the build.Still, if there is need for one pr then I can include that in my pr if @RojerGS is fine with it.

rodrigogiraoserrao commented 7 years ago

@articuno12 be my guest! It is just a minor change in a loop.

antmarakis commented 7 years ago

The problem is fixed, do you mind closing this issue? Thanks.