text:
Model works with huggingface transformers but failed to work with text-generation-launcher

System Info
2023-07-10T10:33:04.375035Z  INFO text_generation_launcher: Runtime environment:
Target: x86_64-unknown-linux-gnu
Cargo version: 1.70.0
Commit sha: 31b36cca21fcd0e6b7db477a7545063e1b860156
Docker label: sha-31b36cc
nvidia-smi:
Mon Jul 10 10:33:04 2023
   +-----------------------------------------------------------------------------+
   | NVIDIA-SMI 520.61.05    Driver Version: 520.61.05    CUDA Version: 11.8     |
   |-------------------------------+----------------------+----------------------+
   | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
   | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
   |                               |                      |               MIG M. |
   |===============================+======================+======================|
   |   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
   | 30%   39C    P0    88W / 320W |      0MiB / 10240MiB |      0%      Default |
   |                               |                      |                  N/A |
   +-------------------------------+----------------------+----------------------+
   |   1  NVIDIA GeForce ...  Off  | 00000000:A1:00.0 Off |                  N/A |
   | 30%   38C    P0    N/A / 320W |      0MiB / 10240MiB |      0%      Default |
   |                               |                      |                  N/A |
   +-------------------------------+----------------------+----------------------+

   +-----------------------------------------------------------------------------+
   | Processes:                                                                  |
   |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
   |        ID   ID                                                   Usage      |
   |=============================================================================|
   |  No running processes found                                                 |
   +-----------------------------------------------------------------------------+

Information

[X] Docker
[ ] The CLI directly

Tasks

[X] An officially supported command
[ ] My own modifications

Reproduction
docker run --gpus all  --shm-size 1g -p 8080:80 -v /root/data:/data ghcr.io/huggingface/text-generation-inference:0.9 --model-id vilsonrodrigues/falcon-7b-instruct-sharded --num-shard 2

2023-07-09T15:25:17.922667Z  INFO text_generation_launcher: Args { model_id: "vilsonrodrigues/falcon-7b-instruct-sharded", revision: None, sharded: None, num_shard: Some(2), quantize: None, dtype: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_input_length: 1024, max_total_tokens: 2048, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: 16000, max_waiting_tokens: 20, hostname: "10dd21d407e5", port: 80, shard_uds_path: "/tmp/text-generation-server", master_addr: "localhost", master_port: 29500, huggingface_hub_cache: Some("/data"), weights_cache_override: None, disable_custom_kernels: false, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, ngrok: false, ngrok_authtoken: None, ngrok_domain: None, ngrok_username: None, ngrok_password: None, env: false }
2023-07-09T15:25:17.922719Z  INFO text_generation_launcher: Sharding model on 2 processes
2023-07-09T15:25:17.922871Z  INFO text_generation_launcher: Starting download process.
2023-07-09T15:25:21.330343Z  INFO download: text_generation_launcher: Files are already present on the host. Skipping download.

2023-07-09T15:25:22.026919Z  INFO text_generation_launcher: Successfully downloaded weights.
2023-07-09T15:25:22.027240Z  INFO text_generation_launcher: Starting shard 0
2023-07-09T15:25:22.027310Z  INFO text_generation_launcher: Starting shard 1
2023-07-09T15:25:25.942328Z  WARN shard-manager: text_generation_launcher: We're not using custom kernels.
 rank=1
2023-07-09T15:25:25.970715Z  WARN shard-manager: text_generation_launcher: We're not using custom kernels.
 rank=0
