Keras 'Model' object has no attribute '_callable_losses'

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS inux release 7.6.1810
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 1.14.0
Python version: 3.7.6
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: V9.1.85
GPU model and memory: Tesla K80 24C

I have a class with a model and I want to add a custom loss with three arguments.  Upon building the model, the following error is raised:
<ipython-input-124-46b9e7f916ce> in _build(self)
     50
     51         self.get_optimiser()
---> 52         model = self.get_loss(inputs, x)
     53
     54         return model

<ipython-input-124-46b9e7f916ce> in get_loss(self, inputs, outputs)
    151             model = Model(inputs=[inputs, y_true, is_weight], outputs=[outputs])
    152
--> 153             model.add_loss(weighted_dice_loss(y_true, outputs, is_weight))
    154             self._model.compile(optimizer = self._optimiser, loss = None, metrics = [dice_coef])
    155

~/miniconda3/envs/segment/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in add_loss(self, losses, inputs)
    899         eager_losses.append(_tag_unconditional(loss))
    900
--> 901     self._callable_losses += callable_losses
    902
    903     call_context = base_layer_utils.is_in_call_context()

AttributeError: 'Model' object has no attribute '_callable_losses'

The expected behaviour is, thus, that the model accepts this custom loss, since it has three arguments instead of two when calling unet._build() without getting thrown an error:
unet = UNet()
unet._build()

The minimum reproducible code is as follows:
class UNet():

    def __init__(self, **kwargs):

        self._input_shape = kwargs.get('input_shape', (12, 86, 98,1))
        self._blocks = kwargs.get('blocks', 2)
        self._layers = kwargs.get('layers', 8)
        self._n_filters = kwargs.get('n_filters', 16)
        self._patch = kwargs.get('patch', (3,3,3))
        self._activation = kwargs.get('activation', 'elu')
        self._activation_last = kwargs.get('activation_last', 'sigmoid')
        self._kernel_initializer = kwargs.get('kernel_initializer', 'glorot_normal')
        self._padding = kwargs.get('padding', 'same')
        self._learnrate = kwargs.get('learnrate',0.001)
        self._momentum = kwargs.get('momentum',0.99)
        self._decay = kwargs.get('decay',0.0)
        self._mode = kwargs.get('mode','train')

    def _build(self):

        # Initialise array to keep skip connections
        self.skips = []

        inputs = Input(shape = self._input_shape)

        x = self.first_layers(inputs)
        x = self.contractive_path(x)
        x = self.middle_path(x)
        x = self.expansive_path(x)

        self.get_optimiser()
        model = self.get_loss(inputs, x)

        return model

    def first_layers(self, inputs):

        layer = Conv3D(filters = self._n_filters, kernel_size = self._patch, activation = self._activation, kernel_initializer = self._kernel_initializer,
                padding = self._padding)(inputs)

        return layer

    def contractive_path(self, layer):

        for b in range(0,self._blocks):
            for i in range(0,self._layers):
                layer = Conv3D(filters = self._n_filters, kernel_size = self._patch, activation = self._activation, kernel_initializer = self._kernel_initializer,
                padding = self._padding)(layer)

            #append for later use in up-sampling
            self.skips.append(layer)

            #downsampling (using patch(2,2,2) and stride of 2, similar to MaxPooling3D but uses less parameters)
            layer = Conv3D(filters = self._n_filters, kernel_size = (2,2,2), strides = (2, 2, 2), activation = self._activation, kernel_initializer = self._kernel_initializer,
                padding = self._padding)(layer)

            #post-pooling, double number of filters
            self._n_filters = int(self._n_filters*2)

        return layer

    def middle_path(self, layer):

        for i in range(0,self._layers):
            layer = Conv3D(filters = self._n_filters, kernel_size = self._patch, activation = self._activation, kernel_initializer = self._kernel_initializer,
                padding = self._padding)(layer)

        return layer

    def expansive_path(self, layer):

        for u in range(0,self._blocks):
            layer = UpSampling3D(size = (2,2,2), data_format = None)(layer)

            # skip connection from DOWN_PATH
            concat_lr = self.skips[-1]

            layer, concat_lr = cropping_tensor(layer, concat_lr)
            layer = Concatenate()([layer, concat_lr])

            for i in range(0,(self._layers)):
                layer = Conv3D(filters = self._n_filters, kernel_size = self._patch, activation = self._activation, kernel_initializer = self._kernel_initializer,
                padding = self._padding)(layer)

            self._n_filters = int(self._n_filters/2)
            #print('UpBlock',str(u),' : end_n_filters ', str(n_filters))

            self.skips = self.skips[:-1] # get rid of last skip connection

        ### output layer
        y_pred = Conv3D(1, (1,1,1), activation = self._activation_last)(layer)

        return y_pred

    def get_optimiser(self):
            self._optimiser = SGD(lr = self._learnrate, momentum = self._momentum, decay = self._decay, nesterov = False)

    def get_loss(self, inputs, outputs):

            y_true = Input(self._input_shape, name = 'y_true')
            is_weight = Input(self._input_shape, name = 'is_weight')

            model = Model(inputs=[inputs, y_true, is_weight], outputs=[outputs])

            model.add_loss(weighted_dice_loss(y_true, outputs, is_weight))
            self._model.compile(optimizer = self._optimiser, loss = None, metrics = [dice_coef])

        return self._model

The weighted_dice_loss function is defined as follows:
def weighted_dice_loss(y_true, y_pred, w):

    return -weighted_dice_coef(y_true, y_pred, w)

Upon updating tensorflow, I got the following error:
---> 44         inputs = Input(shape = self._input_shape)
     45
     46         x = self.first_layers(inputs)

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/engine/input_layer.py in Input(shape, batch_shape, name, dtype, sparse, tensor)
    176                              name=name, dtype=dtype,
    177                              sparse=sparse,
--> 178                              input_tensor=tensor)
    179     # Return tensor including _keras_shape and _keras_history.
    180     # Note that in this case train_output and test_output are the same pointer.

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
     89                 warnings.warn('Update your `' + object_name + '` call to the ' +
     90                               'Keras 2 API: ' + signature, stacklevel=2)
---> 91             return func(*args, **kwargs)
     92         wrapper._original_function = func
     93         return wrapper

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/engine/input_layer.py in __init__(self, input_shape, batch_size, batch_input_shape, dtype, input_tensor, sparse, name)
     37         if not name:
     38             prefix = 'input'
---> 39             name = prefix + '_' + str(K.get_uid(prefix))
     40         super(InputLayer, self).__init__(dtype=dtype, name=name)
     41

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py in get_uid(prefix)
     72     """
     73     global _GRAPH_UID_DICTS
---> 74     graph = tf.get_default_graph()
     75     if graph not in _GRAPH_UID_DICTS:
     76         _GRAPH_UID_DICTS[graph] = defaultdict(int)

AttributeError: module 'tensorflow' has no attribute 'get_default_graph'

Of note, I was importing tensorflow as follows:
import tensorflow.v1.compat as tf

Upon updating tensorflow and running the code again I get thrown this
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-11-3f26c80035c9> in <module>
      1 #graph = tf.get_default_graph()
----> 2 unet_model = unet._build()

<ipython-input-8-9245d04f54db> in _build(self)
     42         self.skips = []
     43
---> 44         inputs = Input(shape = self._input_shape)
     45
     46         x = self.first_layers(inputs)

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/engine/input_layer.py in Input(shape, batch_shape, name, dtype, sparse, tensor)
    176                              name=name, dtype=dtype,
    177                              sparse=sparse,
--> 178                              input_tensor=tensor)
    179     # Return tensor including _keras_shape and _keras_history.
    180     # Note that in this case train_output and test_output are the same pointer.

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
     89                 warnings.warn('Update your `' + object_name + '` call to the ' +
     90                               'Keras 2 API: ' + signature, stacklevel=2)
---> 91             return func(*args, **kwargs)
     92         wrapper._original_function = func
     93         return wrapper

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/engine/input_layer.py in __init__(self, input_shape, batch_size, batch_input_shape, dtype, input_tensor, sparse, name)
     37         if not name:
     38             prefix = 'input'
---> 39             name = prefix + '_' + str(K.get_uid(prefix))
     40         super(InputLayer, self).__init__(dtype=dtype, name=name)
     41

~/miniconda3/envs/segment/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py in get_uid(prefix)
     72     """
     73     global _GRAPH_UID_DICTS
---> 74     graph = tf.get_default_graph()
     75     if graph not in _GRAPH_UID_DICTS:
     76         _GRAPH_UID_DICTS[graph] = defaultdict(int)

AttributeError: module 'tensorflow' has no attribute 'get_default_graph'

Hi, instead of using :
 from keras.layers.convolutional import Conv3D, Conv3DTranspose from keras.layers.normalization import BatchNormalization from keras.layers import Cropping3D, UpSampling3D, AveragePooling3D
use :
 from tensorflow.keras.layers.convolutional import Conv3D, Conv3DTranspose from tensorflow.keras.layers.normalization import BatchNormalization from tensorflow.keras.layers import Cropping3D, UpSampling3D, AveragePooling3D while working with tf2.0 or higher.

@mash2612
Please refer to this comment with same error to resolve the issue.
link link1.
and us know if it helps.

@Saduf2019 this issue was raised by @danielfllaneza . I was just suggesting a way to solve this and I think the links also indicate a solution in the same direction.
@danielfllaneza let us know if the solution helped you.

@ danielfllaneza
Please update as per above comment.

Thanks for the suggestions, It only worked when importing it like this:
import tensorflow as tf

from tensorflow.keras import Input
from tensorflow.keras.models import Model
from tensorflow.keras.layers import (AveragePooling3D,
                                   BatchNormalization,
                                   Concatenate,
                                   Conv3D,
                                   Conv3DTranspose,
                                   Cropping3D,
                                   UpSampling3D)

@danielfllaneza
Please confirm if the issue is resolved can we move this to closed status.


Hyperdrive - Node.js - Wrong ID output

Describe what happened
Creating a HyperdriveConfig resource and getting its ID from the output will return the cloudflare Zone ID instead of the Hyperdrive ID.
Sample program
export const hyperDrive = new HyperdriveConfig('hyperdrive', {
  accountId: 'account',
  name: 'somename',
  origin: {
    scheme: 'postgres',
    user: 'user',
    password: 'password',
    host: 'host',
    database: 'dbName',
    port: 5432,
  },
});

hyperDrive.id // <-- this will return the same value as hyperDrive.accountId
hyperDrive.accountId // <-- this will return the same value as hyperDrive.id

Log output
No response
Affected Resource(s)
HyperdriveConfig
Output of pulumi about
CLI
Version      3.138.0
Go Version   go1.23.2
Go Compiler  gc

Plugins
KIND      NAME                VERSION
resource  cloudflare          5.42.0
resource  gcp                 8.0.0
language  nodejs              unknown
resource  std                 1.7.3
resource  terraform-provider  0.3.0

