ASSERTION ERROR:sentence at index 8241 of size 6922994 exceeds max_tokens limit of 1280000!

What is your question?
I am trying to fine-tune the model using my own audio and label. However, I met this ASSERTION ERROR:sentence at index 8241 of size 6922994 exceeds max_tokens limit of 1280000!  Does this mean that there is something in label file not included in dict.txt.ltr? How to solve it?
Code
nohup python /data/home/v_liwenxu/fairseq/fairseq_cli/train.py //data3/mirex2020/label
--save-dir /data/home/v_liwenxu/data/segmented_sing/s5/models/ --fp16
--post-process letter --valid-subset //data3/mirex2020/label/valid
--no-epoch-checkpoints --best-checkpoint-metric wer --num-workers 4
--max-update 80000 --sentence-avg --task audio_pretraining --arch wav2vec_ctc --w2v-path /data/home/v_liwenxu/data/segmented_sing/s5/models/wav2vec_small.pt
--labels ltr --apply-mask --mask-selection static --mask-other 0 --mask-length 10 --mask-prob 0.5 --layerdrop 0.1
--mask-channel-selection static --mask-channel-other 0 --mask-channel-length 64 --mask-channel-prob 0.5 --zero-infinity
--feature-grad-mult 0.0 --freeze-finetune-updates 10000 --validate-after-updates 10000 --optimizer adam
--adam-betas '(0.9, 0.98)' --adam-eps 1e-08 --lr 2e-05 --lr-scheduler tri_stage --warmup-steps 8000 --hold-steps 32000
--decay-steps 40000 --final-lr-scale 0.05 --final-dropout 0.0 --dropout 0.0 --activation-dropout 0.1 --criterion ctc
--attention-dropout 0.0 --max-tokens 1280000 --seed 2337 --log-format json --log-interval 500  --ddp-backend no_c10d  > train_output.txt 2>&1 &

I just need to adjust the max-tokens in the training script.

@MorrisXu-Driving hello, i met this error too. If you just adjust the max_tokens, will it cause the oom error?

I actually don't know what is the real reason that triggered this error. I just used a smaller dataset (nearly 90%) than the one that triggered this error and everything started working propearly. I guess this may because of some unexpected tokens in labels of your original dataset.

@MorrisXu-Driving oh, thanks. I just filter some sample which is longer than max tokens. It seems that some sample is strange.


pwru: 1.0.6 -> 1.0.7, fix build

Description of changes

pwru: 1.0.6 -> 1.0.7, fix build
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 326602 run on x86_64-linux 1

1 package built:

pwru


Test Issue

This is a test issue which contains some interesting looking strings. However, be aware that none of these credentials actually exist.
Password: SDIfffKVYBDSaYIKUMVBdcIU234876HJbDASeeBHJCd
Fake AWS ID: AKIAABC5BN6KLAPZ7NNN

Password: SDIfffKVYBDSaYIKUMVBdcIU234876HJbDASeeBHJCd
Fake AWS ID: AKIAABC5BN6KLAPZ7NNN

Password: SDIfffKVYBDSaYIKUMVBdcIU234876HJbDASeeBHJCd
Fake AWS ID: AKIAABC5BN6KLAPZ7NNN

32894723947432856329ab23423d2349238ffffff


Unable to load plugins

Version 1.9.1
Revision 2251
Commit 0bb4b3c
Command:

sudo dnscrypt-proxy --resolver-name=dnscrypt.eu-dk-ipv6 --ephemeral-keys --local-address='[::1]:53' --plugin=libdcplugin_example_logging.so,/var/log/dnscrypt.log --plugin=libdcplugin_example_ldns_blocking.so,--domains=/etc/domains.list,--ips=/etc/ips.list,--logfile=/var/log/dnscrypt.blocked.log

Logs:

Sun Jan  8 08:40:10 2017 [INFO] Loading plugin [/usr/lib/dnscrypt-proxy/libdcplugin_example_ldns_blocking.so]
Sun Jan  8 08:40:10 2017 [ERROR] Unable to load [/usr/lib/dnscrypt-proxy/libdcplugin_example_ldns_blocking.so]: [file not found]
Sun Jan  8 08:40:10 2017 [INFO] Loading plugin [/usr/lib/dnscrypt-proxy/libdcplugin_example_logging.so]
Sun Jan  8 08:40:10 2017 [INFO] Loaded plugin: [Log client queries]
Sun Jan  8 08:40:10 2017 [ERROR] Unable to load plugins

List of libs:

laptop% ls /usr/lib/dnscrypt-proxy/
libdcplugin_example_cache.so               libdcplugin_example_ldns_blocking.so    libdcplugin_example_ldns_opendns_deviceid.so       libdcplugin_example_logging.so
libdcplugin_example_ldns_aaaa_blocking.so  libdcplugin_example_ldns_forwarding.so  libdcplugin_example_ldns_opendns_set_client_ip.so  libdcplugin_example.so

Work fine with:
Version 1.9.1
Revision 2219
Commit 37ed781

It says "file not found". My guess is that the ldns library was missing when it was compiled.

Package ldns installed in chroot...

vs0% sudo arch-nspawn /tmp/chroot/root pacman -Qi ldns
Name            : ldns
Version         : 1.7.0-1
Description     : Fast DNS library supporting recent RFCs
Architecture    : x86_64
URL             : https://www.nlnetlabs.nl/projects/ldns/
Licenses        : custom:BSD
Groups          : None
Provides        : None
Depends On      : openssl  dnssec-anchors
Optional Deps   : libpcap: ldns-dpa tool
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 1839.00 KiB
Packager        : Gaetan Bisson<EMAIL_ADDRESS>Build Date      : Sun Jan 1 07:52:00 2017
Install Date    : Tue Jan 10 08:31:32 2017
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Maybe logs can help...
https://gist.github.com/DebugReport/4b6082edbde87a7a7a09f9ce3c643bcf

I can't reproduce it with commit fd04afb
Closed...

Hi @DebugReport
I see you're using Archlinux or some derivative, right?
The problem occurs because the package is not installing the files with extension .la, this causes that you can not use the plugins.
There is a package AUR git version which is configured to install plugins and script to generate blacklists. There is also a PKGBUILD of stable version in github.
AUR: https://aur.archlinux.org/packages/dnscrypt-proxy-git/
For more information, see: https://github.com/jedisct1/dnscrypt-proxy/wiki/Installation-on-Archlinux

Hi @FixedTorres
You right, i'm using ArchLinux.
Thanks you for link to PKGBUILD, but i'm not sure, that's trouble with extensions...

Hi @DebugReport
Try it, I had the same problem. That is why I suggest you the new PKGBUILD, I am currently using the plugins and the script to generate domains blacklist, all tests are done and resolved.
Regards guys! 😃

@FixedTorres
Ok, thanks you again. :-)


Embeddings question

In the embeddings get_batches function there is this line
# only full batches
words = words[:n_batches*batch_size]

n_batches is the length of words so it seems this extends words to be 1000x it's size.
What is this trying to do?

n_batches is len(words)//batch_size, the number of full batches that can be taken from words.
words[:n_batches*batch_size] is slicing up to all the words that will be used for the batches.

Sorry python newbie. When I asked this question I thought // were comments :).


Added Physics-Informed Nonlinear Shallow Water Equations example.