2023-07-09T15:25:26.454690Z ERROR shard-manager: text_generation_launcher: Error when initializing model
Traceback (most recent call last):
  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 778, in main
    return _main(
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 216, in _main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 78, in serve
    server.serve(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 166, in serve
    asyncio.run(
  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
    self.run_forever()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
    self._run_once()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
    handle._run()
  File "/opt/conda/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
> File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 133, in serve_inner
    model = get_model(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 240, in get_model
    raise NotImplementedError("sharded is not supported for this model")
NotImplementedError: sharded is not supported for this model
 rank=0
2023-07-09T15:25:26.839306Z ERROR shard-manager: text_generation_launcher: Error when initializing model
Traceback (most recent call last):
  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 778, in main
    return _main(
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 216, in _main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 78, in serve
    server.serve(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 166, in serve
    asyncio.run(
  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
    self.run_forever()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
    self._run_once()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
    handle._run()
  File "/opt/conda/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
> File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 133, in serve_inner
    model = get_model(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 240, in get_model
    raise NotImplementedError("sharded is not supported for this model")
NotImplementedError: sharded is not supported for this model
 rank=1
2023-07-09T15:25:27.331120Z ERROR text_generation_launcher: Shard 0 failed to start
2023-07-09T15:25:27.331151Z ERROR text_generation_launcher: Traceback (most recent call last):

  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 78, in serve
    server.serve(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 166, in serve
    asyncio.run(

  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)

  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 133, in serve_inner
    model = get_model(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 240, in get_model
    raise NotImplementedError("sharded is not supported for this model")

NotImplementedError: sharded is not supported for this model

2023-07-09T15:25:27.331177Z  INFO text_generation_launcher: Shutting down shards
2023-07-09T15:25:27.760486Z  INFO text_generation_launcher: Shard 1 terminated
# docker run --gpus 1 -p 8080:80 -v /root/data:/data ghcr.io/huggingface/text-generation-inference:0.9 --model-id vilsonrodrigues/falcon-7b-instruct-sharded
2023-07-09T15:31:46.866685Z  INFO text_generation_launcher: Args { model_id: "vilsonrodrigues/falcon-7b-instruct-sharded", revision: None, sharded: None, num_shard: None, quantize: None, dtype: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_input_length: 1024, max_total_tokens: 2048, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: 16000, max_waiting_tokens: 20, hostname: "651ed0250429", port: 80, shard_uds_path: "/tmp/text-generation-server", master_addr: "localhost", master_port: 29500, huggingface_hub_cache: Some("/data"), weights_cache_override: None, disable_custom_kernels: false, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, ngrok: false, ngrok_authtoken: None, ngrok_domain: None, ngrok_username: None, ngrok_password: None, env: false }
2023-07-09T15:31:46.866936Z  INFO text_generation_launcher: Starting download process.
2023-07-09T15:31:50.637241Z  INFO download: text_generation_launcher: Files are already present on the host. Skipping download.

2023-07-09T15:31:51.270900Z  INFO text_generation_launcher: Successfully downloaded weights.
2023-07-09T15:31:51.271200Z  INFO text_generation_launcher: Starting shard 0
2023-07-09T15:31:54.552445Z  WARN shard-manager: text_generation_launcher: We're not using custom kernels.
 rank=0
2023-07-09T15:32:00.971897Z ERROR shard-manager: text_generation_launcher: Error when initializing model
Traceback (most recent call last):
  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 778, in main
    return _main(
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 216, in _main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 78, in serve
    server.serve(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 166, in serve
    asyncio.run(
  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
    self.run_forever()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
    self._run_once()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
    handle._run()
  File "/opt/conda/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
> File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 133, in serve_inner
    model = get_model(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 253, in get_model
    return FlashRWSharded(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_rw.py", line 56, in __init__
    model = FlashRWForCausalLM(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 628, in __init__
    self.transformer = FlashRWModel(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 558, in __init__
    [
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 559, in <listcomp>
    FlashRWLayer(layer_id, config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 411, in __init__
    self.mlp = FlashMLP(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 363, in __init__
    self.dense_h_to_4h = TensorParallelColumnLinear.load(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 234, in load
    return cls.load_multi(config, [prefix], weights, bias, dim=0)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 238, in load_multi
    weight = weights.get_multi_weights_col(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in get_multi_weights_col
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in <listcomp>
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 98, in get_sharded
    tensor = tensor.to(device=self.device)
torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory)
Currently allocated     : 8.73 GiB
Requested               : 157.53 MiB
Device limit            : 9.78 GiB
Free (according to CUDA): 17.31 MiB
PyTorch limit (set by user-supplied memory fraction)
                        : 17179869184.00 GiB
 rank=0
2023-07-09T15:32:01.279858Z  INFO text_generation_launcher: Waiting for shard 0 to be ready...
Error: ShardCannotStart
2023-07-09T15:32:02.979796Z ERROR text_generation_launcher: Shard 0 failed to start
2023-07-09T15:32:02.979844Z ERROR text_generation_launcher: You are using a model of type RefinedWebModel to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
Traceback (most recent call last):

  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 78, in serve
    server.serve(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 166, in serve
    asyncio.run(

  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)

  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 133, in serve_inner
    model = get_model(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 253, in get_model
    return FlashRWSharded(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_rw.py", line 56, in __init__
    model = FlashRWForCausalLM(config, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 628, in __init__
    self.transformer = FlashRWModel(config, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 558, in __init__
    [

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 559, in <listcomp>
    FlashRWLayer(layer_id, config, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 411, in __init__
    self.mlp = FlashMLP(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 363, in __init__
    self.dense_h_to_4h = TensorParallelColumnLinear.load(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 234, in load
    return cls.load_multi(config, [prefix], weights, bias, dim=0)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 238, in load_multi
    weight = weights.get_multi_weights_col(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in get_multi_weights_col
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in <listcomp>
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 98, in get_sharded
    tensor = tensor.to(device=self.device)

torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory)
Currently allocated     : 8.73 GiB
Requested               : 157.53 MiB
Device limit            : 9.78 GiB
Free (according to CUDA): 17.31 MiB
PyTorch limit (set by user-supplied memory fraction)
                        : 17179869184.00 GiB

2023-07-09T15:32:02.979915Z  INFO text_generation_launcher: Shutting down shards

Expected behavior
Web Server Started.

Try removing --num-shard 2.
As the error says, sharding is not supported for this model (since it's not an officially supported model)

Thanks @Narsil promptly reply.

Try removing --num-shard 2.

This is not working.
Please check the following logs:
# docker run --gpus 1 -p 8080:80 -v /root/data:/data ghcr.io/huggingface/text-generation-inference:0.9 --model-id vilsonrodrigues/falcon-7b-instruct-sharded
2023-07-09T15:31:46.866685Z  INFO text_generation_launcher: Args { model_id: "vilsonrodrigues/falcon-7b-instruct-sharded", revision: None, sharded: None, num_shard: None, quantize: None, dtype: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_input_length: 1024, max_total_tokens: 2048, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: 16000, max_waiting_tokens: 20, hostname: "651ed0250429", port: 80, shard_uds_path: "/tmp/text-generation-server", master_addr: "localhost", master_port: 29500, huggingface_hub_cache: Some("/data"), weights_cache_override: None, disable_custom_kernels: false, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, ngrok: false, ngrok_authtoken: None, ngrok_domain: None, ngrok_username: None, ngrok_password: None, env: false }
2023-07-09T15:31:46.866936Z  INFO text_generation_launcher: Starting download process.
2023-07-09T15:31:50.637241Z  INFO download: text_generation_launcher: Files are already present on the host. Skipping download.

2023-07-09T15:31:51.270900Z  INFO text_generation_launcher: Successfully downloaded weights.
2023-07-09T15:31:51.271200Z  INFO text_generation_launcher: Starting shard 0
2023-07-09T15:31:54.552445Z  WARN shard-manager: text_generation_launcher: We're not using custom kernels.
 rank=0
2023-07-09T15:32:00.971897Z ERROR shard-manager: text_generation_launcher: Error when initializing model
Traceback (most recent call last):
  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 778, in main
    return _main(
  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 216, in _main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 78, in serve
    server.serve(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 166, in serve
    asyncio.run(
  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
    self.run_forever()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
    self._run_once()
  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
    handle._run()
  File "/opt/conda/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
> File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 133, in serve_inner
    model = get_model(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 253, in get_model
    return FlashRWSharded(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_rw.py", line 56, in __init__
    model = FlashRWForCausalLM(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 628, in __init__
    self.transformer = FlashRWModel(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 558, in __init__
    [
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 559, in <listcomp>
    FlashRWLayer(layer_id, config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 411, in __init__
    self.mlp = FlashMLP(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 363, in __init__
    self.dense_h_to_4h = TensorParallelColumnLinear.load(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 234, in load
    return cls.load_multi(config, [prefix], weights, bias, dim=0)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 238, in load_multi
    weight = weights.get_multi_weights_col(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in get_multi_weights_col
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in <listcomp>
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 98, in get_sharded
    tensor = tensor.to(device=self.device)
torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory)
Currently allocated     : 8.73 GiB
Requested               : 157.53 MiB
Device limit            : 9.78 GiB
Free (according to CUDA): 17.31 MiB
PyTorch limit (set by user-supplied memory fraction)
                        : 17179869184.00 GiB
 rank=0
2023-07-09T15:32:01.279858Z  INFO text_generation_launcher: Waiting for shard 0 to be ready...
Error: ShardCannotStart
2023-07-09T15:32:02.979796Z ERROR text_generation_launcher: Shard 0 failed to start
2023-07-09T15:32:02.979844Z ERROR text_generation_launcher: You are using a model of type RefinedWebModel to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
Traceback (most recent call last):

  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 78, in serve
    server.serve(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 166, in serve
    asyncio.run(

  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)

  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 133, in serve_inner
    model = get_model(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 253, in get_model
    return FlashRWSharded(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_rw.py", line 56, in __init__
    model = FlashRWForCausalLM(config, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 628, in __init__
    self.transformer = FlashRWModel(config, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 558, in __init__
    [

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 559, in <listcomp>
    FlashRWLayer(layer_id, config, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 411, in __init__
    self.mlp = FlashMLP(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_rw_modeling.py", line 363, in __init__
    self.dense_h_to_4h = TensorParallelColumnLinear.load(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 234, in load
    return cls.load_multi(config, [prefix], weights, bias, dim=0)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py", line 238, in load_multi
    weight = weights.get_multi_weights_col(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in get_multi_weights_col
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 127, in <listcomp>
    w = [self.get_sharded(f"{p}.weight", dim=0) for p in prefixes]

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 98, in get_sharded
    tensor = tensor.to(device=self.device)

torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory)
Currently allocated     : 8.73 GiB
Requested               : 157.53 MiB
Device limit            : 9.78 GiB
Free (according to CUDA): 17.31 MiB
PyTorch limit (set by user-supplied memory fraction)
                        : 17179869184.00 GiB

2023-07-09T15:32:02.979915Z  INFO text_generation_launcher: Shutting down shards

Allocation on device 0 would exceed allowed memory. (out of memory)

Use lower settings or a bigger card.

Try removing --num-shard 2.
As the error says, sharding is not supported for this model (since it's not an officially supported model)

How can we check if a model type is officially supported by TGI? Is there any specific list?
As OP and I are trying to load Falcon model, isn't this officially supported?

authors: GemsFord Narsil tanshuai

repo: huggingface/text-generation-inference


text:
Fix chat CLI for model revisions

This PR passes the revision arg to the tokenizer so one can chat with models at a given branch/revision. I also set the padding token ID to suppress warnings on models that don't have this in their config.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

source: gharchive/pull-request

authors: HuggingFaceDocBuilderDev lewtun

repo: huggingface/trl

license_type: permissive

license_source: github-api


text:
Feat/output m4a

#87
DEMO: https://hughfenghen.github.io/WebAV/demo/2_3-audio-mixin

Released in @webav/av-cliper@0.5.0

repo: hughfenghen/WebAV

license: MIT


text:
Basic Auth for LiquidOutputAgent?

I was thinking about adding some simple basic auth for the LiquidOutputAgent.  Even though the agent has a secret, it's still open.  The agent can create HTML pages, with links, and clicking on those links will include the secret as a referrer.
It's not a big deal, but I was thinking that having the option of adding a simple user/pass might be nice.  I know I'd use it.
Thoughts or concerns before I code it up?  (I'll probably code it up anyway for my own instance :smile: )

Good idea to prevent leaking the secret in the referrer. What do think about adding a Referrer-Policy header to the output? That would secure all Huginn without additional configuration steps.

Adding rel="noreferrer" to every link may be a better bet, as it is getting wide support by major browsers: https://caniuse.com/#feat=rel-noreferrer

Of course, it does not solve the problem but only mitigates the issue.  I guess adding Basic Auth wouldn't be that hard.

@knu The support for basic options (never/origin) of Referrer-Policy looks similar: https://caniuse.com/#feat=referrer-policy
Adding rel to links is fine with me as well, but probably require more work as we would need to parse the generated HTML and modify the links, or did you have something different in your mind?
Assuming we fix leaking the referrer, would adding Basic Auth add additional security? As far as I know both solutions are equally save or unsafe when using HTTPS.

Ah, I just thought rel="noreferrer" should be enough as a user-side workaround because you could insert the attribute to your templates without waiting for us to work on enhancing Huginn, but I just overlooked the response_headers option, so it should be fine either way.

One other story...
Let's say that I'm using Huginn to monitor an application.  The application has an API that allows Huginn to gather all sorts of statistics on specific events.  Huginn monitors the application to look for things that stop happening, or if the numbers suddenly jump or drop.  If there is something of note, Huginn will send texts and emails to various people to warn about a potential problem.
So this Huginn instance has a lot of stats, and let's say that I wanted to use something like vis.js to produce charts.  I can do this with the Huginn agent, but since it would expose some sort of wide-open company data, having some sort of authentication on it might be nice.

Oh, wait, maybe that's it?
We could have a trigger that requires the user to authenticate through Huginn before viewing the page?

When I wrote this agent, I was planning on using it mostly to create some JSON blocks and a simple RSS reader (which is why I was thinking about the referrer, as I'm giving out my secret RSS news page).
But I've been using tools for visualizing data, and I think many are a perfect match for Huginn.  I can use Huginn not just for the data aggregation, but to host the simple charts so I can look at the results in a snappy, styled way.

@dsander With regard to the second question, basic auth credentials can be better than a secret token embedded in the URL when you have multiple third parties to give access to.  You can add, change or revoke credentials for each user.  We could extend the agent to accept multiple secret tokens, but an option to separate auth info from a URL would be nice when your users wouldn't want to change their bookmark every time you update the secret key/password.

having some sort of authentication on it might be nice.

I think from a authentication standpoint a secret or username/password combination are similar.

We could have a trigger that requires the user to authenticate through Huginn before viewing the page?

That could be an option too, but it would only allow the owner of the Agent, right?
How about combining that idea with @knu's use case of having multiple basic auth users? We could authenticate the basic auth user against the Huginn user database. So the output Agent could either use a secret or require basic auth with a allowlist of a subset of the Huginn users (or all of them).

With regard to the second question, basic auth credentials can be better than a secret token embedded in the URL when you have multiple third parties to give access to. You can add, change or revoke credentials for each user.

That is a good point, I always just thought of one secret and one valid username/password combination.

I think multiple authentication "schemes" sound good.  By default, we have "None," but the user could select something like "Huginn Owner" to use Huginn's auth, and check that the person who logs in is the owners.  Then we could have a strategy for "All Huginn owners" which would allow for any Huginn users, and a strategy for "Some Huginn owners" with an allowlist.  And we can include a strategy for "Basic Auth" with a single credential, or a list of credentials.
I'm putting no thought into the strategy names above.... that'd come later.  And they don't have to happen all at once.
I'd recommend starting with the Huginn auth strategies, as Huginn already has authentication and I don't like touching passwords.

So the output Agent could either use a secret or require basic auth with a allowlist of a subset of the Huginn users (or all of them).

Just to be precise... a secret is always required because it is used to form the URL.  For example, if my secret is "news" then the URL I use to access the page would be news.html, news.json, etc.

Just to be precise... a secret is always required because it is used to form the URL. For example, if my secret is "news" then the URL I use to access the page would be news.html, news.json, etc.

Good point, I guess we could change the url to be https://DOMAIN/web_requests/:id.:scheme when using basic auth but that's not really necessary.

and a strategy for "Some Huginn owners" with an allowlist.

I did not remember the Agent was FormConfigurable, at the moment we don't have a way to select multiple values so you either need to add that feature or fall back to the JSON editor.

I love huginn, it's an awesome tool that I've used for years.
I don't know why I had this issue still open... I'm going to close it.

source: gharchive/issue

authors: darrencauthon dsander knu

repo: huginn/huginn

license: mit

license_source: bigquery


text:
Unexpected moving behavior with a lot of markers

Hello there
I'm using this library with dynamic real data from my API to create moving animation markers.
I always request the API and update the marker state (a list of markers) every 10 seconds.
The API would update all the object locations every time I request it.
The object would be motorcycles or cars.
When I tested with only 10 real object data (one object item will be displayed with a marker on the map), the moving animation works as expected.
But when I tested with hundreds (more than 300) of real object data, a lot of markers didn't move as expected. The markers moved unreasonably very fast (around 100 km/second meanwhile the average moving of the object is around 20-30 km/hour).
I'm in Indonesia. The marker could move from the starting point to the finish points I note below (green line) in just a few seconds meanwhile from the west edge to the east edge of the island (blue line) is around 1300 km.

My question is have you tried using this library with hundreds of real data?
I wish I could create you a codesandbox with our real data but it's our confidential data.
Perhaps I could create you a codesandbox with nearly closed data soon.

Hi, the markers dont move with real time, they dont know how may kilometers there are betewen the start and stop points and at what moving speed km/h they are going.
As it is stated on the docs you have to control the time you want the markers to take to move between points.
If you placed the duration fro 1s for all points, they will all take 1s to go to the destination point, it does not matter if they are 5km away or 100km away thats data and calculations you have to make, maybe if you want to always look around same speed, you have to calculate the duration of each with the distance, so :
5km away take 1s
10km away take 2s
so that the points dont run across the country at amazing speed
If something is needed, create a sandbox link with fake data simulating the problem i will try to help

duration
number

Required, duration im miliseconds marker will take to destination point

authors: hugobarragon jaballogian

repo: hugobarragon/react-leaflet-drift-marker


text:
Create sw.toml

Add Swahili translation

Hi, would you mind translating data/search/i18n as well?

Hi, would you mind translating data/search/i18n as well?

Some terms are a bit difficult to translate without context e.g All, {time] etc.

The following image contains the information you need.

All represents all items.
{time} is the variable of search time, leave it as it is.

authors: broughtupsy razonyang

repo: hugomods/search


text:
chore(main): release metamask-testing-tools 1.1.7

:robot: I have created a release beep boop
1.1.7 (2023-09-19)
Bug Fixes

fake user agent and remove flask checks (ba0f86c)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/hugomrdias/filsnap-testing/releases/tag/metamask-testing-tools-v1.1.7 :sunflower:

repo: hugomrdias/filsnap-testing


text:
chore(main): release iso-base 1.0.0

:robot: I have created a release beep boop
1.0.0 (2023-06-22)
⚠ BREAKING CHANGES

base64 no longer matches node (padding)

Features

add, msg, sig, rpc (f574e7b)
base64 no longer matches node (padding) (179ab3d)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/hugomrdias/iso-repo/releases/tag/iso-base-v1.0.0 :sunflower:

repo: hugomrdias/iso-repo


text:
Create data models for schema design (Unit 9)

[x] define objects
[x] define properties of each object
[x] use Parse data types to create model for each object

Resource: https://docs.google.com/presentation/d/1imA6GhGZYWqL5PBbvptfWMtR3nkSmxq295DCujhnIgg/edit#slide=id.g5004d84446_0_19

What objects would our basic Pub Crawl app have?

users
itineraries and/or itinerary items
days? (then each day has a drink count or schedule associated with it?)
locations

What properties would a User model have?

name
location
permissions (who can view their location)?
friends?

What properties would an itinerary item have?

location
start time
end time

What properties would a drink have (in a drink log, say?)

who drank it (user)
what drink it is (type)
how much (quantity)
where I drank it (location)
when I drank it (date/time)

What properties would a location have?

name
address
when it opens
when it closes

Model: User

Property
Type
Description

objectId
String
unique ID for user

username
String
username for login

password
String
password for login

email
String
user's email address

name
String
user's name

Model: Drink

Property
Type
Description

user
Pointer <_User>
which user had the drink

type
String
what kind of drink (beer, wine, etc.)

quantity
Number
how much of that drink was had

location
GeoPoint
where that drink was had

dateDrank
Date
when the drink was had

Model: Schedule

Property
Type
Description

location
GeoPoint
itinerary item: where to be

startTime
Date
when to be at that location

endTime
Date
when to leave that location


text:
New Connector Request: Ethereum Classic Network, ETCswap V3

Description
Description:
1.) Chain Connector: Ethereum Classic, Chain 61. https://chainlist.org/chain/61. Add Chain connector guide
2.) AMM-V3 connector: https://v3.etcswap.org A vanilla fork of Uniswap V3. Add V3 connector guide
The primary goal is connect the ETC/USC markets on ETCswap V3 to the ETC/USD CEX markets via Hummingbot XEMM strategy. This is the foundational DeFi pair for Ethereum Classic.
The secondary goal is to have clear guides that allow novice developers in the Ethereum Classic development community open resources for one of the few decentralized networks in blockchain. This is a perfect open source community that deserves Hummingbot support.
Contact: chris@ethereumclassic.com
Protocol Contract List: https://github.com/etcswap
Bounty

Sponsor: EthereumClassic.com
Bounty amount: 5000 USDC (includes 20% Handling Fee to Hummingbot Foundation)
Developer portion: 4000 USDC

I'll like to work on this

Hey @Myestery, are you working on this? What is the progress?
@chris-mercer, I would like to take it if @Myestery is not working on it. I have some experience working on Uniswap connector: https://github.com/hummingbot/gateway/pull/136.

Hey @VPashkov
Yeah I already started working on it and hope to finish soon.
You'll see the updates as I drop them here

@VPashkov @Myestery hi, we will discuss about this bounty assignment based on developer experience
This not assigned yet.

@nikspz Ok. I hope that @Myestery will be able to finish it since they already started, but I'm ready to pick this up if needed.

Would also offer to take it if needed.

note for the developers. if an RPC endpoint is needed: https://etc.rivet.link is the funded public endpoint. This should be the most stable endpoint for ETC.

I can work on this and get it in asap

Assigned to @vic-en, please be informed:

Since you’re assigned to this bounty exclusively, please keep us informed on your progress over the next few days
Please review and follow contribution guidelines (https://hummingbot.org/developers/contributions/)
Please review the checklist after PR submitted (https://hummingbot.org/developers/contributions/#checklist)
Let us know if you don’t have time, and we will unassigned and keep it open for other devs
Only one dev can be assigned to one bounty

Thanks for your contribution!

Hi @vic-en do you have an expectation of when this bounty will be submitted for code review? Thanks in advance - Chris

@chris-mercer This week. As soon as I'm done testing.

@chris-mercer Pr created

@chris-mercer Pr created

Great I dropped a brief review on naming convention stuff so its clear for the decentralized users on Ethereum Classic. Can you make the edits that make sense. Sorry if some don't, I'm not super familiar with the codebase yet- hence the bounty. :)
Also I made a node of the stable RPC endpoint to use.

NCP Proposal is submitted:
https://snapshot.org/#/hbot-ncp.eth/proposal/0x5face44f80c3c0d3d290da1a6973ec0c030a483023a4647ff91e4339af085770

authors: Myestery VPashkov chris-mercer nikspz p-meier vic-en

repo: hummingbot/hummingbot


text:
(feat) remove sqlite from dependencies

Before submitting this PR, please make sure:

[ ] Your code builds clean without any errors or warnings
[ ] You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:
Remove sqlite from dependencies since it was causing an error in the install and it already comes with Python.
Tests performed by the developer:
Tips for QA testing:

Tests performed:
Clone branch install
Create/start binance_paper_trade pureMM
Reviewed SQLite file do not have permission to open the file (previous development version I had access)

Tests performed:
Created AWS t2.large to test fresh installation.
followed guide from our docs
https://docs.hummingbot.org/installation/linux/#prerequisites
can't reproduce the issue https://github.com/hummingbot/hummingbot/issues/6365 when trying fresh installation

Checked PR on local using papertrade and review SQlite file created and record events (orders created/filled)
Pending test:
Test the PR and check if Sqlite is good for the PR for fresh installation

authors: cardosofede nikspz


text:
Support zip export

I want to add an extension that adds zip and unzip commands to the CommandManager, with the goal of being able to unzip a .zip archive into your fs, and to export your fs to a .zip.  Prior art in:

https://github.com/filerjs/filer/blob/08f4b7e528b8891feec301f549ec9e58a7496304/src/shell/shell.js#L479-608 + https://github.com/Stuk/jszip
https://github.com/humphd/nohost/blob/master/src/webserver.js#L63-L84

The code for zip is in ZipUtils, we just need some UI for when to trigger it.

@flukeout, we need some kind of UX for doing this, the backend is in place.  The basic use case is: "Click here to download a .zip file with all your project files/folders in it."

repo: humphd/brackets


text:
Select component does not show focus ring

Describe the bug
https://www.shadcn-svelte.com/docs/components/select
The select component does not show the focus ring when clicked. Focus via tabbing works.
Reproduction
Go to https://www.shadcn-svelte.com/docs/components/select and click on the component
Logs
No response
System Info
Google Chrome 129

Severity
annoyance

As far as I can tell this follows the same behavior as shadcn-ui with minor differences in the way that focus is handled after selection.
https://ui.shadcn.com/docs/components/select

looks like in next it shows the focus ring (https://next.shadcn-svelte.com/docs/components/select)

Yes, this issue is resolved in next.

authors: demetrius-mp huntabyte ieedan telcy

repo: huntabyte/shadcn-svelte


text:
AlertDialog trigger is not clickable

Current Behavior
I copied the AlertDialog example from the docs and I'm not able to click on the "Show Dialog" button to open the dialog
Expected Behavior
After clicking the "Show Dialog" button, the AlertDialog should appear, but the cursor is unable to reach the button.
Steps To Reproduce

Copy the example code from the docs
Run npm run dev
Click on the Show Dialog button

Link to Reproduction / Stackblitz
No response
More Information
After opening the DevTools, I noticed a fixed div covering the button (and the whole page) and it looks like it's coming from the AlertDialog overlay:

Hey there @leonardodipace , thanks for pointing this out! Please update bits-ui to latest (0.0.33) and this issue should be resolved! Let me know if it isn't!

Updating bits-ui fixed the bug, thanks!

authors: huntabyte leonardodipace


text:
🛑 Pihole is down

In 84199c0, Pihole (https://pihole.craftstudios.eu/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Pihole is back up in c77cc25.

repo: hupratt/upptime


text:
Skip runit installation if already installed

If there is an executable at the desired installation location, we can assume that runit is already installed. Unfortunately, I can't find a way to verify that the correct version is installed, but given that the version isn't configurable via attributes, it seems reasonable that when/if there ever is a new version of runit, this logic can be changed.
I don't know how to test this effectively, give the current minitest-based suite. If you have any thoughts I'd be happy to write some tests.
Cheers!

Is this something that we're ready to merge or is there outstanding tasks or discussion?

@slyness I think the helper methods will be more reliable than simple checking if the executable is installed. I created pull request #89 as a proposal to replace this PR.

Sounds good. I'll close this in favor of #89. Thanks @jtimberman for addressing this.

authors: jtimberman slyness tdooner

repo: hw-cookbooks/runit


text:
Remove request_timeout param from openai requests

OpenAI's completion endpoint doesn't support a request_timeout param. Example stack trace:
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 172, in run
    return self(args[0])[self.output_keys[0]]
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 146, in __call__
    raise e
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 142, in __call__
    outputs = self._call(inputs)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/sql_database/base.py", line 64, in _call
    sql_cmd = llm_chain.predict(**llm_inputs)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/llm.py", line 103, in predict
    return self(kwargs)[self.output_key]
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 146, in __call__
    raise e
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 142, in __call__
    outputs = self._call(inputs)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/llm.py", line 87, in _call
    return self.apply([inputs])[0]
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/llm.py", line 78, in apply
    response = self.generate(input_list)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/chains/llm.py", line 73, in generate
    response = self.llm.generate(prompts, stop=stop)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/llms/base.py", line 81, in generate
    raise e
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/llms/base.py", line 77, in generate
    output = self._generate(prompts, stop=stop)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/langchain/llms/openai.py", line 158, in _generate
    response = self.client.create(prompt=_prompts, **params)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/openai/api_resources/completion.py", line 31, in create
    return super().create(*args, **kwargs)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 100, in create
    response, _, api_key = requestor.request(
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 122, in request
    resp, got_stream = self._interpret_response(result, stream)
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 329, in _interpret_response
    self._interpret_response_line(
  File "/Users/jwang/code/functionalai/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 362, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: Unrecognized request argument supplied: request_timeout

hmmm this works for me
what version of openai are you using? what model are you using?

openai==0.19.0 and davinci-003
Let me give upgrading a try and see if that fixes it. It's odd because I can't find anything about setting timeouts in their API docs either.

Upgrading openai fixes this! Docs must be a bit behind. Closing


text:
Add unit tests for StructuredChatOutputParser and handle variant action format

Description: I added unit tests for StructuredChatOutput Parser (there were none previously). I also noticed in testing with chat-bison that it sometimes produced action output in a slightly different format, so I added an additional regular expression to correctly handle that output format.
Issue: N/A
Dependencies: None
Tag maintainer: @hinthornw
Twitter handle: N/A

This is my first time contributing to a repo that has a Vercel integration. How do I see the output of the automated tests? I created a Vercel account, but clicking on the Details link just takes me to a 404 page.

Tagging @hwchase17 in case I tagged the wrong person originally. Hopefully this is a simple PR to approve - it is mostly just adding unit tests.

@rogerbock Hi , could you, please, resolve the merging issues? After that ping me and I push this PR for the review. Thanks!

@leo-gan I resolved the merge conflicts. Let me know if you need anything else - thanks!

My team is no longer using this class so from my perspective I no longer need this merged, although others may benefit from it. In general, it is probably good to have a more robust parser and unit tests for it, but at this point (seven months after the PR was submitted) someone other than me should resolve the merge conflicts if they consider this worth having in langchain.

No longer relevant

authors: leo-gan nfcampos rogerbock


text:
Adds inferred generic type parameters for prompts

This sets the groundwork for autocomplete in chain inputs, as well as optional chain values etc.

@jacoblee93 I'll review this tomorrow


text:
Random segfaults

Hi,
I've tried to create testing env, but app mostly segfaults at random point.
I have two Aqara LED bulbs, the goal was to control them via mqtt.
Sometimes it start sucessfully, and works as expected, e.g. it reports status from bulbs
mosquitto_sub -t /zigbee-lua/event/Lamp
{"state":1,"bright":255,"temp":370}

and I could get devices via
mosquitto_pub -t /zigbee-lua/devices/get -n
and could control color temp with
mosquitto_pub -t /zigbee-lua/devices/Lamp2/set -m '{ "ctemp": 270}'
Here is an environment file:
local ctx = require"lib.ctx"
local U = require"lib.util"
local D = require"interfaces.zigbee.any"
local json = require"lib.json-lua.json"
local M = ctx.interfaces.mqtt_client[1]

local E = U.object:new()

local devices = ctx.interfaces.zigbee[1].devices:names()
for _,dev in ipairs(devices) do
    E[dev] = D:new{id=dev}
---[[
    E[dev]:on_aqara_report(function (d)
        if d.ReportAttributes then
            local state = { lq = d.linkquality }
            for _, r in ipairs(d.ReportAttributes) do
                if r.AttributeIdentifier == 100 then
                    state.state = r.Attribute.Value
                end
                if r.AttributeIdentifier == 101 then
                    state.bright = r.Attribute.Value
                end
                if r.AttributeIdentifier == 102 then
                    state.temp = r.Attribute.Value
                end
            end
            local ok, msg_json = pcall(json.encode, state)
            if ok then M:publish(string.format("/zigbee-lua/event/%s", dev), msg_json) end
        end
    end)

    M:subscribe(string.format("/zigbee-lua/devices/%s/set", dev))

    ctx.task{function()
        for ok, msg in ctx:wait_all({"mqtt_client", "message"}, function(msg) return msg.topic == string.format("/zigbee-lua/devices/%s/set",dev) end) do
            local ok, t = pcall(json.decode, msg.payload)
            if ok then
                for k,v in pairs(t) do
                    if k == 'ctemp' then E[dev]:ctemp(v)
                    U.DEBUG("env", "payload: %d", v)
                    end
                end
            end
            M:publish(string.format("/zigbee-lua/event/%s", dev), string.format("%s",t.ctemp))
        end
    end}
--]]
end

-- MQTT subscribing: We use this to open the network for joining
M:subscribe("/zigbee-lua/permit_join")
ctx.task{name="mqtt_permit_join",function()
  for ok, msg in ctx:wait_all({"mqtt_client", "message"}, function(msg) return msg.topic == "/zigbee-lua/permit_join" end) do
    U.DEBUG("mqtt_environment", "got permit_join message via MQTT, opening network for devices")
    -- TODO: timeout handling etc
    ctx:fire({"Zigbee","permit_join"},{include={0xfffc}})
  end
end}

---[[
M:subscribe("/zigbee-lua/devices/get")
ctx.task{name="mqtt_list_devices",function()
  for ok, msg in ctx:wait_all({"mqtt_client", "message"}, function(msg) return msg.topic == "/zigbee-lua/devices/get" end) do
    U.DEBUG("mqtt_environment", "got list message via MQTT")

    local ok, msg_json = pcall(json.encode, {type="list", event="devices", data = ctx.interfaces.zigbee[1].devices})
    if ok then M:publish("/zigbee-lua/devices", msg_json) end
  end
end}
--]]
return E

Seems that problem is somewhere in M:subscribe, if I comment out all of them, there are no segfaults anymore.

Yes, I think I'm experiencing the same erratic behaviour. I think I need to have a closer look at integrating the MQTT library with the main event loop. Currently it is using its own thread, which seems to be broken. I guess this is due to callbacks that run in the parallel thread from libmosquitto - and accessing the same Lua state is bound to crash, I guess. I'll look deeper into libmosquitto. I like other aspects of its interface and am not really fond of dumping it and switching to a different, more friendly library...
Thanks for the report! I'm going to investigate - however, probably this will take a few days!

Possibly e2eb62558c09d603639006e99ceeb6c7a1b980c2 does fix this bad behaviour. It is almost completely untested and might in fact not work at all - I just ran a simple test. Will do more testing in a few days.

Unfortunately, it still seems to be missing a bit. It's hitting timeouts related to the MQTT keepalive mechanism here. I think the broker sends a ping that is not answered atm. Will look into it further.

OK, should be fixed in 29c5ab7a3e4a45a1272939097df9545b86d268c0 - it's currently being tested within my production environment, running for about 10-15 minutes without hickups now :-)

Thanks!

BTW, you're the second user (except me) of this code I'm aware of :-) I'm still a bit hesitant to give it any exposure, admittedly - looking in awe at the amount of "end user fallout" in the issues of https://github.com/Koenkk/zigbee2mqtt, I somewhat intentionally kept this code a bit "hacky". It's very interesting to see that you were able to make use of it. Maybe I feel motivated soon to fletch out the documentation a bit more (or rather, start to write it in the first place) :-D I hope you can or could make some use of it. And I'm always interested to hear about similar stuff!
Closing this now since I consider the bug solved - code is running since >24h now here and seems to be quite robust. (JIT enabled! "Broken" JIT was likely caused to broken - since threading - code, too.)

authors: Perlovka hwhw

repo: hwhw/zigbee-lua


text:
Align format for Industrial Edge Pattern to publish on Portfolio Architecture center

Images for proposed changes on industrial edge pattern that aligns the format with the content on Portfolio Architectures

Restored from accident delete. Commits to the format and images that align the Industrial Edge Pattern to Portfolio Architecture Center.

This one has conflicts with the tip of the branch, so can't be merged as is

Thank you @mbaldessari for your response. I've resolved the conflict. Please check it again.

Thanks, merging. I'll fix up the CI failures with a PR on top

authors: mbaldessari rubyyyyang

repo: hybrid-cloud-patterns/docs


text:
hyde gen -r corrupts js file on copy

I'm using Bootstrap 2 for a site. I just recently upgraded to the last 2 version: 2.3.2 and now hyde gen -r corrupts the bootstrap.js file.
To reproduce, add bootstrap.js from http://getbootstrap.com/2.3.2/assets/bootstrap.zip to a hyde project and run hyde gen then hyde gen -r. I get a diff like this:
moorepants@moorepants-2170p:moorepants.info(master)$ diff deploy/media/bootstrap/js/bootstrap.js content/media/bootstrap/js/bootstrap.js
1586c1586
<               && /%24href.position%28%29.top%20%2B%20%28%21%24.isWindow%28self.%24scrollElement.get%280%29%29%20%26%26%20self.%24scrollElement.scrollTop%28%29%29%2C%20href ) || null
---
>               && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null

It only mess up line 1586 for some reason.

@moorepants - Unless excluded, hyde runs templating on all files.  The recommended approach here is to add a meta.yaml file with uses_template: false.
See: https://github.com/hyde/hyde/issues/216

Thanks. I added a meta.yaml file to the directory with the js files and all is well.

authors: lakshmivyas moorepants

repo: hyde/hyde


text:
Invite a bot?

How to invite a bot with discord.js? For example i want to invite a bot (i have permissions) to a server with id 1234, bot id is 127352. How to do this with discordjs

use the Discord Server for questions pls

authors: Dev-Yukine NoahLiedFilmSchool


text:
[REQUEST] Add new site for install (with online)

site: https://freetp.org/
viruses were not found as long as my friends and I downloaded multiplayer fixes from the site
the site has very frequent game updates!
If you add this site, the library of your games will be even more !
Repacks of games on the site are very high quality and do not lag!
I hope you like the idea.

ещкерееее

It usually takes stuff already from online-fix.me, but yeah sometimes there are new things. Overall I think there should be user-directed torrent sources in the launcher

I and my friends are ready to provide sites from which you can take repacks

@TesterHere06

user-directed torrent sources

That's impossible, otherwise you'd just have to manually write code to parsing games and stuff

Пиздец ты конечно англичанин

Пиздец ты конечно англичанин

да я че ебу как пиздеть на пендосятине я через переводчик ебашил

Realistically when will you add freetp.org repacks already?

Реально, когда вы уже добавите репаки freetp.org?

Хз когда разраби время найдут или просто не хотят.

This can be done by the community since version 2.0

Кто-то нашел json файл free-tp?

Я написал разработчику сайта чтобы сделал json файл сайта.

 Я написал разработчику чтобы сделал json файл сайта.

бро а можешь объяснить для чего этот json файл и как его достать

 Я написал разработчику чтобы сделал json файл сайта.

бро а можешь объяснить для чего этот json файл и как его достать

Ну смотри это сборник всего что есть на сайте и у каждого раздела есть своя ссылка, а там просто все отсортировано. Чтобы его найти можешь посмотреть тутор https://ru.stackoverflow.com/q/1173444/600672

 Я написал разработчику чтобы сделал json файл сайта.

бро а можешь объяснить для чего этот json файл и как его достать

Ну смотри это сборник всего что есть на сайте и у каждого раздела есть своя ссылка, а там просто все отсортировано. Чтобы его найти можешь посмотреть тутор https://ru.stackoverflow.com/q/1173444/600672

все понял спасибо

 Я написал разработчику чтобы сделал json файл сайта.

бро а можешь объяснить для чего этот json файл и как его достать

Ну смотри это сборник всего что есть на сайте и у каждого раздела есть своя ссылка, а там просто все отсортировано. Чтобы его найти можешь посмотреть тутор https://ru.stackoverflow.com/q/1173444/600672

и если сможешь получить ссылку на json файл то скинь мне пожалуйста

 Я написал разработчику чтобы сделал json файл сайта.

бро а можешь объяснить для чего этот json файл и как его достать

Ну смотри это сборник всего что есть на сайте и у каждого раздела есть своя ссылка, а там просто все отсортировано. Чтобы его найти можешь посмотреть тутор https://ru.stackoverflow.com/q/1173444/600672

и если сможешь получить ссылку на json файл то скинь мне пожалуйста

Я попробую но ето может сделать только создатель сайта.

repo: hydralauncher/hydra


text:
readme modified

testing on my own copy of repo

testing


text:
Merge pull request #1 from hydropython/Task1

adding Task2

Task 2


text:
Add capability to edit and delete comments

Add capability to delete comments and replies on a resource.  Comments should be deletable by the original commentor and the owner of the resource.  If a comment is deleted, any replies associated with that comment get deleted too.  A user deleting a comment that also deletes replies should be warned that this is the going to happen.  +1 associated with comments or replies deleted, also get deleted.
We could also consider allowing editing of comments, but I am a bit conflicted about whether to allow this as it edits the conversation history.  If someone makes a mistake, they should just delete their comment and write it again, or write a new clarifying comment and reply.

This is kind of a duplicate of #1213, but will keep both open and linked for now. Assigning it to me for now, but may not be able to work on this until other higher priority items get resolved first.

spoke with Hong CUAHSI will take this on

It seems that we need the following functionality
The commentor can delete their own comment
If an owner or anyone else does not like that comment they can not delete it but they can comment back

Related Issue: Report Inappropriate Comments https://github.com/hydroshare/hydroshare/issues/1213

authors: cuahsimarko dtarb hyi

repo: hydroshare/hydroshare


text:
Delete Resource needs to give more context to user

The 'delete resource' tool provides a warning message that tells the user “This will delete any resources you have selected” but gives no other context for the user to know what will happen when he/she confirms the deletion. This can lead to accidental deletion when the user doesn't realize some resources are selected that were not intended to be deleted. (THIS HAS HAPPENED)
It might not make sense to enumerate every resource selected, but this seems serious enough that some information about the number of resources should be given in the warning dialog; perhaps list the first few, followed by “and 4 more resources selected” or whatever the number. The use case here is not about fully describing what’s about to be deleted, but to indicate the size of the selected set, with some identified, so the user has some context for a decision. Right now, there is NO context for a decision, just the red warning box, whether anything’s selected at all.
One other thought is if there’s a way to indicate “this resource is not to be deleted” as a safeguard against accidents like this? ArcGIS Online lets me do that with map and feature services, see attached screenshot.

Additionally, we should consider a "soft delete" as @rayi113 has suggested. This would move resources to a category that hides it from public view on the site, but keeps the resources in a "Deleted" or "Trash" section of the admin, to be purged or preserved as seen fit, or on a timed basis.

Credit to @mjstealey for suggesting the iRODS "soft delete" to me that I passed along.

I agree that we should implement a "soft" delete, but recognize that we probably don't want to make data recovery a daily task.  We should also think about any modifications to the message below that might help prevent accidental deletes.  Below is the current message that's displayed when resources are deleted.

Suggested improvements:

Give an extra warnings if a resource is marked for deletion and:

is public
has multiple owners
has "enhanced" metadata, e.g. coauthors, extended metadata, funding agency, etc.

Add a download copies button in this dialog to encourage users to download a copy of the data they plan to delete.

Do we just need to implement a trash? Stuff in the trash would still count against quota (since we have to keep it on disk), but would be recoverable.

Do we just need to implement a trash? Stuff in the trash would still count against quota (since we have to keep it on disk), but would be recoverable.

1.  Do we just need to implement a trash?
From an iRODS standpoint the concept of a trash already exists, and HydroShare presently avoids it's usage by including the -f or -rf flags when removing a resource via the irm call.

iRODS out of the box has a notion of Zone/home/USERS and Zone/trash/home/USERS
When a resource is removed using irm the resource is moved from the location in Zone/home/USERS to the corresponding location in Zone/trash/home/USERS where it will remain until trash collection is performed via irmtrash or irm -f or irm -rf calls are made on the resource in the trash.
HydroShare presently bypasses the use of a trash by removing resources with the -f or -rf flags. This was a conscious decision and made sense at the time, but review is now needed.

2. Stuff in the trash would still count against quota
This is a decision to be made by the team and could be implemented either way.

If resources in the trash have an expiry date, then the quota issue is somewhat transient based on a rolling window of time.

Implementing a "soft delete"
There are a few elements to keep in mind if this is to be implemented.

How to track deleted but not yet purged items in the Django database
How long to keep deleted resources in the iRODS trash prior to purging them
Define the request to un-delete resource workflow in an easy to maintain way

From iRODS, the trash maintenance can be accomplished via simple rules based on time spent in the trash or more brute force via a periodic script that reaches into the iRODS trash, calculates time of delete, and force remove/purge when resources have reached their expiry.
From Django's point of view I've personally lost track of the moving parts, but would think that some kind of flag could be introduced that tracks a deleted state and removes the resource from any user interaction while retaining the database entry until the resource expires from the trash and is fully purged.
As for the un-delete workflow, you may not want to make that a well known "feature" and only use it when the OMG!!!... my data! requests come in.

Agree with @Castronova 👍 for points that are all immediately actionable in the UI

related to #2743

related to #2743

authors: Castronova aphelionz darctur horsburgh mjstealey rayi113


text:
My Resources Page: Implement Marking Favorite Resources

A user should be able to mark a resource as a favorite. This would make that resource appear in the list of the user's favorite resources.  This should be implemented in two places:

There should be a button on the resource landing page that a user can click to add a resource to their list of favorites
There should be a button at the top of the My Resources page that would add whatever resources are selected in the list to the user's list of favorite resources.

Also, "Favorites" needs to be implemented as a filter in the list on the left of the My Resources Page.

@mauriel133 - "Add to My Resources" and "Add to My Favorites" are not the same action.

"Add to My Resources" is implemented now and I believe has the desired functionality.
"Add to Favorites" would be an additional star button on the resource landing page that would add the resource to My Resources, but would also apply the "Favorite" tag so it would show up when you click on that filter.

We may also need another filter on the My Resources page that enables a user to see everything that they have added to their My Resources list using the "Add to My Resources" mechanism (e.g., resources they don't own, that they don't have editing permissions on, that have not specifically been shared with them, and that are not in their favorites - but that they have for some reason added to their list by clicking on the "Add to My Resources" button).  Right now you can't isolate these - they only show up when you have no filters applied.  If you (or others) agree - I will add this as a separate issue.

@horsburgh @mauriel133 I believe this has been implemented. Can you verify and see if this issue can be closed?

Implemented and working on www.hydroshare.org.  Closing.

authors: horsburgh hyi


text:
4434 message text change for accessing content files

Pull Request Checklist:

[x] Positive Test Case Written by Dev

[ ] Automated Testing

[ ] Sufficient User and Developer Documentation

[ ] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case

Create a resource. Upload a file to the resource.
Add needed metadata to make the resource discoverable
Make the resource discoverable
Logout. Then try to access the resource. On the resource landing page check that you see the following message under the "Content' section:

You do not have permission to see these content files. Please contact an Owner if you wish to obtain access.

METRIC
VALUE

NEW DUPLICATED LINES DENSITY
0.0

NEW CODE SMELLS
0

NEW VULNERABILITIES
0

NEW BUGS
0

NEW SECURITY HOTSPOTS
0

https://sonarqube.cuahsi-workstation.com:9000/dashboard?id=hydroshare-4435

METRIC
VALUE

NEW BUGS
0

NEW VULNERABILITIES
0

NEW CODE SMELLS
0

NEW SECURITY HOTSPOTS
0

https://sonarqube.cuahsi-workstation.com:9000/dashboard?id=hydroshare-4435

authors: hydrocheck pkdash


text:
🛑 Daisy - Whisper is down

In 4e42337, Daisy - Whisper (https://whisper0.hydev.org/health) was down:

HTTP code: 502
Response time: 235 ms

Resolved: Daisy - Whisper is back up in 85ed206 after 5 minutes.

repo: hykilpikonna/Uptime


text:
Optimized code for Hyperf\Codec\Exception\InvalidArgumentException which you can be used to get the origin data.

问题场景：json_encode 的内容有不完整的 utf8 字符时，会导致编码错误。异常中没有具体的数据信息，不方便排查。
添加：设置/获取原始数据的功能
使用方法：
try {
            $originData = '高性能、高灵活性的渐进式 PHP 协程框架';
            Json::encode(substr($originData, 0, 8));
        } catch (JsonInvalidArgumentException $th) {
            var_dump(json_encode($th->getOriginData(), JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE));
        }

添加以上方法后，工程师可以根据自己的情况记录日志，方便快速定位问题

我们内部讨论了下，这个还是用户自己处理吧。
既然都抛出异常了，正常情况下肯定是预先考虑到了，那 try catch 里处理的时候，根本没必要从 exception 里拿数据，直接从上下文拿就可以了。

如果是在常规的业务代码中是比较好处理，如果在 respone 时报错，貌似没有更好的方式，比如从数据库查出来就是乱码的，可能要排查好几个字段才能查到（多张表得到的结果）

try {
            $originData = '高性能、高灵活性的渐进式 PHP 协程框架';
            Json::encode(substr($originData, 0, 8));
        } catch (JsonInvalidArgumentException $th) {
            var_dump(json_encode($originData, JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE));
        }

这样用岂不是也很简单

描述一个例子吧，现在确实无法说服我们大多数人合并这个 pr

AOP 处理也可以

描述一个例子吧，现在确实无法说服我们大多数人合并这个 pr

场景描述：商品详情页有 50 个相关字段，用户打开某一商品时，由于乱码导致返回 json 时 500 错误，异常信息中没有相关的数据信息，排查时只能靠人眼扫描，效率很低。如果能自定义 json 的参数也能比较友好的解决这个问题，如:
$this->response->json($data,JSON_xxx)

好吧，现在这个情况，确实可以你自己处理下就能解决的

如果你使用的官方 json 方法，肯定会走到上面的方法，所以你实际上自己在外层 try catch 如果有问题，直接可以拿到 上面的 data 而非从 异常里来拿了。
$this->response->json($data,JSON_xxx)

当然，正常情况下，你肯定这个方法要进行封装的，类似这里
https://github.com/hyperf/biz-skeleton/blob/master/app/Kernel/Http/Response.php#L34
只需要这里处理一下就行了。

好吧，现在这个情况，确实可以你自己处理下就能解决的

如果你使用的官方 json 方法，肯定会走到上面的方法，所以你实际上自己在外层 try catch 如果有问题，直接可以拿到 上面的 data 而非从 异常里来拿了。
$this->response->json($data,JSON_xxx)

当然，正常情况下，你肯定这个方法要进行封装的，类似这里
https://github.com/hyperf/biz-skeleton/blob/master/app/Kernel/Http/Response.php#L34
只需要这里处理一下就行了。

好的，我试试，谢大佬

这个 pr 不用关，先放着，是个后来可期的功能，但是暂时有点鸡肋

以下是 laravle 中的写法，感觉支持传参是比较好的方式
return response()->json(['status' => 1, 'msg' => substr('我是高性能、高灵活性的渐进式 PHP 协程框架',0, 4)], 200,[],JSON_INVALID_UTF8_SUBSTITUTE);

要学会变通啊。。
    public function json($data): PsrResponseInterface
    {
        $data = $this->toJson($data);
        return $this->getResponse()
            ->addHeader('content-type', 'application/json; charset=utf-8')
            ->setBody(new SwooleStream($data));
    }

你大可以封装一个方法来用啊，不一定非要用官方封装的

要学会变通啊。。
    public function json($data): PsrResponseInterface
    {
        $data = $this->toJson($data);
        return $this->getResponse()
            ->addHeader('content-type', 'application/json; charset=utf-8')
            ->setBody(new SwooleStream($data));
    }

你大可以封装一个方法来用啊，不一定非要用官方封装的

是可以，但感觉是在重复造轮子，哈哈只

不重复，Hyperf 主打的就是灵活高效高性能，这符合框架的设计理念。

authors: greezen huangdijia limingxinleo

repo: hyperf/hyperf


text:
fix:修复注解方式会在非消费环境下自动投递消息到队列问题

翻了下代码
是AnnotationJob调用之前在当前上下文写入了个bool值区别是否AnnotationJob环境
判断之后把bool值改回去可以解决重新投递的延迟任务立即执行问题

自己测试测试再说，多投递几个消息看看

我简单跑过一下的 貌似是对的 不知道有没有特殊协程切换导致问题

想了下,如果执行中切换到新任务应该会有问题,草率了


text:
需要依赖相关组件,文档完善下吧

缺少 psr/log 组件
如果需要 consul 还需要 hyperf/consul
一开始我还以为默认依赖安装了相关的组建

这组件都是可选，都写在suggest里了

这组件都是可选，都写在suggest里了

repo: hyperf/jet


text:
Cannot use custom settings for USB capture when using multiple LED Instances

[x] I confirm that this is an issue rather than a question.

Bug report
Steps to reproduce
Configure two LED Instances
What is expected?
Use the custom settings for USB capture for each LED instance.
What is actually happening?
When I had a single LED instance running I was able to choose which capture device along with the ability to change all settings.  I can still do this, but only one of the two LED instances will work.  If I change both instances back to "Automatic"  everything works as expected except I can't make custom changes.  I've been dropping the resolution down to 320x240 to speed things up along with limiting flickering (Not using smoothing as it's not what I want to do).  I even noticed that when I added the second LED instance, my custom changes from the first instance were changed to automatic for the USB capture.
Running two "WLED devices over IP" with a "UVC Camera (534d:2109): FY HD v"  camera.
Is this by design?  If so, please close this out with a note.
System
Hyperion Server:

Build:           (HEAD detached at 83338dc3) (Paulchen Panther-ca50487e/83338dc3-1605733041)
Build time:      Nov 18 2020 21:32:08
Git Remote:      https://github.com/hyperion-project/hyperion.ng
Version:         2.0.0-alpha.9
UI Lang:         auto (BrowserLang: en-US)
UI Access:       expert
Avail Capt:      dispmanx,v4l2,framebuffer,qt
Database:        read/write

Hyperion Server OS:

Distribution:   HyperBian GNU/Linux 10 (buster)
Architecture:   arm
CPU Model:      ARMv7 Processor rev 3 (v7l)
CPU Type:       Raspberry Pi 400 Rev 1.0
CPU Revision:   c03130
CPU Hardware:   BCM2711
Kernel:         linux (5.4.72-v7l+ (WS: 32))
Qt Version:     5.7.1
Python Version: 3.5.3
Browser:        Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

That still seems to be a problem in the database / WebUI. Thank you for your feedback

Kept hacking on it for a bit.  Found that if I set the capture device to custom and set the device manually to "/dev/video0" for both LED instances, everything works as expected.  So only seeing the issue when selecting the video capture device directly.

authors: Paulchen-Panther billroemhild