Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Error Installing high_quality_translation Validator #1167

Open
OrenRachmil opened this issue Nov 17, 2024 · 2 comments
Open

[bug] Error Installing high_quality_translation Validator #1167

OrenRachmil opened this issue Nov 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@OrenRachmil
Copy link

Describe the bug
I encountered multiple errors while attempting to install the high_quality_translation validator from Guardrails Hub, Below are the details of the issue.

Steps to reproduce the behavior:
guardrails hub install hub://guardrails/high_quality_translation

Expected behavior

Failed to install brainlogic-grhub-high-quality-translation
Exit code: 1
stderr: error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\RachmilO\AppData\Local\Temp\pip-install-wh6bfpm6\sentencepiece_4f30feedef6b4bcab8112afb4b33d30e\setup.py", line 126, in <module>
          subprocess.check_call([
        File "C:\Users\RachmilO\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 408, in check_call
          retcode = call(*popenargs, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\RachmilO\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 389, in call
          with Popen(*popenargs, **kwargs) as p:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\RachmilO\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Users\RachmilO\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [end of output]

Library version:
guardrails-ai 0.6.0

Additional context
Python Version: 3.12
Windows 11

@CalebCourier
Copy link
Collaborator

Hi @OrenRachmil, while not obvious from the error text, I believe the root issue here is a transient dependency of this validator requires cmake to build its wheel. Installing cmake resolved the installation issue on Linux and MacOS and yield a different more details error on Windows. I'm still working through the specific code path necessary to successfully install this validator on Windows and will report back findings here.
I've also filed an issue with this validator's authors so they can update their documentation accordingly: BrainLogicHub/high_quality_translation_validator#6

@CalebCourier
Copy link
Collaborator

@OrenRachmil, to successfully install this validator on windows I had to setup multiple c++ build tools including cmake and g++. I think the easiest way to get all the necessary tools installed and configured correctly is to install Visual Studio Community edition along with the "Desktop development with C++" workload. If this seems excessive, it's because it is. The culprit is a package from Google called sentencepiece that unbabel-comet (a dependency of this validator) depends on. An potential alternative to setting up these build tools, is to pre-install a wheel as described here before installing the validator.

It should be noted that this issue is only present in sentencepiece 0.1.x which unbabel-coment has pinned in it's pyproject.toml. The unbabel-comet repository does have a user submitted issue to support sentencepiece 0.2.x which does not have these install requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants