
    csH                        d Z ddlZddlZddlZddlZ	 ddlmZ n# e$ r	 ddlmZ Y nw xY wddl	Z
	 ddlZdZn# e$ r dZY nw xY wddlmZmZmZ ddlmZ  ej        e          Zd Z G d	 d
ej                  Z G d dej                  Z G d dej                  Zedk    r( ej        dej                    ej                     dS dS )zK
Automated tests for checking the poincare module from the models package.
    N)MockTF)PoincareRelationsPoincareModelPoincareKeyedVectors)datapathc                  d    t           j                            t          j                    d          S )Nzgensim_word2vec.tst)ospathjointempfile
gettempdir     9lib/python3.11/site-packages/gensim/test/test_poincare.pytestfiler   #   s"    7<<+--/DEEEr   c                       e Zd Zd ZdS )TestPoincareDatac                    t          d          }d t          |d          D             }|                     t          |          d           |                     |d         d           t          d          }d	 t          |          D             }|                     t          |          d           |                     |d         d           d
S )z6Tests whether utf8 and non-utf8 data loaded correctly.zpoincare_cp852.tsvc                     g | ]}|S r   r   .0relations     r   
<listcomp>z;TestPoincareData.test_encoding_handling.<locals>.<listcomp>,   s    aaa(Xaaar   cp852)encoding   r   )u   tímtou   budešzpoincare_utf8.tsvc                     g | ]}|S r   r   r   s     r   r   z;TestPoincareData.test_encoding_handling.<locals>.<listcomp>1   s    KKK(XKKKr   N)r   r   assertEquallen)selfnon_utf8_file	relations	utf8_files       r   test_encoding_handlingz'TestPoincareData.test_encoding_handling)   s     !566aa.?X_.`.`.`aaa	Y+++1'=>>>011	KK.?	.J.JKKK	Y+++1'=>>>>>r   N)__name__
__module____qualname__r$   r   r   r   r   r   (   s#        
? 
? 
? 
? 
?r   r   c                       e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Z ej        e d          d             Zd Zd Zd Zd Zd Zd Zd Zed             ZdS )TestPoincareModelc                     t          t          d                    | _        t          t          d                    | _        d S )Nzpoincare_hypernyms.tsvzpoincare_hypernyms_large.tsv)r   r   data
data_larger    s    r   setUpzTestPoincareModel.setUp7   s6    %h/G&H&HII	+H5S,T,TUUr   c                 z   |                      t          |j                  t          |j                             |                      t          |j        j                  t          |j        j                             |                     t          j        |j        j        |j        j                             d S N)	r   r   kvsetindex_to_key
assertTruenpallclosevectorsr    model_1model_2s      r   models_equalzTestPoincareModel.models_equal;   s    WZ#gj//:::WZ455s7:;R7S7STTTGJ$6
8JKKLLLLLr   c                    t          | j                  }|                     t          |j                  d           |                     t          |j        |j                            d                             d           |                     t          |j                  d           |                     d|j        v           dS )z<Tests whether data has been loaded correctly and completely.   kangaroo.n.01      mammal.n.01N)	r   r+   r   r   all_relationsnode_relationsr1   	get_indexr4   r    models     r   test_data_countsz"TestPoincareModel.test_data_counts@   s    di((U0111555U1%(2D2D_2U2UVWWYZ[[[UX***U-AABBBBBr   c                    t          ddg          }|                     t          |j                  d           |                     t          |j        |j                            d                             d           |                     t          |j                  d           |                     d|j        v           dS )	zBTests whether input bytes data is loaded correctly and completely.)   c   Pqa)s   node.1s   node.2r   rI         rJ   N)r   r   r   rB   rC   r1   rD   r4   rE   s     r   test_data_counts_with_bytesz-TestPoincareModel.test_data_counts_with_bytesH   s    ;=STUUU0111555U1%(2D2D\2R2RSTTVWXXXUX***E,@@AAAAAr   c                    t          | j        dd          }|                    d           |                    t	                                 t          j        t	                                }|                     ||           dS )z6Tests whether the model is saved and loaded correctly.r   r?   burn_innegativerK   epochsNr   r+   trainsaver   loadr;   r    rF   loadeds      r   test_persistencez"TestPoincareModel.test_persistenceP   sr    diQ???1

