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

remove hf extension from vscode dependencies #1167

Merged
merged 2 commits into from
Feb 8, 2024
Merged

remove hf extension from vscode dependencies #1167

merged 2 commits into from
Feb 8, 2024

Conversation

Ankush-lastmile
Copy link
Member

@Ankush-lastmile Ankush-lastmile commented Feb 8, 2024

remove hf extension from vscode dependencies

default installation of python fails when building sentencepiece. Remove it for now


Stack created with Sapling. Best reviewed with ReviewStack.

Ankush Pala ankush@lastmileai.dev added 2 commits February 7, 2024 19:28
Downloading, Installing, and setting up python is not standardardized across users, windows, and mac os. Common differences include:
- python installed as python vs python3
- pip installed as pip vs pip3


To mitigate this problem, retrieve the user's python environment path. This is pulled through the python vscode extension, which is also introduced as a dependency to the vscode extension.

Now we don't have to worry about issues like python vs python3, and the user can select the python environment their vscode uses and AIConfig VSCode editor will also use that.

Note: this diff simply updates the invokation of python to use the right interpreter. Any other changes will come on top.

## Testplan

<img width="1917" alt="Screenshot 2024-02-07 at 4 04 59 PM" src="https://github.com/lastmile-ai/aiconfig/assets/141073967/e7ea30c5-38c1-414a-815a-d3190e681ce6">

Notes while testing.

1. If the user installs python for the first time and doesn't select a python interpreter within vscode, vscode editor will default to a nonexistant python interpreter, not open, and fail. But so will the python extension.

2. initialization flow pip installs python-aiconfig requirements, currently vscode flow installs sentencepiece as a requirement of aiconfig-extension-hugging-face. This fails on the windows fresh install. But creating a new config or editing an existing one still works. But This still needs to be fixed


```[error] pip install:   error: subprocess-exited-with-error

  Getting requirements to build wheel did not run successfully.
  exit code: 1

  [31 lines of output]
  Traceback (most recent call last):
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ankush\AppData\Local\Temp\pip-build-env-ylhodmyw\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ankush\AppData\Local\Temp\pip-build-env-ylhodmyw\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "C:\Users\ankush\AppData\Local\Temp\pip-build-env-ylhodmyw\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "C:\Users\ankush\AppData\Local\Temp\pip-build-env-ylhodmyw\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 126, in <module>
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 408, in check_call
      retcode = call(*popenargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 389, in call
      with Popen(*popenargs, **kwargs) as p:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1026, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\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]

  note: This error originates from a subprocess, and is likely not a problem with pip.

2024-02-07 16:11:20.167 [error] pip install: error: subprocess-exited-with-error


2024-02-07 16:11:20.167 [error] pip install: Getting requirements to build wheel did not run successfully.
```
default installation of python fails when building sentencepiece. Remove it for now
@Ankush-lastmile Ankush-lastmile merged commit 067accd into main Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants