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

Client.__init__() got an unexpected keyword argument 'proxies' #131

Open
1 of 2 tasks
aidando73 opened this issue Nov 29, 2024 · 3 comments
Open
1 of 2 tasks

Client.__init__() got an unexpected keyword argument 'proxies' #131

aidando73 opened this issue Nov 29, 2024 · 3 comments

Comments

@aidando73
Copy link
Contributor

System Info

(llama-stack) ubuntu@168-138-112-243:~/1xa100-2/llama-stack-apps$ python -m "torch.utils.collect_env"
/usr/lib/python3.10/runpy.py:126: RuntimeWarning: 'torch.utils.collect_env' found in sys.modules after import of package 'torch.utils', but prior to execution of 'torch.utils.collect_env'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
Collecting environment information...
PyTorch version: 2.4.1
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35

Python version: 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.8.0-49-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.4.131
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA A100-SXM4-40GB
Nvidia driver version: 550.127.05
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        48 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               30
On-line CPU(s) list:                  0-29
Vendor ID:                            AuthenticAMD
Model name:                           AMD EPYC 7J13 64-Core Processor
CPU family:                           25
Model:                                1
Thread(s) per core:                   1
Core(s) per socket:                   1
Socket(s):                            30
Stepping:                             1
BogoMIPS:                             4899.99
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr wbnoinvd arat npt nrip_save umip pku ospke vaes vpclmulqdq rdpid fsrm arch_capabilities
Virtualization:                       AMD-V
Hypervisor vendor:                    KVM
Virtualization type:                  full
L1d cache:                            1.9 MiB (30 instances)
L1i cache:                            1.9 MiB (30 instances)
L2 cache:                             15 MiB (30 instances)
L3 cache:                             480 MiB (30 instances)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-29
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] flake8==4.0.1
[pip3] numpy==1.21.5
[pip3] optree==0.13.0
[pip3] torch==2.4.1
[pip3] torchvision==0.19.1
[pip3] triton==3.0.0
[conda] No relevant packages

Information

  • The official example scripts
  • My own modified scripts

🐛 Describe the bug

# llama-stack server:
sudo docker run \
  -it \
  -v ~/.llama:/root/.llama \
  --gpus all \
  -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT \
  llamastack/distribution-meta-reference-gpu \
  --port $LLAMA_STACK_PORT \
  --env INFERENCE_MODEL=meta-llama/Llama-3.2-3B-Instruct
Setting CLI environment variable INFERENCE_MODEL => meta-llama/Llama-3.2-3B-Instruct
Using template meta-reference-gpu config file: /usr/local/lib/python3.10/site-packages/llama_stack/templates/meta-reference-gpu/run.yaml

# Command:
python -m examples.agents.hello localhost 5001

Error logs

(llama-stack) ubuntu@168-138-112-243:~/1xa100-2/llama-stack-apps$ python -m examples.agents.hello localhost 5001
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/ubuntu/1xa100-2/llama-stack-apps/examples/agents/hello.py", line 78, in <module>
    fire.Fire(main)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/fire/core.py", line 135, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/fire/core.py", line 468, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/ubuntu/.local/lib/python3.10/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/home/ubuntu/1xa100-2/llama-stack-apps/examples/agents/hello.py", line 17, in main
    client = LlamaStackClient(
  File "/home/ubuntu/.local/lib/python3.10/site-packages/llama_stack_client/_client.py", line 108, in __init__
    super().__init__(
  File "/home/ubuntu/.local/lib/python3.10/site-packages/llama_stack_client/_base_client.py", line 855, in __init__
    self._client = http_client or SyncHttpxClientWrapper(
  File "/home/ubuntu/.local/lib/python3.10/site-packages/llama_stack_client/_base_client.py", line 753, in __init__
    super().__init__(**kwargs)
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'

Expected behavior

No error occurs and command runs with output as per README.md

@aidando73
Copy link
Contributor Author

Might be an error with llama-stack-client 🤔

@aidando73
Copy link
Contributor Author

aidando73 commented Nov 29, 2024

Installing pip install httpx==0.27.2 resolves the issue. I was on 0.28.0 before:

(llama-stack) ubuntu@168-138-112-243:~/1xa100-2/llama-stack-apps$ pip show httpx
Name: httpx
Version: 0.28.0
Summary: The next generation HTTP client.
Home-page: 
Author: 
Author-email: Tom Christie <[email protected]>
License: BSD-3-Clause
Location: /home/ubuntu/.local/lib/python3.10/site-packages
Requires: anyio, certifi, httpcore, idna
Required-by: gradio, gradio_client, llama_stack, llama_stack_client, safehttpx

Might be something wrong with the latest release of httpx? Just came out yesterday:

https://github.com/encode/httpx/releases/tag/0.28.0

Asking maintainers: encode/httpx#3425

@aidando73
Copy link
Contributor Author

aidando73 commented Nov 29, 2024

Maintainers have replied:

Heya. That parameter became deprecated in 0.26.0, and was removed in 0.28.0.
If you could follow up with llama_stack_client to help their team get this resolved, that'd be helpful.
You can pin to httpx=0.27.2 in the meantime.

encode/httpx#3425

Opened an issue on llama_stack_client_python meta-llama/llama-stack-client-python#54

ashwinb pushed a commit to meta-llama/llama-stack that referenced this issue Dec 8, 2024
# What does this PR do?

Current examples would cause a lot of unnecessary painful duplication
when a bunch of custom tools are expected while dealing with a real use
case.

Also added pip install -U httpx==0.27.2 to avoid a [httpx proxies
error](meta-llama/llama-stack-apps#131) when
running in an env with 0.28 or higher of httpx installed by default.






In short, provide a summary of what this PR does and why. Usually, the
relevant context should be present in a linked issue.

- [ ] Addresses issue (#issue)


## Test Plan

Please describe:
 - tests you ran to verify your changes with result summaries.
 - provide instructions so it can be reproduced.


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
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

No branches or pull requests

1 participant