8::#HJJ//%(((((r   c                    t          | j        dd          }|                    d           |                    t	                      d           t          j        t	                                }|                     ||           dS )z\Tests whether the model is saved and loaded correctly when the arrays are stored separately.r   r?   rO   rK   rR   )	sep_limitNrT   rX   s      r   test_persistence_separate_filez0TestPoincareModel.test_persistence_separate_fileX   sv    diQ???1

8::
+++#HJJ//%(((((r   c                 ,   t          | j        dd          }|                     t          |j                  d           |                     |j                            dd          d           |                     |j                            dd          d           |                    d	gd
           |                     |j                            dd          d           |                     |j                            dd          d           dS )zGTests whether additional input data is loaded correctly and completely.r   r?   rO   r@   r>   countcat.n.01rK   )r>   r`   T)updaterL   r   N)r   r+   r   r   r1   get_vecattrbuild_vocabrE   s     r   test_online_learningz&TestPoincareModel.test_online_learning`   s    diQ???UX***--owGGKKK--j'BBAFFF89$GGG--owGGKKK--j'BBAFFFFFr   c                 f   t          | j        dd          }|                    d           |                    t	                                 t          j        t	                                }|                    d           |                    d           |                     ||           dS )zITests whether the model can be trained correctly after loading from disk.r   r?   rO   rK   rR   NrT   rX   s      r   test_train_after_loadz'TestPoincareModel.test_train_after_loadj   s    diQ???1

8::#HJJ//1A%(((((r   c                 h   t          j        t          d                    }|                     |j        j        j        d           |                     t          |j                  d           |                     |j        d           |                     t          |j	                  d           dS )zBTests whether model from older gensim version is loaded correctly.poincare_test_3.4.0)   r   ri   r      N)
r   rW   r   r   r1   r7   shaper   sizerB   )r    rY   s     r   test_persistence_old_modelz,TestPoincareModel.test_persistence_old_modelt   s    #H-B$C$CDD*0(;;;VY---a(((V122C88888r   c                    t          j        t          d                    }t          j        |j        j                  }|                    d           |                     t          j	        ||j        j                             dS )zNTests whether loaded model from older gensim version can be trained correctly.rh   r   rR   N)
r   rW   r   r5   copyr1   r7   rU   assertFalser6   )r    rY   old_vectorss      r   test_train_old_model_after_loadz1TestPoincareModel.test_train_old_model_after_load|   sn    #H-B$C$CDDgfi/00A[&)2CDDEEEEEr   c                    |                      t                    5  t          dg           ddd           n# 1 swxY w Y   |                      t                    5  t          g d           ddd           n# 1 swxY w Y   |                      t                    5  t          d           ddd           dS # 1 swxY w Y   dS )z1Tests that error is raised on invalid input data.)abcNab)assertRaises
ValueErrorr   r-   s    r   test_invalid_data_raises_errorz0TestPoincareModel.test_invalid_data_raises_error   s}   z** 	- 	-?+,,,	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	-z** 	+ 	+///***	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+z** 	  	 $	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	 s0   8<<A;;A?A? B==CCc                 |    t          | j        d          }|                     |j        j        j        d           dS )z<Tests whether vectors are initialized with the correct size.   )rl   )r@   r|   N)r   r+   r   r1   r7   rk   rE   s     r   test_vector_shapez#TestPoincareModel.test_vector_shape   s:    dib111)/99999r   c                 2   t          | j        t          j        dd          }|                     |j        j        j        t          j                   |                    d           |                     |j        j        j        t          j                   dS )zGTests whether vectors have the correct dtype before and after training.r   r?   )dtyperP   rQ   rK   rR   N)	r   r,   r5   float32r   r1   r7   r   rU   rE   s     r   test_vector_dtypez#TestPoincareModel.test_vector_dtype   sw    doRZUVWWW)/<<<1)/<<<<<r   c                     t          | j        dd          }t          j        |j        j                  }|                    d           |                     t          j        ||j        j                             dS )z;Tests that vectors are different before and after training.r   r?   rO   r   rR   N)	r   r,   r5   ro   r1   r7   rU   rp   r6   r    rF   rq   s      r   test_trainingzTestPoincareModel.test_training   sk    doq1EEEgeh.//1[%(2BCCDDDDDr   c                    t          | j        dd          }|                    d           t          j        |j        j                  }|                    d           |                     t          j        ||j        j                             t          j        |j        j                  }|                    d           | 	                    t          j        ||j        j                             dS )zETests that calling train multiple times results in different vectors.r   r?   rO   r   rR   rK   N)
r   r,   rU   r5   ro   r1   r7   rp   r6   r4   r   s      r   test_training_multiplez(TestPoincareModel.test_training_multiple   s    doq1EEE1geh.//1[%(2BCCDDDgeh.//1K1ABBCCCCCr   c                     t          | j        d          }	 |                    ddd           dS # t          $ r0}|                     dt          |          z             Y d}~dS d}~ww xY w)zJTests that the model is trained successfully with gradients check enabled.r?   rQ   rK   rS   
batch_sizecheck_gradients_everyzFException %s raised unexpectedly while training with gradient checkingN)r   r+   rU   	Exceptionfailrepr)r    rF   es      r   test_gradients_checkz&TestPoincareModel.test_gradients_check   s    di!444	jKKqQaKHHHHH 	j 	j 	jII^aefgahahhiiiiiiiii	js   2 
A,%A''A,z,autograd needs to be installed for this testc                 4   t          | j        d          }t          t          j        d|j        z   |j        f                    |_        |                     t                    5  |
                    ddd           ddd           dS # 1 swxY w Y   dS )z4Tests that discrepancy in gradients raises an error.r?   r   r   )return_valuerK   r   N)r   r+   r   r5   zerosrQ   rl   