Modulus Pull Request
Description
I added an example in examples/cfd/ for a physics-informed neural operator that uses multiple PDEs in the loss function. This specifically uses the nonlinear shallow water equations. I also added a choice between using modulus to calculate the fourier derivatives or the method mentioned in the paper, on the github (https://github.com/shawnrosofsky/PINO_Applications/tree/main)

Checklist

[x] I am familiar with the Contributing Guidelines.
[ ] New or existing tests cover these changes.
[ ] The documentation is up to date with these changes.
[x] The CHANGELOG.md is up to date with these changes.
[x] An issue is linked to this pull request.

Dependencies

/blossom-ci

/blossom-ci

/blossom-ci

I think the blossom-ci check should work now, idk if there's anything else I should do rn

/blossom-ci

sry but I accidentally did update the branch w main, idk if that affected blossom-ci

sry but I accidentally did update the branch w main, idk if that affected blossom-ci

Thanks @fresleven for rebasing, let me revert back on how the CI report looks like. You don't have to do anything right away. I am also finishing up my reviews and will make them available soon. If there are any issues, I will reach out. Thanks!

/blossom-ci

There are a couple of issues in the example. When running train_swe_nl_pino.py and using the default loss derivative method (modulus), it crashes because an inconsistency in the expected size along the time domain dimension, see output below.  If the loss derivative method is changed to original, it starts to run, but there is a typo in the test_step function here, where PINO_loss_swe_nonlin should be pino_loss_swe_nonlin. Fixing this one is obvious, and the example runs ok after the fix. The error when using the modulus method for the loss derivative is less obvious to me as I'm not yet fully knowledgeable on the implementation details.
This is the error output when using modulus
Error executing job with overrides: []
Traceback (most recent call last):
  File "/mnt/LinuxData/spichardo/modulus/examples/cfd/swe_nonlinear_pino/train_swe_nl_pino.py", line 297, in <module>
    main()
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/mnt/LinuxData/spichardo/modulus/examples/cfd/swe_nonlinear_pino/train_swe_nl_pino.py", line 242, in main
    loss_pde = modulus_fourier(
  File "/mnt/LinuxData/spichardo/modulus/examples/cfd/swe_nonlinear_pino/train_utils/losses.py", line 315, in modulus_fourier
    Dh, Du, Dv = modulus_fdm_swe_nonlin(h, u, v, pde_node, device=device)
  File "/mnt/LinuxData/spichardo/modulus/examples/cfd/swe_nonlinear_pino/train_utils/losses.py", line 274, in modulus_fdm_swe_nonlin
    pde_Dh = pde_node[0].evaluate({"h__t": h_t, "hu__x": hu_x, "hv__y": hv_y})
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/spichardo/miniconda3/envs/modulus/lib/python3.9/site-packages/modulus/sym/utils/sympy/torch_printer.py", line 290, in forward
    output = self.torch_expr(args)
  File "<lambdifygenerated-1>", line 3, in _lambdifygenerated
    return h__t + hu__x + hv__y
RuntimeError: The size of tensor a (99) must match the size of tensor b (101) at non-singleton dimension 1

Hi, sorry I forgot to include the commit that was supposed to fix the indexing and that current code was my in-progress. I made a PR with all the changes needed so that it should work now! https://github.com/NVIDIA/modulus/pull/484

Awesome, thank you!


HFCheckpointer saves to .pt instead of .safetensors

Is it possible to checkpoint a full parameter fine-tuning of Llama3 8B with 4 separate sharded .safetensors checkpoint files per epoch as output instead of 4 separate sharded .pt files? That would make it easier to infer from finetuned models using the Huggingface transformers API, because we could just replace the original .safetensors files with our finetuned .safetensors files. Or is it very easy to convert .pt to .safetensors after torchtune automatically saves them as .pt? Here is the checkpointer section of my config:
checkpointer:
  _component_: torchtune.utils.FullModelHFCheckpointer
  checkpoint_dir: tmp/meta-llama/Meta-Llama-3-8B-Instruct/
  checkpoint_files: [
    model-00001-of-00004.safetensors,
    model-00002-of-00004.safetensors,
    model-00003-of-00004.safetensors,
    model-00004-of-00004.safetensors,
  ]
  recipe_checkpoint: null
  output_dir: tmp/meta-llama/output/
  model_type: LLAMA3
resume_from_checkpoint: False

@dcsuka How do you convert the output ( .pt) files to .safetensors currently? I also have this problem.

Hey @dcsuka and @mahdilashkari. Thanks for raising! Does the answer in this issue help?

Hi, thanks dear Salman, Yes it solved my problems.

Thanks @SalmanMohammadi for sorting this out! Gonna close this issue since it seems to be resolved, but feel free to reopen if anything else comes up here.


Treating OpenAI responses exclusively as either content or function calls, but they can be both

OpenAIAgentModel.request_stream makes an assumption about the response being exclusively text or tool calls, but a single OpenAI response can be both. A response that contains both triggers an uncaught exception in OpenAIStreamTextResponse (see below for examples).
Here we're assuming that a response exclusively contains content or tool_calls:
https://github.com/pydantic/pydantic-ai/blob/d595c084b2dbaa9e1b433bcfb0d7ba4af1be42c2/pydantic_ai_slim/pydantic_ai/models/openai.py#L199-L217
An OpenAI response can contain both. Here's a demonstration using OpenAI's client:
from devtools import debug
from openai import OpenAI

client = OpenAI()

tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {"type": "string"},
                    "unit": {"type": "string", "enum": ["c", "f"]},
                },
                "required": ["location", "unit"],
                "additionalProperties": False,
            },
        },
    }
]

completion = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {
            "role": "system",
            "content": "Always tell the user what you are about to do",
        },
        {
            "role": "user",
            "content": "What 1+1 and what's the weather like in Paris today?",
        },
    ],
    tools=tools,
    tool_choice="auto",
)
debug(completion)

Output:
 completion: ChatCompletion(
        id='chatcmpl-Ab71YFy1O6SNnnV6uDIBov3Rn8Sk0',
        choices=[
            Choice(
                finish_reason='tool_calls',
                index=0,
                logprobs=None,
                message=ChatCompletionMessage(
                    content=(
                        '1 + 1 equals 2. \n'
                        '\n'
                        'Now, I will look up the current weather in Paris.'
                    ),
                    refusal=None,
                    role='assistant',
                    audio=None,
                    function_call=None,
                    tool_calls=[
                        ChatCompletionMessageToolCall(
                            id='call_Ubvr33St36ChbOUbLMQNy2Ot',
                            function=Function(
                                arguments='{"location":"Paris","unit":"c"}',
                                name='get_weather',
                            ),
                            type='function',
                        ),
                    ],
                ),
            ),
        ],
        created=1733408500,
        model='gpt-4o-2024-08-06',
        object='chat.completion',
        service_tier=None,
        system_fingerprint='fp_7f6be3efb0',
        usage=CompletionUsage(
            completion_tokens=40,
            prompt_tokens=72,
            total_tokens=112,
            completion_tokens_details=CompletionTokensDetails(
                accepted_prediction_tokens=0,
                audio_tokens=0,
                reasoning_tokens=0,
                rejected_prediction_tokens=0,
            ),
            prompt_tokens_details=PromptTokensDetails(
                audio_tokens=0,
                cached_tokens=0,
            ),
        ),
    ) (ChatCompletion)

The equivalent Pydantic AI example will raise an exception:
from __future__ import annotations as _annotations

import asyncio
from typing import Any

from devtools import debug
from pydantic_ai import Agent

weather_agent = Agent(
    "openai:gpt-4o",
    system_prompt="Always tell the user what you are about to do",
)

@weather_agent.tool_plain
async def get_weather(location: str, unit: str) -> dict[str, Any]:
    debug(location, unit)
    return {"result": "123"}

async def main():
    prompt = "What 1+1 and what's the weather like in Paris today?"
    async with weather_agent.run_stream(prompt) as result:
        async for text in result.stream(debounce_by=0.01):
            print(text)
        debug(result)

if __name__ == "__main__":
    asyncio.run(main())

Output:
1
1 +
1 + 1 equals
1 + 1 equals 2
1 + 1 equals 2.

Now,
1 + 1 equals 2.

Now, I will
1 + 1 equals 2.

Now, I will get the
1 + 1 equals 2.

Now, I will get the weather information
1 + 1 equals 2.

Now, I will get the weather information for Paris
1 + 1 equals 2.

Now, I will get the weather information for Paris today.
Traceback (most recent call last):
  File "/tmp/pydantic-ai/weather.py", line 30, in <module>
    asyncio.run(main())
  File "/Users/siavash/.local/share/uv/python/cpython-3.11.6-macos-aarch64-none/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/siavash/.local/share/uv/python/cpython-3.11.6-macos-aarch64-none/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/siavash/.local/share/uv/python/cpython-3.11.6-macos-aarch64-none/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/tmp/pydantic-ai/weather.py", line 24, in main
    async for text in result.stream(debounce_by=0.01):
  File "/tmp/pydantic-ai/.venv/lib/python3.11/site-packages/pydantic_ai/result.py", line 152, in stream
    async for text in self.stream_text(debounce_by=debounce_by):
  File "/tmp/pydantic-ai/.venv/lib/python3.11/site-packages/pydantic_ai/result.py", line 191, in stream_text
    async for _ in group_iter:
  File "/tmp/pydantic-ai/.venv/lib/python3.11/site-packages/pydantic_ai/_utils.py", line 198, in async_iter_groups
    item = done.pop().result()
           ^^^^^^^^^^^^^^^^^^^
  File "/tmp/pydantic-ai/.venv/lib/python3.11/site-packages/pydantic_ai/models/openai.py", line 286, in __anext__
    assert choice.delta.content is not None, f'Expected delta with content, invalid chunk: {chunk!r}'
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Expected delta with content, invalid chunk: ChatCompletionChunk(id='chatcmpl-Ab7Am8lOPLxVN1pySDvqpH16EHO38', choices=[Choice(delta=ChoiceDelta(content=None, function_call=None, refusal=None, role=None, tool_calls=[ChoiceDeltaToolCall(index=0, id='call_SObzzp2KWfVzNUruHE5f7e1T', function=ChoiceDeltaToolCallFunction(arguments='', name='get_weather'), type='function')]), finish_reason=None, index=0, logprobs=None)], created=1733409072, model='gpt-4o-2024-08-06', object='chat.completion.chunk', service_tier=None, system_fingerprint='fp_7f6be3efb0', usage=None)

What should we do about this?
There's an equivalent case where the AI returns multiple tools calls, one of which is a result tool, currently the other tool calls are ignored.

What should we do about this?

I'm afraid I don't have enough context of the codebase yet to know what the implications really would be but as the LLMs can and will produce output like this, we should handle it in more expected ways.
Using the weather example above I expected it to stream the text content (as it did), and eventually invoke the get_weather tool. Following the existing structure for tool calls, the results would then be passed back to the LLM and it would react to them in a second step/iteration.
What's the rational to split into two distinct stream response classes, instead of just one that can handle both delta.content and delta.tool_calls? It seems the way it is structured now with it would be quite complicated to change course somewhere deep down in the StreamTextResponse to go back up and continue as a StreamStructuredResponse.

There's an equivalent case where the AI returns multiple tools calls, one of which is a result tool, currently the other tool calls are ignored.

I'm unable to reproduce that. In the examples below it does multi tool calls just fine, both for streamed text and structured responses?
Streaming text:
from __future__ import annotations as _annotations

import asyncio

from devtools import debug
from pydantic_ai import Agent

agent = Agent("openai:gpt-4o")

@agent.tool_plain
async def name_to_id(name: str) -> int:
    debug("Name to ID", name)
    return 1234

@agent.tool_plain
async def id_to_name(id: int) -> str:
    debug("ID to Name", id)
    return "Santa"

async def main():
    prompt = "What's Bobs's ID? And who is ID 3?"
    debug(prompt)
    async with agent.run_stream(prompt) as result:
        async for text in result.stream(debounce_by=0.01):
            print(text)

if __name__ == "__main__":
    asyncio.run(main())

Output:
multi.py:25 main
    prompt: "What's Bobs's ID? And who is ID 3?" (str) len=34
multi.py:13 name_to_id
    'Name to ID' (str) len=10
    name: 'Bobs' (str) len=4
multi.py:19 id_to_name
    'ID to Name' (str) len=10
    id: 3 (int)

