How to compose 2 learned sliders?

As shown in this figure. Is corresponding code available in this repo?

There are a couple of ways to do it. the simplest is to load the weights and simple add them together by some weightage. For example
scale1 = 1
scale2 = 3
weight1 = torch.load(slider1)
weight2 = torch.load(slider2)

composed = scale1*weight1 + scale2*weight2

network.load_state_dict(composed)

Other way to do it is by loading 2 different networks and using them in the inference. (this is a more exhaustive way, but you can compose sliders from different ranks and trainmethods)
network1 = intialize(slider1)
network2 = initialize(slider2)

with network1:
    with network2:
        unet(latents, text_embeddings, .....)

We can also release a demo with context_lib to enable multiple sliders at the same time. Meanwhile please explore these options

Which approach did you use in your paper?

The second approach with context_lib implementation

Do you have an example of the context_lib implementation?

from contextlib import ExitStack

@torch.no_grad()
def call2d(
        self,
        prompt: Union[str, List[str]] = None,
        prompt_2: Optional[Union[str, List[str]]] = None,
        height: Optional[int] = None,
        width: Optional[int] = None,
        num_inference_steps: int = 50,
        denoising_end: Optional[float] = None,
        guidance_scale: float = 5.0,
        negative_prompt: Optional[Union[str, List[str]]] = None,
        negative_prompt_2: Optional[Union[str, List[str]]] = None,
        num_images_per_prompt: Optional[int] = 1,
        eta: float = 0.0,
        generator: Optional[Union[torch.Generator, List[torch.Generator]]] = None,
        latents: Optional[torch.FloatTensor] = None,
        prompt_embeds: Optional[torch.FloatTensor] = None,
        negative_prompt_embeds: Optional[torch.FloatTensor] = None,
        pooled_prompt_embeds: Optional[torch.FloatTensor] = None,
        negative_pooled_prompt_embeds: Optional[torch.FloatTensor] = None,
        output_type: Optional[str] = "pil",
        return_dict: bool = True,
        callback: Optional[Callable[[int, int, torch.FloatTensor], None]] = None,
        callback_steps: int = 1,
        cross_attention_kwargs: Optional[Dict[str, Any]] = None,
        guidance_rescale: float = 0.0,
        original_size: Optional[Tuple[int, int]] = None,
        crops_coords_top_left: Tuple[int, int] = (0, 0),
        target_size: Optional[Tuple[int, int]] = None,
        negative_original_size: Optional[Tuple[int, int]] = None,
        negative_crops_coords_top_left: Tuple[int, int] = (0, 0),
        negative_target_size: Optional[Tuple[int, int]] = None,

        networks =None,
        start_noise=None,
        scales=None,
        unet=None,
    ):
        r"""
        Function invoked when calling the pipeline for generation.

        Args:
            prompt (`str` or `List[str]`, *optional*):
                The prompt or prompts to guide the image generation. If not defined, one has to pass `prompt_embeds`.
                instead.
            prompt_2 (`str` or `List[str]`, *optional*):
                The prompt or prompts to be sent to the `tokenizer_2` and `text_encoder_2`. If not defined, `prompt` is
                used in both text-encoders
            height (`int`, *optional*, defaults to unet.config.sample_size * self.vae_scale_factor):
                The height in pixels of the generated image. This is set to 1024 by default for the best results.
                Anything below 512 pixels won't work well for
                [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)
                and checkpoints that are not specifically fine-tuned on low resolutions.
            width (`int`, *optional*, defaults to unet.config.sample_size * self.vae_scale_factor):
                The width in pixels of the generated image. This is set to 1024 by default for the best results.
                Anything below 512 pixels won't work well for
                [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)
                and checkpoints that are not specifically fine-tuned on low resolutions.
            num_inference_steps (`int`, *optional*, defaults to 50):
                The number of denoising steps. More denoising steps usually lead to a higher quality image at the
                expense of slower inference.
            denoising_end (`float`, *optional*):
                When specified, determines the fraction (between 0.0 and 1.0) of the total denoising process to be
                completed before it is intentionally prematurely terminated. As a result, the returned sample will
                still retain a substantial amount of noise as determined by the discrete timesteps selected by the
                scheduler. The denoising_end parameter should ideally be utilized when this pipeline forms a part of a
                "Mixture of Denoisers" multi-pipeline setup, as elaborated in [**Refining the Image
                Output**](https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/stable_diffusion_xl#refining-the-image-output)
            guidance_scale (`float`, *optional*, defaults to 5.0):
                Guidance scale as defined in [Classifier-Free Diffusion Guidance](https://arxiv.org/abs/2207.12598).
                `guidance_scale` is defined as `w` of equation 2. of [Imagen
                Paper](https://arxiv.org/pdf/2205.11487.pdf). Guidance scale is enabled by setting `guidance_scale >
                1`. Higher guidance scale encourages to generate images that are closely linked to the text `prompt`,
                usually at the expense of lower image quality.
            negative_prompt (`str` or `List[str]`, *optional*):
                The prompt or prompts not to guide the image generation. If not defined, one has to pass
                `negative_prompt_embeds` instead. Ignored when not using guidance (i.e., ignored if `guidance_scale` is
                less than `1`).
            negative_prompt_2 (`str` or `List[str]`, *optional*):
                The prompt or prompts not to guide the image generation to be sent to `tokenizer_2` and
                `text_encoder_2`. If not defined, `negative_prompt` is used in both text-encoders
            num_images_per_prompt (`int`, *optional*, defaults to 1):
                The number of images to generate per prompt.
            eta (`float`, *optional*, defaults to 0.0):
                Corresponds to parameter eta (η) in the DDIM paper: https://arxiv.org/abs/2010.02502. Only applies to
                [`schedulers.DDIMScheduler`], will be ignored for others.
            generator (`torch.Generator` or `List[torch.Generator]`, *optional*):
                One or a list of [torch generator(s)](https://pytorch.org/docs/stable/generated/torch.Generator.html)
                to make generation deterministic.
            latents (`torch.FloatTensor`, *optional*):
                Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
                generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
                tensor will ge generated by sampling using the supplied random `generator`.
            prompt_embeds (`torch.FloatTensor`, *optional*):
                Pre-generated text embeddings. Can be used to easily tweak text inputs, *e.g.* prompt weighting. If not
                provided, text embeddings will be generated from `prompt` input argument.
            negative_prompt_embeds (`torch.FloatTensor`, *optional*):
                Pre-generated negative text embeddings. Can be used to easily tweak text inputs, *e.g.* prompt
                weighting. If not provided, negative_prompt_embeds will be generated from `negative_prompt` input
                argument.
            pooled_prompt_embeds (`torch.FloatTensor`, *optional*):
                Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, *e.g.* prompt weighting.
                If not provided, pooled text embeddings will be generated from `prompt` input argument.
            negative_pooled_prompt_embeds (`torch.FloatTensor`, *optional*):
                Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, *e.g.* prompt
                weighting. If not provided, pooled negative_prompt_embeds will be generated from `negative_prompt`
                input argument.
            output_type (`str`, *optional*, defaults to `"pil"`):
                The output format of the generate image. Choose between
                [PIL](https://pillow.readthedocs.io/en/stable/): `PIL.Image.Image` or `np.array`.
            return_dict (`bool`, *optional*, defaults to `True`):
                Whether or not to return a [`~pipelines.stable_diffusion_xl.StableDiffusionXLPipelineOutput`] instead
                of a plain tuple.
            callback (`Callable`, *optional*):
                A function that will be called every `callback_steps` steps during inference. The function will be
                called with the following arguments: `callback(step: int, timestep: int, latents: torch.FloatTensor)`.
            callback_steps (`int`, *optional*, defaults to 1):
                The frequency at which the `callback` function will be called. If not specified, the callback will be
                called at every step.
            cross_attention_kwargs (`dict`, *optional*):
                A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
                `self.processor` in
                [diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
            guidance_rescale (`float`, *optional*, defaults to 0.7):
                Guidance rescale factor proposed by [Common Diffusion Noise Schedules and Sample Steps are
                Flawed](https://arxiv.org/pdf/2305.08891.pdf) `guidance_scale` is defined as `φ` in equation 16. of
                [Common Diffusion Noise Schedules and Sample Steps are Flawed](https://arxiv.org/pdf/2305.08891.pdf).
                Guidance rescale factor should fix overexposure when using zero terminal SNR.
            original_size (`Tuple[int]`, *optional*, defaults to (1024, 1024)):
                If `original_size` is not the same as `target_size` the image will appear to be down- or upsampled.
                `original_size` defaults to `(width, height)` if not specified. Part of SDXL's micro-conditioning as
                explained in section 2.2 of
                [https://huggingface.co/papers/2307.01952](https://huggingface.co/papers/2307.01952).
            crops_coords_top_left (`Tuple[int]`, *optional*, defaults to (0, 0)):
                `crops_coords_top_left` can be used to generate an image that appears to be "cropped" from the position
                `crops_coords_top_left` downwards. Favorable, well-centered images are usually achieved by setting
                `crops_coords_top_left` to (0, 0). Part of SDXL's micro-conditioning as explained in section 2.2 of
                [https://huggingface.co/papers/2307.01952](https://huggingface.co/papers/2307.01952).
            target_size (`Tuple[int]`, *optional*, defaults to (1024, 1024)):
                For most cases, `target_size` should be set to the desired height and width of the generated image. If
                not specified it will default to `(width, height)`. Part of SDXL's micro-conditioning as explained in
                section 2.2 of [https://huggingface.co/papers/2307.01952](https://huggingface.co/papers/2307.01952).
            negative_original_size (`Tuple[int]`, *optional*, defaults to (1024, 1024)):
                To negatively condition the generation process based on a specific image resolution. Part of SDXL's
                micro-conditioning as explained in section 2.2 of
                [https://huggingface.co/papers/2307.01952](https://huggingface.co/papers/2307.01952). For more
                information, refer to this issue thread: https://github.com/huggingface/diffusers/issues/4208.
            negative_crops_coords_top_left (`Tuple[int]`, *optional*, defaults to (0, 0)):
                To negatively condition the generation process based on a specific crop coordinates. Part of SDXL's
                micro-conditioning as explained in section 2.2 of
                [https://huggingface.co/papers/2307.01952](https://huggingface.co/papers/2307.01952). For more
                information, refer to this issue thread: https://github.com/huggingface/diffusers/issues/4208.
            negative_target_size (`Tuple[int]`, *optional*, defaults to (1024, 1024)):
                To negatively condition the generation process based on a target image resolution. It should be as same
                as the `target_size` for most cases. Part of SDXL's micro-conditioning as explained in section 2.2 of
                [https://huggingface.co/papers/2307.01952](https://huggingface.co/papers/2307.01952). For more
                information, refer to this issue thread: https://github.com/huggingface/diffusers/issues/4208.

        Examples:

        Returns:
            [`~pipelines.stable_diffusion_xl.StableDiffusionXLPipelineOutput`] or `tuple`:
            [`~pipelines.stable_diffusion_xl.StableDiffusionXLPipelineOutput`] if `return_dict` is True, otherwise a
            `tuple`. When returning a tuple, the first element is a list with the generated images.
        """
        # 0. Default height and width to unet
        height = height or self.default_sample_size * self.vae_scale_factor
        width = width or self.default_sample_size * self.vae_scale_factor

        original_size = original_size or (height, width)
        target_size = target_size or (height, width)

        # 1. Check inputs. Raise error if not correct
        self.check_inputs(
            prompt,
            prompt_2,
            height,
            width,
            callback_steps,
            negative_prompt,
            negative_prompt_2,
            prompt_embeds,
            negative_prompt_embeds,
            pooled_prompt_embeds,
            negative_pooled_prompt_embeds,
        )

        # 2. Define call parameters
        if prompt is not None and isinstance(prompt, str):
            batch_size = 1
        elif prompt is not None and isinstance(prompt, list):
            batch_size = len(prompt)
        else:
            batch_size = prompt_embeds.shape[0]

        device = self._execution_device

        # here `guidance_scale` is defined analog to the guidance weight `w` of equation (2)
        # of the Imagen paper: https://arxiv.org/pdf/2205.11487.pdf . `guidance_scale = 1`
        # corresponds to doing no classifier free guidance.
        do_classifier_free_guidance = guidance_scale > 1.0

        # 3. Encode input prompt
        text_encoder_lora_scale = (
            cross_attention_kwargs.get("scale", None) if cross_attention_kwargs is not None else None
        )
        (
            prompt_embeds,
            negative_prompt_embeds,
            pooled_prompt_embeds,
            negative_pooled_prompt_embeds,
        ) = self.encode_prompt(
            prompt=prompt,
            prompt_2=prompt_2,
            device=device,
            num_images_per_prompt=num_images_per_prompt,
            do_classifier_free_guidance=do_classifier_free_guidance,
            negative_prompt=negative_prompt,
            negative_prompt_2=negative_prompt_2,
            prompt_embeds=prompt_embeds,
            negative_prompt_embeds=negative_prompt_embeds,
            pooled_prompt_embeds=pooled_prompt_embeds,
            negative_pooled_prompt_embeds=negative_pooled_prompt_embeds,
            lora_scale=text_encoder_lora_scale,
        )

        # 4. Prepare timesteps
        self.scheduler.set_timesteps(num_inference_steps, device=device)

        timesteps = self.scheduler.timesteps

        # 5. Prepare latent variables
        num_channels_latents = unet.config.in_channels
        latents = self.prepare_latents(
            batch_size * num_images_per_prompt,
            num_channels_latents,
            height,
            width,
            prompt_embeds.dtype,
            device,
            generator,
            latents,
        )

        # 6. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline
        extra_step_kwargs = self.prepare_extra_step_kwargs(generator, eta)

        # 7. Prepare added time ids & embeddings
        add_text_embeds = pooled_prompt_embeds
        add_time_ids = self._get_add_time_ids(
            original_size, crops_coords_top_left, target_size, dtype=prompt_embeds.dtype
        )
        if negative_original_size is not None and negative_target_size is not None:
            negative_add_time_ids = self._get_add_time_ids(
                negative_original_size,
                negative_crops_coords_top_left,
                negative_target_size,
                dtype=prompt_embeds.dtype,
            )
        else:
            negative_add_time_ids = add_time_ids

        if do_classifier_free_guidance:
            prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds], dim=0)
            add_text_embeds = torch.cat([negative_pooled_prompt_embeds, add_text_embeds], dim=0)
            add_time_ids = torch.cat([negative_add_time_ids, add_time_ids], dim=0)

        prompt_embeds = prompt_embeds.to(device)
        add_text_embeds = add_text_embeds.to(device)
        add_time_ids = add_time_ids.to(device).repeat(batch_size * num_images_per_prompt, 1)

        # 8. Denoising loop
        num_warmup_steps = max(len(timesteps) - num_inference_steps * self.scheduler.order, 0)

        # 7.1 Apply denoising_end
        if denoising_end is not None and isinstance(denoising_end, float) and denoising_end > 0 and denoising_end < 1:
            discrete_timestep_cutoff = int(
                round(
                    self.scheduler.config.num_train_timesteps
                    - (denoising_end * self.scheduler.config.num_train_timesteps)
                )
            )
            num_inference_steps = len(list(filter(lambda ts: ts >= discrete_timestep_cutoff, timesteps)))
            timesteps = timesteps[:num_inference_steps]

        with self.progress_bar(total=num_inference_steps) as progress_bar:
            for i, t in enumerate(timesteps):
                if t>start_noise:
                    for i in range(len(scales)):
                        networks[i].set_lora_slider(scale=0)
                else:
                    for i in range(len(scales)):
                        networks[i].set_lora_slider(scale=scales[i])
                # expand the latents if we are doing classifier free guidance
                latent_model_input = torch.cat([latents] * 2) if do_classifier_free_guidance else latents

                latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)

                # predict the noise residual
                added_cond_kwargs = {"text_embeds": add_text_embeds, "time_ids": add_time_ids}
                with ExitStack() as es:
                    for x in range(len(networks)):
                        es.enter_context(networks[x])
                    noise_pred = unet(
                                latent_model_input,
                                t,
                                encoder_hidden_states=prompt_embeds,
                                cross_attention_kwargs=cross_attention_kwargs,
                                added_cond_kwargs=added_cond_kwargs,
                                return_dict=False,
                            )[0]

                # perform guidance
                if do_classifier_free_guidance:
                    noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
                    noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)

                if do_classifier_free_guidance and guidance_rescale > 0.0:
                    # Based on 3.4. in https://arxiv.org/pdf/2305.08891.pdf
                    noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=guidance_rescale)

                # compute the previous noisy sample x_t -> x_t-1
                latents = self.scheduler.step(noise_pred, t, latents, **extra_step_kwargs, return_dict=False)[0]

                # call the callback, if provided
                if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
                    progress_bar.update()
                    if callback is not None and i % callback_steps == 0:
                        callback(i, t, latents)

        if not output_type == "latent":
            # make sure the VAE is in float32 mode, as it overflows in float16
            needs_upcasting = self.vae.dtype == torch.float16 and self.vae.config.force_upcast

            if needs_upcasting:
                self.upcast_vae()
                latents = latents.to(next(iter(self.vae.post_quant_conv.parameters())).dtype)

            image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]

            # cast back to fp16 if needed
            if needs_upcasting:
                self.vae.to(dtype=torch.float16)
        else:
            image = latents

        if not output_type == "latent":
            # apply watermark if available
            if self.watermark is not None:
                image = self.watermark.apply_watermark(image)

            image = self.image_processor.postprocess(image, output_type=output_type)

        # Offload all models
