original_docstring: Validates the model definition file using a PUT to the DAFNI API
  
      Args:
          jwt (str): JWT
          model_definition (Path): Path to the model definition file
  
      Returns:
          bool: Whether the model definition is valid or not
          List[str]: Errors encountered if the model definition file is not valid
      
docstring: Validates the model definition file using a PUT to the DAFNI API
docstring_tokens: Validates the model definition file using a PUT to the DAFNI API
code: def validate_model_definition(jwt: str, model_definition: Path) -> Tuple[bool, str]:
      """Validates the model definition file using a PUT to the DAFNI API
  
      Args:
          jwt (str): JWT
          model_definition (Path): Path to the model definition file
  
      Returns:
          bool: Whether the model definition is valid or not
          List[str]: Errors encountered if the model definition file is not valid
      """
      content_type = VALIDATE_MODEL_CT
      url = MODELS_API_URL + "/models/definition/validate/"
      with open(model_definition, "rb") as md:
          response = dafni_put_request(url, jwt, md, content_type)
      if response.json()["valid"]:
          return True, ""
      else:
          return False, response.json()["errors"][0]
code_tokens: def validate_model_definition ( jwt : str , model_definition : Path ) -> Tuple [ bool , str ] : content_type = VALIDATE_MODEL_CT url = MODELS_API_URL + "/models/definition/validate/" with open ( model_definition , "rb" ) as md : response = dafni_put_request ( url , jwt , md , content_type ) if response . json ( ) [ "valid" ] : return True , "" else : return False , response . json ( ) [ "errors" ] [ 0 ]
short_docstring: Validates the model definition file using a PUT to the DAFNI API
short_docstring_tokens: Validates the model definition file using a PUT to the DAFNI API
comment: """Validates the model definition file using a PUT to the DAFNI API
  
      Args:
          jwt (str): JWT
          model_definition (Path): Path to the model definition file
  
      Returns:
          bool: Whether the model definition is valid or not
          List[str]: Errors encountered if the model definition file is not valid
      """