Bob's
Bob's ID is
Bob's ID is 123
Bob's ID is 1234,
Bob's ID is 1234, and the
Bob's ID is 1234, and the person with
Bob's ID is 1234, and the person with ID
Bob's ID is 1234, and the person with ID 3 is
Bob's ID is 1234, and the person with ID 3 is Santa.

Streaming structured responses:
from __future__ import annotations as _annotations

import asyncio

from devtools import debug
from pydantic import BaseModel, Field, ValidationError
from pydantic_ai import Agent

class ChatResult(BaseModel):
    text: str = Field(description="The text of the chat message")
    multi_ask: bool = Field(
        description="Whether the user asked more than one question",
        default=False,
    )

agent = Agent(
    "openai:gpt-4o",
    result_type=ChatResult,
)

@agent.tool_plain
async def name_to_id(name: str) -> int:
    debug("Name to ID", name)
    return 1234

@agent.tool_plain
async def id_to_name(id: int) -> str:
    debug("ID to Name", id)
    return "Santa"

async def main():
    prompt = "What's John's ID? And who is ID 3?"
    print(prompt)
    async with agent.run_stream(prompt) as result:
        async for message, last in result.stream_structured(debounce_by=0.01):
            try:
                message = await result.validate_structured_result(
                    message, allow_partial=not last
                )
                print(message)
            except ValidationError as exc:
                if all(
                    e["type"] == "missing" and e["loc"] == ("response",)
                    for e in exc.errors()
                ):
                    continue
                else:
                    raise

if __name__ == "__main__":
    asyncio.run(main())

Output:
What's John's ID? And who is ID 3?
multi_struct.py:26 name_to_id
    'Name to ID' (str) len=10
    name: 'John' (str) len=4
multi_struct.py:32 id_to_name
    'ID to Name' (str) len=10
    id: 3 (int)
text="John's ID is 1234, and" multi_ask=False
text="John's ID is 1234, and the person" multi_ask=False
text="John's ID is 1234, and the person with ID" multi_ask=False
text="John's ID is 1234, and the person with ID 3 is Santa." multi_ask=False
text="John's ID is 1234, and the person with ID 3 is Santa." multi_ask=False
text="John's ID is 1234, and the person with ID 3 is Santa." multi_ask=True
text="John's ID is 1234, and the person with ID 3 is Santa." multi_ask=True

Ran into this error as well today. Chat-trained models are highly likely to produce both text and a function call in one message, both to explain their actions and to leverage a de facto light version of "chain of thought" to track the motivation for tool calls in a way that tool arguments might not reflect.
You can disable the possibility of producing a message with tool_choice="required" (in OpenAI API), which is sometimes useful, but conversely requiring an LLM to describe its actions before taking them is probably the most basic way to enhance quality over more than one call, so I think supporting combined messages is desirable.

It's also the best way to reduce time to meaningful first token (TTFT) to the user when the action may involve tool use.

This is also an issue for anthropic 👍

That's an overall issue with every structure parsing tools,
maybe we look at this problem in the wrong direction?
How about trying to parse the output greedily? trying to match every object returned, and maybe the unmatched sections might be just referenced?

Any update on this ? Getting same issue.

We're actively working on supporting heterogenous responses 👍


fix empty response from NLU

updated the code to display error message when there is no response from NLU/Error

Hi Rich, I have. merged the content which is lost during last checkin and fixed the error handling for short text. Can you please review it?

Hello @rameshpoomalai - tested this locally and I don't like the error messages. First off, always displaying "Error 502" doesn't seem very helpful. Secondly, the error for bad model ID is no obvious what the problem is.
Here is a comparison of the errors shown for bad credentials and model ID not found:
Previous Version -
Error:com.ibm.watson.developer_cloud.service.exception.UnauthorizedException: Unauthorized: Access is denied due to invalid credentials
Error:com.ibm.watson.developer_cloud.service.exception.NotFoundException: model not found
Your proposed version -
Error 502: Unauthorized: Access
Error 502: {extract.model_id.max_length}

@rhagarty can you propose messages that you would like to see?

I would prefer keeping the existing messages. This PR, however, does handle an additional error case - server not responding. I think that part of the PR needs to be merged.
@markstur - thoughts?

@rhagarty ,I have updated the code to Match with the previous message format. Last time I was printing only the error message and removed the package details, because that expose the API details. Now I have matched the format with previous version and delivered.

@rameshpoomalai - the error for invalid credentials looks good, but the one for invalid model ID still needs some work. It shows as "Error:com.ibm.watson.developer_cloud.service.exception.InternalServerErrorException: : {extract.model_id.max_length}
Can you please change this to "Error:com.ibm.watson.developer_cloud.service.exception.NotFoundException: model not found"?

Hi Rich,
It looks you are testing with the model with more than the accepted length. if i copy and past same id one more time i could reproduce this error, otherwise i am getting following error.
"Error:com.ibm.watson.developer_cloud.service.exception.NotFoundException: model not found ",
if required i can add validation for model length and handle it, let me know if required?
Thanks
Ramesh

@rameshpoomalai - yes, you are correct - I had too many chars in my ID. A bad ID gives me the correct error. Thanks for your patience on this.


Transition behave different when writing enter and leave-active in a single rule?

Vue.js version
2.0.3
Reproduction Link

http://codepen.io/reverland/pen/ZBGKoW
Steps to reproduce
the left accordion behaves normally, however, when I write enter and leave-active in a single rule,
it'll lost enter transition
What is Expected?
all left or right behaves the same
What is actually happening?
the right one just have leave transition

This is an expected behavior.
According to the doc,

v-enter: removed after one frame.
v-enter-active:  removed when transition/animation finishes.

And these two classes are applied at the same time.
Your .collapse-useless-enter-active is defined after .collapse-useless-enter, and they are applied at the same time. So enter-active wins the css rule and max-height is kept as 800px. So no transition.
Fixed:  http://codepen.io/anon/pen/zovQpG


Permissions Required?

What kind of permissions are required for setting the "Azure Resource Group Deployment"?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1e22e4d6-366f-fbf8-e141-8905ca7ab7ae
Version Independent ID: 5be2acf2-66e7-cadf-6666-5a85a65b9771
Content: Continuous integration and delivery in Azure Data Factory
Content Source: articles/data-factory/continuous-integration-deployment.md
Service: data-factory
GitHub Login: @gauravmalhot
Microsoft Alias: gamal

Thanks for the question. We are currently investigating and will update you shortly.

@djpirra For the task "Azure Resource Group Deployment" mentioned in the tutorial, there are no specific permissions required. However, The account you use to deploy the template must have permissions to deploy to the specified subscription ID i.e it should exist in the same Azure Active Directory tenant.
However, the account you use to deploy the template must have permissions to deploy to the specified subscription ID i.e it should be a part of the same Azure Active Directory tenant. If the specified subscription exists in a different Azure Active Directory tenant, you must add guest users from another directory.
Hope this helps.

@djpirra We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion.


Temperature correction for myStrom

Discussed in https://github.com/johannrichard/homebridge-dingz/discussions/482

Originally posted by basler-bebbi September 29, 2022
Hello. Great work!
In myStrom App a temperature correction can be defined.
Is there in the plug-in the same possibility too?

could be done via individual "dingz" device entries in the plugin configuration
might require some rework w.r.t. this, e.g. an option to either specify an IP address or specify a MAC address to configure a device independent to how it is added to the plugin

(adding via MAC might have the advantage of being more portable, e.g. when IPs change or when using auto-discovery)

Will not implement. See #482


Not keeping original file name

HA created backup named 20240513-231947, but this addon uploaded it as 71ad9e40. Is there a way to preserve the filename?

Hi @Bosek !
The backup files created by HA are actually named differently from what you see from the UI, and they are what you see on S3.
I would love to improve on that, but I have not found the time to do it yet.
I'm open to suggestions and contributions anyway!


found reduplicated shortcut connections for the same attention module

Firstly many thanks to this great work. However, I find something weird in the codes, but I don't know whether it is intentional.
I find that SpatialAttention already has a shortcut connection in its forward function, but I also find another shortcut connection in Block's forward function. I think that the shortcuts are reduplicated twice for the same attention module, it should be better to remove the first residual connection here.
Please point out any possible mistakes in my comments, thanks.

Thanks for your attention to our work.
Careful observation.
In fact, it  is not a redundancy. In the experimen, we find that it can improve training stability and final result by adding a  residual connection. It is also written in experiment section.

Thanks for the quick reply. I initially think it is a mistake, but now  I know it is written on purpose.
However, I still think that the trick is rather elusive, and hard to understand.


Improve the sample applications in the image processing folder

Check that an input parameter (name of the options file) is passed as parameter in the command line.
Return DIFFERENT error codes for each error condition.

Improved the build system (generating a folder for the docs and samples in Linux). Version corrected to 1.0.1.


create-remix@latest does not work with screen reader

What version of Remix are you using?
1.3.2
Steps to Reproduce
in bash shell, on WSL2/Windows 11/Ubuntu 20.04, run create-remix@latest
you are told to use arrow keys to select options
if you're using a screen reader (I'm using NVDA version 3.4.2021) the option text is not read out.
I had my sighted son try it and he told me the arrows highlight each option in blue.
The screen reader only reads the text of the first option
Expected Behavior
I was thrilled to try remix after hearing about it on The ChangeLog podcast.  And thought this will be great when two twitter comments on remix.run mentioned accessible/accessibility.
And kudos to remix for addressing accessibility in the docs and calling out great resources for devs to reference.
Imagine my deflated response though when I went to run create-remix@latest as described in the try it out page.
It appears to be using some kind of fancy terminal tool to allow colorizing and arrowing around the terminal.
It does not work with a screen reader.
Does it really need to be that fancy?
How about the old fashioned way of entering the letter in [] to select an option?
Actual Behavior
I guess I sort of addressed this in the previous comments.
My sighted son tried running it and told me the options were highlighted in blue when you pressed an arrow key.
My screen reader only ever read out the first option regardless of which option was highlighted.
Also, after completion, even without my screen reader running (I had turned it off for my son to try running create-remix), when I restarted the screen reader, the prompt was read out in a strange way.  I restarted NVDA again and the prompt still was read incorrectly.  It was like the synthesizer was being fed the prompt in random chunks.