#         self.maybe_free_model_hooks()

        if not return_dict:
            return (image,)

        return StableDiffusionXLPipelineOutput(images=image)

StableDiffusionXLPipeline.__call__ = call2d
def generate_2d_sliders(prompts, seed, lora_weights, num_images_per_prompt = 1, start_noise = 850, scales = [0,2], scale_last=None, display_im=False, device='cuda:0'):
    weight_dtype = torch.float16
    if seed is not None:
        seed_lock = True
    else:
        seed_lock = False
    for prompt in prompts:
        for _ in range(num_images_per_prompt):
            if not seed_lock:
                seed = random.randint(0,2**15)
            print(prompt, seed)
            pipe = StableDiffusionXLPipeline.from_pretrained("stabilityai/sdxl-turbo",torch_dtype=torch.float16)

            # pipe.__call__ = call
            pipe = pipe.to(device)
            unet = pipe.unet
            if 'full' in lora_weights[0]:
                train_method = 'full'
            elif 'noxattn' in lora_weights[0]:
                train_method = 'noxattn'
            else:
                train_method = 'noxattn'

            network_type = "c3lier"
            if train_method == 'xattn':
                network_type = 'lierla'

            modules = DEFAULT_TARGET_REPLACE
            if network_type == "c3lier":
                modules += UNET_TARGET_REPLACE_MODULE_CONV
            import os
            model_name = lora_weights[0]

            name = os.path.basename(model_name)
            rank = 1
            alpha = 4
            if 'rank4' in lora_weights[0]:
                rank = 4
            if 'rank8' in lora_weights[0]:
                rank = 8
            if 'alpha1' in lora_weights[0]:
                alpha = 1.0
            networks = {}
            for i in range(len(lora_weights)):
                networks[i] = LoRANetwork(
                        unet,
                        rank=rank,
                        multiplier=1.0,
                        alpha=alpha,
                        train_method=train_method,
                    ).to(device, dtype=weight_dtype)
                networks[i].load_state_dict(torch.load(lora_weights[i]))

    #         for scale1 in scales:
            image_list = []
            for scale2 in scales:
                generator = torch.manual_seed(seed)
                scales_final = [scale2]*(len(networks))
                if scale_last is not None:
                    scales_final[-1] = scale_last
                images = pipe(prompt, num_images_per_prompt=1, guidance_scale=1, num_inference_steps=3, generator=generator, networks=networks, start_noise=start_noise, scales=scales_final, unet=unet).images[0]
                image_list.append(images)

            if display_im:
                for im in image_list:
                    display(im)
            else:
                fig, ax = plt.subplots(1, len(image_list), figsize=(20,4))
                for i, a in enumerate(ax):
                    a.imshow(image_list[i])
                    a.set_title(f"{scales[i]}",fontsize=15)
                    a.axis('off')
                plt.show()
            del unet, networks, pipe
            unet = None
            network = None
            pipe = None
            torch.cuda.empty_cache()
            flush()

after this you can generate like:
lora_weights_ = ['models/beardXLslider_race_gender_alpha1.0_rank4_noxattn/beardXLslider_race_gender_alpha1.0_rank4_noxattn_last.pt',
                 'models/glassesXLslider_race_gender_alpha1.0_rank4_noxattn/glassesXLslider_race_gender_alpha1.0_rank4_noxattn_last.pt',
                'models/smilingXLslider_race_gender_alpha1.0_rank4_noxattn/smilingXLslider_race_gender_alpha1.0_rank4_noxattn_last.pt',

                ]
prompts = [
    'photo of a person, realistic, 8k',
]
start_noise = 700
seed = 1951
num_images_per_prompt = 1
display_im = True
device='cuda:0'
scales = [0, 2]
scale_last = None
generate_2d_sliders(prompts=prompts, seed = seed, lora_weights=lora_weights_, num_images_per_prompt = num_images_per_prompt,start_noise = start_noise, scales = scales, display_im=display_im, device=device, scale_last=scale_last)

Hi, this composition code is throwing up errors when i try to run it with the pretrained sliders on the paper's page.
For ex, for the 2D composition, when i load age and smile slider, and try to run the contextlib code above, this is the error i am getting:
in :16                                                                                │
│ in generate_2d_sliders:418
RuntimeError: Error(s) in loading state_dict for LoRANetwork:
Unexpected key(s) in state_dict: "lora_unet_down_blocks_0_resnets_0_conv1.alpha",
"lora_unet_down_blocks_0_resnets_0_conv1.lora_down.weight",
.
.
.
This error arises in the generate_2d_sliders function, when it tries to the load the weights from the pretrained sliders in line:
networks[i].load_state_dict(torch.load(lora_weights[i]))
Any idea on why it isn't working with the pretrained lora slider?


out of memory on ESP8266

Unfortunately I get a mem error on the ESP8266. Added uftp.py + a simple main.py with only
import uftpd in it. Result:

MemoryError: memory allocation failed, allocating 1674 bytes
MicroPython v1.13 on 2020-09-11; ESP module with ESP8266

As detailed in the README file, the heap space of the esp8266 is to small for a regular import. You have either to import it as precompiled file or include it into the flash as frozen bytecode, as has been written in the README file:

Ahh.. I stand corrected. I actually looked for memory info in the readme, but overlooked the intro it seems :).


problem with BREAD on Voyager (Laravel - voyager BREAD)

Version information

Laravel: v5.7.29
Voyager: v1.2.1
PHP: 7.1.3
Database: [type] [version] (e.g. MySQL 8.0)

Description