_loss_gradrx   AssertionErrorrU   rE   s     r   %test_wrong_gradients_raises_assertionz7TestPoincareModel.test_wrong_gradients_raises_assertion   s     di!444RXq5>7I5:6V-W-WXXX~.. 	I 	IKKqQaKHHH	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	Is   'BBBc                 6   t          | j        ddd          }|                    d           t          | j        ddd          }|                    d           |                     t	          j        |j        j        |j        j                             dS )zRTests that vectors are same for two independent models trained with the same seed.rK   r?   )seedrQ   rP   r   rR   N)r   r,   rU   r4   r5   r6   r1   r7   r8   s      r   test_reproduciblez#TestPoincareModel.test_reproducible   s    a!QOOOQa!QOOOQGJ$6
8JKKLLLLLr   c                     t          | j        dd          }t          j        |j        j                  }|                    d           |                     t          j        |j        j        |                     dS )z/Tests that vectors are different after burn-in.rK   r?   rO   r   rR   N)	r   r+   r5   ro   r1   r7   rU   rp   r6   r    rF   original_vectorss      r   test_burn_inzTestPoincareModel.test_burn_in   sm    diQ???758#3441UX%57GHHIIIIIr   c                 ,   t          | j        dd          }|                    d           t          j        |j        j                  }|                    d           |                     t          j        |j        j        |                     dS )zFTests that burn-in does not happen when train is called a second time.r?   rK   )rQ   rP   r   rR   N)	r   r+   rU   r5   ro   r1   r7   r4   r6   r   s      r   test_burn_in_only_done_oncez-TestPoincareModel.test_burn_in_only_done_once   s    di!Q???1758#3441EH$46FGGHHHHHr   c                     t          | j        d          }|                     t          |                                          d           dS )z3Tests that correct number of negatives are sampled.r=   r   N)r   r+   r   r   _get_candidate_negativesrE   s     r   test_negativesz TestPoincareModel.test_negatives   sF    di!444U;;==>>BBBBBr   c                     t          | j        d          }|                     t                    5  |                    d           ddd           dS # 1 swxY w Y   dS )zSTests error is rased if number of negatives to sample is more than remaining nodes.r=   r   rK   rR   N)r   r+   rx   ry   rU   rE   s     r   +test_error_if_negative_more_than_populationz=TestPoincareModel.test_error_if_negative_more_than_population   s    di!444z** 	" 	"KKqK!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"s   AAAc           	      b   t          | j        d          }|j        d         }d}t          |          D ]y}|                    d          }|                     |t          |          z             |                     t          |          t          t          |                               zdS )zUTests that no duplicates or positively related nodes are present in negative samples.r?   r   r   d   N)	r   r,   rC   range_sample_negativesrp   r2   r   r   )r    rF   positive_nodesnum_samplesi	negativess         r   3test_no_duplicates_and_positives_in_negative_samplezETestPoincareModel.test_no_duplicates_and_positives_in_negative_sample   s    do:::-a0{## 	B 	BA//22I^c)nn<===S^^SY-@-@AAAA	B 	Br   c                    t          j        ddgddgddgg          }g d}t          j        ||           t          j        ddgddgddgg          }|                     ||k                                               d	S )
z0Tests that correct number of negatives are used.g      ?g?g?g333333?gɿ)r   rK   r   g        g?N)r5   arrayr   _handle_duplicatesr4   all)r    vector_updatesnode_indicesvector_updates_expecteds       r   test_handle_duplicatesz(TestPoincareModel.test_handle_duplicates   s    C:SzC;"GHH yy(FFF"$(S#Jc
S#J+O"P"P+BBGGIIJJJJJr   c                 j    	 t          j        t                                 d S # t          $ r Y d S w xY wr0   )r	   unlinkr   OSError)clss    r   tearDownClasszTestPoincareModel.tearDownClass   sC    	Ihjj!!!!! 	 	 	DD	s    $ 
22N) r%   r&   r'   r.   r;   rG   rM   rZ   r]   rd   rf   rm   rr   rz   r}   r   r   r   r   unittestskipIfautograd_installedr   r   r   r   r   r   r   r   classmethodr   r   r   r   r)   r)   6   s       V V VM M M
C C CB B B) ) )) ) )G G G) ) )9 9 9F F F     : : :
= = =E E ED D Dj j j X_++-[\\I I ]\IM M MJ J JI I IC C C
" " "B B BK K K   [  r   r)   c                       e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS )TestPoincareKeyedVectorsc                 V    t          j        t          d          d          | _        d S )Nzpoincare_vectors.binT)binary)r   load_word2vec_formatr   r7   r-   s    r   r.   zTestPoincareKeyedVectors.setUp   s'    +@J`AaAajnooor   c                     g d}d | j                             dd          D             }|                     ||           dS )z+Test most_similar returns expected results.)canine.n.02hunting_dog.n.01carnivore.n.01placental.n.01rA   c                     g | ]
}|d          S r   r   r   results     r   r   z>TestPoincareKeyedVectors.test_most_similar.<locals>.<listcomp>  s    [[[6VAY[[[r   dog.n.01r=   topnNr7   most_similarr   r    expected	predicteds      r   test_most_similarz*TestPoincareKeyedVectors.test_most_similar   s[    
 
 
 \[T\-F-FzXY-F-Z-Z[[[	9-----r   c                    |                      t          | j                            dd                    d           |                      t          | j                            dd                    d           | j                            dd          }|                      t          |          t          | j                  dz
             |                      |d         d         d	           dS )
zCTest most_similar returns correct results when `topn` is specified.r   r=   r   
   NrK   r   zgallant_fox.n.01)r   r   r7   r   r    r   s     r   test_most_similar_topnz/TestPoincareKeyedVectors.test_most_similar_topn	  s    T\66z6JJKKQOOOT\66z6KKLLbQQQL--jt-DD	YT\):):Q)>???2q)+=>>>>>r   c                     |                      t                    5  | j                            d           ddd           dS # 1 swxY w Y   dS )z=Test most_similar raises KeyError when input is out of vocab.not_in_vocabN)rx   KeyErrorr7   r   r-   s    r   !test_most_similar_raises_keyerrorz:TestPoincareKeyedVectors.test_most_similar_raises_keyerror  s    x(( 	6 	6L%%n555	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6s   AA
Ac                     t          | j        j        dd                   }t          d | j                            ddd          D                       }|                     ||           dS )z;Test most_similar returns handles restrict_vocab correctly.Nr=   c              3   &   K   | ]}|d          V  dS )r   Nr   r   s     r   	<genexpr>zLTestPoincareKeyedVectors.test_most_similar_restrict_vocab.<locals>.<genexpr>  s&      ppfq	ppppppr   r   )r   restrict_vocab)r2   r7   r3   r   r   r   s      r    test_most_similar_restrict_vocabz9TestPoincareKeyedVectors.test_most_similar_restrict_vocab  sn    t|0!455pp0I0I*[\mn0I0o0oppppp	9-----r   c                 l    | j                             dg d          }|                     |d           dS )z3Test most_similar_to_given returns correct results.r   )r   r   rA   r   N)r7   most_similar_to_givenr   r   s     r   test_most_similar_to_givenz3TestPoincareKeyedVectors.test_most_similar_to_given  s=    L66zCvCvCvww	$455555r   c                     g d}| j         d         }d | j                             |gd          D             }|                     ||           dS )zYTest most_similar returns expected results with an input vector instead of an input word.)r   r   r   r   r   r   c                     g | ]
}|d          S r   r   r   s     r   r   zPTestPoincareKeyedVectors.test_most_similar_with_vector_input.<locals>.<listcomp>,  s    ___6VAY___r   r=   r   Nr   )r    r   input_vectorr   s       r   #test_most_similar_with_vector_inputz<TestPoincareKeyedVectors.test_most_similar_with_vector_input"  sh    
 
 
 |J/__T\-F-F~\]-F-^-^___	9-----r   c                     |                      t          j        | j                            dd          d                     |                     | j                            dd          d           dS )z+Test that distance returns expected values.r   rA   ő"@r   N)r4   r5   r6   r7   distancer   r-   s    r   test_distancez&TestPoincareKeyedVectors.test_distance/  sa    DL$9$9*m$T$TV_``aaa..z:FFJJJJJr   c                    | j                             dddg          }|                     t          j        |ddg                     | j                             d          }|                     t          |          t          | j                              |                     t          j        |d         d                     dS )zSTest that distances between one word and multiple other words have expected values.r   rA   r   r   r   2Y$@Nr7   	distancesr4   r5   r6   r   r   )r    r   s     r   test_distancesz'TestPoincareKeyedVectors.test_distances4  s    L**:z7RSS	I	1~>>???L**:66	YT\):):;;;IbM8<<=====r   c                    | j         d         }| j                             |ddg          }|                     t          j        |ddg                     | j                             |          }|                     t          |          t          | j                              |                     t          j        |d         d                     dS )zRTest that distances between input vector and a list of words have expected values.r   rA   r   r   r   r   Nr   )r    r   r   s      r    test_distances_with_vector_inputz9TestPoincareKeyedVectors.test_distances_with_vector_input=  s    |J/L**<-9TUU	I	1~>>???L**<88	YT\):):;;;IbM8<<=====r   c                     | j         d         }| j         ddg         }| j                             ||          }|                     t          j        |ddg                     dS )z<Test that poincare_distance_batch returns correct distances.r   rA   r   r   N)r7   vector_distance_batchr4   r5   r6   )r    vector_1	vectors_2r   s       r   test_poincare_distances_batchz6TestPoincareKeyedVectors.test_poincare_distances_batchG  s^    <