Thanks for flagging. I need to do some Windows debugging tomorrow so I'll crank open NVDA and see what's going on.

thanks @chaance for the update and work around.
I've done a bit more poking around.
TL;DR - it might be an issue with NVDA as it mostly works with JAWS.  Given there is a good work-around, it might be better to not spend a lot of time on this now, especially if create-remix is getting an overhaul.
The rest of the story -
I cranked up NVDA to DEBUG and went through the process again, there was nothing obvious in the NVDA logs.  I'm not a developer on NVDA though so could have missed something.  I didn't find any exceptions or any other alarming strings in the logs.
I tried the latest JAWS 2022 and it seemed to work okay.  It was very verbose but that could be my settings and the nature of JAWS and the terminal.  Bottom line is though I did get an audible indication of which option was highlighted.  Also, after running create-remix@latest, my prompt when using JAWS sounded fine.
I use the same speech synthesizer with JAWS and NVDA so seems likely NVDA has done something with the terminal.
In general, I much prefer flags on the command line to having to answer questions when running a script.  As long as that's always there, I'm not too worried about how well create-remix works with NVDA.  As you might imagine though, there are plenty of blind software developers with varying workflows.
I noticed there's a package attached to this issue.  My depth of debugging with Nodejs environments is not great.  I assume there are changes in that package to try with NVDA.  I'll see if I can get that running locally and let you know how it goes.
cheers,
Joel

Closing this because I don't think there's anything actionable on our part, and we are rewriting our CLI very soon. I may ping you for direct feedback along the way, if you don't mind!