Hello
I clicked on:
: Add BREAD to this table
and have a problem with this error:
ErrorException (E_ERROR)
Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) (View: C:\xampp\htdocs\mytttweb\vendor\tcg\voyager\resources\views\tools\bread\edit-add.blade.php)
TNX
A clear and concise description of what the bug is.
Steps To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

Please upgrade to the latest version of Voyager

Closing due to inactivity.
If this is still a problem after upgrading this issue can be reopened - just let us know.


[Feature Request] Settings should be overridable from .atom-build.json

Ideally, the toplevel of .atom-build.json shouldn't be a build path, but instead be settings to use and override the default settings. Or, these settings could be stored in some other file like .atom-build.user.json.
My use case is that, I want my c++ projects to build on save, but not everything else.

Not sure what you're asking for here. Do you want to override the global settings on a per-project basis? Why do you prefer your C++ projects to build on save, and not other projects?

Exactly, the ability to override global settings on a per-project basis.
To be specific, I don't really want atom and node projects to npm install every time I save a file, it seems like more work than necessary. Unless npm has updated recently so that it checks which packages are already installed first, but last time i checked, it does a full install every time.  If the build was running unit tests, then i'd maybe want it to build on every save, but I'd use a custom build file for that. And then with that custom build file, I could enable build on save.
It's just an idea. If it doesn't appeal to you, I'd be fine with writing and submitting a PR for this.

Perhaps the discussion should rather be if these configurations should be on a per-project basis, rather than global. But then you wouldn't be able to use the built in tools (since it would require creating an .atom-build.json-file to be able to set the configurations) if you wanted Build on Save or Save on Build.

:+1:
I use "gulp watch" for JS (no autobuild needed), but i want "Build on Save" for my golang project.

I need this feature, too.
It is possible that the global settings can act as the default settings, if none is found in the .atom-build.json?

I need this feature, too.
It is possible that the global settings can act as the default settings, if none is found in the .atom-build.json?


PR Request: Case insensitive header checks in SocketClient

PR request from Jonothan:
      HttpUrlConnectionResponse response = buildResponse(httpRequest, in);

      String redirectLocation = response.getHeaders().stream()
          .filter(h -> h.getName().equals("Location"))

HTTP header names are case insensitive. This means sometimes the header might be location, lOCaTioN, or any other permutation. You should be case insensitive here too to ensure you don't miss out on a redirection.

PR review can be found here.

Changed equals() to equalsIgnoreCase() to account for case insensitive headers.


requestHeaders

This pull request is for #27.
It should be noted that if the integration is of type lambda then the request headers are already there, so they don't need to be added, something the code takes into account.
If the integration is lambda-proxy and the request headers are defined, serverless emits a warning and removes them. e.g.
  hit:
    handler: handler.hit
    events:
      - http:
          path: hit
          method: POST
          request:
            parameters:
              headers:
                MyHeader: true

But when adding them using the plugin it seems to work well. I asked in the serverless gitter but didn't get a response why it was done that way. If the request section wasn't removed, this pull request should probably be replaced with some documentation on how to write in the serverless.yml. But as serverless is implemented right now this is the only way I could get the headers in the swagger when using lambda-proxy.

Codecov Report

Merging #28 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master    #28   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           4      4
  Lines         177    186    +9
  Branches       24     28    +4
=====================================
+ Hits          177    186    +9

Impacted Files
Coverage Δ

src/models.js
100% <ø> (ø)
:arrow_up:

src/documentation.js
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e49815...8223846. Read the comment docs.

It seems serverless doens't want to relax the rules for defining request parameters for lambda-proxy. But this issue contains a workaround which is essentially what this pull request does.
https://github.com/serverless/serverless/issues/3105
Weather to merge this pull request or just document how to get the request parameters passed in to API gateway using the Resources section is your call.

The more I think about this pull request the less I like it. It's better to just give instructions in the documentation of the plugin on how to put the correct RequestParameters in the serverless.yml Resources section instead, IMHO.

I will get my head around this later on. When it feels like a hack, we shouldn't do it.
I will look at the serverless PR you posted to get the bigger picture.

Hmm, I just took the time to look at this now. So when this is documented on AWS side, this seems legit. I get that on Serverless side they don't want to relax the rules because it is not part of the actual request definition, but for the sake of the documentation, it should be added.
I think making this only a part of the documentation is making defining this more of a pain because you need to define this twice. Maybe we do this automatically by default and have an option for the CLI to disable this behaviour?

Yeah, that sounds like a good idea. We can always change it later if it proves to be problematic.
I'll look into it.


Support for multiple KO_DOCKER_REPO?

Is there currently support for pushing to multiple KO_DOCKER_REPO in a single Ko build? In my case, I need to push the build to multiple repositories without running separate Ko builds, as that would increase the build time.
I attempted to set KO_DOCKER_REPO like this, but it didn't work:
KO_DOCKER_REPO=localhost:5000/test,localhost:5000/test1

Is there a recommended way to push to multiple repositories in one go, or is this feature not supported yet?

I would recommend pushing to one location, and then copying (e.g., crane copy) the image to other locations as needed.
There's some complexity building-and-pushing to multiple locations, for example what if building and pushing to A works but pushing to B works -- should the whole process fail? By separating build-and-push-to-A from copy-A-to-B you get simpler tools (ko and crane only do one thing each), and better failure handling semantics.


Missing member ArcTo

I wonder if you can add the following overload of the ArcTo method:
void arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo);
https://github.com/google/skia/blob/master/include/core/SkPath.h#L536
Thanks

sure... my next commit will be this. 😄  Let me know if you are needing anything else!


Fix webpack v4 deprecation warning

Tapable.plugin is deprecated in webpack v4. Converted the plug-in to use hooks when they are available.
(node:1222) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at ProgressiveWebappPlugin.apply (/mnt/pinboard/webapp/node_modules/service-worker-plugin/index.js:26:12)
    at webpack (/mnt/pinboard/webapp/node_modules/webpack/lib/webpack.js:47:13)
    at Object.<anonymous> (/mnt/pinboard/webapp/startWebpackDevServer.js:10:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

Similar PR: https://github.com/geowarin/friendly-errors-webpack-plugin/pull/63

@bishwei anything I can help with to get this merged? Looks like buildkite hasn't been successful in a while:

I canceled all of these long-running builds - looks like there was no agent available for the elastic-builders queue:


Release an Apereo specific version of JPF for Equella

@doolse I will work on this and ping you for assistance as needed

The source repo is up - https://github.com/equella/jpf will be published as part of #79


Deleted and warn when posting same message throughout multiple channels

There are people who, when they don't get a response within 30 seconds in one channel, will post the same message again to another channel, and another, and another.
If the bot sees the same message from the same person within 5 minutes, delete it, send a reply with a message warning them, and add a bot warning

Turns out this was already built in, but horribly broken.


(PUP-7362) Fail fast if there are no facts for a node

Previously, puppet lookup would return incorrect results for any target node that had no facts cached.
For example when using the Per-node data hierarchy, with the path to the data fail being the value of $trusted[certname], a node that had the said fact cached would return the correct data from its data file, but a node which didn't have any facts cached, would default to a common configuration file, outputting the data from there.
This is misleading since it doesn't error out, giving the impression that the run went well, when in actuality it failed to fetch the correct data.
This commit fixes this issue by failing the run the moment we are able to see that the target node has no cached facts.

jenkins please test this

jenkins please test this with servertests

jenkins please test this with servertests

jenkins please test this with servertests


Upgrade fluentbit to v1.8.14

Soak-tested in b/222146442#comment13
All distros e2e test b/222146442#comment14

Looking at the soak test:
There has been some minor CPU usage improvement from Fluent Bit 1.8.12 to 1.8.14, but a big memory usage regression:


inconsistent slashes in rake-db generated table definitions (windows)

on windows here is an example generated definition file after db migrations are run.
import { orchidORM } from 'orchid-orm';
import { Expansion } from './definitons\tables\expansion.table';
import { Region } from './definitons\tables\region.table';
import { Realm } from './definitons\tables\realm.table';
import { Ingame_icon } from './definitons\tables\ingame_icon.table';
import { Achievement } from './definitons\tables\achievement.table';

export const db = orchidORM(
  {
    databaseURL: 'postgres://postgres:postgres@localhost:5432/wowtrackdev',
    ssl: false,
  },
  {
    expansion: Expansion,
    region: Region,
    realm: Realm,
    ingame_icon: Ingame_icon,
    achievement: Achievement,
  }
);

I'm not sure if path names are still okay but at first glance '\' may cause some headaches?

Cool, you have even tested code generation!
Yes, that's a bug, need to fix

By the way, there is also a command to generate migrations from existing db:
npm run db pull

I just added it to the docs.

Update is released for this issue, now it should write correct slashes on windows


Add ability to associate each .send() with a page

Currently, the sdk assumes that it's only deployed to one page. But if we want one bot to work on multiple pages, we need a way to decide which page a bot is talking to.

This may be part of a bigger issue about multitenancy

To be explicit, is there more definition to deploying a bot to more than one page than that they share a web hook URL?

The current interface lets you pick which pages your app can listen to. Example:

So it seems like Facebook is encouraging users to make multitenant bots
The url looks something like https://developers.facebook.com/apps/3456736120893612012345/messenger/

I was thinking about this in the shower this morning, and I think copying from hubot and hapi would give us a nice api too.
for example, instead of:
on('text', ({senderId, text, session}) => messenger.send(senderId, new Text('pong')))

something like:
on('text', ({senderId, text, session}, res) => res.send(new Text('pong')))


Where to find the latest runtime?

Hi team,
I want to use this package 1.0.674-prerelease in my project, however, the latest runtime on this page is 87.0.664.8, where could I get the latest version 88.0.674.0?
Thank you.

Hi @alexchx, it looks like the page has been updated with the latest version. I'll go ahead and close this issue now. Thanks.


A way to see who reacted

My users have requested a way to see who has reacted - Doing mouse-over reveals a couple of names, but not the rest - Clicking it just reacts - Holding LMB on the icon reveals the same couple of names...
Thanks! :)