Host
OS       darwin
Version  15.1
Arch     arm64

Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Hey @andresusanto thanks for reporting and sorry you've hit this. We currently have no workaround for this but I've raised https://github.com/pulumi/pulumi-terraform-bridge/issues/2612 for root-cause of the issue and will add a fix for this resource.

Thank you for looking and fixing this @VenelinMartinov!

@andresusanto the resource id should be available under resourceId - unfortunately the id property has to be mapped to something else because the resource allows the hyper drive id to be set by the user and the pulumi engine does not accept that.


Introductions

👋 Hey, I'm Geoff and I think this is something that should exist in the world.
Wanna help create it? Say howdy below.

Will be watching with interest!

Hi! I'm very interested in helping author the RFC. I thought of creating this today only to find the domain was already taken and this project already existed, ha!


python3Packages.pydaikin: init at 2.4.1

Motivation for this change
Python Daikin HVAC appliances interface
https://bitbucket.org/mustang51/pydaikin
This is a Home Assistant dependency.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

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

3 packages built:

python37Packages.pydaikin
python38Packages.pydaikin
python39Packages.pydaikin

Result of nixpkgs-review pr 112987 at be095d60 run on aarch64-linux 1

3 packages built:

python37Packages.pydaikin
python38Packages.pydaikin
python39Packages.pydaikin


Update fr.yml

Sorry for this late response. If the word "preset" is in parenthesis, it's because we say preset too but it's not the real translation. So I wrote in correct French too ;)

That's perfectly fine, Thanks! :D


[BUG] Receive AttributeError: 'function' object has no attribute 'get' when base_agent::process_model_config

Description
Integrate crewAi with FastAPI, and once receive a http request, trigger a sample crewAI's process.
The sample code is sample:
`
@CrewBase
class OrachestratorCrew():
    """JobPosting crew"""
    agents_config = 'config/agents.yaml'
    tasks_config = 'config/tasks.yaml'

    kimi_llm = LLM(
        model="moonshot-v1-8k",
        temperature=1.3,
        max_tokens=150,
        base_url="https://api.moonshot.cn/v1",
        api_key='sk-s3.....'
    )

    @agent
    def llm_agent(self) -> Agent:
        print("1...")
        return Agent(
            config=self.agents_config['llm_agent'],
            tools=[],
            llm= self.kimi_llm,
            verbose=True
        )

    @task
    def script_task(self) -> Task:
        return Task(
            config=self.tasks_config['video_script_generation'],
            agent=self.llm_agent
        )

    @crew
    def crew(self) -> Crew:
        """Creates the JobPostingCrew"""
        print("hello")
        return Crew(
            agents=self.agents,  # Automatically created by the @agent decorator
            tasks=self.tasks,  # Automatically created by the @task decorator
            process=Process.sequential,
            verbose=2,
        )

`
The  exception is report when creating the task:
`
Hello, World!
<class 'crewai.agents.agent_builder.base_agent.BaseAgent'>    <bound method memoize..memoized_func of <crewai.project.crew_base.CrewBase..WrappedClass object at 0x7fa569022e30>>
....
File "/work/startup/chana/orchestrator/app/controllers/video_controller.py", line 24, in create_video_script
OrachestratorCrew().crew().kickoff(inputs = inputs)
File "/opt/anaconda/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/crewai/project/utils.py", line 7, in memoized_func
cache[key] = func(*args, **kwargs)
File "/opt/anaconda/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/crewai/project/annotations.py", line 95, in wrapper
task_instance = task_method(self)
File "/opt/anaconda/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/crewai/project/utils.py", line 7, in memoized_func
cache[key] = func(*args, **kwargs)
File "/opt/anaconda/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/crewai/project/annotations.py", line 23, in wrapper
result = func(*args, **kwargs)
File "/work/startup/chana/orchestrator/app/agentProcess/chana_crew.py", line 43, in script_task
return Task(
File "/opt/anaconda/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/pydantic/main.py", line 193, in init
self.pydantic_validator.validate_python(data, self_instance=self)
File "/opt/anaconda/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/crewai/agents/agent_builder/base_agent.py", line 137, in process_model_config
return process_config(values, cls)
File "/opt/anaconda/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/crewai/utilities/config.py", line 19, in process_config
config = values.get("config", {})
AttributeError: 'function' object has no attribute 'get'
`
Steps to Reproduce
see # description section.
also add             memory=False for agent, but get the same result
Expected behavior
see # description section.
Screenshots/Code snippets

Operating System
Ubuntu 22.04
Python Version
3.10
crewAI Version
both 0.83.0 and 0.80.0
crewAI Tools Version
0.0.0(not clear)
Virtual Environment
Venv
Evidence
The log message in creating task is print..
Possible Solution
none
Additional context
none

Same happens to me when using an agent as manager:
    @crew
    def crew(self) -> Crew:
        """Creates the Crew crew"""
        return Crew(
            agents=self.agents,
            tasks=self.tasks,
            process=Process.hierarchical,
            manager_agent=self.tech_lead,
            respect_context_window=True,
            memory=True,
            planning=True,
            verbose=True
        )

    @agent
    def tech_lead(self) -> Agent:
        return Agent(
            config=self.agents_config['tech_lead'],
            tools=[DirectoryReadTool(), FileReadTool()],
            allow_delegation=True,
            verbose=True
        )

By removing 'process' and 'manager_agent', the error stops.

@xushijie @mateusscheper What was the fix? Same issue happening to me.

@xushijie @mateusscheper What was the fix? Same issue happening to me.
The issue has been gone in my side. I only rewrite the code and corresponding yaml configuration here.
I have no idea what is the really root cause, and suspect the variable placehodler in the yaml file.
using double curly brackets instead of single bracket initially.


different results between Huggingface and colab

Hi.
Thanks for this great work.
I've used the Huggingface demo to generate descriptions for some images with the following prompt:
Describe this image as detailed as possible.

I also used the 8bits model in colab. This is the code that I used to generate the descriptions:
import torch
from PIL import Image
import requests
from mplug_owl.modeling_mplug_owl import MplugOwlForConditionalGeneration
from mplug_owl.tokenization_mplug_owl import MplugOwlTokenizer
from mplug_owl.processing_mplug_owl import MplugOwlImageProcessor, MplugOwlProcessor

pretrained_ckpt = 'MAGAer13/mplug-owl-llama-7b'
model = MplugOwlForConditionalGeneration.from_pretrained(
    pretrained_ckpt,
    load_in_8bit = True,
    torch_dtype =  torch.half,
    device_map= 'auto'
)
image_processor = MplugOwlImageProcessor.from_pretrained(pretrained_ckpt)
tokenizer = MplugOwlTokenizer.from_pretrained(pretrained_ckpt)
processor = MplugOwlProcessor(image_processor, tokenizer)

prompts = [
'''The following is a conversation between a curious human and AI assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
Human: <image>
Human: Describe this image as detailed as possible.
AI: ''']

image_list = ["/path_to_image"]

generate_kwargs = {
    'do_sample': True,
    'top_k': 5,
    'max_length': 512
}
from PIL import Image
import requests

images = [Image.open(_) for _ in image_list]
inputs = processor(text=prompts, images=images, return_tensors='pt')
inputs = {k: v.bfloat16() if v.dtype == torch.float else v for k, v in inputs.items()}
inputs = {k: v.to(model.device) for k, v in inputs.items()}
with torch.no_grad():
    res = model.generate(**inputs, **generate_kwargs)
sentence = tokenizer.decode(res.tolist()[0], skip_special_tokens=True)
print(sentence)

However, the results from Huggingface demo are different from the locally runned model.
 The woman's pose appears confident and dynamic, as if she is ready to embrace the colorful surroundings.
There are several other objects in the scene, including a potted plant located on the left side of the painting, a handbag situated near the bottom right corner, and a cup placed towards the right side. Additionally, there is a bowl on a stand near her right foot and another bow on her left arm, adding to the artwork' s vivid appearance.
But when I run the model on colab, for the same image, I obtain the following description:
The image is a painting featuring a colorful dog with a purple and green background. The dog's body is in the middle of the painting, while its head appears at the left side of the picture, slightly turned to the right. Its fur is a mix of purple, green, and brown, giving it a vibrant appearance. There are a few more dogs present in the background, but their focus is not as prominent as the main subject's. The background consists of various colors, including red, blue, yellow, orange, white, and purple, creating a visually engaging and lively composition. The overall painting has a cheerful and playful mood.
The second description is wrong, as there are no dogs in the image. I noticed that many descriptions generated when running the model on colab are completely out of concept. Is there a something that I am doing wrong? Could it be because the model is loaded differently?
I also noticed that even when using the Huggingface demo, the model hallucinates and includes elements in the description that are not present in the image. For example, in the first description there are no handbags, cups or bowls. For example, given the image of a statue it will start to describe how the statue is surrounded by people that are admiring the statue when there are no people or crowds  in the image whatsoever.
Is there a way to control the hallucinations?
And why are the results so different when I run the model in different environments (Huggingface vs colab)?
I apologize for the long post.
Any help is greatly appreciated.
Thank you!

Hi, the model on huggingface space is the advanced version of mPLUG-Owl which natively support video with temporal related module as input without treating video as multiple frames. Besides the 8bit precision also have impact on the results.
For hallucination issue, we are working on the improved version of it since hallucination is a common problem of LLM models.

Dear @MAGAer13,
Thanks for the reply.
Is it possible to use the same model as the one on Huggingface but locally?
I guess this would require more gpu, right?

We will release the video version ASAP. The computation is comparable with current version since only a small fraction of parameters are added.

Thanks for your answers and time.
looking forward to it!


Unstoppable Domains name resolution deprecation/changes #3722

Closes #3722

[ ] Create issue for Android

For testing you can use domain: vladylav.wallet as well as these two addreses:

0xF5FFF32CF83A1A614e15F25Ce55B0c0A6b5F8F2c
0x8aad44321a86b170879d7a244c1e8d360c99dda8

Can you help describe what are the v1 and v2 resolvers?

v2 supports for these domains:

.zil
.crypto
.nft
.blockchain
.bitcoin
.coin
.wallet
.888
.dao
.x

v1 supports:

.bit
BTC
ETH
ZIL

Do we need both?

actually can't answer, but i guess we can leave both

Seems like v1 only supports name -> address resolution and v2 does both ways?

Right, v2 works with domain and address resolution. That is allowed by api.

Ok. Looks good to merge then. Would you help check if v1 is going away (or soon)? If it is and v2 covers everything v1 does, then we can swap the order around and at some point remove v1 completely. If v2 is a superset, it's at least faster now if we go with v2 first

Updated order of execution v2 then v1.


Add osx build.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

python -B setup.py install --single-version-externally-managed --record record.txt