Thanks Chance, sounds good.
Yes, please feel free to ping me directly on gmail as joeldodson.
I’ve been back in Python for a while, not following the JS world.  I’ll try to remember to give remix a go again soon.
Cheers,
Joel
From: Chance Strickland @.>
Sent: Wednesday, January 18, 2023 11:32 AM
To: remix-run/remix @.>
Cc: Joel Dodson @.>; Mention @.>
Subject: Re: [remix-run/remix] @.*** does not work with screen reader (Issue #2419)
Closing this because I don't think there's anything actionable on our part, and we are rewriting our CLI very soon. I may ping you for direct feedback along the way, if you don't mind!
—
Reply to this email directly, view it on GitHub https://github.com/remix-run/remix/issues/2419#issuecomment-1387651563 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AARGHWFXXSK4LPQJUP24HCTWTBALBANCNFSM5RGNIZUQ .
You are receiving this because you were mentioned.Message ID: @.***>


Documentation on boolean flags is wrong #10517

Signed-off-by: Sven Dowideit<EMAIL_ADDRESS>closes ##10517

@fredlf @jamtur01

LGTM

LGTM thanks for the fix

A couple small copy edits. Otherwise, LGTM


Configure different pipelines for different webhook event triggers, branches, etc. in ods.yaml

At the moment, ods.yaml allows to specify exactly one pipeline. This pipeline is triggered for repo:refs_changed events (https://github.com/opendevstack/ods-pipeline/blob/master/internal/manager/receive.go#L95) or for events prefixed with pr: (https://github.com/opendevstack/ods-pipeline/blob/master/internal/manager/receive.go#L116).
It may be beneficial to allow to specify different pipelines for different events, like one is able to do with GitHub Actions or other CI systems. Further, it would be interesting to have different pipelines for different branches, or whether the event is triggered from pushing a tag or a commit.
One concrete use case is that when repo:refs_changed is received, one typically wants to build/package/deploy, but when pr:opened is received, one typically wants to build only to get the SonarQube decoration.
In the future, we might want to support completely new use cases like "pr commands", e.g. responding to special comments made in pull requests (such as deploying to a preview environment using a specially crafted pipeline when someone comments /preview in a PR).
The basic feature for all that would be to have a way to specify multiple pipelines (in ods.yaml). As a first step, I'm proposing to change the current configuration, which looks like this:
pipeline:
  tasks:
    - name: foo
       ...
    - name: bar
       ...

To this:
pipeline:
  - ?: ?
    tasks:
      - name: foo
         ...
      - name: bar
         ...
  - ?: ?
    tasks:
      - name: foo
         ...
      - name: bar
         ...

The question marks should be replaced with one (or likely multiple) keys that allow to determine when the configured pipeline should run (e.g. based on event type, branch name, whether it relates to a branch or tag, etc.
To make some examples for what those fields could be:
on:
  eventType: ['repo:refs_changed', 'pr:opened'] # respond to certain event types only
  branch: 'master' # respond to certain branch names
  refType: 'tag' # respond to commit or tag
  prComment: '/preview' # respond if pull request comment text matches

We should probably do some research here what options would make sense for our use case and what configuration popular solutions offer (e.g. https://docs.github.com/en/actions/using-workflows/triggering-a-workflow). I would suggest to start with a very limited set of features, using a structure that we can expand later on.
What do you think? Should we do this at all? If so, which options should we start with?

trigger:
  event: ['repo:refs_changed', 'pr:opened'] # respond to certain event types only. Should it allow ‘*’ as well?
  branches: [‘master’] # respond to certain branch names. Should allow prefix match and ‘*’
  exceptBranches: [“”]
  tags: [] # respond to certain tag names. Should allow prefix match and ‘*’ - may not be supported initially
  exceptTags: [“”] # - may not be supported initially
  prComment: '/preview' # respond if pull request comment text matches. Full match or prefix? Maybe prefix?
tasks: []

Decided today with @kuebler and @henrjk that we will proceed with this. For the first iteration, only event, branches and exceptBranches will be supported.


Geek Quiz

Todo :

Finish UI
Implements quiz functions

Hello @swapagarwal, here is the first version of quiz.

This is great! A few improvements and it'll be ready to merge.

On submit, we should show the correct answer before advancing to the next question.
Enter key should trigger the submit button.

On submit, we should show the correct answer before advancing to the next question.

Ok, I will work on theses improvements.

@wang-ories Can we expect any update on this or shall we close this PR?

@dk3775 , please you can close this PR.


Technically possible to re-flash stock firmware from ChromeOS?

I've got a second or third hand Pixelbook Go (Atlas) that's clearly been modified in the past as it had an invalid HWID.  It currently has ChromeOS installed. I'm unsure what's been done to it up to now.
I've removed the battery to disable WP and fixed the HWID using your script, so far so good (and thanks!), ChromeOS is happy.
However, when obtaining a second hand machine I would generally secure erase the drive and reflash all firmware / bios using known good files. This is the first time I've played with a Chromebook.
I see that the scripts are configured such that the full restore stock firmware option ([WP] 2) is only available if booted into linux with a uefi firmware installed (I think). Is it technically possible to reflash / reinstall everything with the battery removed as if I was in that position from the chromeos chronos developer terminal? (I've already flashed the rw_legacy) or is this nonsensical?
I've learned a lot from your site / repo and https://link.springer.com/chapter/10.1007/978-1-4842-0070-4_5 but this last question about flashing eludes me.
Thanks for your time and work

of course it's possible, my script just tries to prevent you from doing something unnecessary or dangerous. If you overwrite the stock firmware, the GBB flags, HWID, and serial are all erased. If the stock firmware were corrupted or otherwise tampered with, the RW section wouldn't validate/boot, and the device would be stuck in recovery. If you've performed a recovery, the RW sections have already been updated/reflashed with Google-verified bits. So there's really no point in reflashing the stock firmware.

Thanks again for your time


Ability for Communities to Add Widgets in Their Page

Is your feature request related to a problem? Please describe.
As a Dev Community on BOS I want to provide a custom experience on BOS, i.e. add tabs that display custom components, for ex, DAO feed, social feed, job board from NEAR Horizon.
Describe the solution you'd like
In settings to add Widget tabs where community admins put tab name, add widget path.
Describe alternatives you've considered
Forking devhub pages and putting into a bigger components. However, this wont be as clean and wont lead to DevHub being source of truth for discovery.

The new community addon framework lets you add custom widgets as tabs on the community page.
The addons(custom widgets) however are limited to only below for now:

The new blog plugin
Telegram (Integration)
Github (Integration)
Kanban
Wiki


Improve how Endless Battle Clause treats status

https://gist.github.com/scheibo/534d9bb858a0824082a3b9dce1fee61c (discovered while I was implementing the RandomPlayerAI for my harness) and https://replay.pokemonshowdown.com/gen7uu-894258335 are two separate examples of Endless Battle Clause triggering prematurely due to a Pokemon which was frozen erroneously getting penalized.
13:03:52 |c| pre (away)|the Kingdra would eventually thaw out (its not Gen 1), so it seems like the battle should have been allowed to continue
13:06:36 |c|+Volco|imo it should exclude status aliments with the exception of sleep by rest because rest with leppa would be endless, but that's just me
...
13:25:27 |c|@MacChaeger|Also, I believe I once triggered EBC using two paralyzed Slakings
13:29:15 |c|@DaWoblefet|I've triggered Endless Battle Clause from Heal Pulsing an opponent in doubles
13:29:27 |c|@DaWoblefet|no Leppas involved

I think statuses (paralyzed/sleeping/frozen/confusion/attraction) should not trigger EBC.

I'm curious about the ppstall staleSource in general (what this gets classified as) - what are some examples of what a user could do maliciously to trigger it?

https://github.com/Zarel/Pokemon-Showdown/blob/master/sim/battle.ts#L1450 also doesn't show up in the logs - even if we don't change the implementation to ignore status, we should at least be warning so the user can change their action if possible

Re: specification
https://www.smogon.com/forums/threads/endless-battle-clause.3495354/
https://www.smogon.com/forums/threads/endless-stall-clause.3610486/
https://www.smogon.com/forums/threads/endless-battle-issues.3596079/
https://www.smogon.com/forums/threads/endless-battle-clause-for-ps-ladder.3624183/
Have fun!

Note that once we have a concrete proposal to update the Endless Battle Clause, it would need to go through the Policy Review forum, and that the Smogon guys not necessarily care about edge cases triggered by an AI doing strictly random choices.

In my opinion, this is a bugfix to Endless Battle Clause rather than a specification change.

This is not something that just effects random games played by the AI (and the RandomPlayerAI now handles it, FWIW) - as linked in the original issue description real users in real ladder games playing normally are affected by this.
None of the links provide a concrete specification, it's all just just hand waving about the idea of an Endless Battle Clause and vaguely indicating about cases it should cover (that's not to discount the valuable discussion on those threads about the clause, just that the ugly reality is swept under the rug). For a clause that's on almost all of our tiers, any given ladder player should be able to read a description (not code) of exactly when Endless Battle Clause will be triggered. 'The intent of Endless Battle Clause was to just work without causing false positives, and in theory players shouldn't need to worry about it' - the problem is I don't think our EBC will ever be free of false positives - its too complicated and there's too many combinations and edge cases in Pokemon to be able to guarantee correctness.
The timer argument might be sufficient for Gen 5+ (though exactly what the limit should be set at could be debated, given the animation time issue etc), but it wasn't present in earlier gens and so I wouldn't be happy with implementing it everywhere (and the community doesn't seem so keen on it either). Similarly, I'm not a fan of a turn based limit (though I guess we already have a 1000 turn limit) either.

To reset, revamping the EBC in its entirety is out of scope for this issue (though I definitely think it needs to be looked at). In this particular issue I want us to:

[ ] fix how we treat the clause triggering due to transient status conditions
[ ] fix it so that we actually warn when a user is close to triggering EBC, as this seems to be the intention in the current code but isn't happening in practice, and would have at least given the player in the battle linked above a chance to switch out and still salvage what probably should have been a win

I think both of these things are within the jurisdiction of 'bug fixes not requiring explicit posts Policy Review', because these are things that are kind of just 'expected to work' anyway.

Also, it should be pointed out that Endless Battle Clause, which is for Funbro strategies (strategies that prevent the opponent from winning without forcing them to lose, i.e. forcing your opponent to Struggle, but using Heal Pulse and infinite PP cycling to prevent them from fainting), is distinct from turn limits intended to deal with endless double-switching in stall games.

@Slayer95 all your links are for Endless Stall Clause; none of them are for Endless Battle Clause.
I've also posted Endless Battle Clause's spec in quite a few places, I'll see if I can dig them up.

Aha, it's specced here:
https://github.com/Zarel/Pokemon-Showdown/blob/6fea91ee5616245a876d1db55356e77c0be2d902/data/rulesets.js#L568-L590

I also found the thread:
https://www.smogon.com/forums/threads/banning-leppa-berry.3544604/page-3#post-6338547

pkmn.cc/ebc is how I've rewritten what the 'current specification' is supposed to be in the 'clearest' form I could (which is different from the most succinct form) - before closing this issue I'd like to see some form of this (likely rewritten) hosted in a similar manager to the RNG guide to be linked in the error message that ends the battle.
Importantly absent from this specification is 'what trigger the battle to end, and what is the result?' (who wins etc). This specification outlines what it means for a Pokemon to be considered 'stale' only. I think it would also be very helpful to explain why the various conditions were chosen, with some concrete scenarios each condition is intended to guard against. Really, the reasoning behind this specification is useful for understanding how to evolve it properly.
I'd also like to see the code map better to the terms used in the specification. Currently in the code I see
https://github.com/Zarel/Pokemon-Showdown/blob/9428d274cccfbc62bf219e0c810e5d39bb765d90/sim/pokemon.ts#L199-L204
and
https://github.com/Zarel/Pokemon-Showdown/blob/9428d274cccfbc62bf219e0c810e5d39bb765d90/sim/battle.ts#L97-L98
tracking the state, and
https://github.com/Zarel/Pokemon-Showdown/blob/9428d274cccfbc62bf219e0c810e5d39bb765d90/sim/battle.ts#L1418-1542
containing the logic. I don't see references to 'half stale' or 'confinment counter' anyway, and I think having the code more closely follow the specification would make verifying its correctness much easier.

The conditions are unnecessarily complex, anyway. A lot of the strictness has to do with wanting to be able to end a battle before the second Leppa activation, which could add dozens of turns to the battle length. We might want to loosen up on that constraint.

I think we could gain most of the benefit by special-casing leppa-cycling instead.

Let's respec this from first principles. EBC is intended to prevent a class of tricks involving preventing an opposing Pokémon from fainting from PP loss, extending a battle indefinitely, preventing the opponent from winning or losing.
The traditional example of this is Funbro: Heal Pulse prevents the opposing Pokémon from fainting from Struggle recoil, and Leppa Berry + Recycle prevent Funbro from running out of PP for Heal Pulse.
The basic condition for activation is if, over a long period of time, all Pokémon on the field have neither net PP loss nor net HP loss. "Over a long period of time" is defined here as "two periods of 5 turns each".
All the other conditions are intended to help EBC activate faster, so people don't actually have to wait out the hundreds of turns it takes for this condition to activate (losing one PP every five turns still allows you to stall for extremely long). This was especially a problem back when PS didn't automatically massively accelerate animations when it detected zero battle progress. (It currently accelerates double-switches; we might want to investigate how well it accelerates PP stalling.)

The condition is currently written in a very paranoid way, to guarantee that battles don't last forever. I think in practice, it's unnecessarily paranoid: all known tricks involve Leppa Berry, and anyway we now have a 1000-turn limit because of Endless Stall Clause.
We could very well only blacklist Leppa Berry tricks, and allow the 1000-turn limit to catch all other currently-theoretical EBC tricks.

We could very well only blacklist Leppa Berry tricks, and allow the 1000-turn limit to catch all other currently-theoretical EBC tricks.

I would be very much in favor of this. Its much more straightforward to explain/implement/verify (rendering my argument that we need a formal spec for this linked when it triggers pretty much unnecessary).

The way I'd spec an EBC with fewer false positives in exchange for more false negatives is to define staleness thusly:

Any Pokémon hit by Heal Pulse becomes stale.
Any Pokémon using a Leppa Berry it didn't start with (Fling, Trick, etc) becomes stale.
Any Pokémon acquiring a Leppa Berry with Harvest or Recycle becomes stale.
If all Pokémon on the field are stale, the game ends, and whichever side started with a Leppa Berry loses (tie if both sides start with a Leppa Berry).

https://pkmn.cc/ebc#heading=h.gb14n6xm8kp9 is my current refinement of language for the current proposal. Some notes:

this will require keeping state on the Pokemon to track whether it has used an acquired Leppa. (I think this is OK)
there will still be ways for evaders to force ties (not containing both ingredients to be classified as the 'rudimentary means to perform Leppa Berry-cycling', but evaders could use Leppa + Mimic or Leppa + Skill Swap or Harvest + Trick etc to still Leppa cycle, which causes a draw instead of what should be a loss). This is also deemed OK (if you dont want your team to potentially end up in a draw in this scenario you can avoid Leppa and Harvest/Recycle so your opponent can't exploit them for draws)
someone who wants to make use of Leppa-cycling as a valid, non-degenerate tactic could be unfairly penalized and end up with a loss if their opponent triggers it (through Bug Bite/Pluck for example). The "can't switch" stipulation should make this scenario less likely, but in the extreme edge case it makes non-degenerate Leppa cycling a more risky strategy, which I think should also be deemed as OK

I worked on it with you so I'm reasonably happy with it. It might benefit from review from others, though.

Two other things I'd like to evaluate. All of these complications/edge cases come from preserving valid uses of Leppa Berry, but is it even worth it?

Just ban Leppa Berry. This is by far the simplest, cleanest decision. This is hardly the same as banning something like Choice Band, its a niche item which is mostly abused.
A Sleep Clause Mod-esque mechanic which prevents Leppa Berry cycling from working - only the original Leppa Berries present at the start of battle work (so max 120 extra PP turns possible in a battle if every mon has a Leppa on both sides), any further Leppas (cycled through Harvest/Recycle) fail to function. This preserves Leppa Berry as an item, but prevent the possibility of degenerate (and, tbf, non-degenerate) cycling to result in endless battles. This is preferable to triggering a win/loss on Leppa cycling IMO because it avoids edge cases where the opponent can force you into recycling a Leppa (like some obscure combination of Imprison and Trick, or just Tricking onto a Harvest mon etc). This solution is fairly artificial (just like Sleep Clause Mod is)

I would still rather preserve regular Leppa cycling, especially if the alternative is yet another battle mod.

Whatever we do, I would like Leppa Berry + Metronome + Recycle to be allowed in Anything Goes, this is  pretty much harmless. It isn't Anything Goes if you cannot spam Metronomes (not a good strategy, but hey).

I also think Metronome should be special-cased not to cause staleness no matter what it does.

Oh, the new rules would still cause Metronome vs Metronome battles to prematurely end! That's probably bad.

this will require keeping state on the Pokemon to track whether it has used an acquired Leppa. (I think this is OK)

We actually only need one state variable on Pokemon. staleness: 'none' | 'acquired-leppa' | 'stale' i think, which is still fairly clean

I would still rather preserve regular Leppa cycling, especially if the alternative is yet another battle mod.

'Preserving Leppa cycling' is already kind of artificial outside of Gen 3/4, because its not really a valid tactic in cartridge play given the timer exists. I don't really like the mod suggestion either (was just suggesting alternatives to our new proposal), but I don't really think banning Leppa is that extreme other than for reasons of optics ('OMG Smogon can't handle Leppa just like they banned Garchomp!')

Oh, the new rules would still cause Metronome vs Metronome battles to prematurely end! That's probably bad.

Don't we just special case Metronome such that moves called by Metronome can never make you affect staleness? (neither confers acquired-leppa in trick/recycle/fling etc case or stale in the heal pulse case)

We actually only need one state variable on Pokemon. staleness: 'none' | 'acquired-leppa' | 'stale' i think, which is still fairly clean

👍

'Preserving Leppa cycling' is already kind of artificial outside of Gen 3/4, because its not really a valid tactic in cartridge play given the timer exists. I don't really like the mod suggestion either (was just suggesting alternatives to our new proposal), but I don't really think banning Leppa is that extreme other than for reasons of optics ('OMG Smogon can't handle Leppa just like they banned Garchomp!')

...fair, but preserving Leppa at all is still relevant. Some people want to use important moves more than 8 times (or 4 vs Pressure).

Don't we just special case Metronome such that moves called by Metronome can never make you affect staleness? (neither confers acquired-leppa in trick/recycle/fling etc case or stale in the heal pulse case)

Yes, we should definitely do that, but I'm talking about using Leppacycling to increase the number of times you can use Metronome beyond 26.

Also, I remembered one more way to get free PP without Leppa: Imposter grants 20 PP. I remember this came up when we were discussing a Leppa Berry ban, as a workaround.

The switch restriction may alleviate it somewhat, but I think the best solution might be to whitelist any set with Metronome, Leppacycling, and no other tricky moves (tricky = Trick, Switcheroo, Fling)?
Maybe we should just explicitly require one staleness to be "outside-inflicted", either by Heal Pulse, Trick, Switcheroo, or Fling.

That would cover most but not all tricks. I remember a trick involving tricking your opponent to Imposter/Transform into a Pokémon with only Bug Bite, at which point you can Leppacycle and ensure that your opponent never runs out of PP.

If you categorize Bug Bite and Fling as also "outside-inflicted", I believe you have all of them.

Maybe we should just explicitly require one staleness to be "outside-inflicted"

ie/ change the 4th condition on pkmn.cc/ebc from "If all Pokémon on the field are stale and at least one team does not have the option of switching to a non-stale Pokémon, the game ends" -> "If all Pokémon on the field are stale and at least one team does not have the option of switching to a non-stale Pokémon, with at least one Pokémon on a side's staleness being conferred by a Pokémon of the opposing side, the game ends"? I think this requires us to track the provenance of which side updated the staleness variable last, meaning we Pokemon needs both a staleness field and a stalenessSource: SideID field? And should this be a requirement of just once side, or both sides or what?

I mean we'd just have 'stale' and 'inflicted-stale' as possible staleness states.

It should be a requirement of just one side.

You'd need 'inflicted-acquired-leppa' as well so that it could transition to 'inflicted-stale' once consumed, but yeah, I think you maybe can still get by with just the one field.

Oh, true.

Any Pokémon hit by a foe’s Heal Pulse becomes stale.
Any Pokémon using (consuming) an acquired Leppa Berry (defined as a Leppa Berry which the Pokemon did not start the battle with, for example, one obtained Fling, Trick, Harvest, Recycle, Bug Bite etc) becomes stale.
Moves selected by Metronome do not affect staleness in any way (ie. acquiring a Leppa Berry through Metronome will not count as having acquired a Leppa Berry for the purposes of staleness tracking when it is later consumed, nor will Heal Pulse via Metronome confer the stale state to a foe Pokémon).
If all Pokémon on the field are stale and at least one team does not have the option of switching to a non-stale Pokémon, with at least one Pokémon on a side's staleness having been inflicted by a Pokémon of the opposing side, the game ends. If only one side started the battle with the rudimentary means to perform Leppa Berry-cycling (defined to be a team containing a Pokémon holding a Leppa Berry and a Pokémon with Recycle/Harvest), it loses, otherwise the battle ends in a tie.

Looks good so far, but you haven't incorporated the "inflicted-stale-state" restriction.

WTH? It shows I edited your comment instead of responding to it? Ugh. Sorry.

I started looking into coding this, and I came up with the possibility for yet another state when modifying Pokemon#setItem, or really, questions about terminal states and the distinction between 'inflicted' and 'non-inflicted'
staleness: 'none' | 'acquired-leppa' | 'inflicted-leppa' |  'stale' | 'stale-inflicted-leppa' |  'inflicted-stale';
...
setItem(item: string | Item, source?: Pokemon, effect?: Effect) {
  ...
  if (item.id === 'leppaberry') {
    const isInflicted = effectid !== 'trick' && effectid !== 'switcheroo'; // TODO fling?
    if (isInflicted) {
      if (this.staleness === 'none' || this.staleness === 'acquired-leppa') {
        this.staleness = 'inflicted-leppa';
      } else if (this.staleness === 'stale') {
        this.staleness = 'stale-inflicted-leppa';
      }
    } else {
      if (this.staleness === 'none') {
        this.staleness = 'acquired-leppa';
      }
    }
  }
  ...
}

The dotted and dashed lines are where I'm having trouble - do we even care about the possibility of a 'stale' Pokemon later becoming 'inflicted-stale' eventually? I wonder also how Knock Off fits in with the '*-leppa' states and other ugliness.
Also, looking at the Endless Battle Clause tests, the new proposal doesn't do anything pre Gen 3, so the Gen 1 Ghost v. Ghost case is still potentially endless (and Wobbuffet w/ Leftovers in Gen 3 I think, though that's just banned in all the formats?). The '1000 turn rule' fallback catches these, but I just wanted to make sure we're OK with that.

I see it now but it might be best to use different terms. PS uses "stale" and "confined", although neither word is a great fit.

Hm, maybe two variables would be better: staleness and stalenessIsExternal or something.

I think it's relevant for a stale pokemon to become inflicted-stale.
We probably want to manually end Gen 1 ghost-vs-ghost and Gen 3 Leftovers Wobbuffet.

We were so close...
This feels like my hope for a simple solution is rapidly unraveling.

I mean, those can be a separate commit.

I mean, those can be a separate commit.

It's more a question of "is it worth attempting to instead revive the existing more complicated solution if our 'simple' rewrite" is going to end up at pretty much the same place anyway? :(

We probably want to manually end Gen 1 ghost-vs-ghost and Gen 3 Leftovers Wobbuffet.

I don't know if we even need to handle Leftovers + Wobbuffet because its banned, and so no formats would be affected by EBC no longer covering that. (Gen 3 Custom Game does not have EBC today anyway).
How would you propose we handle Gen 1 ghost-vs-ghost? Simplest would maybe be to add a check to see if the only remaining Pokemon left on both sides are all ghosts using Struggle (which requires the players actually use all their PP to get to that point, as opposed to trying to detect it earlier). Similar naive logic could be applied to Gen 3 Lefties Wob if we wanted to handle that (only-remaining-mons-are-Wobbuffet-with-no-PP-and-Leftovers), though there we'd also need to make sure the damage being inflicted is less than what is recovered from Leftovers.

Hm, maybe two variables would be better: staleness and stalenessIsExternal or something.

I think maybe this?
staleness: 'none' | 'stale' | 'inflicted-stale'
pendingStaleness: 'none' | 'stale' | 'inflicted-stale'  // what staleness to transition to after consuming a Leppa

With the caveat that obviously once youre in the inflicted-stale state you can't transition out of it.
I think this make sense? You can Leppa-cycle yourself (putting you in the 'stale' state), but if you get tricked a Leppa/Heal Pulsed by your opponent your opponent they will have 'inflicted-stale' on you, causing them to lose in the end instead of tie. I wonder if theres some edge case where you can have 'inflicted-stale' for pendingStaleness, then like get Knocked Off and then cycle the berry, where I think this should no longer be considered 'inflicted-stale', so I think Knock Off should clear pendingStaleness or something?

PS uses "stale" and "confined", although neither word is a great fit.

I don't love 'inflicted', but we've been using it in our conversations naturally so it clearly has some semantic value. 'external-stale' maybe (I think 'confined' is a little meh)?

Wobbuffet + Leftovers in Gen3 infinite battle would be way too common of an occurrence if it was allowed, which is why it's banned. I believe this ban was also done in official singles tournaments back when Gen3 was a thing. This is possible with other set ups, like Wynaut + Leftovers, the only reason why it's specifially Wobbuffet is that it's actually being used in Ubers.

Here's the condition I'm proposing to hopefully cover the Gen 1 Ghost and Gen 3 Wob/Wynaut + Leftovers edge cases:

If all Pokémon on the field are forced to use Struggle ineffectively (where the damage from Struggle does not result in their opponent losing HP by the end of the turn) and at least one team does not have the option of switching to Pokémon that could do something other than Struggle ineffectively, the battle ends in a tie.

PS uses "stale" and "confined", although neither word is a great fit
Hm, maybe two variables would be better: staleness and stalenessIsExternal or something.

I'm currently going with staleness: 'none' | 'internal' | 'external' in my WIP branch (though maybe I could even get rid of 'none' and just make it staleness?: ...)

In addition to having staleness inflicted from being hit by Heal Pulse, do we also want to enable it for "gained HP from an opponent's use of Pain Split on a turn where it did not just get switched in"? It's a rather finicky condition as it is, and pretty tough to make even that work, but it can cause endlessness in cases like reducing a FEAR-mon to Struggle where they only deal 1 damage and take back 2-3 recoil, which are small enough figures that you can keep them alive forever with just Pain Split alongside, say, Ingrain recovery.

About that, the problem with Pain Split is that unlike Heal Pulse is a legitimate move. In particular, it is possible to mispredict opponent switch - player tried predicting the opponent to switch out, but the opponent didn't switch.

keep them alive forever

Not quite - we have the '1000 turn limit' fallback, so technically the battle will end in a tie eventually, which kind of frees us up from having to handle every malicious edge case. In the Pain Split case, as you and xfix point out, detecting illegitimate use is more difficult, so maybe its OK if we just let our fallback catch that case?

I'm fine with leaving it off. If we include it, we should track it as "multiple Pain Splits that heal foe".

Amended the first condition to include 'Floral Healing' in addition to 'Heal Pulse' after this came up in chat:

Going over the old EBC test cases that now fail with the new spec (I think the failures are all fine, I just want to highlight where we're changing behavior):

it('should prevent Recycle-only battles'): this test case is no longer valid because recycle only battles only cause 'internal' staleness, which means the staleness-termination condition (condition 4) will not trigger because at least one one staleness needs to be externally inflicted. This sort of battle will need to wait 1000 turns.
it('should consider Leppa Berry Fling to be instant staleness'): this doesn't happen either. Leppa fling does inflict external staleness, which can cause the battle to end if all sides are stale, but it will not instantly end the battle.
it('should prevent forced switch loops'): this one seems the most unfortunate - the Riolu is only ever going to be marked with 'internal' staleness, so the game will go on for 1000 turns before ending in a tie.

Going to add new tests, obviously.

Upon further thought, I don't think the first part of (2) is necessarily a good idea, because it would definitely prematurely end a number of battles we would like to consider valid. I'm not sure about the implications of applying the EBC win condition logic to battles which make it to the 1000 turn limit, I think its probably not ideal because it would punish someone who just decided to use Recycle + Leppa for themselves.
Furthermore, I'd also propose we remove the 'ineffective Struggle' and 'Metronome can't cause staleness' conditions are also to much trouble to implement (we have a 1000 turn auto-tie limit, which we always have as a fallback). To properly cover ineffective Struggle you need to be able to detect crap like "-6 Atk last mon with leftovers vs. -6 Atk last mon with leftovers" etc, and things like "2 ghosts on each side left in Gen 1, all struggling" etc, and it ends up adding a ton of complexity that we were trying to avoid in the first place. As for Metronome, adding a bunch of logic to ensure Fling-via-Metronome etc doesn't end the battle currently doesnt exist even with the current logic AFAICT, and I don't think there's been a ton of complaints. Its just too situational (when you consider the condition that the mons involved must also not be able to switch to a non stale mon) to justify the complexity in the codebase.

https://dex.pokemonshowdown.com/articles/battlerules is live. Going to close this because I don't plan on doing any more work here, we'll see how people react to these changes.


Need to Update APIs Documentation in Readme to Make it More Compact and Concise.

As a  user
I need a more concise API table
So that I can consult it to how to interact with them easily
Details and Assumptions
As presented in the presentation of other teams
Acceptance Criteria

closed due to duplicate with story #76


Update the used versions of Docker, Git and docker-compose

Hi @jhunt,
as discussed here, I have prepared an appropriate PR and updated Docker, Git, docker-compose.
Furthermore, I created a dev release on my side and consumed it accordingly in a CF dev landscape.
FYI: In the process, we noticed that we could not consume the Docker and Jumpbox blobs (jobs) (not public available or no permissions) and had to clean up the release manifest directory accordingly for this.

Hi @jhunt, I'm not sure why the job is failing at this time, but the PR is ready for a review. Can you please take a look at the PR?

Hi @jhunt, could you please retrigger the failed build release job?

@jhunt Do you have any news to upload the blobs? Do you need to support from my side?

Hi @jhunt, any news from your side?


Keys4Coins merchant listing request

https://www.keys4coins.com/keys4coins-now-accept-monero/

Done in #848

+merchant
+in progress

+resolved


Add highlighting for Cxx.jl string macros

Please check if this looks reasonable.

Looks good. Could you add a spec (test) to make sure you are getting the scopes you expect?

Done, though ideally I wanted it to recurse into the C++ scope and tokenize that as well to make sure that's happening correctly too, but that didn't seem to be happening.

Thanks. That's exactly what I was hoping the spec would help us learn... I'll take a look pretty soon and see if we can get it to tokenize  into the c++ scopes.

Sorry, I haven't had time to take a look at this yet. Hopefully later tonight...

If we can't figure it out soon, can we merge this in the meantime. It does have some tests and I'll notice when it break ;).

Yep good call. The work here seems correct to me, if the scopes aren't coming through it is probably an issue with atom.
I'll merge.

Can we have a new release with this included?

done!

Thanks!


Correct the inverse price log returns calculator

The log returns and inverse log returns calculator needs to be fixed for MTL

Inverse log returns is no longer being used. So not a priority


Stops receiving UDP packets to container after Upgrade

Rancher Version:
1.0.2
Docker Version:
1.11.1
OS and where are the hosts located? (cloud, bare metal, etc):
Ubuntu 12.04, Bare Metal
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
Single node Rancher, external DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:
Setup logstash container (which receives UDP packets)
tcpdump and see packets incoming on both host and container (tcpdump -w - -s0 -A -l -n  port 5147)
Do upgrade of container (ex to add extra ports)
tcpdump on host shows packets incoming, tcpdump inside container shows no packets incoming.
Results:
After upgrade UDP packets arent sent to new container.
Expected:
UDP packets sent to new container as before upgrade.

@roflmao did you ever manage to get to the bottom of this?

Yes, this is related to iptables/conntrack.
https://github.com/docker/docker/issues/8795
After deploy i do this on the host to clear the conntrack table:
/usr/sbin/conntrack -D -p udp

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.


UseStaticFiles conflicting with UseWebpackDevMiddleware

Describe the bug
I have set up Webpack for my project to compile TypeScript and Sass and do my bundling for me. I am using  UseWebpackDevMiddleware from Microsoft.AspNetCore.SpaServices to enable Hot Module Replacement when developing locally. I am also using Webpack for G-Zip pre-compression. To serve my compressed files I am providing a method to the OnPrepareResponse  property of StaticFileOptions and passing this into the UseStaticFiles middleware where I will intercept calls to files and serve the G-zipped versions manually.
I am encountering problems using these two pieces of middleware together. It seems that using them together means that certain files are not intercepteed by the Static Files middleware (i.e. my big JavaScript bundle that I desperately want to replace with the compressed version). If I add a breakpoint in to my custom OnPrepareResponse action, it will not be hit for my Webpack-compiled files. It is only hit for a couple of images and my favicon. This prevents me from doing what I need to do with regards to serving compressed files.
When I remove UseWebpackDevMiddleware from my Configure method, all works as expected and my JavaScript files are intercepted.
To Reproduce
Using .NET Core 2.1
File structure:

TypeScript files from js folder and Sass files from css folder are compiled into dist/main.js and dist/bundles.css.
Relevant code from Startup.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
	if (env.IsDevelopment())
	{
		//app.UseBrowserLink();
		app.UseDeveloperExceptionPage();
		app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
		{
		   HotModuleReplacement = true
		});
	}
	else
	{
		app.UseHsts();
		app.UseHttpsRedirection();
		app.UseExceptionHandler("/Error");
	}

	app.UseSession();
	app.UseAuthentication();
	app.UseStaticFiles(StaticFileOptions);

	app.UseMvcWithDefaultRoute();
}

private StaticFileOptions StaticFileOptions
{
	get
	{
		return new StaticFileOptions
		{
			OnPrepareResponse = OnPrepareResponse
		};
	}
}

private void OnPrepareResponse(StaticFileResponseContext context)
{
	var mimeTypeProvider = new FileExtensionContentTypeProvider();
	var headers = context.Context.Response.Headers;
	var contentType = headers["Content-Type"];

	if (contentType != "application/x-gzip" && !context.File.Name.EndsWith(".gz"))
	{
		return;
	}

	var fileNameToTry = context.File.Name.Substring(0, context.File.Name.Length - 3);

	if (mimeTypeProvider.TryGetContentType(fileNameToTry, out var mimeType))
	{
		headers.Add("Content-Encoding", "gzip");
		headers["Content-Type"] = mimeType;
	}
}

Expected behavior
HMR to work using UseWebpackDevMiddleware as well as static files in dist folder to be intercepted to allow me to do what I need to do regarding compression and headers etc.
Screenshots
N/A
Additional context
N/A

@SteveSandersonMS

Thanks for contacting us, @andyfurniss4.
@ryanbrandenburg  can you please look into this? Thanks!

@ryanbrandenburg this happens because we are processing all files from /dist using webpack middleware.
should we ignore the public path ? (the second call of UseProxyToLocal...)
// Proxy the corresponding requests through ASP.NET and into the Node listener
// Anything under /<publicpath> (e.g., /dist) is proxied as a normal HTTP request with a typical timeout (100s is the default from HttpClient),
// plus /__webpack_hmr is proxied with infinite timeout, because it's an EventSource (long-lived request).
foreach (var publicPath in devServerInfo.PublicPaths)
{
        appBuilder.UseProxyToLocalWebpackDevMiddleware(publicPath + hmrEndpoint, devServerInfo.Port, Timeout.InfiniteTimeSpan);
        appBuilder.UseProxyToLocalWebpackDevMiddleware(publicPath, devServerInfo.Port, TimeSpan.FromSeconds(100));
}

we can try to remove the proxy for all static files in /dist folder (and other publicPaths without hmlEndpoint), but if we change the output folder (in the webpack configuration), we will not be able to find assests from the dev server

@javiercn thoughts here?

No idea, @SteveSandersonMS might know better.

UseWebpackDevMiddleware works as a reverse proxy to a Webpack dev server running on Node. It's not serving static files from disk, so you shouldn't expect it to be involved in the UseStaticFiles middleware pipeline.
Either UseWebpackDevMiddleware or UseStaticFiles has to go first in the pipeline:

If UseWebpackDevMiddleware goes first, then anything that Webpack serves will be returned and doesn't go through UseStaticFiles
If UseStaticFiles goes first, then anything that's on disk already will be served from there without asking UseWebpackDevMiddleware to supply some newer of it


Implement sqlite3_trace_v2() and add tests for it

I removed the xunit tests involving sqlite3_trace() and sqlite3_profile() as I was updating to SQLite 3.28.0 (#267).  These two calls are deprecated, and as of 3.28.0, seem to behave differently (where "behave differently" might mean "they don't work anymore", not sure).
Anyway, so with these tests gone, we should have new ones, for sqlite3_trace_v2(), which is the successor to those deprecated calls.

Note that the current implementation of sqlite3_trace_v2() is very low-level.  It exposes IntPtr upward.  Higher-level wrappers might be nicer.

I should consider bringing back sqlite3_trace() and sqlite3_profile() even though they are deprecated.
They both do still work in SQLite itself.  And yes, their behavior did change, slightly, between 3.26 and 3.28, but I have since learned how it changed, and now I'm thinking that removing them from SQLitePCLRaw was maaaaybe a bit rash, especially because the new sqlite3_trace_v2() interface needs special handling to make it work.


Allow mixed explicit / inferred type parameters

TypeScript Version:  2.1.4
Often, I'd like to manually specify a type parameter for a generic type, but let it infer the other type parameters:
e.g:
type Route<P, C> = { children: C }

function createRoute<P, C>(children: C): Route<P, C> {
  return { children }
}

const myRoute = createRoute<{ id: string, popup?: string }>(someComplexChildrenStructure)

// or perhaps

const myRoute = createRoute<{ id: string, popup?: string }, *>(someComplexChildrenStructure)

The P type parameter cannot be inferred here because there are no values of type P on the right hand side. I sometimes use that to capture a user specified type that will have to be matched with other types later.
On the other hand, the type for C really should be inferred as it's a fairly complex type (object of objects of objects, etc)
There's the hack of asking for a fake value but it's verbose and is very inconvenient for optional types.
I've come across this limitation a few times now. I think it could be very useful.

I'm interested in how are you using this and does it work correctly. As far as I know phantom types are not supported by TS (it uses structural checking after all).

Yes it works as expected. It can be useful when used together with user defined type guards or just to carry some type for use somewhere else.
Guess I should read the FAQ one day :D


Monorepo support

I can find no way to have bumpver still commit even if it is in a subdirectory of a monorepo.  It would be great if I could specify what version control (eg. git) I am using and then instead of resolving the version control, it simply tries to commit.  Currently I get a warning every time saying bumpver can't find the version control, so it is skipping the commit.

I'm not sure what to do with this problem description. Can you be more detailed/precise with your request?

So here is an example:
monorepo
├── .git
├── devops
├── docs
├── libs
└── projects
├── project1
├── project2
└── project3
If I had a pyproject.toml file in each of the project folders, if I do a version bump bumpver does not recognize that I am within a git repository as I am a couple of directories into the repo.
Another way mono repo support could be improved is if you could specify the .toml file to use for configuration when running bumpver (eg bumpver --config=project1.toml ....  I have a ton of libraries, lambda layers, etc that I have to version bump periodically.  I need to bump the version of the package and THEN I need to bump the version in all of the requirements.txt files that require that package.  Right now each package has it's own pyproject.toml file and I specify and manage versions there.  Bumping the versions in all of the projects that use that library is another use case.  I just think some of the tools you have already built could be extended to be useful for also bumping the requirement versions.
Thanks for the package BTW! Super useful!

Thanks for the update. The --config=<path> parameter does indeed sound like a nice solution to this.
I won't be working on this for a while, so if anybody wants to work on a PR, I'd be happy to accept it.

I've looked at this a bit more closely and a possible implementation could look like this.

A bumpver.toml or .bumpver.toml file would need to added to the project sub-directory.
Just to make things explicit, the config would specify monorepo_dir = "..".
If in monorepo mode, a project identifier needs to be determined (e.g. via the directory name) or specified (via a config parameter project_id).
Only version tagsx which use the project identifier as a prefix may be parsed.
Version tags that are generated must include the project identifier as a prefix.

If anybody wants to take this on, please let me know.

@gdoermann I think pip constraints files better serves yor needs.


chore(frontend): Remove unused prop of TokenUiGroup

Motivation
We remove the props that are not needed from TokenUiGroup and we keep only the needed ones.

[OISY-69]


⚠ SolarOscp has degraded performance

In 92903b5, SolarOscp ($SOLAROSCP_URL) experienced degraded performance:

HTTP code: 200
Response time: 234 ms

Resolved: SolarOscp performance has improved in 1a3f0b4 after 9 minutes.


(PUP-4470) Observe http proxy user/password

Previously, puppet couldn't connect to an authenticating http proxy for REST
requests.
The Puppet::Util::HttpProxy.proxy method will return a connection object of
class Net::HTTP or the subclass Net::HTTP::Proxy based on the currently
configured proxy host, port, user and password.

Blocked on PR #7662

CLA signed by all contributors.


how to use web-ui?

I can not access the link in the example part....
how can I use this web-ui in my own node-casbin application??
should I develop the web part by myself ?? any guide there???

Hi @jonqiao , the example website is down. This project is a Python 2.7 Django site. But the frontend (html, js, etc) can be shared. You can develop your own backend if you are using Node.js as backend.
We have plan to improve this project but slightly lack of developers. Let me know if you want to contribute :)

Closed as stale.


Multiple ports with same host

Do you want to request a feature or report a bug?
Bug
What did you do?
I have a container which exposes 2 ports: http 80 and https 443
Indeed, the web app should be available on both ports: I don't want to redirect from 80 to 443 like most examples found on Internet.

I was expecting to have 2 frontends and 2 backends: one for https and one for http.
What did you see instead?
I just see the https frontend and the https backend.
Output of traefik version: (What version of Traefik are you using?)

 It works ;) I thought it was a bug.
I think this issue can now be closed.
With your explanation, I was able to pinpoint the part of the documentation which was talking about this use case:

It's possible to mix container labels and segment labels, in this case container labels are used as default value for missing segment labels but no frontends are going to be created with the container labels.


Add my first file

As a reminder, you have: created a new branch, created a file, and made a commit.

My First pull request is done


"all at once" upgrade stategy leads to broken cluster

Shut down a previously working cluster of three nodes A B C, using discovery, and given network delay.
When bringing them up the cluster should "work".
But the behavior is this indeed, resulting in a deadlocked cluster:

A (previously the leader) cannot reach B and C due whatever delay. Won't listen on ports :4001 and :7001.
B cannot reach A (and C). Won't listen on ports :4001 and :7001.
C cannot reach A (and B) due to closed ports. Won't listen on ports :4001 and :7001.

Re https://github.com/coreos/etcd/blob/master/Documentation/upgrade.md
You can simulate network delay (and packet loss) for example by:
tc qdisc add dev eth0 root netem delay 70ms 5ms
tc qdisc change dev eth0 root netem loss 0.5% 15%

#ETCD_PEER_HEARTBEAT_INTERVAL=80
#ETCD_PEER_ELECTION_TIMEOUT=400

I just ran into this with a 3-node cluster on AWS.  I terminated a machine that was acting up, which dropped the cluster to 2 nodes.  I fired up a new machine to take its place, however the cluster is not usable.  I tried rebooting all the machines as suggested above, but no go.  Thanks.

More info in case it helps.  Not sure this is the redirect issue, but somehow all the machines that etcd knows about are listed as followers:
core@ip-172-30-0-125 ~ $ curl http://<IP_ADDRESS>:7001/v2/admin/machines
[{"name":"35503004937c44ffb87d6ba3d4ad8570","state":"follower","clientURL":"http://<IP_ADDRESS>:4001","peerURL":"http://<IP_ADDRESS>:7001"},{"name":"55feb942c50942aebc9406fa236d62c6","state":"follower","clientURL":"http://<IP_ADDRESS>:4001","peerURL":"http://<IP_ADDRESS>:7001"},{"name":"7e2fba0ba5e844d8aaf60efbf3c64a12","state":"follower","clientURL":"http://<IP_ADDRESS>:4001","peerURL":"http://<IP_ADDRESS>:7001"},{"name":"a1bf697a02ee430cad48ec49427fe413","state":"follower","clientURL":"http://<IP_ADDRESS>:4001","peerURL":"http://<IP_ADDRESS>:7001"}]

@kelseyhightower Thanks for trying to reproduce this issue. In the meanwhile we don't use etcd anymore but have written an adapter to another dDBMS.
I can rule out duplicate names: I've used a script for the nodes which works with variables for names. (It's been "core-test{,-1,-2}" as described on 2014-09-10.)
I believe the breaking point is shutting down the nodes in the right order, "whacking the [then new] leader".
What do you use for integration tests? I would like to contribute one for this and two other issues.


Clean up tests

We have a lot of failing tests from old import paths. I'm trying to get our test suite back to green.

I applaud test fixing 🎸 , but this looks stale- ok to close @chadbailey59 ?


fix: eliminate duplicate of head in NESet::from_nonempty_iter

Duplicates are removed from the tail by HashSet, but we also need to make sure there are no duplicates of head in tail.

Thanks!


there is aproblem in  binaryTournamentSelection

private static Chromosome binaryTournamentSelection(Population population) {
Chromosome individual1 = population.getPopulace().get(LOCAL_RANDOM.nextInt(population.getPopulace().size()));
Chromosome individual2 = population.getPopulace().get(LOCAL_RANDOM.nextInt(population.getPopulace().size()));
        if(individual1.getFitness() > individual2.getFitness())
            return individual1;
        else return individual2;
    }

after the first generation,it should use crowded-comparison operator，
As says in the Article in SectionIII part C: It is important to note that we use a binary tournament  selection operator but the selection criterion is now based on the crowded-comparison operator.

I'll look into it and get back to you as soon as possible.

thank you very much

@whynotybb hello, I know this has taken way too long, but your issue has been resolved. Yes, on the previous implementation, there was this problem that you were highlighting in this issue, but it has now been resolved in v2 implementation of the algorithm. Please check the latest release here. This new implementation is also much simpler to understand. The previous one was unnecessarily much complex.
While I did resolve your issue much earlier, I was also working on a better implementation of NSGA-II. I have now updated the repository. Sorry for such a long delay.
I am closing this issue, but if you have any queries, please feel free to reopen this issue and I shall try to help you with your problem.