Hi!
I would also be very interested for the same reasons as @daath stated. :+1:

Would be clearer if title were edited to say "all who reacted"

@IwishIcanFLighT Can you please make a pull request with the changes you said?

@GokulNC Sorry I never got the time to actually make this change and no longer need it for my discourse instance.
In the meantime from what I found it looks like my previous suggestion cannot be applied anymore as the plugin seems to support different locales now:
https://github.com/gdpelican/retort/blob/7fd191b7e47a9612163436556e14ed1cd1b313ac/config/locales/client.en.yml
en:
  js:
    retort:
      title: 'add an emoji reaction to this post'
      reactions:
        one_person:  "%{first} reacted with :%{emoji}:"
        two_people:  "%{first} and %{second} reacted with :%{emoji}:"
        many_people: "%{first}, %{second}, and %{count} others reacted with :%{emoji}:"

I suppose you'd also need to modify the code in this file as well:
https://github.com/gdpelican/retort/blob/8d582c512ae89427c6e0520f9f256e91c05aa07b/assets/javascripts/discourse/widgets/retort-toggle.js.es6
  sentence({ usernames, emoji }) {
    let key
    switch(usernames.length) {
      case 1: key = 'retort.reactions.one_person'; break
      case 2: key = 'retort.reactions.two_people'; break
      default: key = 'retort.reactions.many_people'; break
    }

Hi there, thanks for this wonderful plugin! My community has also expressed an interest in this feature. To me it would be ideal if this worked similarly to the built-in like button: Always display a number alongside the reaction and show the reacters underneath the reactions when the number is clicked. I think the relevant Discourse code can be found here.


add new feature for backend v1.1.0

Summary by CodeRabbit
Release Notes

New Features

Introduced moderation_server for content security scanning.
Added temporal for asynchronous task management and temporal-ui for task viewing.
New endpoint for accessing the backend asynchronous task panel.

Bug Fixes

Updated default admin login credentials for enhanced security.

Documentation

Enhanced README with new components and usage instructions.
Updated Nginx configuration to support authentication for the new temporal-ui endpoint.

The first two commit already merged. @wayneliu0019

close this pr since it has been merge by other5 pr


Thinking about Culture Caching

Storing the entire CultureInfo object may it causes some issues such as Number & DateTime Formats. IMHO caching the culture name may enough to avoid such issues, hope to heard your thoughts

What exactly is the issue? What doesn't work?

Try to change the number or date format in supported culture list, you will notice that nothing will change because the current cache mechanism store the entire culture object based on its name, have a look to this line https://github.com/aspnet/Localization/blob/dev/src/Microsoft.Extensions.Globalization.CultureInfoCache/CultureInfoCache.cs#L43, I think caching name enough to solve this issue because we can't guarantee no one will change a piece of information in the supported list

Are you talking about changing the format of an existing CultureInfo object? Is that even a thing? Even if it's possible (and I don't see how exactly), I would say that changing CultureInfo properties while the app is running is not supported.

After checking the issues, issue #203 is one of the cases that I mean

Is this an exact dup of #203? If it's different, how is it different?

The issue #203 shows one case (currency) of what i'm talking about, if the fix will cover all the formats dates, numbers .. etc, of course i will close this

Currency was just an example. I'm sure if we fix this it would be a complete fix, not for just one property.

Sure, hopefully if this will got fix in V1

That is not currently planned.


CHYT queries hang in the web-UI

Any CHYT queries launched in the web-UI are infinitely in the 'pending' state, even if they are aborted and the clique is stopped.
In the CLI CHYT works well.
The used images:
  coreImage: ytsaurus/ytsaurus:stable-23.1.0-relwithdebinfo
  uiImage: ytsaurus/ui:stable

  strawberry:
    image: ytsaurus/strawberry:0.0.5

  queryTrackers:
    image: ytsaurus/query-tracker-nightly:dev-66905-ecb23a91d6e5b9e427b74bc9b4bb1698853ad8de-relwithdebinfo

  yqlAgents:
    image: ytsaurus/query-tracker-nightly:dev-66905-ecb23a91d6e5b9e427b74bc9b4bb1698853ad8de-relwithdebinfo

The query-tracker logs are attached.
query-tracker.info.log
query-tracker.debug.log

Hi, with this image the problem is gone, thank you!


Feature request: add structure level indicator to admin

When using a structure as a source for the user manual, it would be nice to have a visual indicator of hierarchy for nested pages. Here's an example:

I have a pull request incoming which implements this.

+1

This should be included now in the plugin:


Undefined symbol

Hi, there is a case where a variable is used undefined:
line 195 of exportMediaWiki2Html.py you call DownloadImage(linkedpage, imgpath)
However imgpath is only defined conditionally, a few lines above.
If the condition is not met, you run through an exception:
Traceback (most recent call last):
  File "exportMediaWiki2Html.py", line 195, in <module>
    DownloadImage(linkedpage, imgpath)
NameError: name 'imgpath' is not defined

@maxime-esa this is about the situation where an uploaded file is linked, which is not an image?
I will have a look into this

Thanks. To reproduce:
./exportMediaWiki2Html.py --url http://taste.tuxfamily.org/wiki --page 93

Additionally I noticed that I never get the images downloaded. For example this page does not raise the exception but the img folder remains empty after the download:
./exportMediaWiki2Html.py --url http://taste.tuxfamily.org/wiki --page 357

2 issues: mixing http and https for downloading the images, and the script did not support subpath /wiki yet.
Those have now been fixed.

Thanks. Seems to work perfectly now!


2.3.11