Traceback (most recent call last):

  File "setup.py", line 151, in <module>

    pkg = libsvm()

  File "setup.py", line 120, in __init__

    raise RuntimeError("cannot find required libsvm binary module `%s' - make sure libsvm is installed on `%s'" % (module, prefix))

RuntimeError: cannot find required libsvm binary module `svm' - make sure libsvm is installed on `/Users/travis/miniconda3/envs'

Command failed: /bin/bash -x -e /Users/travis/miniconda3/conda-bld/work/bob.learn.libsvm-2.0.3/conda_build.sh


Version 2.3.3 - Can not open .exe file 'The assembly with display name 'MahApps.Metro' failed to load in the 'Load' binding context of the AppDomain with ID 1

Describe the bug
Everything works fine while Run app from VS. Problem occurre while run release .exe file manually.
.NET Framework 4.7.2
MahApps.Metro 2.3.3 (checked also on 2.0.0)
Managed Debugging Assistant 'BindingFailure' : 'The assembly with display name 'MahApps.Metro' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'MahApps.Metro, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=51482d6f650b2b3f' or one of its dependencies. The system cannot find the file specified.'
Steps to reproduce

Build WPF app with MahApps.Metro
Run exe file manually
Exception Thrown

Expected behavior
.exe file should run
Actual behavior
Exception tTown
Environment
.NET Framework 4.7.2
MahApps.Metro 2.3.3 (checked also on 2.0.0)
Visual Studio: 2019 16.7.6

Thank you for help.

@matiaso11 Does this happen with a raw WPF app with MahApps, or with your special app? Does all dll exists at the same place as the executable (ControlzEx, MahApps, Behavior)?

@matiaso11 Any news? I've tested this with a complete new project, added MahApps (latest version) and all necessary resources and the used the MetroWindow, but can not reproduce this issue.

I close this for now. If you still have trouble with this issue then let us know. Thank you! 🙏


E2: Add missing propcore getter functions

There are several functions in E2 propcore, which only has setter, but no getter.
It would make sense to add the missing getter functions.
Here just to name some without getter (all are entity methods, taking a number as an argument):
propDrag
propDraw
propFreeze
propGravity
propMakePersistent
propNotSolid
propSetBuoyancy
propShadow
propStatic

It's possible some of these already have getters outside of propcore, in the normal entity extension. I haven't checked though.
And for the ones that don't, adding them to the normal entity extension would probably make more sense.

quite a few of these seem to not have getters due to gmod, Looking through the wiki i cant find a getter for drag, buoyancy and shadow so you would probably have to modify the existing functions to store the set value somewhere for a getter to retrieve.
propFreeze has n = e:isFrozen()
v = propGravity() exists to return the gravity all props are affected by which might confuse things if n = e:propGravity()
The rest could be added