+L-!<=	L66xKK	I	1~>>?????r   c                 F   | j         d         }| j         d         }| j                             ||          }|                     t          j        |d                     | j                             ||          }|                     t          j        |d                     dS )zOTest that poincare_distance returns correct distance between two input vectors.r   rA   r   r   N)r7   vector_distancer4   r5   r6   )r    r   vector_2r   s       r   test_poincare_distancez/TestPoincareKeyedVectors.test_poincare_distanceN  s    <
+<.<//(CCHi88999<//(CCHa0011111r   c                     |                      | j                            d          d           |                      | j                            d          d           dS )zXTest closest_child returns expected value and returns None for lowest node in hierarchy.r   terrier.n.01zharbor_porpoise.n.01N)r   r7   closest_childr-   s    r   test_closest_childz+TestPoincareKeyedVectors.test_closest_childY  sU    33J??PPP334JKKTRRRRRr   c                     |                      | j                            d          d           |                      | j                            d          d           dS )zZTest closest_parent returns expected value and returns None for highest node in hierarchy.r   r   rA   N)r   r7   closest_parentr-   s    r   test_closest_parentz,TestPoincareKeyedVectors.test_closest_parent^  sT    44Z@@-PPP44]CCTJJJJJr   c                     g d}|                      | j                            d          |           g }|                      | j                            d          |           dS )zZTest ancestors returns expected list and returns empty list for highest node in hierarchy.)r   r   r   rA   r   rA   N)r   r7   	ancestorsr    r   s     r   test_ancestorsz'TestPoincareKeyedVectors.test_ancestorsc  sd    UUU//
;;XFFF//>>IIIIIr   c                     g d}|                      | j                            d          |           |                      | j                            dd          |dd                    dS )z[Test descendants returns expected list and returns empty list for lowest node in hierarchy.)r   zsporting_dog.n.01zspaniel.n.01zwater_spaniel.n.01zirish_water_spaniel.n.01r   r?   )	max_depthN)r   r7   descendantsr  s     r   test_descendantsz)TestPoincareKeyedVectors.test_descendantsj  sw    
 
 
 	11*==xHHH11*1JJHUWVWUWLYYYYYr   c                 
   |                      t          j        | j                            dd          d                     |                      t          j        | j                            dd          d                     dS )zNTest similarity returns expected value for two nodes, and for identical nodes.r   rK   rA   g4'?N)r4   r5   r6   r7   