Updated Couchbase SDK to 2.3.11
Updated Newtonsoft.Json to 9.0.1
Updated NLog to 4.4.1
Enhanced ObjectUnwrappingTranscoder to correctly handle binary data in get operations
Added standard .NET .gitignore and .gitattributes

Please remove the auto-generated .gitattributes and .gitignore files. If you want to make meaningful additions, please do them by hand without the unnecessary trash.


GEOMESA-2606 Fix client-side stats for transform schemas

Signed-off-by: Emilio Lahr-Vivaz<EMAIL_ADDRESS>

We should cherry-pick back to 2.3.x


chore: bump alloy to fix #8830

Motivation
Fixes #8830

Solution
Bumps alloy to include https://github.com/alloy-rs/alloy/pull/1261
Consequently bump op-alloy-rpc-types

this fix is now released

Patch removed


Adding support for non-top-level directories when setting up a volume

The following message is a bit puzzling:
% krunvm  changevm f35 -v /Users/ddd:/home/ddd
Invalid volume, only single direct root children are supported as guest_path

With podman, it is perfectly fine to pass a directory like this. This can be worked around using a bind mount from a top-level directory, but I'm curious about the reason for that restriction to start with.

On macOS, libkrun implements volume sharing by extending virtio-fs to have special nodes on top of the root inode. While it's technically possible to extend this to allow those special nodes to reside anywhere in the filesystem, I'm not sure if the benefits justify the increase in complexity (krunvm doesn't intend to be a podman replacement).


Move CI to use Github actions

Travis CI queue waits and issues are on the rise and is creating more problems now.
Other projects at Kong have successfully moved to Github Actions with positive results and so should this repository.

All dret

@hbagdi is this still an issue? I would like to try addressing this if you can let me know where to start.

Yes, this is still an issue.
The way to go about this would be to study the small Makefile and .travis.yml files in the repository then try to write a workflow for Github Action.

ok, thanks. I'll start working on that.

If anyone wants to take this up, the basic steps are documented here: https://github.com/hbagdi/go-kong/blob/master/.github/workflows/test.yaml


【TGo Handler】Add sucure connection to gRPC server

Add sucure coneection to rpc server.
Tgo's config should add keys relate to secure connection, such as cert_path, key_path
{
    "handlers": {
        "Tgo": {
            "api_addr": "<IP_ADDRESS>",
            "api_port": 1444,
            "cert_path": ""
        }
    },
    "apiToken": "x",
    "debug": true
}

done


updated _includes/getting-stareted.html

Signed-off-by: ANURAG-PATHAK<EMAIL_ADDRESS>Description
This PR fixes #517 #500
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

@ANURAG-PATHAK changes LGTM🎉! Just something to keep in mind for next time, if you could please make seperate PRs for seperate issues, putting everything together in one PR makes it difficult to the review the code.
Also, Thanks for these changes, good work 😃.

Sure, I will take care of it next time, and thank you for your help and guidance.

@Jashpatel1 if I'm not wrong, aren't we looking for new designs for that page?

Looks good. One more change if @leecalcote can confirm. Do we change the program name from CommunityBridge to LFX on the programs page as well?

I was thinking the same but @warunicorn19 told that they will be redesigning the whole page

I would have to commit a change because I deleted the community bridge icon so if my pr will be merged the site will look like this

that is why I think I should make this LFX then we can think of redesigning  the page as well so should I commit the change in this pr please approve

this would be the new look after my commit
should I make a commit for the same?
@warunicorn19 @Jashpatel1

@ANURAG-PATHAK a request: the white versions of these logos are terribly unattractive. Do you mind finding SVGs of each with color, so that we can assess whether shifting to colorized version is a bit more aesthetically pleasing?

Maybe we could try using something like https://iconscout.com/icon/linux-foundation-3521550

@ANURAG-PATHAK a request: the white versions of these logos are terribly unattractive. Do you mind finding SVGs of each with color, so that we can assess whether shifting to colorized version is a bit more aesthetically pleasing?

Yes I can make a prototype using coloured SVGs, but I think we need to redesign this whole page as these large icons are making it a bit unattractive .

@leecalcote , These are the updated changes

@ANURAG-PATHAK thanks. That's not the MLH logo, no?

@ANURAG-PATHAK thanks. That's not the MLH logo, no?

there are two logos one is for mlh and other is of mlh fellowship

Thanks, @ANURAG-PATHAK. Almost there?

Thanks, @ANURAG-PATHAK. Almost there?
yes, tell me if I need to change anything else

Thanks, @ANURAG-PATHAK. Almost there?

so which logo you want on the website mlh one or mlh-fellowship one

@ANURAG-PATHAK could you please put in the LFX one as well?

@Jashpatel1 should we go with the coloured ones?

@ANURAG-PATHAK could you please put in the LFX one as well?

sorry @warunicorn19 what LFX ? please elaborate 😊

so if you can confirm I can push the changes with coloured logo and LFX also or should I go with this one?

Pulling in the big gun, @Nikhil-Ladha here.

due to some errors, I pulled another PR #544
sorry for the inconvenience 😔😔

Closing this PR based on the above comment.


Publish 1.3.3 to public repository

Could you please advise, when do you plan to release 1.3.3 to public repository? Currently latest  1.3.2 version is available in pip, but important functions like _key in collection are not there.

Anyone?
1.3.3 looks good, can we release it?

Looks like it's there now.


Set date Picker Language To French

One of my application use of datetime-picker but actually I required French language so give me response.

@onusgit did you fix it? share your resolution, please ?

Tks, I will test later. But if not set locale props, picker will get device locale to set language, my case is: on iPhone 6s+ run ios 9.3, it is exactly, but on iPhone X run 12.0, language always English.

I setted locale="FR" but it is still English

It should work,
Check for Feb, should be Fév. As Oct is Oct in Fr.

No, see Day in week :|

This feature is available only for IOS, so you can set the locale prop like this:
locale='fr-FR'


why are you limiting the following packages?

why are you limiting the following packages?
httpx = ">=0.23.0,<0.25.0"
fastapi = ">=0.100,<0.109.0"

As I noted in #739 , This is blocking any project that has chainlit 1.0.200 from installing the ollama python sdk, which is currently extremely useful due to its recent OpenAI-compatible API support.

The fastapi limitation was removed not long ago, for httpx we had some issues, will need to look into it.

I think the issue with httpx is resolved because it uses the >= version specifier now.
However, pyproject.toml still uses the caret requirement for the FastAPI version.
https://github.com/Chainlit/chainlit/blob/efc2c78359e99bdacc5082468f93f1170085bf3e/backend/pyproject.toml#L29-L32
Because FastAPI uses 0 as its major version, ^0.110.1 resolves as (>=0.110.1, <0.111.0). According to semantic versioning, a major version of 0 is for initial development, and each version could have breaking changes.
FastAPI is pretty stable though. It's disappointing that they still use 0 as the major version. You can read their rationale here: https://fastapi.tiangolo.com/deployment/versions/
I suggest changing the FastAPI requirement to use the >= specifier, like it is done for httpx.
Let me know if you want a PR.

Hey, I can't mount Chainlit to my existing FastAPI project because the dependency specification on the FastAPI package is too strict. Would you consider relaxing it by specifying it as following?
fastapi = ">=0.110.1"

@cenkalti We'd like to be more flexible here but we are currently not able to provide support for multiple FastAPI versions. To address this, we should:

Have unit tests for backend functionality, for which #1134 is a starting point.
Run tests on a matrix of supported versions of dependencies, for which #1214 is a starting point.

For either one, we explicitly applaud any contributions and -- and we'll do our best to work towards this as soon as we can. Until then, supporting a range of versions of dependencies will imply that, sooner or later, a big chunk of users will run into unexpected issues as we are literally unable to test all the different versions.
I'd recommend, until we're there, you deploy into your app from a fork of chainlit wherein you make the necessary changes to your dependency.


https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details

This section:

These error events do not bubble up to window, but (at least in Firefox) can be handled with a window.addEventListener configured with useCapture set to True.

implies that bubbling of the error event works only on Firefox, but both Chrome and Edge propagate the event in the same way, so the part in the parenthesis should be removed.
The code used for the test is:
window.addEventListener('error', function (e) {
    console.log("ERROR");
    ...
}, true);

Thanks for reporting! I've fixed this now.


sandbox_remove: Do not error out when CNI tear down fails

We don't want to have lingering pods because of CNI failures.
Signed-off-by: Samuel Ortiz<EMAIL_ADDRESS>

LGTM

will just wait for the CI to come back on this one.

where's the CI here :confused:

alright, just checked, it's the first in the queue so it'll report results soon.

LGTM


New clock face - mosaic

New clock face, bright and colourful but still easy to read. Options to show or hide widgets.

I forgot to reference my inspiration, the pebble watch face: https://store-beta.rebble.io/app/55386bcd2aead62b16000028
Should I add that to the readme?

I forgot to reference my inspiration, the pebble watch face: https://store-beta.rebble.io/app/55386bcd2aead62b16000028 Should I add that to the readme?

In my opinion, yes. Furthermore other Pebble-inspired themes make it explicit.

This looks great - thanks! Using g.drawImage for this is great too as it should be pretty speedy.
Not sure what you think but when I finally sort out https://github.com/espruino/BangleApps/issues/1466 it might be a neat thing to use when fullscreen.

Thank you Gordon (and Alessandro for your help and feedback)!
I like the sound of the hideable widget bar, that would be ideal for this.


Import Animation .glb files to existing GLTF model?

I'm wondering if there is support and/or sample scenes for importing separate animation .glb files at runtime and applying them to an existing GLTF model component in the scene?
Thanks!

hey, lol. saw you over at the TriLib forums. Guessing you gave up on it? :) Have you been able to get this GLTF loader working on android by any chance? Im having zero luck.