quite a few of these seem to not have getters due to gmod, Looking through the wiki i cant find a getter for drag, buoyancy and shadow so you would probably have to modify the existing functions to store the set value somewhere for a getter to retrieve (which also wouldn't catch edits made by anything other than E2).

Air friction/drag has direct getter function (PhysObj.IsDragEnabled).
Buoyancy is actually missing, but could be worked around.
Shadow can be retrieved using bittest function (Entity.IsEffectActive(EF_NOSHADOW)).

v = propGravity() exists to return the gravity all props are affected by which might confuse things if n = e:propGravity() is added

There's nothing to be confused with, if you read descriptions, which is something people should always do beforehand. (Yes, it can be a bit cumbersome when looking at the signatures at first, but that's because E2 doesn't have boolean datatype, instead it uses 1 and 0 as a number to represent true and false respectively.)
vector=propGravity() ; get the direction and strength of gravity.
entity:propGravity(number) ; set per-entity zero gravity (boolean).
number=entity:propGravity() ; get per-entity zero gravity (boolean). < is missing.
number=gravity() ; get the value of sv_gravity ConVar; world gravity.
Oh, yeah, the 1st function above isn't even documented.

My bad on the drag, not sure how i missed that tbh. I didn't know about the Entity.IsEffectActive(EF_NOSHADOW) :P. I agree that people should look at the descriptions but not many people do (unfortunately) and i dont like to add confusion, when unnecessary. If nobody else has done it when get time i'll make a pr adding these but unless you can point me to a way to get buoyancy that'll be skipped out


⚠ ClamAV has degraded performance

In 8eb28c2, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 75 ms

Resolved: ClamAV performance has improved in cda0c74.


Change supported branches to 1.3+

Q
A

Branch?
1.3

Bug fix?
no

New feature?
no

Related tickets

Thanks, @SirDomin! :tada:


Zjpm: VBITS definition

Current VBITS is defined as
"VBITS: The bits within an address that affect which memory is addressed."
I think it would be more appropriate to define as
"VBITS: If virtual memory is enabled, bits of an address which are used to index into page tables"

Addressed in fd7220807e1405ba9b5de38d9d4ac26e73312128 (Section 2.1)


reset not working as expected

I have have a form with FormBuilderTextField's as per example.
When calling fbKey.currentState.reset(), I can see when stepping through the code, that each field is reset to the initial value.
But when checking the value of the initial value, I see it has the value of the updated textfield which is also shown in the onChange.
I have no idea how this could be happening.
upgraded to v1.7.8+hotfix.3 today, but not sure if that could be an issue.
Any help would be greatly appreciated.

experiencing same issue.
reset() not clearing any value.

Could you please post a minimal example where this bug occurs? Just a main.dart file is enough. I'll look into it if I can reproduce it.

@knaeckeKami Thanks for your time. Currently I am swamped with work and in the end I managed by just creating a new key on reset.
I am new to flutter, so it is probably an issue on my side.
should I run into this some other time, I will update with an example.

I've faced the same issue. This issue caused by combination of 2 factors:

Implementation detail of TextFormField - https://github.com/flutter/flutter/blame/9dce19e96ff36fc36c50d15f57fa20e096a5b29f/packages/flutter/lib/src/material/text_form_field.dart#L141
Simply put, on each (re)build initial value of field will be set to current controller.text value.
So, if you make your widget containing form stateful and use setState inside FormBuilder onChanged callback, you get rebuild each time you change field value => reassignment of initialValue. When time comes to reset form, reset "wont work".

I run into same issue, setting initialValue: "" fixed this - feels like work around = maybe by default set that value?

This issue should be fixed. Feel free to reopen if not.


Enable importing from multiple sources

Currently only NPM packages are supported, but support could be added for:

URL
block explorer (lookup by chain and address)

Related: https://www.npmjs.com/package/hardhat-etherscan-contract-cloner


Data: Include fame earnings in API responses

Fame earnings are very useful to track progress / achievements of players inside a guild. Please, include fame earned and guild the player belongs to in the match data.
Please, take into account that a player may have played a match while belonging to a guild, but he may no longer belong to that guild, so the guild the player belongs to should be included in each match.

Thanks @jgongo should have an answer by end of week (don't see any problems at the moment, just want to get you something definite)

/CC: @tmcarmona16

@kas240sx89 Can you see if we have this.

Is there any update on this ? Thanks !

As the captain of two guilds in EA server, I can't agree more with jgongo that keeping track of the guild members' degree of participation and contribution are essential to VG guild management. Currently I need to input the guild fame contribution and skill tier of each member manually every week to generate the attached ranking charts.  It would therefore be appreciated if the API could support the features of reporting each guild member's statistics within a specific time frame, including:

Category of membership
Guild fame contribution
Number of each type of games (casual, ranked, blitz, BR, private) played with other guild members
VG online hours
Last active time

Moved to main feature issue #223


Specifying classloader

In issue #555 it is detailed how to specify a classloader when using OSGI. But the methods discussed are no longer there. Has this functionality been removed?

Indeed, this is an important functionality, it looks like it was not implemented in 3.x.x.
I hope it will be reimplemented.

I've found a workaround: i noticed that when DB is created it uses the classloader stored into Thread.contextClassLoader, so setting it before opening the DB can force your classloader:
Thread.currentThread().setContextClassLoader(childClassLoader);
I don't know if it's the expected behavior or even good practice, but it works. The contextClassLoader can be reset after opening the db

This issue was already targeting it in 2.0, but it was not ported to 3.0 https://github.com/jankotek/mapdb/issues/555

Hey @jankotek i noticed that https://github.com/jankotek/mapdb/commit/3d1ddbf186607d1a5022b699de57dcf5275a3dd0 references a classloader setting so that I can tell a DB to use a particular classloader. But it is not in the latest mapdb version.
I tried the Thread.currentThread().setContextClassLoader(childClassLoader); work around but couldn't seem to get that to work either.
how can I use a custom classloader?


Update Pip compilation instructions

--no-use-wheel has been deprecated since Pip v7.0.0, and has stopped working
at some point.
https://pip.pypa.io/en/stable/news/#id242

Thanks!


Propose ForceChangeRate

Implemented following existing PressureFlowRate

I'll merge this in now and let you add prefixes later if you choose to do so.

Nuget 3.23 out with all your PRs.

Thanks ^^


[Feature] Support dispatch for materializations to use implementations defined in installed packages

Is this your first time submitting a feature request?

[X] I have read the expectations for open source contributors
[X] I have searched the existing issues, and I could not find an existing issue for this feature
[X] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature
This is a way of preserving a more granular version of the previous behavior, which would implicitly (and somewhat surprisingly) use materializations from packages that override builtins (view, table, incremental, test, etc).
We are opting for this syntax:
dispatch:
  - type: materialization
    # macro_namespace is not needed, because all materializations are global
    search_order: ['elementary', 'dbt']
  - type: macro
    macro_namespace: dbt_utils
    search_order: [...]

Considerations
If not specified, the default would remain:

Root package first
Then builtin implementations within dbt-core / adapters

Which is how it works for materializations with the flag, and for dispatched macros.
Implementation
The relevant method is find_materialization_macro_by_name.
Michelle spiked a similar capability, though by pulling the "allowlist" from Project.flags rather than Project.dispatch: https://github.com/dbt-labs/dbt-core/pull/9956/commits/99998a597c75d71f85b85202e31de6cff984249e
Describe alternatives you've considered
(1) Not doing this
Users must reimplement materializations one-by-one, by defining them in their root project and calling the implementations in packages.
{% materialization table, snowflake %}
  {{ return(elementary.materialization_table_snowflake()) }}
{% endmaterialization %}

{% materialization incremental, snowflake %}
  {{ return(elementary.materialization_incremental_snowflake()) }}
{% endmaterialization %}

-- etc
-- differs by adapter

(2) Bundling with existing macro dispatch
Under the hood, these materializations are macros, and defined within the 'dbt' namespace. But I like the idea of continuing to keep the two separate, for three reasons:

Avoid tying ourselves forever to this implementation details (that materializations are macros)
Materializations are only callable from the "global" namespace, whereas all other macros can be called by namespace
It's conceivable that users would want different behavior for materializations versus other built-in macros

(3) Different syntax that wouldn't require evolving the type of dispatch config
# 'materialization' is just a special macro_namespace
dispatch:
  - macro_namespace: materialization
    search_order: ['elementary', 'dbt']

Edge case: this would not play well with an installed package named materialization.
Who will this benefit?

Users who have installed the elementary package (https://github.com/elementary-data/dbt-data-reliability/issues/703)
Maintainers of internal "utils" packages for their organizations, who want to change the behavior of table/incremental/etc for all of their colleagues with only a few lines of code

Are you interested in contributing this feature?
Yes, with the help of the elementarians
Anything else?
We should do this for dbt Core v1.8.x only. No backports. While we introduced the deprecation warning in dbt-core v1.6 + v1.7, it's still the default behavior in those versions to use implementations defined in packages.
We will document in the v1.8 upgrade guide and "legacy behaviors" the recommended sequence of:

Any users currently seeing the deprecation warning should set the behavior change flag to False to preserve existing behavior (regardless of the version they're running on), and to unblock their upgrade to v1.8
Then, at their leisure, they may set materialization dispatch, set the flag to True / remove the flag setting, and confirm that they're seeing the same behavior as before

Overall, either of these options seem like they could work.
I'm more drawn to the second option because it seems it seems closest conceptually to current.
The first option has a slight hack feel to it along with the edge case where it would not play well with an installed package named materialization.
If we choose the second option, would users be able to mix-n-match like the following? Or would - type become required?
# second option: new attribute
dispatch:

  - type: materialization
    # macro_namespace is not needed, because all materializations are global
    search_order: ['elementary', 'dbt']

  - macro_namespace: dbt_utils
    # type is not needed here because `macro` is the default when not specified
    search_order: ['my_project', 'dbt_utils']

Out of curiosity, would/could either of these work from a technical perspective if we choose the second option?
# second option: new attribute
dispatch:
  - macro_namespace: dbt
    type: materialization
    search_order: ['elementary', 'dbt']

# second option: new attribute
dispatch:
  - macro_namespace: none
    type: materialization
    search_order: ['elementary', 'dbt']

@dbeatty10 I agree with your preference for a new type attribute.
I think users could "mix-n-match". The default type would be macro, and we already have custom validation logic where we could apply special handling: "If type: materialization and macro_namespace is not specified, it is none or 'dbt' by default."
And I like where your "out of curiosity" thought is going. This syntax would be extensible to eventually support namespacing for materializations, and finer-grained search orders for each namespace. That's a good future possibility, out of scope for whatever we're doing here. For now, this will be a single search order for all materializations.

@Maayan-s @haritamar Does this proposal make sense to you both? Would you still be up for helping with the contribution?

Hi @jtcohen6 , yes this proposal sounds good on our end, and we'll be happy to help with contribution!

Following up as well. Has there been any progress on this issue?


[ZEPPELIN-1843] Error on invoking the REST API to run paragraph synchronously

What is this PR for?
This fixes the validation check of paragraph's note id to match with the Note instance id.
What type of PR is it?
Bug Fix
Todos
NA
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1843
How should this be tested?
The run para synchronous REST API should be successful.
Screenshots (if appropriate)
Questions:

Does the licenses files need update? No
Is there breaking changes for older versions? No
Does this needs documentation? No

Reopening to trigger the CI build.

Reopening to trigger the CI build.

Reopening to trigger the CI build.

The travis build is green.

@kavinkumarks Thanks for your contribution! Seems this bug is only shown at the first time after starting Zeppelin. Tested and works well.

Will merge it if there's no more discussion

Merge it master and branch-0.7


Allow manually setting a JSON Schema URL

Reason/Context
Current Studio picks up a JSON Schema from https://github.com/asyncapi/spec-json-schemas based on the asyncapi field.
This is valid for most of the users but I wonder if we could allow users to manually enter a URL of a valid JSON Schema (AsyncAPI one) so it can be used for validating.
The reason is that I find it useful for testing changes on the spec that are not yet fully merged.
I know the use case is very limited, but wondering if we could easily do that.
Description
Allow setting an external JSON Schema URL so it can be used for validating the document. It doesn't have to be in the UI, maybe a query parameter such as ?schema=<url> would be enough.

Do you wanna validate on different schema by parserJS? Currently parserJS has hardcoded versions of specs and you cannot pass new schema as input to the parser.

Do you wanna validate on different schema by parserJS? Currently parserJS has hardcoded versions of specs and you cannot pass new schema as input to the parser.

I know you load schemas at boot time, but I guess you can also add more schemas to the registry during runtime.

🤔  We can add new schema to the global object from @asyncapi/specs. I will think about it.

@magicmatatjahu What do you think about this one? I think it is valid?

 We can always override some rule from official Spectral's AsyncAPI ruleset in our Parser, it's not a problem.

Still relevant


Workaround for go-swagger issue in Authentication with two seperate API keys

Rewrite / workaround because of issue with handling two API keys in configure_weaviate.go#setupMiddlewares to combine both keys in 1 struct. In the authentication functions the keys will be validated using that object.
See issue https://github.com/go-swagger/go-swagger/issues/1089.

Made workaround for now, when bug is fixed in Go Swagger, we should remove this workaround.
Workaround can be found in configure_weaviate.go#setupMiddlewares


Webpack

What's the current status of the webpack issue?
I installed rx trough npm and added the following code to my webpack config
alias: {
      // Workaround https://github.com/Reactive-Extensions/RxJS/issues/832, until it's fixed
      'rx$': require.resolve('rx/dist/rx')
    }

I get a:
ERROR in ./~/falcor/~/rx/dist/rx.aggregates.js
Module not found: Error: Cannot resolve module '12' in /pathtoproject/node_modules/falcor/node_modules/rx/dist
 @ ./~/falcor/~/rx/dist/rx.aggregates.js

Pointing the rx$ alias to 'falcor/node_modules/rx/dist/rx' doesn't solve the problem either:
=> webpack builds, but I get:
TypeError: this is undefined //firefox-console.

Is this an issue with Falcor, or did I mess something up?

Update:
Tried the https://github.com/Netflix/falcor/issues/428 approach, didn't work with latest version of Rx
=> Clone Falcor
webpack --output-library falcor browser.js falcor.webpack.js

//use falcor.webpack.js in my app gives me
TypeError: "name" is read-only //firefox-console

In source this refers to:
	InvalidSourceError.prototype = new Error();InvalidSourceError.prototype.name = NAME;InvalidSourceError.name = NAME;InvalidSourceError.is = function(e){return e && e.name === NAME;};module.exports = InvalidSourceError; /***/}, /* 26 */function(module,exports,__webpack_require__){module.exports = {iterateKeySet:__webpack_require__(27),toTree:__webpack_require__(28),toTreeWithUnion:__webpack_require__(29),pathsComplementFromTree:__webpack_require__(30),pathsComplementFromLengthTree:__webpack_require__(32),hasIntersection:__webpack_require__(31),toPaths:__webpack_require__(33),collapse:__webpack_require__(34)}; /***/}, /* 27 */function(module,exports){var isArray=Array.isArray; /**

Hey @IwanKaramazow
We're in the process of removing the internal falcor dependency on Rx so there isn't really any value in upgrading to the latest version of Rx, which has the fix for this webpack issue (there's a migration cost, since it's a major bump in the rx version and signature changes), so you'd need to stick with the workaround for Rx.

Are you just building falcor with webpack? It already has a webpack.config
Or are you trying to build another project which has falcor as a dependency?

If it's the later, you'll need to point to the explicit path to rx.js from your webpack config, since falcor will be in your ./node_modules. See the 'Workaround Notes' here. You can try literally hardcoding the path to rx.js (instead of using require.resolve) to see if that's actually the issue.
Alternatively if you don't use AMD for your modules, you could try disabling webpack's AMD parsing:
See: https://github.com/webpack/imports-loader
a. npm i imports-loader
b. Add the following to your webpack.config in the module.loaders section:
 {
   // configure the loader for all js files (you can configure this differently if required
   test: /\.js$/,
   // disable webpack's AMD parsing.
   loader: "imports?define=>false"
}

Thanks for the response!
I'm trying to build with Falcor as a dependency.
Seems this fixes the original issue:
//Changing the AMD line in rx.aggregate's header to:
define(['./rx'], function (Rx, exports) {

but...
the following code breaks in rx.js:
var inherits      //= this.inherits   (I have to comment the this.inherits out to make it work, this is undefined)
  = Rx.internals.inherits = function (child, parent) {
    function __() { this.constructor = child; }
    __.prototype = parent.prototype;
    child.prototype = new __();
  };

Next file that breaks: falcor/lib/errors/InvalidSourceError.js
InvalidSourceError.name = NAME; //TypeError: "name" is read-only

Same thing happens with InvalidModelError.js, MaxRetryExceededError.js
Known issue?
I think for now I'll use
Seems this does the job just fine, only problem is my app has to be production ready in eight weeks. ;-)

I'd be worried about commenting out the this.inherits line.
If your project is available on github, I can try and help you configure it using one of the methods I mention above. It should be pretty straight forward.
The InvalidSourceError is not a known issue, but if you can file it, we can take a look at it.
Which version of Firefox is this, and is it the only browser you're seeing it on?
In theory (as per ES6 spec) I believe function.name is read-only, but I don't see that being enforced in Chrome (46.x) or FF (40.0.2)

I'm using firefox 41.0.2, I suspect it has something to do with commenting out too much code.
Probably isn't worth filing an issue.
If you could spare some time, it would be really nice if you could take a look at my project.
It's a private one: I added your username.
https://github.com/IwanKaramazow/VeggieApp/tree/webapp/feature/refactor-quiz/Webapp
(currently all code lives in webapp/feature/refactor-quiz branch)
The webpack config is located in the /config folder

Looked at your repo. Unfortunately all of these hacks are required.
a. The function.name issue is real.
If you file it we can take care of it. If you need to work around it locally for now, you can uncomment the lines which set .name on the constructor function for everything in falcor/lib/errors. The browsers enforce .name being read-only when using "use strict".
We should be able to fix this. I'm not sure the .name is actually required (depending on our browser support matrix).
b. The this.inherits fix is also required unfortunately.  It is safe. It's actually the fix which went into Rx 3.x.
The root issue here is really a Babel + RxJS issue.
It looks like Babel runs with an undefined "this" as the top level context.
The only way we'd be able to address this in Falcor is once Rx 2 is removed (or upgraded to an another version of Rx).
I'm not sure if there's a Babel configuration you could use to control this (to have Babel allow you to configure the top level context, but that may let you work around it).
See: https://github.com/Reactive-Extensions/RxJS/issues/850
See: https://github.com/Reactive-Extensions/RxJS/commit/7f118a46d73ee122bbb3335dfccf746af9fbd75b#diff-b9a1e3a1f7a1cabdc218ed6d13633a67L539
c. For the "webpack" issue where you started, the imports-loader would be the best way to handle this. I tried this out, and it does run fine, but I'd need to spend some time to figure out how to get it to work in WebPack with your other loaders (Babel etc).
If I take care of these issue your app builds/works fine with the local falcor. I'll let you know if I can figure out how to get c working.

For c) above, this fixes it also, in your build env...
resolve: {
// you can now require('file') instead of require('file.js')
extensions: ['', '.js','.json'],
alias: {
// Workaround https://github.com/Reactive-Extensions/RxJS/issues/832, until it's fixed
'rx$': path.join(__dirname, '../node_modules/falcor/node_modules/rx/dist/rx.js')
}
},

Thanks for the input, really appreciate it!
I somehow got it the RX dependency working, but... 😁
/falcor/node_modules/falcor-path-syntax/src/tokenizer/index.js line 73.
        done = idx + 1 >= string.length; //ReferenceError: assignment to undeclared variable done

Should probably be var done = idx+1 >=string.length;, can't find the declaration of done...
I'll go with a <script src="https://netflix.github.io/falcor/build/falcor.browser.js"></script> in my index.html for now. After fixing the undeclared variable, another error rises.. I don't want to go too far down this rabbit hole. Gotta love the fragile javascript/webpack/babel ecosystem 😅
Thanks anyway for the help! 👌

The latest falcor (0.1.14) and falcor-router should have all these fixes [ function.name, global leaked done and i ]. I tried it out locally, with a 'use strict' and the falcor-express-demo seems fine.


Create a JavaScript File

Create script.js file and save it into the assets folder.

script.js file created and completed.


Fixes #272. Use IOR() for netcdf modes

As the subject says, this PR uses IOR() to "combine" netCDF modes.

Description

Changes us from adding NF90 constants to using IOR().
Related Issue

#272
Motivation and Context

Per netcdf-fortran advice, there could be issues with adding NF90 mode flags.
How Has This Been Tested?

Types of changes

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Trivial change (affects only documentation or cleanup)

Checklist:

[X] I have tested this change with a run of GEOSgcm (if non-trivial)
[X] I have added one of the required labels (0 diff, 0 diff trivial, 0 diff structural, non 0-diff)
[ ] I have updated the CHANGELOG.md accordingly following the style of Keep a Changelog

I'm blocking this for now until I can build and test GEOS with the fix.

Unblocking. Seems zero-diff in my testing. I'd like @weiyuan-jiang to take a look to make sure it looks I did the IOR()'ing right.


Add configurations for M5Stack CoreS3

This draft pull request depends on my Moddable branchhttps://github.com/meganetaaan/moddable/tree/feature/m5stack_cores3 that hasn't been merged yet. You can check out our branch and see how it works. When Moddable's all set, we're planning to take the draft tag off.

The latest release of Moddable SDK supports M5Stack CoreS3 https://github.com/Moddable-OpenSource/moddable/releases/tag/3.9.7 . The available feature is limited but enough for Stack-chan to run basic behavior.


jupyterhub-singleuser used in mediator not configurable

In
https://github.com/jupyter/sudospawner/blob/b66b7625d66a0fcd2d92f6b45bcb6f2cb29847df/sudospawner/mediator.py#L60
The jupyterhub-singleuser command is explicity used there.  Is there a way to configure it so that an absolute path to this can be provided.
I don't see an obvious place to change in order to make this configurable

It shouldn't be configurable. Actually, it shouldn't even be sensitive to PATH (this is a recently introduced bug, from when python -m jupyterhub.singleuser was removed).
#16 requires jupyterhub-singleuser to be the executable in the same directory as sudospawner.

@minrk In the case where I want to keep my notebook server environment separate from my jupyterhub environment, it would be helpful to point to a script that activates the desired environment and then delegates the command line params to jupyterhub-singleuser. As it stands, I have to generate a script with that name, rename the actual juputerhub-singleuser script to something else, and then delegate to it.
Is there another way to accomplish conda / virtualenv activation before running jupyterhub-singleuser?


Add SUSE staging GPG key to containerized server

What does this PR change?
This adds the SUSE staging GPG key to the containerized server for SUMA.
$ cat SUSE_ALP_Source_Standard_1.0_Staging_Z_key.gpg
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.15 (GNU/Linux)

mQENBFErWUoBCADTYW0S3mAHLCLLFuaRWxsK6NwGDmW6vSSkRt8OTXSAJyz2yFUS
oQ7dmw5ce6uyChoMBap0+2xiGyBzMZ4nP3ADD6voG5FXxg6QTfsDyz/sg5BRbS2W
q2e3XU4qEiJn357mXd53YfXKYpA7d2Ct5LKtKGph0DeGsi2zDKnjUCkXrOGNI+VH
qUCardfjAxgsA+m2bN/GKBOdHiHEHlQ0+GyLaoDi8utQz+L42iEQK4uvUQDKa+6k
fbocsR0z55meVCf5ZuEg/katzhtrtesG/sqTLCBMLsLGSIllHSZRxQPbBNf8l7wT
CPqg9JqXHT17aO3O+ZTkqv1dTIwXtmyPkIAjABEBAAG0JVVuc3VwcG9ydGVkIDx1
bnN1cHBvcnRlZC1yc2FAc3VzZS5kZT6JATwEEwECACYCGwMGCwkIBwMCBBUCCAME
FgIDAQIeAQIXgAUCY+utDQUJGkUhwwAKCRCcdTFJzjtnLkZzCACJV8KKLtRtlw5a
MZJdFz1TKFzpAYd2Wcdtl7R/gYa+z4A91UbqtFHdK91EKXAvEkf4f88wj2Dvqj/1
omBhO8si+p3Hxm1UVD91nTBNVWyjn33uai5YP2VEKQOzgBV2swVWuzSsJq0Kc1Yk
zKCPdtFpENdHfRKIXVgaDmUy0EAQJhBLx4SGD9l3DnG5Lt4d+jXe49BgCaGn+5eB
zl23nwL02wSD6uTShsqtdGQCaZtl2WjIb81H6rTRLcSPhyClpy/s3GV9wFri0zLL
Q6eiIbNj8uAvCDdGACEpmXic0lgIQdKsnJLelqJtwCpAmi3ma4cV1kCLD9z2Qtxl
ePb5BMBz
=xYx6
-----END PGP PUBLIC KEY BLOCK-----

$ file SUSE_ALP_Source_Standard_1.0_Staging_Z_key.gpg
SUSE_ALP_Source_Standard_1.0_Staging_Z_key.gpg: PGP public key block Public-Key (old)

Fixes
2024/08/28 10:55:52 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'custom_channel_slmicro60_minion', '--type', 'yum', '--non-interactive']
2024/08/28 10:55:52 +02:00 Sync of channel started.
2024/08/28 10:55:52 +02:00 RepoMDError: Cannot access repository.
Repository 'custom_channel_slmicro60_minion' is invalid.
[custom_channel_slmicro60_minion|http://download.suse.de/ibs/SUSE:/ALP:/Source:/Standard:/1.0:/Staging:/Z/standard/] Valid metadata not found at specified URL
History:
 - Signature verification failed for repomd.xml

Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'custom_channel_slmicro60_minion' because of the above error.
Could not refresh the repositories because of errors.

Slack discussion: https://suse.slack.com/archives/C02CLBJ5RGF/p1724853951719289

Hm... I manually added the key and imported it with rpm (basically what the Salt steps in the PR do)
suma-bv-50-srv:/tmp # mgrctl exec 'rpm --import /tmp/^Cse_staging.key'

suma-bv-50-srv:/tmp # mgrctl cp /tmp/suse_staging.key server:/tmp/suse_staging.key
4:52PM INF Welcome to mgrctl
4:52PM INF Executing command: cp

suma-bv-50-srv:/tmp # mgrctl exec 'rpm --import /tmp/suse_staging.key'
warning: Rebuilding outdated index databases
warning: Generating 18 missing index(es), please wait...
suma-bv-50-srv:/tmp #

I then checked the checkbox again, but I still get the same error.

@nodeg please use the special mgradm command for custome gpg keys

Is there any risk to expose this key to public repository ? Should it be a Jenkins secret ?

@nodeg please use the special mgradm command for custome gpg keys

Thank you, mc. This did the trick:
suma-bv-50-srv:~ # mgradm gpg add /tmp/suse_staging.key
8:12AM INF Welcome to mgradm
8:12AM INF Executing command: add
8:12AM ??? gpg: keybox '/var/spacewalk/gpg/customer-build-keys.gpg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
pub   rsa2048 2013-02-25 [SC] [expires: 2027-02-13]
      F5FE65C3163CD347266C583D9C753149CE3B672E
uid                      Unsupported<EMAIL_ADDRESS>
Do you really want to trust this key [y/N]?y
8:12AM INF Running gpg --no-default-keyring --import --import-options import-minimal --keyring /var/spacewalk/gpg/customer-build-keys.gpg /var/spacewalk/gpg/suse_staging.key
8:12AM ??? gpg: key 9C753149CE3B672E: public key "Unsupported<EMAIL_ADDRESS>imported
8:12AM ??? gpg: Total number processed: 1
gpg:               imported: 1
8:12AM INF Running systemctl restart uyuni-update-config

2024/08/29 08:13:05 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'custom_channel_slmicro60_minion', '--type', 'yum', '--non-interactive']
2024/08/29 08:13:05 +02:00 Sync of channel started.
2024/08/29 08:13:06 +02:00 Repo URL: http://download.suse.de/ibs/SUSE:/ALP:/Source:/Standard:/1.0:/Staging:/Z/images/repo/SUSE-Manager-Tools-For-SL-Micro-6-x86_64/
2024/08/29 08:13:06 +02:00     Packages in repo:                 9
2024/08/29 08:13:06 +02:00     No new packages to sync.
2024/08/29 08:13:06 +02:00 Filtering packages that failed to download
2024/08/29 08:13:06 +02:00 Importing packages started.
2024/08/29 08:13:06 +02:00
2024/08/29 08:13:06 +02:00   Importing packages to DB:
2024/08/29 08:13:06 +02:00 Importing packages finished.
2024/08/29 08:13:06 +02:00
2024/08/29 08:13:06 +02:00   Patches in repo: 1.
2024/08/29 08:13:06 +02:00     No new patch to sync.
2024/08/29 08:13:06 +02:00
2024/08/29 08:13:06 +02:00   Importing mediaproducts file products.
2024/08/29 08:13:06 +02:00 *** NOTE: Importing mediaproducts file for the channel 'custom_channel_slmicro60_minion'. Previous mediaproducts will be discarded.
2024/08/29 08:13:06 +02:00   Updating overview of 1 systems
2024/08/29 08:13:06 +02:00 Sync completed.

I am not sure, why we use the command above for the other keys, we import, e.g.
https://github.com/uyuni-project/sumaform/blob/22f1f1d8e435d339727693416a1c56a1a2aa2325/salt/server_containerized/testsuite.sls#L76-L111

I am not sure, why we use the command above for the other keys, we import, e.g.

I think this was added before this command exists?

That makes sense. Then I will adjust the other comands, too.

Is there any risk to expose this key to public repository ? Should it be a Jenkins secret ?

I do not know. However, what I added above is what we have been doing before. Since this could also be interesting for non Jenkins deployments e.g. on test servers, personal environments, I would not add it as a Jenkins secret.

Is there any risk to expose this key to public repository ? Should it be a Jenkins secret ?

It is a "public key". So I think it is not a problem as the private part is only internal.
And if you require it for testing, we need to have it


JCL-297: Add explicit version for spring boot plugin

This ensures that we manage the version of the springboot plug-in. (otherwise, maven just uses the latest version)

good point & catch


Possible perf issues with useField helpers

🚀 Feature request
Since v2.1.0 we can do this:
const MyInput = (props) => {
 const [field, meta, helpers] = useField(props)
 const handleThing = () => {
    helpers.setValue('boop')
 }
 // ...
}

Unfortunately, the helpers object (and the helpers.setValue) gets a different reference on every form update, regardless of whether the field has been updated or not. This means that if a single field got updated, then every other field that utilizes helpers.setValue as a prop value will have to re-render as well, regardless of whether it implements React.memo or not. For example the following component will always re-render on every form update:
const ComboboxMemo = React.memo(Combobox);

const MyCombobox = (props) => {
 const [field, meta, { setValue }]= useField(props.name);
 return <ComboboxMemo onChange={setValue} />
}

This issue is similar to 1804
Current Behavior
The helpers object and specifically the helpers.setValue  gets a different reference on every form update
Desired Behavior
The helpers.setValue should only update when the value of the related form field got updated
Suggested Solution
There needs to be some sort of memoization based on the field's value, unrelated to the rest of the form. I haven't gotten into the v2 release, so I can't suggest something.
Who does this impact? Who is this for?
People that utilize setValue in component props and people that use heavy/big forms with multiple fields

I noticed this too. Not great.

Came here with this exact issue - the helper functions change on every render so my otherwise memoised component rerenders because the helper functions are different. Haven't hacked around to check yet, but could the helper functions be memoised in useField?
return [
getFieldProps(props),
getFieldMeta(fieldName),
useMemo(() => getFieldHelpers(fieldName), [getFieldHelpers, fieldName]) ,
];

If we change this, users may have depended on the helpers changing instead of depending on values changing. Fixing this would be a breaking change. We should note it somewhere.
const formik = useFormikContext();
const [field, meta, { setValue }] = useField('secondaryField');
React.useEffect(() => {
    helpers.setValue(formik.values.firstField + 1);
}, [setValue]); // whoops, no formik.values

It should be an eventCallback though.

users may have depended on the helpers

I understand and agree. It would be rare though, since the setValue changes whenever the value changes. So I wouldn't expect to see users doing this:
React.useEffect(() => {
    setValue(formik.values.firstField + 1);
}, [setValue]); // whoops, no formik.values

instead of this
React.useEffect(() => {
    setValue(formik.values.firstField + 1);
}, [formik.values.firstField]);

since they would be capitalizing on an undocumented side-effect of the way setValue was declared.

Definitely not expected. Just want to make sure it's noted in the release notes on the off-chance someone gets hit by it. There are some moments where I've sadly had to disable exhaustive-deps :(

I just noticed this issue. It's weird because the methods between meta and field are inverted. I can use setValue from meta, like: meta.setValue.
Hope it helps whoever's in a hurry and lets stay tuned into future  updates

@rafaelcavalcante , useField returns a tuple, which means the values are in the same order no matter what you name them. I think you must have done something like const [field, helpers, meta] = useField(name);, but it must be in the order [field, meta, helpers].

Is there a resolution in works for this or we just have to turn off exhaustive-deps and not put helpers in the dependency array?

@anant-singh I don't think anyone's actively working on this if you'd like to open a PR.

The same problem with getFieldProps and setFieldValue when loaded from context:
const { getFieldProps, setFieldValue } = useFormikContext();

Noticing this issue as well, and it's causing several re-renders. Is there an accepted workaround at this point if using useField? Will certainly watch this one...

Stumbled upon this issue and wrote myself a little helper hook to improve performance. Maybe it will help someone:
function useFieldFast(props) {
  const [field, meta, helpers] = useField(props);

  const latestRef = useRef({});

  // On every render save newest helpers to latestRef
  latestRef.current.setValue = helpers.setValue;
  latestRef.current.setTouched = helpers.setTouched;
  latestRef.current.setError = helpers.setError;

  // On the first render create new function which will never change
  // but call newest helper function
  if (!latestRef.current.helpers) {
    latestRef.current.helpers = {
      setValue: (...args) => latestRef.current.setValue(...args),
      setTouched: (...args) => latestRef.current.setTouched(...args),
      setError: (...args) => latestRef.current.setError(...args)
    };
  }

  return [field, meta, latestRef.current.helpers];
}

Still I think it would be beneficial if that was handled by the library. Like when you use useState, setState never changes.

@mayorandrew do you have a codesanbox or some perf showing your finds?

@sibelius I do not have a codesandbox with an example. You can just plug my hook and use that in place of useField.
I used that in my project (not public) and amount of rerenders declined dramatically. I.e. previously I would have every field re-render on every other field change which cause cascade of expensive input component re-renders like react-select. By making helper callbacks constant, I am allowing React.memo to cut off expensive subtrees.

so you use your own hook and also React.memo?

Yes. According to my source code and issue digging, in current formik architecture it is nearly impossible to make useField re-render that component only when the field actualy needs it (e.g. when value or something else related changes). So I am making wrappers for all my fields and rely on React.memo to prevent deeper rerenders, like so:
const MySelect = React.memo((props) => ... )

function FormikSelect(props) {
  const [field, meta, helpers] = useFieldFast(props);
  return <MySelect value={field.value} onChange={meta.setValue} />;
}

In terms of userland solutions, the above looks good!
In terms of solving this in Formik, we'd need to switch to useEventCallbacks for these helpers and if they access the underlying values (formik.values, formik.touched, etc), need to use refs of those values instead of depending on state, or use the formik reducer to mitigate race conditions.

can't we use something similar to redux behavior? subscription based approach?

i try to reperoduce @mayorandrew approach and in the code:

const MySelect = React.memo((props) => ... )

function FormikSelect(props) {
  const [field, meta, helpers] = useFieldFast(props);
  return <MySelect value={field.value} onChange={meta.setValue} />;
}

Shouldn't it be helpers.setValuein the onChange prop?
And as i couldn't get it working somebody has a small working example of that stuff...?

@WegDamit you are right, my typo. It should be helpers.setValue. I will fix it now.
I have created a demo sandbox here:
https://codesandbox.io/s/formik-fast-field-p7szk?file=/src/App.js

@mayorandrew Your hook was very helpful, thank you! You seriously saved my butt, helping me understand the problem and realize what's possible.
In the project I'm on atm I noticed that OnBlur or OnChange in field was also changing every time any value was updated (I should probably figure out why). I updated your hook to also make static shims for OnBlur and OnChange, but still update when value or name change. Here are my updates in case they help anyone:
import { useRef } from 'react'
import { useField } from 'formik'

export default (props) => {
	const [field, meta, helpers] = useField(props)

	const helperRef = useRef()
	helperRef.current = helpers

	const helperShim = useRef({
		setValue: (args) => helperRef.current.setValue(args),
		setTouched: (args) => helperRef.current.setTouched(args),
		setError: (args) => helperRef.current.setError(args),
	})

	const fieldRef = useRef()
	fieldRef.current = field

	const makeFieldShim = ({ name, value }) => ({
		name,
		value,
		onBlur: (args) => fieldRef.current.onBlur(args),
		onChange: (args) => fieldRef.current.onChange(args),
	})

	const fieldShim = useRef(makeFieldShim(field))

	if (
		fieldShim.current.value !== field.value ||
		fieldShim.current.name !== field.name
	) {
		fieldShim.current = makeFieldShim(field)
	}

	return [fieldShim.current, meta, helperShim.current]
}

I use this hook in a HOC that mimics Formik's <Field />: the component passed to the as prop is handed all the Formik goodies as props, but is also automatically wrapped with React.memo().
import React, { useRef } from 'react'
import useSmartField from 'form/smart-field-hook'

export default (props) => {
	const { name, as, children, ...elementProps } = props
	const [field, meta, helpers] = useSmartField(name)

	const element = useRef({ cached: as, memoized: React.memo(as) })

	return React.createElement(
		element.current.memoized,
		{ ...elementProps, field, ...meta, ...helpers },
		children
	)
}

So if I have a <TextField /> like:
import React from 'react'
import TextField from '@material-ui/core/TextField'

export default (props) => {
	const { label, error, touched, field } = props

	return (
		<TextField
			label={label}
			error={touched && error != null}
			{...field}
		/>
	)
}

Then I can memoize it and hook it into Formik like:
<SmartField as={MyTextField} name="myField" label="My Field" />

I'm currently using this for all my components and it seems to work well, though I'm no React/Formik guru to know it's not falling into some nasty pitfall. Time will tell. I do like that I can use this to wrap all my input components, including more complex ones that I needed the useField hook for in the past, which makes it really straightforward to change stuff in my form.
Here's a demo sandbox I forked from @mayorandrew's.

This issue is much more then just unwanted renders.
A bigger problem is when you use helpers in useEffect dependencies. If you do so, you'll get to an infinite loop of renders, as helpers reference changes on every render...

I created a Typescript version useFastField mentioned above. Might be helpful for you:
export function useFieldFast<Val>(
  propsOrFieldName: string | FieldHookConfig<Val>,
) {
  const [field, meta, helpers] = useField(propsOrFieldName);

  const actualHelpersRef = useRef<FieldHelperProps<Val>>(helpers);

  // On every render save newest helpers to actualHelpersRef
  actualHelpersRef.current.setValue = helpers.setValue;
  actualHelpersRef.current.setTouched = helpers.setTouched;
  actualHelpersRef.current.setError = helpers.setError;

  const consistentHelpersRef = useRef<FieldHelperProps<Val>>({
    setValue: (...args) => actualHelpersRef.current.setValue(...args),
    setTouched: (value: boolean, shouldValidate?: boolean) =>
      actualHelpersRef.current.setTouched(value, shouldValidate),
    setError: (...args) => actualHelpersRef.current.setError(...args),
  });

  return [field, meta, consistentHelpersRef.current] as const;
}

@0xR You have a small typescript issue there with the generics, here's a fix:
export function useFieldFast<Val = any>(
  propsOrFieldName: string | FieldHookConfig<Val>,
) {
  const [field, meta, helpers] = useField<Val>(propsOrFieldName);

  const actualHelpersRef = useRef<FieldHelperProps<Val>>(helpers);

  // On every render save newest helpers to actualHelpersRef
  actualHelpersRef.current.setValue = helpers.setValue;
  actualHelpersRef.current.setTouched = helpers.setTouched;
  actualHelpersRef.current.setError = helpers.setError;

  const consistentHelpersRef = useRef<FieldHelperProps<Val>>({
    setValue: (...args) => actualHelpersRef.current.setValue(...args),
    setTouched: (value: boolean, shouldValidate?: boolean) =>
      actualHelpersRef.current.setTouched(value, shouldValidate),
    setError: (...args) => actualHelpersRef.current.setError(...args),
  });

  return [field, meta, consistentHelpersRef.current] as const;
}

Coming these implementations above in Typescript could also look like this:
/* eslint-disable @typescript-eslint/no-explicit-any */
import { FieldHelperProps, FieldHookConfig, FieldInputProps, useField } from 'formik';
import { useRef } from 'react';

export function useFieldFast<Val = any>(propsOrFieldName: string | FieldHookConfig<Val>) {
  const [field, meta, helpers] = useField<Val>(propsOrFieldName);

  const fieldRef = useRef<FieldInputProps<Val>>();
  fieldRef.current = field;

  const makeFieldShim = (field: FieldInputProps<Val>) => ({
    ...field,
    onBlur: (args: any) => fieldRef.current?.onBlur(args),
    onChange: (args: any) => fieldRef.current?.onChange(args),
  });

  const fieldShim = useRef(makeFieldShim(field));

  if (fieldShim.current.value !== field.value || fieldShim.current.name !== field.name) {
    fieldShim.current = makeFieldShim(field);
  }

  // On every render save newest helpers to actualHelpersRef
  const actualHelpersRef = useRef<FieldHelperProps<Val>>(helpers);
  actualHelpersRef.current.setValue = helpers.setValue;
  actualHelpersRef.current.setTouched = helpers.setTouched;
  actualHelpersRef.current.setError = helpers.setError;

  const consistentHelpersRef = useRef<FieldHelperProps<Val>>({
    setValue: (value: Val, shouldValidate?: boolean | undefined) =>
      actualHelpersRef.current.setValue(value, shouldValidate),
    setTouched: (value: boolean, shouldValidate?: boolean) =>
      actualHelpersRef.current.setTouched(value, shouldValidate),
    setError: (value: Val) => actualHelpersRef.current.setError(value),
  });

  return [fieldShim.current, meta, consistentHelpersRef.current] as const;
}

I am having some luck with this and wrapping the outer components w/ React.memo here. Once this issue is resolved, you simply replace useFieldFast references w/ useField I suppose. The React.memo optimizations can't hurt you.

I ran into this today, and realized that the functions from useFormikContext do not suffer from this.
So, while this causes re-renders and other issues:
const [field, meta, { setValue, setTouched, setError }] = useField(name);

// callback is re-created every time any value changes in the form
const callback = useCallback(() => {
  setValue('x')
  setTouched(true)
  setError('y')
}, [setValue, setTouched, setError])

This causes no unexpected renders and still works as expected:
const [field, meta] = useField(name);
const { setFieldValue, setFieldTouched, setFieldError } = useFormikContext()

// callback is created only once and never re-creates
const callback = useCallback(() => {
  setFieldValue(name, 'x')
  setFieldTouched(name, true)
  setFieldError(name, 'y')
}, [setFieldValue, setFieldTouched, setFieldError])

You can even wrap that up into a new hook and use as a drop-in replacement:
const useFieldNew = (config) => {
  const [field, meta] = useField(config);
  const { setFieldTouched, setFieldValue, setFieldError } = useFormikContext();
  const helpers = useMemo(
    () => ({
      setValue: (...args) => setFieldValue(field.name, ...args),
      setTouched: (...args) => setFieldTouched(field.name, ...args),
      setError: (...args) => setFieldError(field.name, ...args)
    }),
    [setFieldTouched, setFieldValue, setFieldError, field.name]
  );

  return [field, meta, helpers];
};

Here's a sandbox illustrating: https://codesandbox.io/s/formik-use-global-helpers-hooks-example-2m9cy?file=/src/App.js
This may be a way forward for fixing up the original helpers in Formik - I haven't gotten that far yet.

@danieltott, even so the component continues to render even if it is not changed

@secodigo True, thank you. Edited my original comment to clarify the language.

Desired Behavior
The helpers.setValue should only update when the value of the related form field got updated

Is that really the desired behavior? Shouldn't the setter function remain unchanged even when the value is set? Any useEffects or useCallbacks that reference the function in their dependency array will re-fire when there really isn't a reason to


Telemetry Video

Hello, is there a way to use MoviePY library to generate a video of telemetry?

@marinik98 Ok, will try. I no nothing about matplotlib, animation etc.

Even this documentation can be useful in your case, never tried to implement any animation with the telemetries but can't be that obnoxious: https://plotly.com/python/animations/

@marinik98 Sorry, I tried but I cannot. Can you mind checking what is the problem.
"""
Matplotlib Animation Example

author: Jake Vanderplas
email<EMAIL_ADDRESS>website: http://jakevdp.github.com
license: BSD
Please feel free to use and modify this, but keep the above information. Thanks!
"""

import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
import fastf1 as ff1
from fastf1 import plotting

# First set up the figure, the axis, and the plot element we want to animate

plotting.setup_mpl()
graph1 = plt.figure()

ff1.Cache.enable_cache('cache')  # optional but recommended

year = 2021
wknd = 22
ses = 'R'
drv1 = 'VER'
drv2 = 'VER'

weekend = ff1.get_session(year, wknd)
session = ff1.get_session(year, wknd, ses)
laps = session.load_laps(with_telemetry=True)

first_driver = laps.pick_driver(drv1)
first_driver_info = session.get_driver(drv1)
first_color = plotting.team_color(first_driver_info.team)
second_driver = laps.pick_driver(drv2)
second_driver_info = session.get_driver(drv2)
second_color = plotting.team_color(second_driver_info.team)

first_driver = laps.pick_driver(drv1).pick_fastest()
first_car = first_driver.get_car_data()
second_driver = laps.pick_driver(drv2).pick_fastest()
second_car = second_driver.get_car_data()

fig, ax = plt.subplots(6)

fig.suptitle(f'{first_driver_info.familyname} vs {second_driver_info.familyname} - Fastest lap - {weekend.name} {year} {ses}ualifying', size=18)

l2, = ax[0].plot(second_car['Time'], second_car['Speed'], color=second_color)
l1, = ax[0].plot(first_car['Time'], first_car['Speed'], color=first_color)
ax[1].plot(second_car['Time'], second_car['RPM'], color=second_color)
ax[1].plot(first_car['Time'], first_car['RPM'], color=first_color)
ax[2].plot(second_car['Time'], second_car['nGear'], color=second_color)
ax[2].plot(first_car['Time'], first_car['nGear'], color=first_color)
ax[3].plot(second_car['Time'], second_car['Throttle'], color=second_color)
ax[3].plot(first_car['Time'], first_car['Throttle'], color=first_color)
ax[4].plot(second_car['Time'], second_car['Brake'], color=second_color)
ax[4].plot(first_car['Time'], first_car['Brake'], color=first_color)
ax[5].plot(second_car['Time'], second_car['DRS'], color=second_color)
ax[5].plot(first_car['Time'], first_car['DRS'], color=first_color)

ax[0].set_ylabel("Speed [km/h]")
ax[1].set_ylabel("RPM [#]")
ax[2].set_ylabel("Gear [#]")
ax[3].set_ylabel("Throttle [%]")
ax[4].set_ylabel("Brake [%]")
ax[5].set_ylabel("DRS")

ax[0].get_xaxis().set_ticklabels([])
ax[1].get_xaxis().set_ticklabels([])
ax[2].get_xaxis().set_ticklabels([])
ax[3].get_xaxis().set_ticklabels([])
ax[4].get_xaxis().set_ticklabels([])

fig.align_ylabels()
fig.legend((l1, l2), (f'{first_driver_info.familyname}', f'{second_driver_info.familyname}'), 'upper right')

plt.subplots_adjust(left=0.06 ,right=0.99, top=0.9, bottom=0.05)

# initialization function: plot the background of each frame
def init():
    fig.set_data([], [], [], [], [], [], [])
    return fig,

# animation function.  This is called sequentially
def animate(i):
    x = np.linspace(0, 2, 1000)
    y = np.sin(2 * np.pi * (x - 0.01 * i))
    fig.set_data(x, y)
    return fig,

# call the animator.  blit=True means only re-draw the parts that have changed.
anim = animation.FuncAnimation(graph1, animate, init_func=init,
                               frames=200, interval=20, blit=True)

# save the animation as an mp4.  This requires ffmpeg or mencoder to be
# installed.  The extra_args ensure that the x264 codec is used, so that
# the video can be embedded in html5.  You may need to adjust this for
# your system: for more information, see
# http://matplotlib.sourceforge.net/api/animation_api.html
anim.save('basic_animation.mp4', fps=30, extra_args=['-vcodec', 'libx264'])

plt.show()

That too I what like a Bar Chart moving back-and-forth and all in a line one below other.

I've had a quick look at your code, haven't tried ever myself doing animations, but I really think that you can use an example the plotting of an histogram, with the caviats that it is 1 dimensional, don't know if it makes sense.

@marinik98 Let me wait for someone who knows to comment then.

@theOehrly Any way how to animate these telemetry graphs?


Issue when the user change the payment method for an order to Stripe

Sylius: v1.7.3
SyliusPayumStripeCheckoutSessionPlugin: v1.1 (fresh install)

Hello, me again.
There is an issue that makes the Stripe payment fail when the user changes the payment method for an order to Stripe after initially choosing another payment method.
Here is the actual context and steps that made me stumble upon the issue:

On my project I have 2 payment methods, an offline method and Stripe. If the user choose the offline payment method, a record in the sylius_payments table will be created with the following data in the details column:
{
  "paid": false,
  "status": "pending"
}

Based on my observations, Sylius does not seems to create a new payment record in the sylius_payments table when the user change the payment method but instead just update the last payment record if it's still in a new state.

Because of that, if the user changes the payment method to Stripe the details column is not filled with the correct content and will instead keep the content set by the previous payment method + other content added by this method.

Ultimately, the payment flow fails with the following error:

I'm not familiar with everything related to Sylius and Payum, and how everything works is still blurry for me, but I might have found where the issue could come from. I'll try to be as accurate as possible about what I found, I hope it will be clear enough for you to identify the issue.
When the user changes the payment method, at some point during the whole payment flow Sylius calls the Sylius\Bundle\PayumBundle\Action\CapturePaymentAction->execute method. This method will get the current payment status, which, for Stripe payments, is decided using the Prometee\PayumStripe\Action\StatusAction->execute method. If the payment status is 'new', this code will be executed and at some point the Prometee\SyliusPayumStripeCheckoutSessionPlugin\Action\ConvertPaymentAction->execute method will be called to generate the required data.
But, in the situation where the user changes the payment method from an offline method to Stripe, when the Sylius\...\CapturePaymentAction->execute method starts, a payment record already exists in the DB with a details column containing a status field that was set to pending by the previous payment method. The Prometee\...\StatusAction->execute method does not handle this case, and will set the payment status to unknown. This will prevent these lines from being executed, which will in consequence also prevent the Prometee\...\ConvertPaymentAction->execute method from being executed.
I hope the explanation is clear enough, once again I'm sorry that I can't give you a more brief and concise explanation.

Sorry for this late answer @YellowFish085, base on what you are explaining I should be able to test this behaviour. But I think there is something missing in the other payment gateway like something canceling the payment after getting back to the page showing the selection of payment methods. I will investigate on this, thanks for the pointing it and explain it 😉

@YellowFish085 I'm able to reproduce the bug you described and you are right, because the status is set to unknown the payment fail because the Convert is not done. While switching to another gateway the Payment entity is updated and not created with a new one unfortunately. I'm currently investigating how Sylius or Payum is handling this. I'll get back to you soon !

Nice, thank you! (and thank you for the shipping cost issue too :) )

Hi, first i'd like to thank @Prometee for creating this gateway for those like me who are kind of newbies in the world of Sylius, but is there any chances that this issue was solved or nothing yet ? ^^'

@oneshoot41 thanks you 😉
Nothing yet unfortunately. The problem come from the way Sylius is handling the switch between gateways keeping the old payment details value. A way of fixing it is to listen to doctrine event and reset the details data when the payment_gateway_id is changed.

@Prometee Mmh indeed that could be the temporary solution, but i was thinking if i really needed offline payment on a online shop.. I think i'll try to resolve this problem later but for the moment it will be just fine by removing offline gateway, thank you for your fast reply ! Have a nice day !


Game crashes when loading into a song

Describe your problem here.
For some reason, whenever I load into a song, the game will crash. I've done some testing and figured out at least that it only crashes if the stage isn't a specific one.
https://user-images.githubusercontent.com/73810550/145733590-e6106d4c-bb5e-48fb-8e3e-a286f9301e7b.mp4
Here's a vid of me opening a song with that stage, and then me opening a song without that stage. If I go into the chart editor and change the stage to the working one, then it'll play any song just fine.
I've been digging through all my commits trying to figure out when and where I went wrong in my code but I can't find anything, this only started happening, or at least I only noticed it right after I added a new song. I've tried getting rid of all the code for that stage but the game still crashes if it isn't that stage.
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
I added some stages, note types, and songs

Run lime test windows -debug

When I load into a song it gives me a popup saying "Null Object Reference"

What does the terminal say

When I load into a song it gives me a popup saying "Null Object Reference"

Yeah but what does the command prompt/terminal says???

Yeah but what does the command prompt/terminal says???

Nothing

oh shit wait I'm blind
it says this:
Called from hxcpp::__hxcpp_main
Called from ApplicationMain::main ApplicationMain.hx line 25
Called from ApplicationMain::create ApplicationMain.hx line 130
Called from lime.app.Application::exec lime/app/Application.hx line 150
Called from lime._internal.backend.native.NativeApplication::exec lime/_internal/backend/native/NativeApplication.hx line 146
Called from lime._internal.backend.native.NativeApplication::handleRenderEvent lime/_internal/backend/native/NativeApplication.hx line 370
Called from lime.app._Event_lime_graphics_RenderContext_Void::dispatch lime/_internal/macros/EventMacro.hx line 91
Called from openfl.display.Stage::__onLimeRender openfl/display/Stage.hx line 1950
Called from openfl.display.Stage::__broadcastEvent openfl/display/Stage.hx line 1166
Called from openfl.display.DisplayObject::__dispatch openfl/display/DisplayObject.hx line 1399
Called from openfl.events.EventDispatcher::__dispatchEvent openfl/events/EventDispatcher.hx line 402
Called from flixel.FlxGame::onEnterFrame flixel/FlxGame.hx line 551
Called from flixel.FlxGame::step flixel/FlxGame.hx line 677
Called from flixel.FlxGame::update flixel/FlxGame.hx line 745
Called from flixel.util.FlxTimerManager::update flixel/util/FlxTimer.hx line 285
Called from flixel.util.FlxTimer::onLoopFinished flixel/util/FlxTimer.hx line 195
Called from PlayState::startCountdown PlayState.hx line 1980
and then the game crashes

I figured it out

that keeps happening to me on the Dusk Till Dawn mod, but the song itself crashes, idk if its for coding or for the files

help

tell me then

sam, crashing on ALL song in 6.3 but not on 5.2


Fetch imprint from dynamic ACDH-CH service

In GitLab by @KlausIllmayer on Jul 28, 2022, 16:43
This issue was touched in #28 but not further handled.
We have every now and then changes in the signing power section of the imprints at OEAW. Therefore we do have a dynamic imprint service which is located at ACDH-CH and should always deliver the current version of the imprint.
@stefanprobst Do you see a way to integrate this dynamic service into one of the MP pages? I guess that this is not easy done within a page holding different text blocks, like it is now in privacy-police. Maybe we should separate the imprint from this page into a dedicated one (which would also fit better Austrian law), what do you think @laureD19?

please review #164


dynamic fork & branch - basic version #3

So that would be the basic version without prebuilding the docker image with build args.
Are there any benefits of having a prebuilt docker image to reuse? I don't think that github will cache this for a faster workflow, so you can simply use this version instead

Somehow forgot about this and instead patched versions manually 🙄

Went back to using qmk setup instead of git clone to properly run it with firmware23 🤔


[Tracking Issue] Capturing dependent libraries of code-generated TIR

See pre-RFC: https://discuss.tvm.apache.org/t/tvm-capturing-dependent-libraries-of-code-generated-tir-initially-for-use-in-model-library-format/11080
cc @Hzfengsy @junrushao

@areusch is this still planned?

i think this is preempting the RFC that hasn't been landed yet


Issue while Debugging

VSCode Version:1.14.2
OS Version:Windows 10 build 1703

Steps to Reproduce:
1.Into Debug Mode
2.While running python through import command, is will also step info module's function.

Reproduces without extensions: Yes

This issue was moved to DonJayamanne/pythonVSCode#1112

Python debugging is not part of VS Code, it is provided by separate extension.


[ember] create ember entry point to official storybook

What I did

Adds an entry point to the ember example app

It should be a symlink not a text file

My bad, github shows symlink like this, so thought this diff contained a symlink. Should have looked at the details.

@gabrielcsapo Can you make a PR fixing this? Thanks.


Fix a broken link

@xerial, Thank you for your contribution. Good catch! I have modified a little  your changes and use an absolute path in the docs link.


Getting ClientAuthError: endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again.

Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
2.32.1
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
2.1.2
Public or Confidential Client?
Public
Description
We can see the error sometimes for some users.
Signin Failure. Error message: ClientAuthError: endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again. Detail: ClientAuthError: openid_config_error: Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints. Attempted to retrieve endpoints from: https://domain/domain/b2c_1a_signup/v2.0/.well-known/openid-configuration
package.json is looks like this.
{
  "dependencies": {
      "@azure/msal-angular": "2.1.2",
      "@azure/msal-browser": "2.32.1",

  },
  "overrides": {
      "@azure/msal-common": "9.0.1"
    }
}

Error Message
Signin Failure. Error message: ClientAuthError: endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again. Detail: ClientAuthError: openid_config_error: Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints. Attempted to retrieve endpoints from: https://domain/domain/b2c_1a_signup/v2.0/.well-known/openid-configuration
Msal Logs
No response
MSAL Configuration
{
auth: {
        clientId: clientId,
        authority: "B2C_1A_SIGNUP_SIGNIN",
        redirectUri: '/',
        navigateToLoginRequestUrl: false
    },
    cache: {
        cacheLocation: "LocalStoarage",
        storeAuthStateInCookie: false
    }
}

Relevant Code Snippets
this.adService.msalBroadcast$()
        .pipe(
          mergeMap(res => {
              if (res.eventType === EventType.LOGIN_FAILURE) {
              if (res.error) {
                msg += res.error;
              }
              return of(new LogError(msg));
            }
          })
        )

Reproduction Steps

Log into the system

Expected Behavior

should be able to login without an issue

Identity Provider
Azure B2C Custom Policy
Browsers Affected (Select all that apply)
Chrome, Firefox, Edge, Safari, Internet Explorer, None (Server), Other
Regression
No response
Source
External (Customer)

This happens when the openid config endpoint cannot be reached. You'll need to inspect the network traffic when this happens to determine why it failed, often it's a network connectivity issue.
As a side note, why are you overriding msal-common? We don't recommend this, it's very likely to cause unintended behavior.

@tnorling  thanks for the reply, i will check this.
Signin Failure. Error message: ClientAuthError: endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again. Detail: ClientAuthError: openid_config_error: Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints. Attempted to retrieve endpoints from: https://domain/domain/b2c_1a_signup/v2.0/.well-known/openid-configuration

this is the all the information we cloud see on out logs, is there a way to get more information from the handleRedirectObservable() ?
msal-common we applied this as a fix for a issue we had few months ago, we yet to update the package version to the new one.

Are you putting in domain/domain/ as a placeholder when posting here or is that actually in the error message? If it's actually in the error message you should check what you're passing in as the authority value, this is not a valid url.

For more detail you will need to look at your network logs which you can find either in your browser dev tools or by using a tool like Fiddler

No i added domain for  post, error msg is contains correct authority values

Hey @HansakaSS !
Can you confirm that you are passing in known authorities? Docs
Can you please share your network logs from the browser's Dev Tools -> Network tab or you can also reproduce this issue with Fiddler running to capture the network trace and send the trace.

Hey @lalimasharda
here is our configuration
      const msalConfig: Configuration = {
       auth: {
           clientId: environment.activeDirectory.clientId,
           authority: `https://${environment.activeDirectory.loginDomain}/${environment.activeDirectory.domain}/B2C_1A_SIGNUP_SIGNIN`,
           knownAuthorities: [
               environment.activeDirectory.loginDomain,
               environment.activeDirectory.editDomain
           ],
           redirectUri: '/',
           navigateToLoginRequestUrl: false
       },
       cache: {
           cacheLocation: BrowserCacheLocation.LocalStorage,
           storeAuthStateInCookie: isIE
       },
       system: {
           loggerOptions: {
               loggerCallback(logLevel: LogLevel, message: string) { },
               logLevel: LogLevel.Error,
               piiLoggingEnabled: false,
           }
       }
   };
   ```
   We only can see the issue sometimes, i will investigate the network logs or fiddler like suggested.


add version check when enabling scheduled scan

https://github.com/rancher/rancher/issues/26219

Also build is failing.