similarityr-   s    r   test_similarityz(TestPoincareKeyedVectors.test_similarityr  sj    DL$;$;J
$S$SUVWWXXXDL$;$;J$V$VXcddeeeeer   c                    |                      t          j        | j                            d          d                     |                      t          j        | j                            d          d                     dS )z!Test norm returns expected value.r   gyhMH?rA   gcq(?N)r4   r5   r6   r7   normr-   s    r   r  zTestPoincareKeyedVectors.normw  sd    DL$5$5j$A$A:NNOOODL$5$5m$D$DjQQRRRRRr   c                    |                      t          j        | j                            dd          d                     |                      t          j        | j                            dd          d                     |                      t          j        | j                            dd          d                     dS )z[Test difference_in_hierarchy returns expected value for two nodes, and for identical nodes.r   r   rA   g?gN)r4   r5   r6   r7   difference_in_hierarchyr-   s    r   test_difference_in_hierarchyz5TestPoincareKeyedVectors.test_difference_in_hierarchy|  s    DL$H$HU_$`$`bcddeeeDL$H$HXb$c$cenoopppDL$H$HUb$c$ceoppqqqqqr   c                     |                      | j                            dd          g            t          ddg          }|                      t          | j                            dd                    |           dS )zITest closer_than returns expected value for distinct and identical nodes.r   r   r   r   N)r   r7   closer_thanr2   r  s     r   test_closer_thanz)TestPoincareKeyedVectors.test_closer_than  su    11*jII2NNN'9:;;T\55jBRSSTTV^_____r   c                     |                      | j                            dd          d           |                      | j                            dd          d           dS )zBTest rank returns expected value for distinct and identical nodes.r   rK   r   r?   N)r   r7   rankr-   s    r   	test_rankz"TestPoincareKeyedVectors.test_rank  sY    **:zBBAFFF**:7GHH!LLLLLr   N)r%   r&   r'   r.   r   r   r   r   r   r   r   r   r   r   r   r  r  r	  r  r  r  r  r  r  r   r   r   r   r      su       p p p
. 
. 
.? ? ?6 6 6
. . .6 6 6
. . .K K K
> > >> > >@ @ @	2 	2 	2S S S
K K K
J J JZ Z Zf f f
S S S
r r r` ` `M M M M Mr   r   __main__z)%(asctime)s : %(levelname)s : %(message)s)formatlevel)__doc__loggingr	   r   r   mockr   ImportErrorunittest.mocknumpyr5   autogradr   gensim.models.poincarer   r   r   gensim.test.utilsr   	getLoggerr%   loggerr   TestCaser   r)   r   basicConfigDEBUGmainr   r   r   <module>r.     s     				  # # # #""""""""#    OOO    Z Y Y Y Y Y Y Y Y Y & & & & & & 
	8	$	$F F F
? ? ? ? ?x( ? ? ?@ @ @ @ @) @ @ @FRM RM RM RM RMx0 RM RM RMj z GJRYR_````HMOOOOO s    ))8 AA