Hey, there doesn't seem to be a sample to work from but I'm still experimenting. :)

Hi @marcspraragen,
This isn't something that is built in, but I think you should be able to accomplish it with UnityGLTF.  If you load scene in a glb which contains a mesh that has an animation attached to it, then it will load as a Unity animation.  Then should be able to copy that animation onto another mesh.

Thanks Adam! The other possibility I was looking for applying an animation was merging a model .gltf with a model-less animation .gltf at runtime. Does (or could, with some tweaking) RootMergeComponent script cover this case?

This is not possible right now.  Side note, are these valid gltfs?
Looking at the spec, animation channel targets must specify a node.  And I think that node needs to be in the same gltf to be valid.
https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#channel
https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#animations
That aside, if you wanted to accomplish this, then you'd need to:

Make GLTFSceneImporter.ConstructClip public or expose a public function that calls it.
Come up with some way to retarget the animation's referenced nodes to the nodes from another file.

See the call to GetNode() inside ConstructClip().  Maybe have ConstructClip take in a function to get a node given a node id.  By default it will call GetNode() as it does now.

If you do the work to enable something like this, please send a pull request to get it into master branch so others can benefit from it.

Thanks for your reply! I will definitely share any successful updates.

Oh finally, someone has tried on what I am stuck for a week now. So the case is the same as me. I want to apply an animation from one GLTF file to another. I don't want to bloat my main mesh while loading the main scene.
Any update on this issue? @marcspraragen
Screenshot of my files below (will give a better prespective)

We tried quite a bit to transplant / construct animated clips between imported scenes and their nodes, but it ended up being unreliable. Also, it's hard to test because even though UnityGLTF is open source, GLTF spec is too much of a black box (I'm guessing that factor has stumped many other efforts here).


where are these MAT-files generated from?

Could you share where and how are these mat-files generated from?
https://github.com/lood339/SCCvSD/blob/474f5b612955fdb7c3c1f568cc39764533eeab74/data/read_me.py
Are these all based on the input of the UoT_soccer annotation from "Sports Field Localization Via Deep Structured Models"?
Thanks a lot!

The reason I am asking is that, for the deep features-based retrieval.
if I am using your preprocessed MAT "database_camera_feature.mat"  and "testset_feature",  the matching is very good.
However, in the 2nd approach, if I am training the Siamese network following your instruction in "bash network_train.sh" and generated "network.pth". and use the "fake_D.data" from the GAN approach as input to obtain the deep feature, the result is very off from the "testset_feature.mat", and the retrieval with "database_camera_feature.mat" does not give a satisfactory result as the 1st approach above.

Hi thanks a lot for the prompt reply.
I think your TODO feature is exactly the missing piece.
Using both your "soccer_seg_detection"  and my own data, I observed the following:
(1) Your GAN-generated edge-image works fine with the HoG feature, and the NN search is correct with the groundtruth database.
(2) However, using the same GAN-generated edge-image, Siamese network feature can be generated but the NN search does not give the correct result. I suspect something was not correct when I implement the deep-feature extraction. Or at least not the same way which was used during the Siamese network training, which is exactly what you pointed out in TODO.
I am happy to implement this missing piece if possible.  Would be great if you could share the training data and necessary info.
Thanks again for your reply and this beautiful work!

Hi Rambleramble,
No problem.
Because I do not test the network training part, can you pull the code that works in your machine? So that, others may can use your code?
Thank you.
Jimmy

Hi Rambleramble,
I'm following your discussions with Dr. Chen. Have you achieved the same results as Dr. Chen?  Could you shed some light on how to achieve this target?

For the network training part, are you using a 90K dataset(new "train_data_90k.mat") rather than default "train_data_10k.mat" generated in "generate_train_data.py"?
For the deep feature extracting part, are you using the method in "network_test.py" to obtain your own "testset_feature.mat"?

Thanks very much in advance!
Thanks very much also to Dr. Chen for sharing this code!

@lood339 , thank you!!
At this moment, I haven't implemented any new code. I only tested the capability and it works well for my application. I will pull if any necessary new source is generated in the future.
@ Explorerli,  I uesd 10k version. which is already good enough for my application. deep feature extraction in "network_test.py" is for the 10K training data to be proceed to generate the database feature for the later stage retrieval. For the query image ( I assume input an RGB or BGR from your frame), you need to extract your own deep-feature, following the GAN-generated edgemap and the network_test.py implmenetaion of the ndarray example.  I think it shouldn't be too many  lines of code.

@rambleramble Thank you very much! I'll try!

@Explorerli Any luck with re-producing the same results in the paper by Dr.Chen?
Thanks in advance.


Papercuts training Understanding Galaxy history system updated

All figures have been updated to adjust the training to the new color scheme and the incorporated modifications.

xref: https://github.com/galaxyproject/training-material/issues/2074
@gallardoalba there is a merge conflict.

@bgruening solved (I think)

Yes thanks!

fixes #2074

Thanks @gallardoalba!


Share file types

Hi,
Currently it's not possible to share PDFs in android as the files are checked for file type
https://github.com/alinz/react-native-share-extension/blob/master/android/src/main/java/com/alinz/parkerdan/shareextension/ShareModule.java#L59
I've added a check for application/pdf as well, but maybe there are other ways to detect if the share is file...

Any updates on this? Making the mimetype flexible would be awesome as I'm trying to share .pdf .ppt files

since that list at the moment is static, it's better to expose that one as a JS function. Any one interested doing a PR?

I Make react-native-file-share-intent it's Work perfectly on both platforms. It supports all media to share our App


Chart race template

What problem does this feature solve?
Hello, just wondering whether it is possible to implement a chart race template in echarts, something along these lines: https://flourish.studio/2019/07/15/line-chart-race/
Some of this can be implemented by the timeline, however, it's not as smooth, axis wouldn't move etc.
Any thoughts welcome!
What does the proposed API look like?
Not sure at this stage

