• Funtowicz Morgan's avatar
    ONNX v2 raises an Exception when using PyTorch < 1.8.0 (#12933) · 640421c0
    Funtowicz Morgan authored
    * Raise an issue if the pytorch version is < 1.8.0
    
    * Attempt to add a test to ensure it correctly raises.
    
    * Missing docstring.
    
    * Second attempt, patch with string absolute import.
    
    * Let's do the call before checking it was called ...
    
    * use the correct function ... 馃う
    
    * Raise ImportError and AssertionError respectively when unable to find torch and torch version is not sufficient.
    
    * Correct path mock patching
    
    * relax constraint for torch_onnx_dict_inputs to ge instead of eq.
    
    * Style.
    
    * Split each version requirements for torch.
    
    * Let's compare version directly.
    
    * Import torch_version after checking pytorch is installed.
    
    * @require_torch
    640421c0
file_utils.py 79.4 KB