AWQ models not loading

System Info
When launching with an AWQ model with the latest tag TGI crashes
System ENV output:
OS version info:
Linux version 6.1.55-1-lts (linux-lts@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #1 SMP PREEMPT_DYNAMIC Sat, 23 Sep 2023 16:57:15 +0000
2023-09-25T20:40:10.483833Z  INFO text_generation_launcher: Runtime environment:
Target: x86_64-unknown-linux-gnu
Cargo version: 1.70.0
Commit sha: c5de7cd88679bc0331185c9cee75e4f68412243d
Docker label: sha-c5de7cd
nvidia-smi:
Mon Sep 25 20:40:10 2023
   +---------------------------------------------------------------------------------------+
   | NVIDIA-SMI 535.113.01             Driver Version: 535.113.01   CUDA Version: 12.2     |
   |-----------------------------------------+----------------------+----------------------+
   | 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 RTX 3090        Off | 00000000:27:00.0 Off |                  N/A |
   |  0%   23C    P8               7W / 420W |      5MiB / 24576MiB |      0%      Default |
   |                                         |                      |                  N/A |
   +-----------------------------------------+----------------------+----------------------+
   |   1  NVIDIA GeForce RTX 3090        Off | 00000000:28:00.0 Off |                  N/A |
   |  0%   26C    P8              34W / 370W |      2MiB / 24576MiB |      0%      Default |
   |                                         |                      |                  N/A |
   +-----------------------------------------+----------------------+----------------------+

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

Launch parameters:
docker run --gpus all --shm-size 1g -p 8085:80 -e HF_HUB_ENABLE_HF_TRANSFER=1 -e HUGGING_FACE_HUB_TOKEN= -v ssdStorage/docker/STATIC/tgi-data:/data ghcr.io/huggingface/text-generation-inference:latest --model-id TheBloke/Llama-2-70B-AWQ --quantize awq  --num-shard 2 --max-input-length 3584 --max-total-tokens 4096
Error after launching:
2023-09-25T20:34:02.974103Z  INFO text_generation_launcher: Args { model_id: "TheBloke/Llama-2-70B-AWQ", revision: None, validation_workers: 2, sharded: None, num_shard: Some(2), quantize: Some(Awq), dtype: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_top_n_tokens: 5, max_input_length: 3584, max_total_tokens: 4096, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: None, max_waiting_tokens: 20, hostname: "d71d6ffe8981", 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, cuda_memory_fraction: 1.0, rope_scaling: None, rope_factor: None, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, ngrok: false, ngrok_authtoken: None, ngrok_edge: None, env: false }
2023-09-25T20:34:02.974145Z  INFO text_generation_launcher: Sharding model on 2 processes
2023-09-25T20:34:02.974320Z  INFO download: text_generation_launcher: Starting download process.
2023-09-25T20:34:05.099936Z  INFO text_generation_launcher: Files are already present on the host. Skipping download.

2023-09-25T20:34:05.377123Z  INFO download: text_generation_launcher: Successfully downloaded weights.
2023-09-25T20:34:05.377401Z  INFO shard-manager: text_generation_launcher: Starting shard rank=1
2023-09-25T20:34:05.377403Z  INFO shard-manager: text_generation_launcher: Starting shard rank=0
2023-09-25T20:34:08.171845Z ERROR 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 1157, 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 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 783, 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 82, in serve
    server.serve(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 195, 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 147, in serve_inner
    model = get_model(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 187, in get_model
    return FlashLlama(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_llama.py", line 68, in __init__
    model = FlashLlamaForCausalLM(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 474, in __init__
    self.model = FlashLlamaModel(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 412, in __init__
    [
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 413, in <listcomp>
    FlashLlamaLayer(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 349, in __init__
    self.self_attn = FlashLlamaAttention(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 229, in __init__
    self.query_key_value = load_attention(config, prefix, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 154, in load_attention
    return _load_gqa(config, prefix, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 183, in _load_gqa
    weight = weight.to(dtype=weights.dtype).to(device=weights.device)
AttributeError: 'tuple' object has no attribute 'to'

2023-09-25T20:34:08.315602Z ERROR 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 1157, 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 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 783, 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 82, in serve
    server.serve(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 195, 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 147, in serve_inner
    model = get_model(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 187, in get_model
    return FlashLlama(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_llama.py", line 68, in __init__
    model = FlashLlamaForCausalLM(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 474, in __init__
    self.model = FlashLlamaModel(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 412, in __init__
    [
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 413, in <listcomp>
    FlashLlamaLayer(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 349, in __init__
    self.self_attn = FlashLlamaAttention(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 229, in __init__
    self.query_key_value = load_attention(config, prefix, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 154, in load_attention
    return _load_gqa(config, prefix, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 183, in _load_gqa
    weight = weight.to(dtype=weights.dtype).to(device=weights.device)
AttributeError: 'tuple' object has no attribute 'to'

2023-09-25T20:34:08.581202Z ERROR shard-manager: text_generation_launcher: Shard complete standard error output:

[W socket.cpp:426] [c10d] The server socket cannot be initialized on [::]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
You are using a model of type llama 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 82, in serve
    server.serve(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 195, 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 147, in serve_inner
    model = get_model(

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

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

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 474, in __init__
    self.model = FlashLlamaModel(config, weights)

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

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 413, in <listcomp>
    FlashLlamaLayer(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 349, in __init__
    self.self_attn = FlashLlamaAttention(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 229, in __init__
    self.query_key_value = load_attention(config, prefix, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 154, in load_attention
    return _load_gqa(config, prefix, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 183, in _load_gqa
    weight = weight.to(dtype=weights.dtype).to(device=weights.device)

AttributeError: 'tuple' object has no attribute 'to'
 rank=0
2023-09-25T20:34:08.680899Z ERROR text_generation_launcher: Shard 0 failed to start
2023-09-25T20:34:08.680914Z  INFO text_generation_launcher: Shutting down shards
2023-09-25T20:34:08.681213Z ERROR shard-manager: text_generation_launcher: Shard complete standard error output:

[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost.localdomain]:29500 (errno: 97 - Address family not supported by protocol).
You are using a model of type llama 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 82, in serve
    server.serve(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 195, 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 147, in serve_inner
    model = get_model(

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

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

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 474, in __init__
    self.model = FlashLlamaModel(config, weights)

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

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 413, in <listcomp>
    FlashLlamaLayer(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 349, in __init__
    self.self_attn = FlashLlamaAttention(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 229, in __init__
    self.query_key_value = load_attention(config, prefix, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 154, in load_attention
    return _load_gqa(config, prefix, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 183, in _load_gqa
    weight = weight.to(dtype=weights.dtype).to(device=weights.device)

AttributeError: 'tuple' object has no attribute 'to'
 rank=1
Error: ShardCannotStart

Information

[X] Docker
[ ] The CLI directly

Tasks

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

Reproduction
Steps to reproduce:

with the latest tag docker container as of 25/09/2023 at 20:45 UTC launch with any AWQ model

Expected behavior
Model launches and is ready for batch inferencing.

Thanks @HarmonyTechLabs for reporting this. Another user @RonanKMcGovern also reported issues with Llama 2 70B. Please note I was able to load Llama 2 7B successfully.
Llama 2 34B onwards implement GQA (grouped query attention), so could be related to that.
Can you try loading 34B and report here?
Thanks.

Sure thing! I had a thought, could this be an issue with sharding 70b across two cards? I'll go test 34b right now.

@abhinavkulkarni, no luck with 34b code llama. Here is the output. Please let me know if you'd like me to test anything further. More than happy to lend my hardware for testing!
2023-09-26T05:42:22.357111Z  INFO text_generation_launcher: Args { model_id: "TheBloke/CodeLlama-34B-Instruct-AWQ", revision: None, validation_workers: 2, sharded: None, num_shard: None, quantize: Some(BitsandbytesNF4), dtype: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_top_n_tokens: 5, max_input_length: 3584, max_total_tokens: 4096, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: None, max_waiting_tokens: 20, hostname: "6014ac3a1c4b", 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, cuda_memory_fraction: 1.0, rope_scaling: None, rope_factor: None, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, ngrok: false, ngrok_authtoken: None, ngrok_edge: None, env: false }
2023-09-26T05:42:22.357317Z  INFO download: text_generation_launcher: Starting download process.
2023-09-26T05:42:24.749317Z  INFO text_generation_launcher: Download file: model-00001-of-00002.safetensors

2023-09-26T05:43:50.058299Z  INFO text_generation_launcher: Downloaded /data/models--TheBloke--CodeLlama-34B-Instruct-AWQ/snapshots/9f2e460ded6babaee180853dea1d04cff2882128/model-00001-of-00002.safetensors in 0:01:25.

2023-09-26T05:43:50.058408Z  INFO text_generation_launcher: Download: [1/2] -- ETA: 0:01:25

2023-09-26T05:43:50.058809Z  INFO text_generation_launcher: Download file: model-00002-of-00002.safetensors

2023-09-26T05:45:01.701470Z ERROR text_generation_launcher: An error occurred while downloading using `hf_transfer`. Consider disabling HF_HUB_ENABLE_HF_TRANSFER for better error handling.

2023-09-26T05:45:01.701499Z  INFO text_generation_launcher: Retrying in 5 seconds

2023-09-26T05:45:06.705947Z  INFO text_generation_launcher: Retry 1/4

2023-09-26T05:45:06.706000Z  INFO text_generation_launcher: Download file: model-00002-of-00002.safetensors

2023-09-26T05:46:18.480839Z  INFO text_generation_launcher: Downloaded /data/models--TheBloke--CodeLlama-34B-Instruct-AWQ/snapshots/9f2e460ded6babaee180853dea1d04cff2882128/model-00002-of-00002.safetensors in 0:01:11.

2023-09-26T05:46:18.482879Z  INFO text_generation_launcher: Download: [2/2] -- ETA: 0

2023-09-26T05:46:18.899143Z  INFO download: text_generation_launcher: Successfully downloaded weights.
2023-09-26T05:46:18.899692Z  INFO shard-manager: text_generation_launcher: Starting shard rank=0
2023-09-26T05:46:22.283146Z ERROR 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 1157, 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 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 783, 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 82, in serve
    server.serve(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 195, 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 147, in serve_inner
    model = get_model(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 187, in get_model
    return FlashLlama(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_llama.py", line 68, in __init__
    model = FlashLlamaForCausalLM(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 474, in __init__
    self.model = FlashLlamaModel(config, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 412, in __init__
    [
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 413, in <listcomp>
    FlashLlamaLayer(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 349, in __init__
    self.self_attn = FlashLlamaAttention(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 229, in __init__
    self.query_key_value = load_attention(config, prefix, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 154, in load_attention
    return _load_gqa(config, prefix, weights)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 176, in _load_gqa
    weight = weights.get_multi_weights_col(
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 205, 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 205, 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 103, in get_sharded
    filename, tensor_name = self.get_filename(tensor_name)
  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 53, in get_filename
    raise RuntimeError(f"weight {tensor_name} does not exist")
RuntimeError: weight model.layers.0.self_attn.q_proj.weight does not exist

2023-09-26T05:46:22.602795Z ERROR shard-manager: text_generation_launcher: Shard complete standard error output:

The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization.
The tokenizer class you load from this checkpoint is 'CodeLlamaTokenizer'.
The class this function is called from is 'LlamaTokenizer'.
You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. If you see this, DO NOT PANIC! This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=True`. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
You are using a model of type llama 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 82, in serve
    server.serve(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 195, 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 147, in serve_inner
    model = get_model(

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

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

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 474, in __init__
    self.model = FlashLlamaModel(config, weights)

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

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 413, in <listcomp>
    FlashLlamaLayer(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 349, in __init__
    self.self_attn = FlashLlamaAttention(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 229, in __init__
    self.query_key_value = load_attention(config, prefix, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 154, in load_attention
    return _load_gqa(config, prefix, weights)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py", line 176, in _load_gqa
    weight = weights.get_multi_weights_col(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 205, 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 205, 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 103, in get_sharded
    filename, tensor_name = self.get_filename(tensor_name)

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 53, in get_filename
    raise RuntimeError(f"weight {tensor_name} does not exist")

RuntimeError: weight model.layers.0.self_attn.q_proj.weight does not exist
 rank=0
Error: ShardCannotStart
2023-09-26T05:46:22.702485Z ERROR text_generation_launcher: Shard 0 failed to start
2023-09-26T05:46:22.702503Z  INFO text_generation_launcher: Shutting down shards

Thanks for reporting, indeed, 70b uses a different loading flow because of GQA, just fixed it.


[no-unused-prop-types] False warning when used in external function

When a prop is not directly use in the class, but outside of it in an external function, the linter shows a warning.
Here's an example:
const propTypes = {
    testProp: PropTypes.string,
    content: PropTypes.string,
};

function initState(props) {
    return {
        className: `yolo-${props.testProp}`,
    };
}

export default class Test extends React.PureComponent {
    constructor(props) {
        super(props);
        this.state = initState(props);
    }

    render() {
        return
{this.props.content}
;
    }

}
Test.propTypes = propTypes;

It also sometimes happen when it's used in an instance function. Will try to get a small example

Before I look into fixing this, out of curiosity, why are you using this pattern for PropType declaration? Why a separate propTypes constant? It's only used in once place.
I worry about how deep we'll have to scan for props variable re-declarations to properly account for this. For example, you could also theoretically write this code:
const propTypes = {something: PropTypes.string);
const nestedPropTypes = propTypes;
MyComponent.propTypes = nestedPropTypes;

Checking for this would require making several hops across multiple variables to detect where the prop types are actually defined.

I like to keep my proptypes at the top of the file

@EvNaverniouk this is how all of our propTypes are defined at airbnb, and in fact is in our styleguide, because propTypes should be at the top of the file since they're important for documentation.

Fair enough. I'll see what can be done here.

The same for nested function. In this example
const Comp = (props) => {
    const loadTerm = (type, projectId) => props.termProcessor.getTerm(type, projectId);

    const terms = props.terms
        .map(({type, projectId}) => loadTerm(type, projectId))
        .join(' ');

    return {terms};
};

Comp.propTypes = {
    termProcessor: React.PropTypes.object.isRequired,
    terms: React.PropTypes.arrayOf(React.PropTypes.shape({
        type: React.PropTypes.string.isRequired,
        projectId: React.PropTypes.number
    })).isRequired
};

termProcessor is marked as unused, while in this example not:
const Comp = (props) => {
    const loadTerm = (type, projectId) => props.termProcessor.getTerm(type, projectId);

    const terms = props.terms
        .map(loadTerm)
        .join(' ');

    return {terms};
};

Comp.propTypes = {
    termProcessor: React.PropTypes.object.isRequired,
    terms: React.PropTypes.arrayOf(React.PropTypes.shape({
        type: React.PropTypes.string.isRequired,
        projectId: React.PropTypes.number
    })).isRequired
};

Similarly, here url is marked as unused.
class PhotoList extends React.Component {
  static propTypes = {
    photos: React.PropTypes.arrayOf(React.PropTypes.shape({
      id: React.PropTypes.number,
      url: React.PropTypes.string,
      caption: React.PropTypes.string,
    })),
  }

  render = () => (

      {this.props.photos.map(photo =>
{photo.url}
)}

  )
}

And here, "id" and "onSelectIndex" is marked as unused.

import React from 'react';
import styles from './styles.css';
function PlaylistItem(props) {
const onClick = () => {
props.onSelectIndex(props.id);
};
const className = () => {
if (props.loadedA) return styles.playlistItemLoadedA;
if (props.loadedB) return styles.playlistItemLoadedB;
return styles.playlistItem;
};
return (

{props.item.time}

{props.item.artist}
{props.item.title} { props.item.version ? ({props.item.version}) : null }

);
}
PlaylistItem.propTypes = {
item: React.PropTypes.object,
loadedA: React.PropTypes.bool,
loadedB: React.PropTypes.bool,
id: React.PropTypes.number,
onSelectIndex: React.PropTypes.func,
};
export default PlaylistItem;

Any update on this issue? @yannickcr Do you think there's an easy fix that could be done, or it's actually quite hard to know when a prop is used in a function outside of the component?

Hello, Could we allow an option like: skipWithExternalFunction: true
Would pass:
static getSomeValue (props) {
  return //
}

render () {
  const someValue = MyClass.getSomeValue(this.props)
  // fine because there is function where the argument is the entire prop object
}

MyClass.propTypes = {
  prop1: React.PropTypes.number,
  prop2: React.PropTypes.bool,
  ...
};

Would not pass:
render () {
  return
{this.props.prop1}

  // fail because prop2 isn't used.
}

MyClass.propTypes = {
  prop1: React.PropTypes.number,
  prop2: React.PropTypes.bool,
  ...
};

Caveat:
I don't know how far the code can be analysed. The only issue with this approach is that if might
have false negative. The external function might not be consuming all the props. But the point is
having some compromise until the "perfect" solution comes in.

@AoDev it can't be analyzed across files; separately, passing the props object around is a huge antipattern. The proper solution is to destructure everything you need, and pass it in to your functions explicitly.

"huge anti pattern" feels pretty exaggerated. I don't want to destructure and recreate possibly thousands of objects just because I have a static helper function created for the sake of code clarity.  I could just move everything in the render function and it would be super bloated.

@AoDev how many props does getSomeValue really need to use? You can also pass the props you need as normal arguments, instead of having to pass an object.

@ljharb
Can be up to 5 - 6 arguments.
Note that this does not happen often. It's rare that such helper functions are needed. But the goal is to avoid disabling this eslint rule or making some work-around.
This is only for sake of code clarity in some particular case.
It is more readable and I wanted to avoid caring about the order of the arguments.
A real code example in one component I have, is for a scrollable listview:
(render is more complex in actual code)
static getStickAtBottomStyle({ headerIndex, height, scrollbarWidth, headersCount }) {
  return {
    position: 'absolute',
    bottom: `${(headersCount - 1 - headerIndex) * height}px`,
    width: `calc(100% - ${scrollbarWidth}px)`
  };
}

...

render () {
  ...
  {stickyState.isStickyAtBottom &&

      {this.props.children}

  }
  ...
}

Reasons for splitting in a function:

can be unit tested easily
clearer to read than putting the computations in render.

I agree with you that I could pass the arguments in order but sometimes there are bit too many.
On the other hand, these examples are almost the same ones in the docs about SFC. That's how I reached this issue in the first place ;)

Note that I am trying to use the props in a static method of the same component class. Not some function in another module and / or another file.

Is this issue still accepted? It appears that this case, passing entire props as an argument, is an anti-pattern and is hard to implement, so I am inclined to be -1 on this. There are rejected duplicates https://github.com/yannickcr/eslint-plugin-react/issues/1135 https://github.com/yannickcr/eslint-plugin-react/issues/2155 .

@golopot the OP seems to be about both that and having propTypes defined as a variable and then later assigned. Does the latter already work?

Yes that works https://github.com/yannickcr/eslint-plugin-react/commit/712244f88adab974e8685412643ceab07cd5bfa6


Licenses error in the last new version

I was installing the Python plugin then later the program show me an error message whit all the license

I'll take a look then,I'll  transfer this back

Looks like the extension wasn't installed properly or the like.

That is not the location where extensions install. That license is the core VS Code license, this has nothing to do with python extensions. It could be that while installing the extension Core looked at the license.


Exception in read: invalid string character \U

Describe the bug
When I press Ctrl+Enter, the following error occurs:
Exception in read: invalid string character \U
Exception: variable sersomenlDesktopchez-playgroundsample1.scm is not bound
Exception: variable λ> is not bound
Exception in read: unexpected end-of-file reading string

To Reproduce
Steps to reproduce the behavior:

I added C:\Program Files\Chez Scheme 9.5.8\bin\ta6nt to the user environment variable PATH.
Then I created a folder named "chez-playground" in C:\Users\omenl\Desktop.
In this folder, I created a file named sample1.scm and put the following code in it.(define (fact n)
    (cond
        [(< n 1) "error"]
        [(= n 1) 1]
        [else (* n (fact (sub1 n)))]))

(define (fact-iter n)
    (define (iter cnt acc)
        (if (= cnt 1)
        acc
        (iter (sub1 cnt) (* cnt acc))))

    (cond
        [(< n 1) "error"]
        [else (iter n 1)]))

Place the mouse cursor at the end of the fifth line and press Ctrl+Enter.
This error occurred.

Expected behavior
Eval s-expression left of the cursor.
Screenshots

Logs
Chez Scheme REPL starting.
Registered all commands
Extension startup finished.
Sent
    [else (* n (fact (sub1 n)))])) to REPL using command chezScheme.evalLastSexp

Environment (please complete the following information):

Version of the extension: v0.1.0
Version of VS Code: 1.79.2
OS: Windows 11 22H2

Additional context
After trying the aforementioned steps, I created a new folder called .vscode within the directory and added a file named .settings.json inside it. In this file, I set the value of chezScheme.schemePath to C:\\Program Files\\Chez Scheme 9.5.8\\bin\\ta6nt. But the error still occurs.

Hi and thank you very much for your bug report.
I see. What is happening here is that I'm loading the source file using something like
(load "C:\Users\omenl\Desktop")

and Chez thinks the \U is a non-existing escape sequence. I'm adding escaping of backslashes in file paths to the extension as soon as possible, I should be able to publish a new version today (until 00:00 CEST).
As a temporary workaround you can send the whole file to the interactive REPL by using a right click in the source file or the tab of the source file and selecting Chez Scheme REPL: Send the whole current file to the REPL or using the command Chez Scheme REPL: Send the whole current file to the REPL.

The new version 0.2.0 should fix this.
Could you please check if the error has gone away? I do not have Windows myself and can't test it.
Download links:
VS Marketplace
Open VSX Marketplace
latest release at GitHub

Thank you! This error has been resolved.

Glad to hear, and thank you for your help!


handle the scenario where strategies are empty

Checklist

[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Is there an existing issue for this PR?

Fix #81

[x] Have the files been linted and formatted?
[ ] Have the docs been updated to match the changes in the PR?
[ ] Have the tests been updated to match the changes in the PR?
[ ] Attached videos/screenshots demonstrating the fix/feature.
[x] Have you run the tests locally to confirm they pass?

Changes
Return early if there are no strategies at all.
How does this PR fix the problem?
Return early if there are no strategies.

I hope you are fine.
What does it mean that the package does not execute startListenUserConsent when there is no Android platform and throws an error? Does this mean that these parts are not needed in iOS? So this package does not work for ios?


Replace kubeconfig file for each fresh start of crc

Fixes: Issue #2432
Solution/Idea
This patch tries to implement a KCS article about replacing the
kubeconfig file which generated during installation time.

https://access.redhat.com/solutions/6054981

Proposed changes
No changes from ux side.
Testing
This patch make sure once the cluster is provisioned then old kubeconfig file which is part of bundle metadata should be outdated.
$ crc start
$ oc --kubeconfig=$HOME/.crc/cache/<bundle_location>/kubeconfig whoami
error: You must be logged in to the server (Unauthorized)

Does it change crc start duration ? Does it trigger a resync of all operators ?

/retest this please

/retest

Does it change crc start duration ? Does it trigger a resync of all operators ?

@praveenkumar these questions from Guillaume are still pending.

$ go test ./pkg/crc/machine/
--- FAIL: TestCleanKubeconfig (0.00s)
    kubeconfig_test.go:53:
        	Error Trace:	kubeconfig_test.go:53
        	Error:      	Not equal:
        	            	expected: map[string]interface {}{"apiVersion":"v1", "clusters":[]interface {}{map[string]interface {}{"cluster":map[string]interface {}{"certificate-authority-data":"ZW1wdHkK", "server":"https://<IP_ADDRESS>:8443"}, "name":"192-168-42-71:8443"}, map[string]interface {}{"cluster":map[string]interface {}{"certificate-authority-data":"ZW1wdHkK", "server":"https://<IP_ADDRESS>:33407"}, "name":"kind-reference"}}, "contexts":[]interface {}{map[string]interface {}{"context":map[string]interface {}{"cluster":"kind-reference", "user":"kind-reference"}, "name":"kind-reference"}, map[string]interface {}{"context":map[string]interface {}{"cluster":"192-168-42-71:8443", "namespace":"myproject", "user":"developer/192-168-42-71:8443"}, "name":"minishift"}}, "current-context":"", "kind":"Config", "preferences":map[string]interface {}{}, "users":[]interface {}{map[string]interface {}{"name":"developer/192-168-42-71:8443", "user":map[string]interface {}{"token":"token2"}}, map[string]interface {}{"name":"developer/api-crc-testing:6443", "user":map[string]interface {}{"token":"token3"}}, map[string]interface {}{"name":"kind-reference", "user":map[string]interface {}{"client-certificate-data":"ZW1wdHkK", "client-key-data":"ZW1wdHkK"}}}}
        	            	actual  : map[string]interface {}{"apiVersion":"v1", "clusters":[]interface {}{map[string]interface {}{"cluster":map[string]interface {}{"certificate-authority-data":"ZW1wdHkK", "server":"https://<IP_ADDRESS>:8443"}, "name":"192-168-42-71:8443"}, map[string]interface {}{"cluster":map[string]interface {}{"certificate-authority-data":"ZW1wdHkK", "server":"https://<IP_ADDRESS>:33407"}, "name":"kind-reference"}}, "contexts":[]interface {}{map[string]interface {}{"context":map[string]interface {}{"cluster":"kind-reference", "user":"kind-reference"}, "name":"kind-reference"}, map[string]interface {}{"context":map[string]interface {}{"cluster":"192-168-42-71:8443", "namespace":"myproject", "user":"developer/192-168-42-71:8443"}, "name":"minishift"}}, "current-context":"", "kind":"Config", "preferences":map[string]interface {}{}, "users":[]interface {}{map[string]interface {}{"name":"admin", "user":map[string]interface {}{"client-certificate-data":"ZW1wdHkK", "client-key-data":"ZW1wdHkK"}}, map[string]interface {}{"name":"developer/192-168-42-71:8443", "user":map[string]interface {}{"token":"token2"}}, map[string]interface {}{"name":"developer/api-crc-testing:6443", "user":map[string]interface {}{"token":"token3"}}, map[string]interface {}{"name":"kind-reference", "user":map[string]interface {}{"client-certificate-data":"ZW1wdHkK", "client-key-data":"ZW1wdHkK"}}}}

        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -39,3 +39,10 @@
        	            	  },
        	            	- (string) (len=5) "users": ([]interface {}) (len=3) {
        	            	+ (string) (len=5) "users": ([]interface {}) (len=4) {
        	            	+  (map[string]interface {}) (len=2) {
        	            	+   (string) (len=4) "name": (string) (len=5) "admin",
        	            	+   (string) (len=4) "user": (map[string]interface {}) (len=2) {
        	            	+    (string) (len=23) "client-certificate-data": (string) (len=8) "ZW1wdHkK",
        	            	+    (string) (len=15) "client-key-data": (string) (len=8) "ZW1wdHkK"
        	            	+   }
        	            	+  },
        	            	   (map[string]interface {}) (len=2) {
        	Test:       	TestCleanKubeconfig

Does it change crc start duration ? Does it trigger a resync of all operators ?

@guillaumerose As per my testing it doesn't change much on crc start side. It resync the kube-apiserver and that's the reason I do it just before we start waiting for cluster to comeup.

retest this please.


Need Logo?

Hi, I am a graphic designer and I make free contributions of logo to open source app, I would like to help and build a representative logo for this platform as interesting as it is Koel. let me know your concerns and if you are interested in accepting this proposal.

Thanks, but I'm happy with the current logo :)


Support for RMQ Topic Exchanges?

Hi - I was wondering if there is a way to create a topic exchange in RMQ. By default, the RMQ Messaging Gateway creates a direct exchange. Looking through the code a bit, I can see that there is a property called "Type" in RMQMessagingGatewayConfigurationSection that appears to be relevant, but it doesn't seem to be used when an exchange is created/configured in MessageGatewayHelper. Thanks!

Does look like Type configuration attribute gets ignored: https://github.com/iancooper/Paramore/blob/3d3c604d9ad9aeb1a44accbff00fc5399c5a7871/Brighter/paramore.brighter.commandprocessor.messaginggateway.rmq/MessageGatewayHelper.cs#L42


Adds lint-build-test badge to readme

New badge appears to be properly formed, if showing no-status message. I'm assuming the no-status is a product of this badge being hooked to qiime2/q2-diversity-lib, which may not have checks running at this time? :crossed_fingers:
Will check on bDiv branch where checks are running, and revert/merge if that's looking better.

Badge shows 'failing' as expected on chriskeefe/q2-diversity-lib/bDiv, so I'm pretty sure we're wired up correctly. Reverting to original commit (watches qiime2/q2-diversity-lib/master) and merging.


Fr Problem with some numbers expressed in letters when associated with "brightness" input

Sorry, I'm not sure it's the right place to put this issue.
Some troubles with the light_HassLightSet.yaml:

For example, "Salon à trente pourcent" doesn't work but "Salon à 30%" or "Salon à 30 pourcent" work fine.
In the same way, "Salon à vingt pourcent" doesn't work but "Salon à 20%" or "Salon à 20 pourcent" work fine.

BUT

"Salon à trente cinq pourcent" or "Salon à vingt cinq pourcent" work fine. "Salon à cent pourcent" works fine too. Very strange.

Excluding the "cent pourcent" exception, it seems that the numbers expressed in letters with only one word doesn't work. I don't remember observing that a few weeks ago. A error after a update ?
Thanks guys

Hi there,
seems like the same issue occurs in the German language (#2799).
I did not find the root cause so far


Research https://github.com/yabwe/medium-editor

Cool but lacking stable implementation of features..and not actively maintained


See my commit and  review, approve, suggest.


TCN models containing expand dims and conv1d layers induce "Arena size is too small issue"

I am trying to upload some lightweight TCN models to STM32L476RG Nucleo running Mbed OS.
Example model 1 (the tcn layer is from keras tcn library https://github.com/philipperemy/keras-tcn):
Model: "model"
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to
==================================================================================================
input_1 (InputLayer)            [(None, 400, 6)]     0
__________________________________________________________________________________________________
tcn (TCN)                       (None, 32)           31840       input_1[0][0]
__________________________________________________________________________________________________
tf.reshape (TFOpLambda)         (None, 32, 1)        0           tcn[0][0]
__________________________________________________________________________________________________
max_pooling1d (MaxPooling1D)    (None, 16, 1)        0           tf.reshape[0][0]
__________________________________________________________________________________________________
flatten (Flatten)               (None, 16)           0           max_pooling1d[0][0]
__________________________________________________________________________________________________
pre (Dense)                     (None, 32)           544         flatten[0][0]
__________________________________________________________________________________________________
velx (Dense)                    (None, 1)            33          pre[0][0]
__________________________________________________________________________________________________
vely (Dense)                    (None, 1)            33          pre[0][0]
==================================================================================================
Total params: 32,450
Trainable params: 32,450
Non-trainable params: 0

The above model consumes 162 kB of flash (1 MB capacity) and a total of ~50 kB (128 kB capacity) of RAM on the Mbed board (includes other dependencies) for arena of size 32X1000.
Example model 2 (which is even lighter!):
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to
==================================================================================================
input_2 (InputLayer)            [(None, 140, 1)]     0
__________________________________________________________________________________________________
conv1d (Conv1D)                 (None, 140, 2)       22          input_2[0][0]
__________________________________________________________________________________________________
batch_normalization (BatchNorma (None, 140, 2)       8           conv1d[0][0]
__________________________________________________________________________________________________
zero_padding1d (ZeroPadding1D)  (None, 140, 2)       0           batch_normalization[0][0]
__________________________________________________________________________________________________
conv1d_1 (Conv1D)               (None, 140, 11)      242         zero_padding1d[0][0]
__________________________________________________________________________________________________
dropout (Dropout)               (None, 140, 11)      0           conv1d_1[0][0]
__________________________________________________________________________________________________
zero_padding1d_1 (ZeroPadding1D (None, 140, 11)      0           dropout[0][0]
__________________________________________________________________________________________________
conv1d_2 (Conv1D)               (None, 140, 11)      1331        zero_padding1d_1[0][0]
__________________________________________________________________________________________________
batch_normalization_1 (BatchNor (None, 140, 11)      44          conv1d_2[0][0]
__________________________________________________________________________________________________
conv1d_3 (Conv1D)               (None, 140, 11)      22          batch_normalization[0][0]
__________________________________________________________________________________________________
dropout_1 (Dropout)             (None, 140, 11)      0           batch_normalization_1[0][0]
__________________________________________________________________________________________________
batch_normalization_2 (BatchNor (None, 140, 11)      44          conv1d_3[0][0]
__________________________________________________________________________________________________
add (Add)                       (None, 140, 11)      0           dropout_1[0][0]
                                                                 batch_normalization_2[0][0]
__________________________________________________________________________________________________
activation (Activation)         (None, 140, 11)      0           add[0][0]
__________________________________________________________________________________________________
zero_padding1d_2 (ZeroPadding1D (None, 140, 11)      0           activation[0][0]
__________________________________________________________________________________________________
conv1d_4 (Conv1D)               (None, 140, 11)      1331        zero_padding1d_2[0][0]
__________________________________________________________________________________________________
batch_normalization_3 (BatchNor (None, 140, 11)      44          conv1d_4[0][0]
__________________________________________________________________________________________________
dropout_2 (Dropout)             (None, 140, 11)      0           batch_normalization_3[0][0]
__________________________________________________________________________________________________
zero_padding1d_3 (ZeroPadding1D (None, 140, 11)      0           dropout_2[0][0]
__________________________________________________________________________________________________
conv1d_5 (Conv1D)               (None, 140, 11)      1331        zero_padding1d_3[0][0]
__________________________________________________________________________________________________
batch_normalization_4 (BatchNor (None, 140, 11)      44          conv1d_5[0][0]
__________________________________________________________________________________________________
dropout_3 (Dropout)             (None, 140, 11)      0           batch_normalization_4[0][0]
__________________________________________________________________________________________________
add_1 (Add)                     (None, 140, 11)      0           dropout_3[0][0]
                                                                 activation[0][0]
__________________________________________________________________________________________________
activation_1 (Activation)       (None, 140, 11)      0           add_1[0][0]
__________________________________________________________________________________________________
zero_padding1d_4 (ZeroPadding1D (None, 140, 11)      0           activation_1[0][0]
__________________________________________________________________________________________________
conv1d_6 (Conv1D)               (None, 140, 11)      1331        zero_padding1d_4[0][0]
__________________________________________________________________________________________________
batch_normalization_5 (BatchNor (None, 140, 11)      44          conv1d_6[0][0]
__________________________________________________________________________________________________
dropout_4 (Dropout)             (None, 140, 11)      0           batch_normalization_5[0][0]
__________________________________________________________________________________________________
zero_padding1d_5 (ZeroPadding1D (None, 140, 11)      0           dropout_4[0][0]
__________________________________________________________________________________________________
conv1d_7 (Conv1D)               (None, 140, 11)      1331        zero_padding1d_5[0][0]
__________________________________________________________________________________________________
batch_normalization_6 (BatchNor (None, 140, 11)      44          conv1d_7[0][0]
__________________________________________________________________________________________________
dropout_5 (Dropout)             (None, 140, 11)      0           batch_normalization_6[0][0]
__________________________________________________________________________________________________
add_2 (Add)                     (None, 140, 11)      0           dropout_5[0][0]
                                                                 activation_1[0][0]
__________________________________________________________________________________________________
activation_2 (Activation)       (None, 140, 11)      0           add_2[0][0]
__________________________________________________________________________________________________
flatten_1 (Flatten)             (None, 1540)         0           activation_2[0][0]
__________________________________________________________________________________________________
dense (Dense)                   (None, 5)            7700        flatten_1[0][0]
__________________________________________________________________________________________________
activation_3 (Activation)       (None, 5)            0           dense[0][0]
==================================================================================================
Total params: 14,913
Trainable params: 14,777
Non-trainable params: 136

The above model in quantized form consumes 33 kB of flash  and a total of ~50 kB (128 kB capacity) of RAM on the Mbed board (includes other dependencies) for arena of size 32X1000.
The Mbed code is as follows:
#include "tensorflow/lite/micro/micro_profiler.h"
#include "tensorflow/lite/micro/all_ops_resolver.h"
//#include "tensorflow/lite/micro/examples/hello_world/constants.h"
#include "model.h"
//#include "tensorflow/lite/micro/examples/hello_world/output_handler.h"
#include "tensorflow/lite/micro/micro_error_reporter.h"
#include "tensorflow/lite/micro/micro_interpreter.h"
#include "tensorflow/lite/micro/system_setup.h"
#include "tensorflow/lite/schema/schema_generated.h"
#include "mbed.h"
#include "BMX160/bmx160.h"

Timer t;
//+ = 5V, - = GND, C = SCL, D = SDA
const int numSamples = 400; //should b 400 for model 1 and 140 for model 2
int samplesRead = 0;

// Globals, used for compatibility with Arduino-style sketches.
namespace {
tflite::ErrorReporter* error_reporter = nullptr;
const tflite::Model* model = nullptr;
tflite::MicroInterpreter* interpreter = nullptr;
TfLiteTensor* input = nullptr;
TfLiteTensor* output = nullptr;
int inference_count = 0;
tflite::MicroProfiler* profiler = nullptr;

constexpr int kTensorArenaSize = 32*1000;
uint8_t tensor_arena[kTensorArenaSize];
}  // namespace

int main(int argc, char* argv[]) {
  uint32_t failures = 0;
  tflite::InitializeTarget();

  // Set up logging. Google style is to avoid globals or statics because of
  // lifetime uncertainty, but since this has a trivial destructor it's okay.
  // NOLINTNEXTLINE(runtime-global-variables)
  static tflite::MicroErrorReporter micro_error_reporter;
  error_reporter = &micro_error_reporter;

  static tflite::MicroProfiler micro_profiler_reporter;
  profiler = &micro_profiler_reporter;

  // Map the model into a usable data structure. This doesn't involve any
  // copying or parsing, it's a very lightweight operation.
  model = tflite::GetModel(g_model);
  if (model->version() != TFLITE_SCHEMA_VERSION) {
    printf("Model provided is schema version %d not equal "
                         "to supported version %d.",
                         model->version(), TFLITE_SCHEMA_VERSION);
    failures++;
  }

  // This pulls in all the operation implementations we need.
  // NOLINTNEXTLINE(runtime-global-variables)
  static tflite::AllOpsResolver resolver;

  // Build an interpreter to run the model with.
  static tflite::MicroInterpreter static_interpreter(
      model, resolver, tensor_arena, kTensorArenaSize, error_reporter,profiler);
  interpreter = &static_interpreter;

  // Allocate memory from the tensor_arena for the model's tensors.
  TfLiteStatus allocate_status = interpreter->AllocateTensors();
  if (allocate_status != kTfLiteOk) {
    printf("AllocateTensors() failed");
    failures++;
  }

  // Obtain pointers to the model's input and output tensors.
  input = interpreter->input(0);
  output = interpreter->output(0);

  // Keep track of how many inferences we have performed.
  inference_count = 0;

// Initialise I2C bus (PC_1 and PC_0 pins being used in this demo for Nucleo L476RG)
    I2C i2cBus(PB_9, PB_8);
    i2cBus.frequency(400000);
    BMI160_I2C imu(i2cBus, BMI160_I2C::I2C_ADRS_SDO_LO);

    //check if accel an gyro are ok
    if(imu.setSensorPowerMode(BMI160::GYRO, BMI160::NORMAL) != BMI160::RTN_NO_ERROR) {
        printf("Failed to set gyroscope power mode\n");
        failures++;
    }
    //thread_sleep_for(100);
    if(imu.setSensorPowerMode(BMI160::ACC, BMI160::NORMAL) != BMI160::RTN_NO_ERROR) {
        printf("Failed to set accelerometer power mode\n");
        failures++;
    }

    BMI160::AccConfig accConfig;
    //example of using getSensorConfig
    if(imu.getSensorConfig(accConfig) == BMI160::RTN_NO_ERROR) {
        printf("ACC Range = %d\n", accConfig.range);
        printf("ACC UnderSampling = %d\n", accConfig.us);
        printf("ACC BandWidthParam = %d\n", accConfig.bwp);
        printf("ACC OutputDataRate = %d\n\n", accConfig.odr);
    } else {
        printf("Failed to get accelerometer configuration\n");
        failures++;
    }

    //example of setting user defined configuration
    accConfig.range = BMI160::SENS_4G;
    accConfig.us = BMI160::ACC_US_OFF;
    accConfig.bwp = BMI160::ACC_BWP_2;
    accConfig.odr = BMI160::ACC_ODR_8;
    if(imu.setSensorConfig(accConfig) == BMI160::RTN_NO_ERROR) {
        printf("ACC Range = %d\n", accConfig.range);
        printf("ACC UnderSampling = %d\n", accConfig.us);
        printf("ACC BandWidthParam = %d\n", accConfig.bwp);
        printf("ACC OutputDataRate = %d\n\n", accConfig.odr);
    } else {
        printf("Failed to set accelerometer configuration\n");
        failures++;
    }

    BMI160::GyroConfig gyroConfig;
    if(imu.getSensorConfig(gyroConfig) == BMI160::RTN_NO_ERROR) {
        printf("GYRO Range = %d\n", gyroConfig.range);
        printf("GYRO BandWidthParam = %d\n", gyroConfig.bwp);
        printf("GYRO OutputDataRate = %d\n\n", gyroConfig.odr);
    } else {
        printf("Failed to get gyroscope configuration\n");
        failures++;
    }

    if(failures == 0) {
        BMI160::SensorData accData;
        BMI160::SensorData gyroData;
        BMI160::SensorTime sensorTime;

        while(1) {

            while(samplesRead<numSamples){
            //change the channel count as per model 1 (6) and model 2 (1)
            imu.getGyroAccXYZandSensorTime(accData, gyroData, sensorTime, accConfig.range, gyroConfig.range);
            input->data.f[0] = accData.xAxis.scaled;
            input->data.f[samplesRead * 6 + 1] = accData.yAxis.scaled;
            input->data.f[samplesRead * 6 + 2] = accData.zAxis.scaled;
            input->data.f[samplesRead * 6 + 3] = gyroData.xAxis.scaled*0.0174533;
            input->data.f[samplesRead * 6 + 4] = gyroData.yAxis.scaled*0.0174533;
            input->data.f[samplesRead * 6 + 5] = gyroData.xAxis.scaled*0.0174533;
            samplesRead++;
            printf("%d\n",samplesRead);
            }
            samplesRead = 0;

            t.start();
            TfLiteStatus invoke_status = interpreter->Invoke();
            if (invoke_status != kTfLiteOk) {
                TF_LITE_REPORT_ERROR(error_reporter, "Invoke failed");
            while(1);
            }
            t.stop();
            printf("Latency: %f\n", t.read());
            t.reset();
            float out1 = output->data.f[0];
            float out2 = output->data.f[1];
            printf("Output: %f, %f",out1, out2);
            //thread_sleep_for(50);
        }
    } else {
        while(1){
            printf("Fatal Error\n");
        }

    }
}

The code compiles without any error. However, very surprisingly, during runtime, I get the following error for both models!
Arena size is too small for all buffers. Needed Arena size is too small for all buffers. Needed<PHONE_NUMBER> but only X was available. AllocateTensors() failed (X varies, depending on arena size).
This is surely some bug in tensorflow, because the 2nd model was shown to run on the exact same hardware via TF Lite Micro: https://github.com/pulp-platform/ecg-tcn.
TF 2.4 does not find expand dims, while TF 2.5 and 2.6 (this repo) complains about the arena size being unrealistic.

Here are some debugging tips that may be useful:

Start by ensuring that you can use the model with TFLM on x86 and then attempting to run inference on your target platform.

To that end, create a benchmark for your model, similar to https://github.com/tensorflow/tflite-micro/blob/169a27b2048fdfc58ad815f22de6267e4ea8e86a/tensorflow/lite/micro/benchmarks/person_detection_benchmark.cc so that the errors can be reproduced more easily.

On x86, you can make the arena size as large as needed, and then use the recording memory APIs to get more insight into what is happening for your specific model: https://github.com/tensorflow/tflite-micro/blob/169a27b2048fdfc58ad815f22de6267e4ea8e86a/tensorflow/lite/micro/docs/memory_management.md#recording-memory-apis

You may also want to raise an issue on https://github.com/pulp-platform/ecg-tcn to find out more details about their use of TFLM.

Some more information (some of which is relevant to running the model on x86):
When I try to load an interpreter object on x86 using tf.lite.Interpreter(args.tflite_model), I get the following error:
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 90 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 97 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 106 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 113 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 122 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 129 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 138 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 145 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 154 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 161 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 170 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 177 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 186 is invalidly specified in schema.
tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.
Tensor 193 is invalidly specified in schema.

Possible solutions are given here, pointing to problems with input shape on CNNs: https://stackoverflow.com/questions/64882214/runtimeerror-when-calling-allocate-tensors-on-converted-tflite-model and https://stackoverflow.com/questions/63500096/tensorflow-lite-core-subgraph-cc-bytesrequired-number-of-elements-overflowed-no
However, I can't use the solution as I the interpreter won't even load the tflite model, neither am I using built in TF CNNs

Attached is the tflite model: https://drive.google.com/file/d/1swiQmoH_Rxy-f422eYnrVsDzIwpn-W7N/view?usp=sharing

I think I solved the problem. It's got to do with older versions of TF (TF 2.4) not supporting dilation rates greater than 1. I swtiched the training version of TF to 2.5 and everything seems to be working fine.

Hi @swapnilsayansaha !
Something that I want to ask you if if you could convert the second model from (https://github.com/pulp-platform/ecg-tcn) using Conv1D or did you converted the equivalent model using Conv2D as explain in (https://github.com/pulp-platform/ecg-tcn).
I undestand that Conv1D is not still supported in tflite micro, isn't it?
Regards,
Martin

@martingcavallo  https://github.com/tensorflow/tensorflow/issues/39823 https://github.com/tensorflow/tensorflow/pull/28410
It was a bug with dilated conv support. It got fixed in recent versions of TF. I was able to convert my model to TFLM format without issues in TF 2.5++.

Ok. So I undesrtand that Convolutional 1D layer is supported by tflite micro, is that right??
On the other hand, I want to deploy a model on an arm mbed enable board too. But I do not know how to follow after that I execute the following command:
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m4 OPTIMIZED_KERNEL_DIR=cmsis_nn microlite
Since June, when tflite-micro was moved to this repository, seems like the process to deploy changed a bit, and some tutorials like the ones that are in O'Reilly TinyML book seems to be obsolete or deprecated. Because I do not find the directories that are mentioned in these tutorials after executing make command.
Did you use the same make command? Did you use Mbed Studio?? How to integrate tflite-micro to Mbed Studio??
Sorry for a lot of quesetions.
Regards,
Martin

https://www.youtube.com/watch?v=gDFWCxrJruQ
Check this out (although its not for Mbed but concepts are similar). Basically you write your own main.cpp file based on the examples given in TFLM (e.g. the hello world main.cpp file). You then copy all the necessary dependencies from your make folder as shown in the video to your Mbed project directory. And yes you can use Mbed Studio to do it.
Also I Used TF2.5 instead of 2.6 to compile directly for Mbed targets (target arch = mbed) They removed Mbed target in TF2.6.


isValid not working for IPv4 subnets

const Address4 = require('ip-address').Address4;
const address = new Address4('<IP_ADDRESS>/16');
console.log(address.isValid());

outputs true
but should false, like python's similar library
Python 3.5.6 (default, Nov 13 2018, 08:43:46)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> ipaddress.ip_network('<IP_ADDRESS>/24')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/alt/python35/lib64/python3.5/ipaddress.py", line 74, in ip_network
    return IPv4Network(address, strict)
  File "/opt/alt/python35/lib64/python3.5/ipaddress.py", line 1537, in __init__
    raise ValueError('%s has host bits set' % self)
ValueError: <IP_ADDRESS>/24 has host bits set

I think it's confusion on your part between IP inside of subnet and actual sub network address.
Here is startAddress() doc fragment: The first address in the range given by this address' subnet. Often referred to as the Network Address.
So if you'd like to check whether given IP is a valid network  cidr you perhaps should compare startAddress() and correctForm().
Overall this lib's constructor behaves close to Python's
ipaddress.ip_network('<IP_ADDRESS>/24', False)

only keeping original IP around (which Python destroys)


Stay In Touch - Milestone-6

This PR is for Microverse TSE review

☝🏽 Stay In Touch - Milestone 6
Hi there,
This PR should contain the required features asked for milestone 6. They were previously implemented in milestone 5 (accidentally), hence there not being a lengthy commit history for this branch.
If you have any questions, please do get in contact with me via Slack or @ me on Github.
All the best,
Rory

This PR is for Microverse TSE review

Stay In Touch ☝🏽 - Update # 1
Following the code review and suggestions left by @euqueme, I have made some changes to this project so that it may more tightly fit the project spec as per the pathwright. The changes made are as following:
Duplicate Friend Reuqest Issues

Validation created (':not_inviting_self') to prevent the user from creating a friendship where the current_user id is the sender id (user_id)
Callback method ':prevent_duplicates' created to avoid the scenario where the user1 can sends a friend request to user2, however, user2 can then send a friend request to user1, resulting in two unconfirmed friendships. As long as the reciever of a friend request has that friend request from the sender, they cannot send a friend request back to the reciever.
An additional callback conditional method '':inverse_exists?' has been created to remove the bar to creating a duplicate (in this case, inverse) friendship when the receiver of a friend request accepts.

Timeline & Posts

The posts index/timeline now only shows the users posts or friends of the user's posts
Testing has been updated to reflect these changes

If there are any other changes that are due to this project, feel free to reach out to me on Slack or @ me on Github!
Thanks,
Rory

Hi Rory Hellier, I'm Sarah your reviewer for this PR 👩🚀
Good job with with the improvements! You are just missing one of the items mentioned before by the first reviewer.
Required Changes 🏗 🐛 💡

[ ] As mentioned by the previous TSE, there should be no view logic in the views, it should be in the helpers.
View logic includes loops, <% friends.each do ... and conditionals <% if condition..., please refactor the logic in your views into helpers.

Kindly fix the pointed out issues before requesting the next code review

Cheers and Happy coding!👏👏👏
Code review by Sarah Uryelah Silva Chamorro
(Feel free to contact me on slack by the handle of  sarah if you have any additional question)

This PR is for Microverse TSE review

Stay In Touch ☝🏽 - Update # 2
Hi there,
Stupidly I forgot to remove the logic from the views as suggested previously, but I have gone ahead and done that now. There should no longer be any if/else conditionals or loop calls in any of the views.
Thanks,
Rory

@euqueme @uryelah Thanks for the code reviews and kind words! 🦾 🤟🏽


WSL crashes when going into full screen via Alt+Enter when vim has a statusline

Your Windows build number:  Microsoft Windows [Version 10.0.17672.1000]

Desktop message shows
Windows 10 Enterprise Insider Preview
Evaluation copy. Build 17672.rs_prerelease.180511-1445

What you're doing and what's happening:

I am using vim (version 8.0.1453) inside the Ubuntu 18.04 downloaded from the store to open a file.  Sometimes it's a legit blue gradient Win7 frame, sometimes it's just a flat box. It hangs there for 5-10 seconds, and then my WSL environment crashes completely, clearing both the black background and the now-unresponsive terminal
This also occurs in the legacy bash.exe environment that I still have around, so it doesn't seem to be anything specific to 18.04. It also repros across /bin/bash and /bin/zsh as my login shell

Oddly, it only happens when I have specific values in my .vimrc. The minimal configuration to reproduce the error is the following:
Bad .vimrc
set laststatus=2

Good .vimrc
set laststatus=0

It also only occurs when I am in vim prior to Alt+Enter. If I am in fullscreen mode, then open vim, all is fine. If I then reenter fullscreen mode, I get the crash again.

What's wrong / what should be happening instead: I should be allowed to maximize a WSL terminal without errors

Strace of the failing command, if applicable:
https://gist.github.com/noelbundick/5d395d1f5e67017585cbb6896a2c28cd

See our contributing instructions for assistance.

Update: this does not happen with an identical config on my 1803 machine with version: Microsoft Windows [Version 10.0.17134.48]

So it doesn't work in 17672 but is okay in 17134. That's definitely helpful and interesting. You might try your luck over in the Windows Console issue tracker, if only because quoth: "I get a flash of Win7-ish chrome with Sets buttons and no min/max/close buttons around my terminal". That doesn't seem like a WSL syscall surface kind of thing. But your strace log (appreciated) blocks on a select() so I can't rule out a cross-border problem either. You're right it (nearly certaintly) isn't going to be a Xenial vs Bionic thing.
You can confirm by trying your scenario with another terminal emulator (wsltty or PuTTY or xterm with VcXsrv, or pick your poison) and see how it fares. If it works, you'll probably get better service over in the other tracker.

Thanks, @therealkenc - I've verified that wsltty is working fine, so I'll close this here
Looks like https://github.com/Microsoft/console/issues/175 is likely the same issue and has a fix landing in an upcoming Insiders build (if not already fixed in 17677)

I have the same issue too. When resizing terminal window while vim is open it "crashes". Weird gray color appears in the bottom and right side of the terminal window.


Move debugger to require-dev section

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Extension Page doesn't show repository info

Reproduce:

search extension husky-lang.husky-analyzer
open it in vscode

Version: 1.75.1 (Universal)
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:34:59.000Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 22.3.0
Sandboxed: No

It seems the extension does not has Read Me and hence the details tab is not shown

Leaving this open as it seems like a low-hanging fix. We could render the details tab even if the readme is not there.
Feel free to close as out of scope.


[WIP] Integrations at the Hub level

This is a new PoC, more complete and probably more viable than #748, to solve #746.
In this way, integrations are bound to the Hub level, so the client is used indirectly, and the (default) integrations are generated inside the options, so they can carry those everywhere.
I hope this iteration is the correct solution. WDYT?

I think we can close this PR right?
Even though it might provide an example of how to move integrations to the hub level.
I think if we want to go down this route we should take a step back and talk about concepts first before implementing it.

Yes. Closing in favor of #762 which solves the same problem without too much changes (and with additional features too!)


Add documentation for getting started with Docker Desktop

This documents a default user desktop installation using docker for desktop. It is aimed at end users who do not want to clone this repository and explains the steps to have a running local Transition instance in Docker.

maybe we should also add a documentation section to show how to install nginx to serve the transition docker instance to the outside world.

I'd say no. Opening to the outside world can be a security issue, I don't want to encourage this for people who "just want to install on their laptops". To serve the outside world, one needs to know what they are doing and thus don't need our documentation.

maybe we should also add a documentation section to show how to install nginx to serve the transition docker instance to the outside world.

I'd say no. Opening to the outside world can be a security issue, I don't want to encourage this for people who "just want to install on their laptops". To serve the outside world, one needs to know what they are doing and thus don't need our documentation.

Also, they don't need nginx to serve to the outside world! That part is really a general hosting questions and we should not bother with it.


can't use require('express')

hi. i'm trying to do this in a js file which later i bundle with browserify and insert in client-side html:
var http = require('http')
var express = require('express');
var exp = express();

it's using browserify port of node's native http module and npm express module, but it gives me an TypeError: http.IncomingMessage is undefined on the require('express') statement. what's going on? i'm guessing that i can't use express locally because it needs some node apparatus not provided by browserify bindings, namely listening on ports and such, is that it?

browserify's http implementation only includes the client part of http, not the server implementation. The core http server in node extends the tcp server implementation, so that won't work in browsers by default.


After Lockdown, interactive Node REPL goes crazy

See the following screen recording.
https://user-images.githubusercontent.com/273868/103123990-fd7ff100-463a-11eb-80d5-7cb55b1f0d7d.mov
Attn @bmeck Likely a Node bug, but filing here first until I hear from you. Thanks.

Will look later, probably is how REPL is dealing w/ RegExp.$1 and friends.

Was wrong on cause, but confirmed bug in Node REPL: https://github.com/nodejs/node/blob/master/lib/internal/repl/utils.js#L350 is using a non-safe roundtrip using util.inspect. Will try and fix later.


Replace forEach and for in with reg. for loops.

node 132ms
Processing time (w/o IO): 140ms
Processing time (w/o IO): 126ms
Processing time (w/o IO): 125ms
Processing time (w/o IO): 126ms
Processing time (w/o IO): 130ms
Processing time (w/o IO): 126ms
Processing time (w/o IO): 126ms
Processing time (w/o IO): 131ms
Processing time (w/o IO): 126ms
Processing time (w/o IO): 131ms
Processing time (w/o IO): 134ms
Processing time (w/o IO): 125ms
Processing time (w/o IO): 183ms

node: 130.23ms
node: 130.23ms

node: 182.92ms -> 130.23ms  = 29%
deno: 166.31ms -> 164.07ms = 1%
bun:  284.77ms -> 122.31ms = 132%


jtagspi driver with support for 4-byte addresses (needed for large Flash Memories)

Discussed in https://github.com/xpack-dev-tools/openocd-xpack/discussions/15

Originally posted by SteffenKlu November 22, 2021
The jtagspi driver was updated this month (https://review.openocd.org/c/openocd/+/4876/) and I am interested if
you could build a new 'xpack-openocd-0.11.xx' Tar-ball which includes those latest improvements?
I tried to flash the large SPI-Flash in an Xilinx-Board, with the existing openocd release but it failed:
[Log]
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
xc7_program
jtagspi_program
Info : usb blaster interface using libftdi
Error: unable to get latency timer
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc7.tap tap/device found: 0x13631093 (mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)
Info : JTAG tap: xc7.tap tap/device found: 0x13631093 (mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)
Info : Found flash device 'sp s25fl256s' (ID 0x00190201)
Warn : device needs paging or 4-byte addresses - not implemented
[...]
Info : sector 9 took 2 ms
Info : Found flash device 'sp s25fl256s' (ID 0x00190201)
Warn : device needs paging or 4-byte addresses - not implemented
read 645496 bytes from file build/results/ip0170p.ppn.bin and flash bank 0 at offset 0x00000000 in 12.880716s (48.939 KiB/s)
contents differ
diff 0 address 0x00000000. Was 0x00 instead of 0xff
diff 1 address 0x00000001. Was 0x09 instead of 0xff
diff 2 address 0x00000002. Was 0x0f instead of 0xff
diff 3 address 0x00000003. Was 0xf0 instead of 0xff
diff 4 address 0x00000004. Was 0x0f instead of 0xff
[...]
More than 128 errors, the rest are not printed.
[/Log]
I hope the new enhancements to the jtagspi driver solve this problem.
Best,
Steffen

A test with a self compiled openocd version shows that the addressed topic is indeed fixed on the master branch of the openocd git repository:
[Log]
Open On-Chip Debugger 0.11.0+dev-00501-g4626af440 (2021-11-24-07:40)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
xc7_program
jtagspi_program
Info : usb blaster interface using libftdi
Error: unable to get latency timer
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc7.tap tap/device found: 0x13631093 (mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)
Info : JTAG tap: xc7.tap tap/device found: 0x13631093 (mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)
Info : Found flash device 'sp s25fl256s' (ID 0x190201)
Warn : 4-byte addresses needed, might need extra command to enable
flash 'jtagspi' found at 0x00000000
Info : sector 0 took 1708 ms
Info : sector 1 took 1728 ms
Info : sector 2 took 95 ms
Info : sector 3 took 100 ms
Info : sector 4 took 99 ms
Info : sector 5 took 97 ms
Info : sector 6 took 95 ms
Info : sector 7 took 95 ms
Info : sector 8 took 98 ms
Info : sector 9 took 96 ms
read 645496 bytes from file build/results/ip0170p.ppn.bin and flash bank 0 at offset 0x00000000 in 12.291559s (51.285 KiB/s)
contents match
[/Log]

Ok, thank you for confirming, then it'll be included in the next release.

Please check the latest v0.11.0-3 release and let me know if it solves this problem.

Hi Liviu,
yes, the topic is solved with release v0.11.0-3.
Thank you for the prompt help.
Best,
Steffen
Am 2021-12-07 19:56, schrieb Liviu Ionescu:

Please check the latest v0.11.0-3 release and let me know if it solves
this problem.
--
You are receiving this because you commented.
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
Triage notifications on the go with GitHub Mobile for iOS [3] or
Android [4].
Links:
[1]
https://github.com/xpack-dev-tools/openocd-xpack/issues/16#issuecomment-988187278
[2]
https://github.com/notifications/unsubscribe-auth/AWTXN5JFLUGZJQ677WY4GDLUPZKHNANCNFSM5IRTHGJQ
[3]
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
[4]
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

Ok, thank you for confirming.
And please don't reply via email, use the web interface. Or at least remove the useless quoted message.


As a developer, I need to implement program for creating snarks in a separate process and communication protocol with it

Program should run in a separate process as that will shield us from crashing.
Also it will give us an ability to cancel a job midway if we no longer need it.

State machine part should be added as node/snark/tx_prove or node/snark/transaction_prove. As a template, block_verify can be used,
We should have an ability to spawn and manage multiple workers.
In service, we should have an api to send a job to the specific worker and to restart the worker (to cancel it or recover from failure).
We should have snark workers state machine, which will manage worker states. State should represent whether worker is up, down, starting, working, idle, etc... We should have minimal state in service as always.

This runs ocaml snark worker process: https://github.com/openmina/mina/blob/4c57c37fcd2a5674adad7116ebde19195dd17310/src/lib/snark_worker/functor.ml#L228
Since we don't yet have proof generation logic in Rust, we will have to use that.
I think sexp inputs can be passed as a cli arguments to this standalone worker, I don't remember exactly.
We might need to modify this a bit to accept binprot encoded inputs from the Rust process.

Started implementing statemachine-side data/code for handling external processes
Started implementing RPC protocol with Mina snark worker executable

Implementing assertions:

[x] commitments are not greater than workers
[x] ready snark work is increasing
[ ] snark value assertions
[ ] snark order assertions

https://ci.openmina.com/openmina/openmina/79/1/7

fixed cancel-related redux
dockerized/k8s-zed openmina
improved logging


Project Access update comments

I suggest that we call this session something like: "Common tasks with DDS" and then have sections: A. Account registration and accessing the system B. Project creation, data upload, and invitation of Researchers

Then there is nothing that goes to a new section right?

Then there is nothing that goes to a new section right?
Probably not, but let's get it merged that way so that we have a clean view of it.


Splits file paths with spaces in to two arguments (and silently fails)

I had been scratching my head for the longest time over why Atom Linter (primarily Linter Rubocop) wasn't working for me.
I keep basically all my files, including projects, under my Google Drive folder. I finally did some poking around and discovered that the file path to my project was getting split in to two different arguments:

Every linter is advised to transition to the new Plus API. so Yeah it's gonna be fixed real soon.


Turbolinks doesn't run scripts on back

Looks like Turbolinks doesn't re-run scripts in the body when the back button is pressed:
https://github.com/rails/turbolinks/blob/master/lib/assets/javascripts/turbolinks.js.coffee#L94 - is there a specific reason for this? Could we change this or make it configurable?
@Thibaut

@reed mentioned in #478:

Because those scripts have already been executed for that page. And since the transition cache uses fetchHistory, the scripts would run then too.

I think both use-cases are legit and we should make this opt-in. Maybe with data-turbolinks-eval=true?


Could a new type of loss be introduced for classes?

In EPro-PnP-Det_v2 if we want to improve the classification performance, could theoretically a new type of loss be introduced with the help of the deformable correspondance head?
I was thinking about how the yaw angle distribution corresponds to different classes. During the AMIS algorithm we could use the generated rotation distribution, evaluate it from 0 to 2pi with some density. Then feed this distribution to a simple network which classifies based on yaw angle. Maybe this isn't suitable for all classes but it might be useful to train a binary classsifier for pedestrians and cones (which can be mixed for classifiers that are based on purely image inputs) and add the scores to the corresponding ones in the FCOS detection head with some weighting.
Or we could just use these orient logprobs for this purpose?:
https://github.com/tjiiv-cprg/EPro-PnP-v2/blob/85215de8002dbd8523ee8eaaf1bae85b47179ebe/EPro-PnP-Det_v2/epropnp_det/models/dense_heads/deform_pnp_head.py#L563-L574
This is just an idea and my question is, could this theoretically work? Can this be backpropagated at all?
Thanks in advance for the answer, and for the previous ones too, they've been very useful.

I was experimenting with this and I have a question in connection with this.
https://github.com/tjiiv-cprg/EPro-PnP-v2/blob/85215de8002dbd8523ee8eaaf1bae85b47179ebe/EPro-PnP-Det_v2/epropnp_det/models/dense_heads/deform_pnp_head.py#L573
Here, we don't exactly get logprobs, but a constant is added to each probability based on the density of the distribution (+ np.log(orient_bins / (2 * np.pi)), so the probabilities won't sum to one.
What is the purpose of this? Better visualization?
Thanks in advance!

Theoretically these logprobs can be backpropagated. But I don't think information extracted from the pose distribution can help improve the classification.
+ np.log(orient_bins / (2 * np.pi)) is meant to convert the bin probabilities into a continuous density function on [0, 2pi), such that the integral equals 1.

Theoretically these logprobs can be backpropagated. But I don't think information extracted from the pose distribution can help improve the classification.

I understand. But theoretically, the yaw angle distribution evaluated with some density from 0 to 2pi would roughly look like the logprobs here?
https://github.com/tjiiv-cprg/EPro-PnP-v2/blob/85215de8002dbd8523ee8eaaf1bae85b47179ebe/EPro-PnP-Det_v2/epropnp_det/models/dense_heads/deform_pnp_head.py#L573

np.log(orient_bins / (2 * np.pi)) is meant to convert the bin probabilities into a continuous density function on [0, 2pi), such that the integral equals 1. This is mainly for visualization purpose.

I don't understand this. Without  np.log(orient_bins / (2 * np.pi)), the probabililities sum to one, with it they don't.


April 3: airdrop $TDF to all token holders and roll out new governance

All $TDF from the ledger have been attributed.


Source navigation to temp-table definition

Clicking on a temp-table received as method parameter navigates to parameter line.
The request is: when clicking in the temp-table name (in parameter line) navigates do temp-table definition

Source navigation will always go to temp-table definition
Released in v0.3.0


♻ refactor(contact): switch from server actions to EmailJS

Replaces server-side form handling with EmailJS for contact form submissions, improving reliability and reducing server load. Added necessary environment variables and error handling.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.39%. Comparing base (a69e48e) to head (0880605).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #549      +/-   ##
==========================================
+ Coverage   99.38%   99.39%   +0.01%
==========================================
  Files          33       33
  Lines         325      331       +6
  Branches       84       87       +3
==========================================
+ Hits          323      329       +6
  Misses          2        2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


bsConst in launch.json does not affect component libraries

bsConst are being updated on the app manifest, but not component libraries

Hmm. Component libraries and the main project all flow through the same manifest transformation  logic here: https://github.com/rokucommunity/roku-debug/blob/bb2146888261a7d2d21cdb17dc31e1715e72ae2a/src/managers/ProjectManager.ts#L291
Are you using a preprocessor or brighterscript somewhere by chance? Because brighterscript currently transpiled away all the false blocks. (We want to fix that eventually...)

Hmm. Component libraries and the main project all flow through the same manifest transformation logic here: https://github.com/rokucommunity/roku-debug/blob/bb2146888261a7d2d21cdb17dc31e1715e72ae2a/src/managers/ProjectManager.ts#L291
Are you using a preprocessor or brighterscript somewhere by chance? Because brighterscript currently transpiled away all the false blocks. (We want to fix that eventually...)

I'm using brighterscript, and the output of it contains all the false values.
Like after transpiling with bsc my manifest still has
bs_const=DEBUG=false;WEB_SERVER_BASIC_AUTH=false;DASH_THUMBNAILS=false;WEB_SOCKETS=true

Also, I don't see it looping through all manifests, or is a Project object created for each component library?

I wasn't talking about the manifest itself, i was talking about the code. So Something like this:
bs_const=some_true_value=true;some_false_value=false;
#if some_true_value
    'i get to stay
#end if
#if some_false_value
    'i get deleted
#end if

will result in this output code:
#if some_true_value
    'i get to stay
#end if

Got it, sorry for not being clear. No what's missing is the manifest of the component library is not updated according to the launch config

Got it, sorry for not being clear. No what's missing is the manifest of the component library is not updated according to the launch config

Ah, ok. Well then yeah, I guess there's a bug somewhere. Maybe vscode isn't sending the bsconst stuff up for complibs during launch.

Also, I don't see it looping through all manifests, or is a Project object created for each component library?

Yeah, we make one project for the main app, and a project for each complib.

To work around the issue, I was trying to modify the manifest in staging just before bsc starts transpiling.
Turns out bsc does not care about the manifest in the staging.
I ended up modifying the actual rootDir manifest right before bsc does work, and restoring it back later (plugin)

BrighterScript v1 recently introduced proper AST support for conditional compile statements being transpiled into the output (see https://github.com/rokucommunity/brighterscript/pull/1149). So I'm going to close this issue, as it should eventually be fixed with v1 lands.