We can expect it in 5.0. See #12484

Awesome!


Barrows plugin updates: Show potential above NPC heads in tunnels & Calculate optimal kills

An couple of updates which I think would be simple-is to implement and very beneficial are
Showing the potential for each NPC in the tunnels above their heads, similar to the name when the NPC Indicator plugin is suggested. It could be a straightforward "turn on/off" tickbox in case some people don't want the overcrowding on their screens.
Bloodworm: 5.2%
Skeleton: 7.7%
Crypt rat: 4.3%
Crypt spider: 5.6%
Giant Crypt rat: 7.6%
Giant Crypt Spider: 7.9%
In addition to this, having a dynamic calculation of what combination of monsters would get you to a chosen % that could also be entered on the plugin page. As the value for these potential %'s are just the combat level of the monster, it could be simple to hardcode this value in, as well as include the following combinations. I don't have any experience coding in Java, but it seems that something like This could effectively be used to calculate the possible combinations, or if this isn't an option, just running through the possible combinations that get you as close as possible would also be beneficial.
E.G:
Goal inputted is 88%
All Brothers = 66.8%
2 Skeletons, 1 Bloodworm = 66.8 + 27.7 +5.2 = 87.4%
4 Bloodworms = 66.8 + 45.2 = 87.6%
5 Crypt Rats =66.8 + 54.3 = 88.3%
1 Skeleton, 1 Bloodworm, 2 Crypt Rats = 66.8 + 7.7 + 5.2 + 24.3 = 88.3%
Thanks! Let me know any feedback on this idea

Just kill skeletons


Adding mod-space! Op Atom, to access the space of a module, loading it if necessary

Adding mod-space! Op Atom, to access the space of a module, loading it if necessary
See https://github.com/trueagi-io/hyperon-experimental/issues/592
It's now possible to do this: !(add-atom &new_space (mod-space! mod_name))
Therefore, !(add-atom &self (mod-space! stdlib)) adds the same atom(s) as !(import! &self stdlib), but does not add any tokens.
For me the remaining question is whether we want to enshrine the "nested-sub-space" behavior into MeTTa semantics?  We could add a merge-atoms or similar operation, to make it clear we're bringing in all atoms from the source space, but the implementation in the present code would be identical to add-atom

Taking into account that modules drift away from pure spaces as was supposed...

The biggest conceptual issue here is the Tokenizer.  There are other minor things, but if we can come up with a way the Tokenizer leverages the space then I am sure we can solve the rest of the issues.  https://github.com/trueagi-io/hyperon-experimental/issues/510  Of course the Alpha release timeline might constrain us a bit.

Do we need to load the module if it is not loaded, or would it be better to return Empty?

Not sure.  My assumption was that load-on-demand would be more convenient.  Otherwise people would need to use register-module! or import! prior.  Which might be inconvenient.  Especially because import! does additional stuff (e.g. registering tokens) and register-module! works with paths and therefore is limited to modules in the file system.

My assumption was that load-on-demand would be more convenient.

Maybe, this functionality should be covered by a unit test.

Maybe, this functionality should be covered by a unit test.

The Op Atom generally has this unit test:  https://github.com/luketpeterson/hyperon-experimental/blob/b686aa950964c089621a6ad5a60ea46e2d2cc799/lib/src/metta/runner/stdlib.rs#L1527
as far as a unit test specifically for load-on-demand, it calls through exactly the same pathway as import!, so I don't think there is much untested surface area in that particular interaction.


Send message still haven't BCC and CC.

Hi
Incoming (send) message still haven't BCC and CC.

By send you mean messages that are received by our library? If so yes, cc and bcc is added.
$imap->incomingMessage->header->details->cc
# or
$imap->incomingMessage->header->details->bcc
# cc and bcc it is array of objects with properties [personal, adl, mailbox, host]

Okay sorry my mistake. I read email from drafts folder and he not contained bcc and cc.

All good :)


en: add a simpe desc about HA

What is changed, added or deleted? (Required)

add a simpe desc about HA

Which DM version(s) do your changes apply to? (Required)

[x] master (the latest development version, including v3.0 changes)
[x] v2.0 (TiDB DM 2.0 versions)
[ ] v1.0 (TiDB DM 1.0 versions)

What is the related PR or file link(s)?

This PR is translated from: https://github.com/pingcap/docs-dm/pull/322
Other reference link(s):

Do your changes match any of the following descriptions?

[ ] Delete files
[ ] Change aliases
[ ] Have version specific changes
[ ] Might cause conflicts after cherry-picked

@ireneontheway please address https://github.com/pingcap/docs-dm/pull/366#discussion_r485476523. rest LGTM

/merge


Easy way to test device configs

Could you please find a way to test new device configs (yaml files) without HA restart?
It takes a lot of time to test new devices now.

You can run pytest tests/test_device_config.py, which will perform some basic checks on the device config files prior to deployment.

Thanks. I wanted to test something more than what test_device_config.py does:

new effects added
color modes added/deleted
new data points added
etc.

Just in case somebody will be looking for some solution. I use the following approach currently:

Modify the yaml
Delete the device/integration
Add the integration again (so, you'll have to input device id, ip and local key again :( )
Now the device will work with updated yaml
So, no need to restart HA

YAML configuration reloading you mean? Or, where should I find that Reload option?

On the Settings / Devices tab, if you select the device inside the Tuya Local box, then in the menu there is a "Reload" item.  This appears to load the new yaml when I tried it just now.

As the Reload is working, I think this issue is taken care of already by Home Assistant's generic device support.

Thanks! It works, but looks like doesn't cover all scenario. For ex., I remove some mappings, then the list is updated.
But when I tried to change entity type from hex to string, I received the following error
2023-01-08 14:15:36.453 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Fairy lights for select
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 62, in async_setup_entry
return await component.async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!


head.tmpl og:image picture location

og:image picture location

Codecov Report

Merging #10531 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #10531      +/-   ##
==========================================
+ Coverage   43.68%   43.68%   +<.01%
==========================================
  Files         586      586
  Lines       81521    81521
==========================================
+ Hits        35612    35615       +3
+ Misses      41494    41492       -2
+ Partials     4415     4414       -1

Impacted Files
Coverage Δ

modules/indexer/stats/queue.go
62.5% <0%> (-18.75%)
:arrow_down:

modules/indexer/stats/db.go
40.62% <0%> (-9.38%)
:arrow_down:

modules/git/utils.go
65.67% <0%> (-4.48%)
:arrow_down:

modules/queue/workerpool.go
56.93% <0%> (-1.07%)
:arrow_down:

modules/git/repo.go
46.78% <0%> (-0.92%)
:arrow_down:

services/pull/pull.go
35.19% <0%> (-0.88%)
:arrow_down:

models/error.go
29.23% <0%> (+0.51%)
:arrow_up:

modules/indexer/issues/indexer.go
58.9% <0%> (+1.36%)
:arrow_up:

modules/log/file.go
77.62% <0%> (+2.09%)
:arrow_up:

modules/git/command.go
89.56% <0%> (+2.6%)
:arrow_up:

... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d2059a...aa069f1. Read the comment docs.

make L-G-T-M work

@freecipher Please send backport to release/v1.11

@freecipher created backport for you: #10556


TechnicalException:  Do not use the resource: or classpath: prefix for non-existing files

Happy new year!
Do not use the resource: or classpath: prefix for non-existing files. Use a direct path (relative or absolute, no prefix)

Why would I want to use ANY sort of path when something is non-existing?

Happy new year! This is exactly what the error message intends to say. The use case is for a non-existing keystore which will be automatically created. These prefixes must be clearly revisited in version 2.0.


FirstRowNum and LastRowNum == -1

On certain files, which Excel manages to read, only the first row is recognised, and with RowNum -1.

fixed in da5d540 by PR #2.