Adapting VQAScore to a new VLM

Hey there, I am interested in running VQAScore with another VLM, CogVLM (see here). I was looking at the guidelines on how to adapt to another VQA model checking the LLaVA template example. I'm wondering how much work should I expect to put in for this? The code of interest is here. Any tips/advice would be appreciated!

Hey, I am not familiar with CogVLM architecture, but it seems like their implementation is fairly clean.
I would suggest you first check the code for CLIP-FlanT5/LLaVA-1.5 and make sure you understand how we compute the token likelihood (e.g., logits) in the forward() function. Then, it should be fairly simple to adapt CogVLM's forward() function  for computing VQAScore.
Please reach out if you need any help.

Makes sense, thank you! I will likely try to adapt it to VLMs I currently playing with.

Hello again, I am currently trying to add CogVLM in the VQAScore codebase. However, I am unsure how much code I need to change/adapt to make it compatible.

Do I actually need to add the CogVLM src code under its own directory under vqascore_models? I was hoping to make use of the automatic AutoModel classes here without adding any src code.
How much do I actually need to change in the main file (here cogvlm_model.py, which I started from llava_model.py since they are very similar). For instance, updating the model name and tokenizer/model ids:

COGVLM_MODELS = {
    'cogvlm-17b': {
        'tokenizer' : {
            'path': 'lmsys/vicuna-7b-v1.5',
        },
        'model': {
            'path': 'THUDM/cogvlm-chat-hf',
            'conversation': 'chat',
            'image_aspect_ratio': 'pad',
        },
    },
}

Do you have any instructions/tips on what to change in the codebase when adding a new model? E.g. do I need to inherit and reimplement the classes such as ModelArguments (following the example in llava/llava_llama.py here)? Any help is greatly appreciated, thanks!

Hey,
1 - You don't need to add CogVLM src code under its directory and I believe you can simply use AutoModel. The only purpose I did that for LLaVA/InstructBLIP is because I am afraid their src code might change in the future (at least LLaVA-1.6 is different from LLaVA-1.5 already).
2 - You can do anything you want for cogvlm_model.py. There is no need to follow anything as long as you implemented the CogVLM class (a child class of VQAScoreModel).
The only thing you need to change after you complete your model is to update the t2v_metrics/models/vqascore_models/init.py. It should be straightforward to add your models to ALL_VQA_MODELS and get_vqascore_model(). Then you should be good to go!

Hey @linzhiqiu , thanks for the feedback. Sadly I have not much experience with LLMs in practice, but tried to write a skeleton for the CogVLM class, based on your examples for LLaVA and CLIP-T5, keeping in mind that I want to reuse as much as possible from the CogVLM code from HuggingFace.
This is what I have so far (surprisingly runs but there are clearly issues in the way I process the labels/inputs since it gives me a score of 0):
from typing import List
import torch
import copy
from PIL import Image

from .vqa_model import VQAScoreModel
from ...constants import HF_CACHE_DIR
from transformers import AutoModelForCausalLM, LlamaTokenizer

CONTEXT_LEN = 2048
SYSTEM_MSG = ""
IGNORE_INDEX = -100
DEFAULT_IMAGE_TOKEN = "<image>"

default_question_template = 'Does this figure show "{}"? Please answer yes or no.'
default_answer_template = "Yes"

def format_question(question, conversation_style='chat'):
    if conversation_style == 'plain':
        question = DEFAULT_IMAGE_TOKEN + question
    elif conversation_style == 'chat':
        #question = SYSTEM_MSG + " USER: " + DEFAULT_IMAGE_TOKEN + "\n" + question + " ASSISTANT: "
        question = question #not sure about this, from experience CogVLM inference does not require a text template unlike LLaVA
    else:
        raise NotImplementedError()
    return question

def format_answer(answer, conversation_style='chat'):
    if conversation_style == 'plain':
        answer = answer + "\n"
    elif conversation_style == 'chat':
        answer = answer + "</s>"
    else:
        raise NotImplementedError()
    return answer

COGVLM_MODELS = {
    'cogvlm-17b': {
        'tokenizer' : {
            'path': 'lmsys/vicuna-7b-v1.5',
        },
        'model': {
            'path': 'THUDM/cogvlm-chat-hf',
            'conversation': 'chat',
            'image_aspect_ratio': 'pad',
        },
    },
}

class CogVLMModel(VQAScoreModel):
    """A wrapper for the CogVLM model"""
    def __init__(self,
                 model_name='cogvlm-17b',
                 device='cuda',
                 cache_dir=HF_CACHE_DIR):
        assert model_name in COGVLM_MODELS
        super().__init__(model_name=model_name,
                         device=device,
                         cache_dir=cache_dir)

    def load_model(self):
        """Load the model, tokenizer, image transform
        """

        self.conversational_style = COGVLM_MODELS[self.model_name]['model']['conversation']

        self.context_len = CONTEXT_LEN

        self.tokenizer = LlamaTokenizer.from_pretrained('lmsys/vicuna-7b-v1.5', cache_dir=HF_CACHE_DIR)

        self.model = AutoModelForCausalLM.from_pretrained(
            'THUDM/cogvlm-chat-hf',
            torch_dtype=torch.bfloat16,
            low_cpu_mem_usage=True,
            trust_remote_code=True,
            cache_dir=HF_CACHE_DIR,
            ).to('cuda').eval()

    def load_images(self, image_paths: List[str]) -> torch.Tensor:
        images = [Image.open(path).convert("RGB") for path in image_paths]
        return images

    @torch.no_grad()
    @torch.autocast(device_type='cuda', dtype=torch.bfloat16)
    def forward(self,
                images: List[str],
                texts: List[str],
                question_template: str=default_question_template,
                answer_template: str=default_answer_template) -> torch.Tensor:
        """Forward pass of the model to return n scores for n (image, text) pairs (in PyTorch Tensor)
        """
        assert len(images) == len(texts), "Number of images and texts must match"

        questions = [question_template.format(text) for text in texts]
        answers = [answer_template.format(text) for text in texts]

        # Formatting for LLaVA-1.5 desired input including system message and image tokens
        questions = [format_question(question, conversation_style=self.conversational_style) for question in questions]
        answers = [format_answer(answer, conversation_style=self.conversational_style) for answer in answers]

        images = self.load_images(images)

        prompts = [qs + ans for qs, ans in zip(questions, answers)]
        print("prompts: ", prompts[0])

        inputs = self.model.build_conversation_input_ids(self.tokenizer, query=prompts[0], history=[], images=[images[0]])

        inputs = {
            'input_ids': inputs['input_ids'].unsqueeze(0).to('cuda'),
            'token_type_ids': inputs['token_type_ids'].unsqueeze(0).to('cuda'),
            'attention_mask': inputs['attention_mask'].unsqueeze(0).to('cuda'),
            'images': [[inputs['images'][0].to('cuda').to(torch.bfloat16)]],
        }

        input_ids = inputs['input_ids']
        labels = copy.deepcopy(input_ids)

        for label, qs in zip(labels, questions):
            tokenized_len = len(input_ids)
            if qs[-1] == " ":
                tokenized_len -= 1
            label[:tokenized_len] = IGNORE_INDEX

        input_ids = torch.nn.utils.rnn.pad_sequence(
            input_ids,
            batch_first=True,
            padding_value=self.tokenizer.pad_token_id)

        labels = torch.nn.utils.rnn.pad_sequence(labels,
                                                batch_first=True,
                                                padding_value=IGNORE_INDEX)

        input_ids = input_ids[:, :self.tokenizer.model_max_length]
        labels = labels[:, :self.tokenizer.model_max_length]
        attention_mask = input_ids.ne(self.tokenizer.pad_token_id)

        input_ids, attention_mask, labels = input_ids.to(self.device), attention_mask.to(self.device), labels.to(self.device)

        outputs = self.model.model(**inputs, return_dict=True)

        hidden_states = outputs[0]
        logits = self.model.lm_head(hidden_states)

        # Shift so that tokens < n predict n
        shift_logits = logits[..., :-1, :].contiguous()
        shift_labels = labels[..., 1:].contiguous()

        # Flatten the tokens
        loss_fct = torch.nn.CrossEntropyLoss(reduction='mean')
        shift_labels = shift_labels.to(shift_logits.device)
        lm_prob = torch.zeros(shift_logits.shape[0])
        for k in range(lm_prob.shape[0]):
            lm_prob[k] = (-loss_fct(shift_logits[k], shift_labels[k])).exp()
        return lm_prob

Maybe I should make use of these lines since it does pretty much the same thing? Any pointers/tips would be appreciated.

Yes, I think you should refer to the lines you sent me instead of reusing LLaVA-1.5's code -- I am not sure how much they overlap in fact.

Thanks @linzhiqiu, I did manage to integrate CogVLM into it by making use of the original CogVLM source code from HuggingFace! I currently have a forked version, I probably need to clean up the implementation a bit. But I could eventually submit a PR.

Thank you for the PR!
Have you tried CogVLM on any datasets? For example, you can run eval.py to evaluate your model on all benchmarks we tested in the paper. To get started, I think Winoground is a good dataset (shouldn't take more than a few minutes). If CogVLM is strong enough, you should see performance close to LLaVA-1.5 or CLIP-FlanT5 (a group score of above 28).
I am recently working on implementing VQAScore using GPT-4-Vision, and I will merge your PR once I am done with that. In the meantime, I would appreciate it if you could test CogVLM on Winoground / other benchmarks that you find suitable.

Hey, I will try to run the eval on the benchmark and clean the code more so I can submit a PR (but may not be able to do so in the next 2 weeks due to vacation).
I compared LLaVA 13B vs CogVLM vs CLIP-FlanT5-XXL on a binary classification task that I'm working on so far, and it seems that CLIP-FlanT5-XXL is still the best one, CogVLM coming second (for a given caption, P(Yes), using AUC as metric).

Sure! Take your time!


change(mempool): Return verification result after attempting to insert transactions in the mempool

We want to merge this independently of https://github.com/ZcashFoundation/zebra/pull/8951.
See https://github.com/ZcashFoundation/zebra/pull/8901 for more details.

@mergifyio queue


feat: introduce new CRD for in-process evaluation

Fixes: #542
Changes

introduce new CRD for in-process evaluation configuration
adapt mutating webhook to support in-process evaluation and injection of env variables
unit tests
e2e tests

I think we need to substantially rework OFO's documentation, including this. I think it's out of scope of this PR.
cc @Kavindu-Dodan @beeme1mr

I will review this with a local run tomorrow 🤝


change status and symbol baer

change status and symbol baer

{
  "symbol": "Baer",
  "address": "0x21ab6c9fac80c59d401b37cb43f81ea9dde7fe34",
  "overview":{
        "en":"Baer Chain, the world’s first technology-driven block chain game ecosystem.\nBaer Chain will serve the global game market and target at constructing a blockchain sharing platform to reshape the game ecological pattern, transforming behaviors and credits of all people into digital assets, thus to realise business value and circulation in the whole ecosystem.\nWith high-performance technologies , Baer Chain will promote effectiveness of game application to realize rich types and great game experience.\nAs the media of circulation of the whole Baer Chain ecological chain, use of BRC can finish various of transactions in the Baer Chain. As the user scale growth, BRC can realize value enhancement and globalization\n【Prospective of Baer Chain】\nBaer Chain is devoted to making outstanding technical contributions to application of blockchain in the global game industry!",
        "zh":"贝尔链（Baer Chain）是全球首款以技术驱动的区块链游戏产业生态平台。\n贝尔链的打造将服务于全球游戏市场，旨在通过区块链技术构建一个去中心化共享平台重塑游戏生态格局，并且把所有人的行为、信用都转变为数字化资产，从而产生商业价值并且流通于整个游戏生态圈，实现价值传递。\n技术方面，贝尔链的高性能提升了区块链游戏应用的效能，让区块链游戏回归丰富类型与强体验的游戏本质。\n贝尔币（BRC）作为贝尔链生态价值流通的媒介，可以完成贝尔链上各种数字资产交易，随着用户规模增长实现价值提升与全球化。\n【贝尔链的愿景】\n致力于为全球游戏产业区块链应用做出杰出技术贡献！",
  },
  "email"<EMAIL_ADDRESS>  "website": "http://baerchain.com/",
  "whitepaper": "http://www.baerchain.com/templets/bel/media/baer_whitepaper.pdf",
  "links": {
    "twitter": "https://twitter.com/BaerChain?s=05",
    "telegram": "https://0.plus/BaerChainCN",
  }
}

What's the problem, please?

请移除特殊字符 \n，并删除   "blog": "https://your-awesome-project.com/blog"

请移除 "telegram": "https://0.plus/BaerChainCN",  这一行的逗号，参考 CI 报错

@makoshan Please update it, thank you.


image: introduce an ImageKind abstraction

An ImageKind encapsulates how to generate a manifest for a certain kind of image. Each image type in the distro packages
will be implemented in terms of an image kind, by instantiating its configuration and calling the InstantiateManifest
function, which does the actual pipeline creation and instantiation. Different image kinds will have different configuration and
produce different pipelines.
The osbuild-playground command is reimplemented in terms of ImageKinds, ideally making it easy to create new ones
and move them over to internal/image when satisfied. Note that osbuild-playground takes its input as a JSON serialised
struct, but probably anything in internal/image would use more high-level objects than that, so might not be a straight
copy-paste.
Furthermore, the fedora image definitions have been ported over to be generated in this way. There is a lot of copying of
struct fields going on in distro/fedora/manifests.go now, and ideally we would not have that indirection but instantiate things directly in the image definitions, at least to a greater extent, so there is a lot of room for future work.
An unsolved problem is how to properly expose the artefact objects from the InstantiateManifest function, we probably
want to return a struct of these per image kind, but that might require some rework.

This needs a rebase.

Rebased :)


Is this the old or new logging agent?

Is this page applicable to the old Log Analytics agent (omi) or the new Azure Monitor Agent (oms)?
It seems it's oms, but listed under legacy documentation.

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

ID: 8de16fd2-54aa-1f46-0a42-d1540d937d03
Version Independent ID: 7a4964d7-8dc9-e838-4d81-914e9c31645b
Content: Troubleshoot Azure Log Analytics Linux Agent - Azure Monitor
Content Source: articles/azure-monitor/agents/agent-linux-troubleshoot.md
Service: azure-monitor
Sub-service: agents
GitHub Login: @guywi-ms
Microsoft Alias: guywild

@ragazzojp Thanks for reaching out. Old Log Analytics Agent (OMI / OMS) falls under legacy category as Azure Monitor Agent (AMA) is the new agent. Hence, Log Analytics related content is under legacy section.


Add Thanos Query frontend in Query CRD and deployment

This adds Thanos Query frontend within query crd, which generates cache config if you don't specify

Modified this to be a nested field on Query CRD, but have kept the builder code separate as it is a separate thanos component and not a mode of another.


✨ Add functionality to KCP to be able to scale down with annotation

This PR meant to get an internal review, an original PR towards upstream Cluster API repo is merged.
/close


Feature: Integrate OpenPolicyEditCardLimitTypePage api command to the app

Details

Integrate OpenPolicyEditCardLimitTypePage api command to the app
Fixed Issues

$ https://github.com/Expensify/App/issues/46959
$ https://github.com/Expensify/App/issues/45924
PROPOSAL: N/A
Tests

Pre-step:
Comment out the feature check in the WorkspaceExpensifyCardDetailsPage file, so you can access the screen.
Also don't forget to disable policy?.areExpensifyCardsEnabled here

Navigate to Workspace -> Members
Click on the member
Observe that cards displays correctly
Click on Card
Click on Limit type

Go through these steps from here:

Case 1: Monthly -> SmartLimit
Monthly-limit card with:
limit: $1000
currentSpend: $500
unapprovedSpend: $1100
totalSpend: $2000
If the admin updates the card to SmartLimit, we'll check if the unapprovedSpend >= limit - which in this case is true, so we'll show the warning: If you change this card's limit type to SmartLimit, new transactions will be declined because the $1,000 unapproved limit has already been reached.
Case 2: SmartLimit -> Monthly
SmartLimit card with:
limit: $1000
currentSpend: $1000
unapprovedSpend: $1000
totalSpend: $2000
If the admin updates the card to Monthly, unapprovedSpend >= limit is true so we'll show the warning: **If you change this card's limit type to monthly, new transactions will be declined because the $1,000 monthly limit has already been reached.**
Case 3: Monthly or SmartLimit -> Fixed
SmartLimit card with:
limit: $1000
currentSpend: $500
unapprovedSpend: $500
totalSpend: $2000
We'll check if totalSpend >= **limit - true, in this case so we won't show Fixed as an option
Case 4: Fixed -> SmartLimit
Fixed-limit card with:
limit: $1000
currentSpend: $500
unapprovedSpend: $500
totalSpend: $500
If the admin updates the card to SmartLimit, we'll check if unapprovedSpend >= limit - false, in this case so we won't show the warning
Case 5: Fixed -> Monthly
Fixed-limit card with:
limit: $1000
currentSpend: $500
unapprovedSpend: $500
totalSpend: $500
Updating the card to Monthly shouldn't cause any issues here since currentSpend is still within the limit so we won't show the warning

[x] Verify that no errors appear in the JS console

Offline tests

Same as tests
QA Steps

None

[X] Verify that no errors appear in the JS console

PR Author Checklist

[X] I linked the correct issue in the ### Fixed Issues section above
[X] I wrote clear testing steps that cover the changes made in this PR

[X] I added steps for local testing in the Tests section
[X] I added steps for the expected offline behavior in the Offline steps section
[X] I added steps for Staging and/or Production testing in the QA steps section
[X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[X] I included screenshots or videos for tests on all platforms
[X] I ran the tests on all platforms & verified they passed on:

[X] Android / native
[X] Android / Chrome
[X] iOS / native
[x] iOS / Safari
[X] MacOS / Chrome / Safari
[X] MacOS / Desktop

[X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[X] I followed proper code patterns (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[X] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I followed the guidelines as stated in the Review Guidelines
[X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] I verified that if a function's arguments changed that all usages have also been updated correctly
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase
[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[X] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
unapprovedSpend > limit and changing MONTHLY -> SMART

unapprovedSpend > limit and changing SMART -> MONTLY

totalSpend > limit

unapprovedSpend > limit and changing FIXED -> SMART

If this has visual changes, then it'd be great to get screenshots for desktop and mobile to review 😄

@waterim Please ping me when the PR is ready

@waterim , can you update videos on all platforms

I will upload screenshots for all cases, but this PR is not about adding new UI, do we really need to have videos from all platforms?

@allgandalf Added all cases screenshots, also found one bug, will push in 1 min

@allgandalf should be ready!

@waterim what are the steps to get real data instead of the mock data? I am having trouble. I have connected bank account, but not able to add a virtual card and also get that card on the members details page

if you have problems with createExpensifyCard maybe first checkout on the branch with ConfigureExpensifyCardsForPolicy https://github.com/Expensify/App/pull/46564
This flow is not merged yet thats why you can't add new card without going on this PR

@allgandalf merged

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/MariaHCD in version: 9.0.21-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@mountiny @MariaHCD We not exactly sure how to QA all the cases described in this PR. Any chance you can validate these internally?

Let's check this one off. We can test these internally (via full E2E tests) at a later stage.

🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Update deepSearchInArr.js

The search was not working when the list items are huge. It was inefficient because it's not terminating the search once it finds a match. A better approach was to use JavaScript's built-in array methods, like filter(). This method creates a new array with all elements that pass the test implemented by the provided function.

@AdelRedaa97  ^

does this solve when data are huge?

does this solve when data are huge?

Yes

Related to #148
Using the .filter method will not terminate the search, the performance will be similar to the original implementation using a for-loop.
The reason why the search does not work when the list is huge is because of null being pushed into the array when the item doesn't match the query. In addition to that, because the height of each item in the FlatList is calculated by getItemLayout in useLayoutDropdown, having nulls in the array messed up the layout calculation for large dataset.
Therefore, if we stop pushing null into the array, the bug should be resolved. Using the .filter method as @rrscodes suggested looks cleaner as well.

@rrscodes Hi, thanks for your solution. I copied your solution into deepSearchInArr.js. Now, it can search as expected. But, while I searched the target, and then click on it for selecting, but my selection not works and selects the first row automatically. Could you suggest any additional solution for this ?

Without push null there will be a problem with the indexes as the default index will point to another item, for example, if we have an array ['aa', 'b', 'ca', 'da'] and the default index prop is set to 2 and then he used the search and he typed 'a' the without pushing null to the array the default index will change to be ''da'' instead of ''ca''

@AdelRedaa97 You're right, removing null causes another issue. Fixing the index seems to be quite involved and risky, it might break other things as we don't have tests.
Another way to fix the search issue is to keep on pushing null into the array, but removing the getItemLayout method from the FlatList so the FlatList can calculate the layout correctly. This might hurt the performance a little bit, but I think it's better than having incorrect behavior. What do you think?

Hi again, I read your answers and I confused a little bit because of being new in react native. Could you talk on this, that was written as code linked at the top of this topic. Which null or FlatList in here ? (deepSearchInArr.js file)
By the way, as I wrote on my previous message, search works very well, just we confused on selecting searched element on our list (This list is for countries). When we select it, as you said there is a different index key, it gets a different result, not we selected.
`const contains = (item, searchTxt) => {
// item is an object
if (typeof item == 'object' && item != null) {
for (let key in item) {
const value = item[key];
if (contains(value, searchTxt)) {
return true;
}
}
}
// string, number or boolean
if (typeof item != 'object' && item != null && item != undefined) {
const itemStringfied = item.toString().toLowerCase();
const searchTxtStringfied = searchTxt.toString().toLowerCase();
if (itemStringfied.includes(searchTxtStringfied)) {
return true;
}
}
return false;
};
export const deepSearchInArr = (query, arr) => {
// handle edge cases
if (!arr || !query) {
return [];
}
// use filter to get elements that pass the contains test
return arr.filter(item => contains(item, query));
};
`

@donemuhendislik I was talking about removing the prop from this line of code (such as deleting the line), and also restore the changes made in the PR (that means use the original version from master), then you should be good to go. But in the long run, it would be better to fix it from this library instead of patching the package by yourself.

Any update on this?

I've made an update that might fix the problem in this commit https://github.com/AdelRedaa97/react-native-select-dropdown/commit/59505a477270a87966b3c4f6acf65e5e9c205281 ,,, I removed push(null) and fixed the index problem that happened when push(null) has been removed.


uv should install packages without requiring a venv

I'm installing packages inside a Docker container (via a Dockerfile) and wish to install them globally so that they're always available. This should be similar to running pip with root privileges. Unfortunately uv pip install doesn't let me install packages without an existing venv created via uv venv.
error: Failed to locate a virtualenv or Conda environment (checked: `VIRTUAL_ENV`, `CONDA_PREFIX`, and `.venv`). Run `uv venv` to create a virtualenv.

This prevents the subsequent Python commands from running correctly. I have to source .venv/bin/activate for every docker RUN command.
RUN . $VIRTUAL_ENV/bin/activate \
    && python manage.py ...

Ideally uv would let me install packages globally.
Is there anything I can do to enable the venv globally? I've already set the VIRTUAL_ENV and the PATH env vars inside the Dockerfile.
Thanks.

Thanks! Closing as a duplicate of #1526 / #1374

You can add a --system flag so it does not require a virtual environment.


Deserialization manage errors & easily create Nit object from pure JSON

This PR intro better error management to the deserialization phase, the abstract engine and the JSON implementation. Deserialization of a malformed JSON string or a JSON serialized object from a different program version do not crash the program anymore, it will instead raise errors. When errors are raised, the deserialized object may be inconsistent with uninitialized attribute. Depending on the context, the object may have to be discarded or, usually with the user consent, it can be used with possible fatal failures later.
Cool bonus part
This PR also lighten the JSON format expected by the deserializer. This allow for nicer custom creation of Nit objects from JSON.
For example, given a Opportunity-like Web app using the Nit class MeetupConfig declared like so:
class MeetupConfig
    serialize

    var description: String
    var max_participants: nullable Int
    var answers: Array[FlatString]
end

On the client-side JavaScript code, one can create a JSON object that will be converted to a Nit instance of MeetupConfig by the JSON deserialization services:
{"__class": "MeetupConfig", "description": "My Awesome Meetup",
 "max_participants": null, "answers": ["Pepperoni", "Chicken"]}

Future work

We may need to precise the types of a few errors. Especially to differentiate between fatal errors and errors that can be overlooked. There is already IOError and AttributeTypeError that should be considered fatal.
Infer advanced array type, such as Array[MeetupConfig]. As of now, only arrays of string, int, float, objects and their nullable variants are created.

Seems very cool, +1!
not so related question: I'm more and more considering to use this in github_api or nitrpg. The main concern I have is about the lack of deserialization metadata in the api returned json objects.
Will it be better to:

prepare the receved json and setup the metadata before the deserialization phase?
hack the deserializer to recognize json objects without metadata?

@Morriar Interesting problem... I prefer the second solution, and even more without the hacking part! So I've added a feature for this use case in the new commits.
You can now create Nit classes with the exact same attributes as the expected JSON objects.
And use a subclass to JsonDeserializer to redef class_name_heuristic and use your own logic to infer the name of the corresponding Nit class.
Example:
class MyData
	serialize

	var data: String
end

class MyError
	serialize

	var error: String
end

class MyJsonDeserializer
	super JsonDeserializer

	redef fun class_name_heuristic(json_object)
	do
		if json_object.keys.has("error") then return "MyError"
		if json_object.keys.has("data") then return "MyData"
		return null
	end
end

var a = """{"data": "some data"}"""
var deserializer = new MyJsonDeserializer(a)
var deserialized = deserializer.deserialize
assert deserialized isa MyData

a = """{"error": "some error message"}"""
deserializer = new MyJsonDeserializer(a)
deserialized = deserializer.deserialize
assert deserialized isa MyError

I like it and will definitely use it!

This is great. Some issues with tests. +1


Where can we find a doc with every color variable and where it is applied

Where can we find a doc with every color variable and where it is applied

https://code.visualstudio.com/api/references/theme-color

/question


Keycode refactor

So, I've got the first working version of KMonad with the new Keycode model running on Linux.
The code is still an undocumented mess, and there are warnings that I have to take care of, and then there is more stuff to be done. BUT It compiles, it runs, it works.
Next obvious steps:

Get Windows keycodes implemented (Will take care of this myself)
Get Mac keycodes implemented (I was hoping @thoelze1 would have a go)
Get all the aliases added back in so that we don't break backwards support

Once that is done, I think we merge into master.
A lot has changed, I am happy discussing things in this Pull Request. If someone would like to hop into Discord or IRC, then let's arrange a time, and I will show up.
I'll get started on ironing out the warts.

@thoelze1 I just added a testing framework and 2 tests that will check if you provide keycodes for all the core keynames. You should be able to just run stack test, and it will tell you what names you haven't defined but should.
I still haven't decided how to handle names we have defined but that are not standard. Ideally every config would parse on every platform, but how do we deal with all the weird keynames in Linux that have no direct correspondence in Mac or Windows? For example: left-control is standard, but is KEY_FINANCE in the linux kernel?
I think we should have names for a full 100% keyboard, and maybe add user-specifiable aliasing for beyond that? Anyways, let's focus on getting the 100% keyboard working first, and then consider edge-cases.

This is great!  Are there any modules you reckon need a review the most?

I still haven't decided how to handle names we have defined but that are not standard. Ideally every config would parse on every platform, but how do we deal with all the weird keynames in Linux that have no direct correspondence in Mac or Windows? For example: left-control is standard, but is KEY_FINANCE in the linux kernel?

This is a good question; maintaining something by hand and then associating a no-op with that sounds very error prone, but I suppose this is not something we'd ever need to update either...

Are there any modules you reckon need a review the most?

At the moment, not particularly. @thoelze1 is helping out with the Mac support. I will need to add in support for keycode-name-aliases, and at that point it would be really helpful if you could help me check if we indeed aren't breaking any backward compatibility, i.e. that we are still supporting all of our old keynames. Additionally, any brainpower you could invest in thinking how best to support weird buttons (I think the least weird weird-button would be: volume controls) across platforms. Finally, just having a go to see if it compiles on your system and doesn't break your config would already be extremely helpful (although right now it would probably break on some keyname aliases).
Actually, thinking about it now, since I've setup a testing framework, we could actually add config-parsing tests to KMonad. If we could have a few configurations with clearly defined syntax that we want to support (like a config with layers, a config with aliases, a config with weird buttons, etc.) then we could integrate testing for the correct parse into the testing system as well. That might really ease development of the improved parsing functionality in the near future.

So my config works modulo missing aliases.  However, I don't necessarily get parsing errors when the parser can't find a certain symbol.  For example, I used grv instead of \`` in my layouts and that config parsed and kmonad started normally.  Only that key would not emit anything when pressed and, for some reason, ewas not mapped tofas requested, but still remained ase.  The same happened with pauseandf`.

Thanks for the detailed report. I'll look into it when I get a chance :)

So I've managed to add in all aliases we used to have for standard keys (on a 100% kbd). That means that all of those should basically just work again. I've also added some tests to ensure that aliases only references actual keycodes, and that there is no overlap between aliases and codes etc.
I haven't added in the aliases for those keycodes that aren't dealing with 100%-kbd keycodes yet. We still need to decide what to do with those kinds of keys. This will also be an issue for @thoelze1, who will need to figure out how to add in the launchpad and missionctrl keys which are rather Mac-only.

I just have tested the latest commit (ed54f19) with my config and had no problems. Everything seems to work as usual.

Thanks :-)
Now Mac and Windows support, and then we can merge stuff.

Um.... just did a very large model refactor, separating out the button-initialization code from the joiner. And then the pull-chain based model from the app. This was such a large refactor that for all intents and purposes this shouldn't have worked... But it compiles... and it passes all the tests... and my test-config works...
Either I just completely broke KMonad by pushing this commit, or Haskell is an amazing language to refactor. (or both)

It still works for me!

What is left to do for Windows?

What is left to do for Windows?
I started implementing the basic types, the names are still very provisional. Not actually sure if it currently runs, will try to get a virtualbox up and running, and also one for Mac, so I can start running the other OSes. Once I can run your code I'll try to get your progress merged into the branch.

Finally, when this stuff runs on all 3 OSes we can have some fun rebasing onto master :p

Just an update: implemented key-repeat for windows. Will now focus on merging and rebasing everything.

Update: just merged in the Mac stuff, will now start work on rebasing this on top of master.

Just a quick drive-by comment: when rebasing we need to take extra care of the renamed modules, because git may or may not pick up on changes due to that (I ran into this when I experimentally tried to rebase this branch on top of master)

@slotThe Thanks for the tip. I remember playing around with this rebase a couple of weeks ago and it being a big chore. Gonna start now, and just take it one commit at a time, make sure it compiles, step by step, see where I get. Before I merge the whole branch in I will check in here and with the discord, see if I can get some people to test the keycode-refactor branch.

Ummm, I think I might've 'done a silly' by merging all the commits on this branch together (poorly) and then force-pushing to this branch. I think we might've lost some commit history, and I'm not sure that is entirely industry approved behavior.
However, I've actually managed to rebase this on top of the current state of master, and got it compiling and running on my machine. I will let the continuous integration run and see how things might be breaking and see what I can fix, but basically we're very close to merging this in.

Whose idea was it to setup continuous integration? That stuff is amazing!
Thanks so much, I had no idea this was possible, but it's made testing this big refactor loads easier. Many, many kudos to you and your efforts.

@MuhammedZakir @slotThe @thoelze1
Could you guys see if you can compile and run this branch? We're currently rebased on top of master's head and all the CI stuff is passing, so I think we're ready to merge this into master and move on to other fixes/features.

@david-janssen, yep, but bear in mind there are no automated tests, so CI only checks that everything builds okay, not that everything actually works. Since we're using Haskell, if it builds it probably works, but it doesn't check for any logical errors that can't be checked by the type system.

@david-janssen builds and works for me!  Though it seems like we lost at least one commit that modified the renamed modules: https://github.com/kmonad/kmonad/commit/e636747ea15925f3f2a5f16c085a6cd721d5bda8

This builds for me on Windows. A few notes:

Keys repeat (yay) but so does the Windows key, so combinations like Windows + E or Windows + V just result in the start menu flashing like crazy 😂
Ctrl + C stops kmonad, but doesn't release the terminal. I have to close the terminal window and open a new one to get a prompt. Previously the first ctrl+c stopped kmonad and the second released the terminal.
I lost my media/volume controls, but I think that's expected

I can't get this branch to link on MacOS. I'm using Big Sur (11.6) with the bundled driverkit extension, version 1.15.0.

Full compilation error message in case it's helpful.

...
[69 of 69] Compiling KMonad.App
Preprocessing executable 'kmonad' for kmonad-0.4.1..
Building executable 'kmonad' for kmonad-0.4.1..
[1 of 1] Compiling Main
Linking .stack-work/dist/x86_64-osx/Cabal-<IP_ADDRESS>/build/kmonad/kmonad ...
Undefined symbols for architecture x86_64:
  "_release_kb", referenced from:
      _Ls2y9p_info in libHSkmonad-0.4.1-AsmXRmlWaUeETWlnOxT1qd.a(IOKitSource.o)
  "_grab_kb", referenced from:
      _Lc2ya5_info in libHSkmonad-0.4.1-AsmXRmlWaUeETWlnOxT1qd.a(IOKitSource.o)
      _Lr2xXM_info in libHSkmonad-0.4.1-AsmXRmlWaUeETWlnOxT1qd.a(IOKitSource.o)
  "_wait_key", referenced from:
      _Lc2yaU_info in libHSkmonad-0.4.1-AsmXRmlWaUeETWlnOxT1qd.a(IOKitSource.o)
  "_send_key", referenced from:
      _Lc2AdI_info in libHSkmonad-0.4.1-AsmXRmlWaUeETWlnOxT1qd.a(Ext.o)
      _Lc2Adg_info in libHSkmonad-0.4.1-AsmXRmlWaUeETWlnOxT1qd.a(Ext.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)

--  While building package kmonad-0.4.1 (scroll up to its section to see the error) using:
      /Users/XXXX/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_<IP_ADDRESS>_ghc-8.10.4 --builddir=.stack-work/dist/x86_64-osx/Cabal-<IP_ADDRESS> build lib:kmonad exe:kmonad --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

@lierdakil Actually, I had started adding in a few automated tests in this refactor, and it looks like the CI is automatically running them, because it actually failed on one of the tests for the windows build, which help me fix the bug before ever trying it on Windows. I'm guessing hspec tests get run automatically?

Keys repeat (yay) but so does the Windows key, so combinations like Windows + E or Windows + V just result in the start menu flashing like crazy joy

Doh! I made a silly mistake. When doing key-repeat we should only ever repeat the last key pressed. I think I programmed it to repeat any key you hold :-). I'll fix this next.

I had started adding in a few automated tests

I see. Disregard my comment, then. What I meant to say was, "I didn't add any tests" :)

I'm guessing hspec tests get run automatically?

All tests defined in the cabalfile will run, since CI script just runs stack test.

Though it seems like we lost at least one commit that modified the renamed modules:

Well caught! And fixed.

@whitbur

I can't get this branch to link on MacOS.

The error message looks like it can't find the c-code for Mac. There has been some confusion these last few weeks about what command is required to build the code on Mac, something to do with --include-dirs. You could look through the recent issues if you'd like. Not entirely sure myself since I use almost entirely Linux.

@david-janssen: I posted this on my PR thread. Maybe you missed this? Or, is it that key-repeat is supported only in Windows?

The last thing I have to fix for windows is key-repeat, but after that both Linux and Windows will be ready.

Currently, there in no key-repeat if KMonad is used in Linux virtual console*. IIRC, key-repeat is not baked into Windows, and if that's the case, it would be nice if the key-repeat feature is made generic, so that we could use it in Linux, and if needed, in Mac too.
Edit: * Do I have to run some command after starting KMonad to get key-repeat in virtual console?

There has been some confusion these last few weeks about what command is required to build the code on Mac

Yep, I got it compiled, thanks for the tip. Otherwise working just fine on MacOS for me.

@whitbur

I can't get this branch to link on MacOS.

The error message looks like it can't find the c-code for Mac. There has been some confusion these last few weeks about what command is required to build the code on Mac, something to do with --include-dirs. You could look through the recent issues if you'd like. Not entirely sure myself since I use almost entirely Linux.

The problem with --include-dirs is most probably because they used masterbranch insteadMac-keycode-refactor` branch. One person has already confirmed this.
About the compilation errors: It may have to do with GHC version (try 8.10.7). I will test on Mac tomorrow and post here.

@MuhammedZakir

I posted this on my PR thread. Maybe you missed this?

Ooh, good that you bring this up. I did miss this. I'll have to think about how to make this generic properly. Some stuff will be shared (like the delay/interval forkind behavior), but other stuff will be specialized (Windows only sending press events, Linux using press and repeat events).
I'll take that into consideration when I make these fixes.

Minor problem: Logging for Rerunning event(?) needs to be corrected.
Current:
Rerunning event: KeySwitch {_kSwitch = Press, _kCode = Keycode {unKeycode = 35}}

Expected:
Rerunning event: Presse h

Config:
(defalias
  esc (tap-next-release esc (layer-toggle home-row)
)
;; In layer `home-row`, h,j,k,l are left,down,up,right

;; In base-layer `qwerty`, caps_lock is mapped to @esc

Log for Pcaps Ph Rh Rcaps (removed registering untimed hook messages):

Click to expand
Got: Press caps
Running hooks
Block level set to: 1
Got: Press h
Running hooks
Storing event, current store:
 - Press h

Got: Release h
Running hooks
Pushed layer to stack: "home-row"
 1. "home-row"
Base-layer: qwerty

Unblocking input stream, rerunning:
Press h

Injecting event: Release h

Rerunning event: KeySwitch {_kSwitch = Press, _kCode = Keycode {unKeycode = 35}}
Running hooks
Put: Press left

Rerunning event: KeySwitch {_kSwitch = Release, _kCode = Keycode {unKeycode = 35}}
Running hooks
Put: Release left
^[[DGot: Release caps
Running hooks
Popped layer from stack: "home-row"
Base-layer: qwerty

@whitbur: did you use --extra-include-dirs flag when compiling?

Nope, I'd just forgotten to add the --flag kmonad:dext argument.

Another one:
kmonad: EvdevCouldNotAcquire (EvdevCfg {_evdevPath = "/path/to/kbd"}) (-1)

There is also no error messages for exceptions in App/KeyIO/Linux/Uinput.hs.

Just got key-repeat behavior generalized and hooked up for Linux. Still have to go back and make the changes for Windows.
In regards to Linux key-repeat: I've added another optional argument to the parser, which takes a tuple of values, the first being the delay before repeat starts, the second the time between repeats. This means that you need to provide both the name and some post-init command. I should probably be using keywords to pass this stuff to avoid this issue. Going back to deal with the parser is future-work, first I want to merge the keycode refactor.
X doesn't respect the key-repeat settings in KMonad at all, however the virtual console does. However, the repeat events don't seem to hurt X at all, it doesn't double up its own repeat with our repeat.
Will go back now and see if I can get stuff integrated into windows.
Having a rougher few days this past week, so work may be slow.

Got Windows mostly working, with the one remaining wart that if you C-c C-c out of kmonad in the terminal, the 'C'-key remains pressed. But this stops once you close the terminal by clicking. I'm thinking of further refactoring the way we handle KeyIO, in a way that should solve this issue entirely, but I want to fix this branch and merge in into master before we do any more.
Waiting for the tests to pass and some final OK's, and then I will merge this into master.
I'll be just tidying up little things, cleaning up comments, and trying to apply some code-formatting here and there.

@MuhammedZakir Good catch on the Evdev one. Interestingly: they were already defined as in the typeclass under the displayException method. However, I needed to implement an outer 'final' catch all the remaining errors and properly print them context, which I did. So, fixed!

I'm going to have to travel soon, fleeing the bad allergic conditions of my current housing situation for a few weeks, which means I won't have access to my PC, which means I  won't have access to virtualization, which means I can't do any Windows support.
Is this branch ready to be merged? Ideally I want to get this behind me. On the other hand, if this suddenly introduces issues I won't be able to provide Windows support for the next few weeks.
Ideas on best course of action?

On Tue, Oct 05 2021 03:01, David Janssen wrote:

Is this branch ready to be merged? Ideally I want to get this behind
me. On the other hand, if this suddenly introduces issues I won't be
able to provide Windows support for the next few weeks.
Ideas on best course of action?

I don't know whether it's the best but... screw Windows and let's move
forward? :)

screw Windows

I detest Windows just as much as you, but you have to remember to maintain your compassion for Windows-users. You wouldn't want to leave them behind on Windows and without kmonad support, right? :-)
Gonna merge this tonight, unless I hear any objections. However if this does break a lot of stuff for the Windows-homies, maybe you could revert that commit if I'm not around?

On Tue, Oct 05 2021 04:17, David Janssen wrote:

I detest Windows just as much as you, but you have to remember to
maintain your compassion for Windows-users. You wouldn't want to leave
them behind on Windows and without kmonad support, right? :-)

Ah, very good point—that would be all too cruel!

However if this does break a lot of stuff for the Windows-homies,
maybe you could revert that commit if I'm not around?

Sure, I see no problems with that.

Merge it, and deal with any problems when you get back. No use preparing
for problems that might not show up.
Enjoy your vacation!
On Tue, Oct 5, 2021, 07:39 slotThe @.***> wrote:

On Tue, Oct 05 2021 04:17, David Janssen wrote:

I detest Windows just as much as you, but you have to remember to
maintain your compassion for Windows-users. You wouldn't want to leave
them behind on Windows and without kmonad support, right? :-)

Ah, very good point—that would be all too cruel!

However if this does break a lot of stuff for the Windows-homies,
maybe you could revert that commit if I'm not around?

Sure, I see no problems with that.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kmonad/kmonad/pull/259#issuecomment-934329365, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAST6D2PR6S4VYJTMCSIGXLUFLPXRANCNFSM45CSD6PQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Alea iacta est


I added the o1-preview model to the .env file, but I got an error when using it:

I added the o1-preview model to the .env file, but I got an error when using it:

Originally posted by @lam584 in https://github.com/danny-avila/LibreChat/discussions/4037

https://github.com/danny-avila/LibreChat/discussions/4037#discussioncomment-11051552


Identify inter-protocol dependencies that require refactor/abstraction

This search shows all the instances where specific protocol versions are being imported directly: https://github.com/hyperledger/aries-cloudagent-python/search?q=%23+FIXME%3A+We+shouldn't+rely&unscoped_q=%23+FIXME%3A+We+shouldn't+rely

@nrempel -- could you outline what is the fix for these instances?  Can we dynamically import the correct version of the protocol?  Or is there some other way to maintain these?
@sklump -- any thoughts on this?  This is a byproduct of the "proper handling of major/minor" versions of protocols.  We now declare what version of a protocol we support via the plugin registry.  Can we use that to handle these imports?

I am taking few hours here to look into this and come up with a document.

There are a couple approaches I can think of:
Perhaps a particular protocol simply depends on another protocol of a certain version. In this case, we could keep the direct imports, or maybe go through some sort of protocol resolution abstraction, and add some validation around the protocol dependencies.
Or maybe every direct import could be bubbled up into its own abstraction. For example any reference to the connection protocol could be pulled into its own "connection" abstraction. Then the imports would reference higher-level notions of things instead of protocols directly. This is just an example, I think we already do this everywhere for connections but we would need to create more high-level notions of things that represent what the imported protocols represent.

https://drive.google.com/open?id=1_eA6FtMv-gqh0o8c8h6wskWR_DOE7PwB
Use symbolic links: per protocol for current version, per major version for current minor version. Link to current version from unversioned protocols, link to most recent minor version for major version matching versioned importer's reckoning (typically, v1->v1, but v0->v1 for introductions). Anyway, that's my thought.

https://github.com/hyperledger/aries-cloudagent-python/pull/514 provides a working implementation.

@sklump -- I believe this is done and am closing. Please reopen if I'm wrong on that.


common.js module not work

Hi,
After install animateplus from npm, this module doesn't support common.js module.export.
Is it possible to include common.js supports? Thanks.

Hi! I'd rather stick with native export and let people transpile to CommonJS if needed. Thanks!


Removing unnecessary section in the second step of the tutorial

Removing unnecessary section in the second step of the tutorial
This work is part of effort done in the Sprints in DjangoCon Europe in Vigo with Daniele Procida @evildmp
Task picked from the task list in https://docs.google.com/spreadsheets/d/16UTGwtAoOwznc46cszbwAHU9xbukXnnpwG-faE94Rw8/edit?gid=0#gid=0

@evildmp addressed what we discusses in 46852956da902e15edc266aaf216ec55e0902a79

@evildmp fixed what we discussed "again" in ae301918d3bc9390429a356b16fcd42878d88a5a

hi @nessita, I wonder if we still want these changes to be merged. It has been a while since we created the pr.

hi @nessita, I wonder if we still want these changes to be merged. It has been a while since we created the pr.

Hello @avallbona! Yes, we still want these changes and I'm processing them "as fast as I can". I know that the process feels slow, but we invest a lot of time and effort in ensuring that Django remains secure, stable and solid. But be sure we will get to this eventually.
Thanks for your patience!

@avallbona in fact one thing you could help greatly with is "finding a new home" for the removed docs. We've had some fair feedback pointing it out that instead of just removing tutorial "extra" content is to relocate it to a more appropriate place. I have done so with 73e8e811416dcb5007ad9cc9d1632aaca95bf302 and 1005c2abd1ef0c156f449641e38c33e473989d37 for example. So for this PR we also need to evaluate and potentially find a new home for the deleted details. Would you like to give that a try?


Can't apply convex decomposition to a hollow cylinder (STL file) in Python?

Hi,
I am trying to use the example script python/package/bin/coacd on an STL file of a hollow cylinder (attached:
hollowcyl.zip).

I want to decompose this cylinder into a union of convex objects so I can accurately simulate collision detection in MuJoCo. The picture above shows the hollow cylinder in a MuJoCo simulation. The video below shows that a small sphere is unable to fall through the hollow cylinder as its convex hull doesn't allow this.
Screencast from 02-08-24 11:50:29.webm
When I execute the code:
cd python
python package/bin/coacd -i hollowcyl.stl -o hollowcyl_coacd.stl

I still get the same issues, whereas I was expecting this to produce an STL file that allows the sphere to fall through the cylinder? I have read the code in python/package/bin/coacd line-by-line and I don't know why I am encountering this issue. Can anyone help?
Thanks in advance!

Hi here are the .obj and .stl files that coacd generated, by visualization I feel the results are reasonble, can you show the coacd result you generate to compare? I also attached the files.

out.zip

Hi here are the .obj and .stl files that coacd generated, by visualization I feel the results are reasonble, can you show the coacd result you generate to compare? I also attached the files.

out.zip
Hi, I put your model in Mujoco. But the model named out.obj is not fully displayed, the one named out.stl didn't work and the ball didn't fall.


[SR-765] Implement NSNumberFormatter.stringForObjectValue()

SR 765 reports that NSNumberFormatter is missing an implementation for stringForObjectValue().
I've added an implementation for that which follows the NSFormatter Class Reference by returning nil if the class is incorrect, otherwise returning a formatted string. The formatted string is obtained by calling through to stringFromNumber(), which also deals with the localisation of the string.

looks good to me


could not allocate memory, after many components using Vizzu have been loaded/reloaded

vizzu.min.js:19 Uncaught RangeError: WebAssembly.Memory(): could not allocate memory
at eval (vizzu.min.js:19:1)
at new Vizzu (vizzu.min.js:19:1)
at eval (ShareOfChart.js:158:1)
at invokePassiveEffectCreate (react-dom.development.js:23487:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
at invokeGuardedCallback (react-dom.development.js:4056:1)
at flushPassiveEffectsImpl (react-dom.development.js:23574:1)
at unstable_runWithPriority (scheduler.development.js:468:1)
at runWithPriority$1 (react-dom.development.js:11276:1)

Is there a way to unimport on component unmount, or clean up WebAssembly memory?

Fixed  with commit: https://github.com/vizzuhq/vizzu-lib/pull/145/commits/762e691164f7dcd6f2f0b016e9a0c1c710ac1137
chart.detach() should be called to enable proper garbage collection


[BUG]Harcoded Region in Endpoint in CustomVisionTrainingManager

I need to understand why the region in the endpoint is been hardcoded...
public static CustomVisionTrainingClient authenticate(String apiKey) {
return authenticate("https://southcentralus.api.cognitive.microsoft.com/customvision/v2.1/Training/", apiKey);
}
Issue :
While creating a project with different region in-spite of generating the keys we will get Access Denied error.

@milismsft @ryogok @jianghaolu can you please follow up?
https://github.com/Azure/azure-sdk-for-java/blame/d2cf1859ef09c3874190770a3332e1491fb3d6d0/sdk/cognitiveservices/ms-azure-cs-customvision-training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/CustomVisionTrainingManager.java#L25

There is a overload authenticate method which accepts both URL and apikey , can you try that method?

Hi,@pkreborn06
How is this issue going? Feel free to let us know if further help is needed.

We are going to close this issue because we haven’t heard from you in a few days, but please re-open it if the issue still persists.


Return secrets as outputs instead of values

Issue #14: Environment variables vs outputs
Description of changes:
Secrets are now returned as action outputs. This results in the following improvements:

User side:

Less concern needed over which steps to separate in a different job to avoid access to environment variables
Full control over where the returned secrets are used

Codebase side:

No more need to clean up environment variable secrets, as the GitHub Actions toolkit will handle the outputs.

README.md, action.yml and code comments have been updated accordingly. Tests are passing.
If you prefer reviewing less files and compiling the source code yourselves, I have created a parallel PR(#37) containing only the code changes without the built dist files.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ecraw-amzn Is there something I still need to do before this PR can be reviewed and merged?

Thanks for the PR, @Olfi01 - we are evaluating this as a part of issue #14

@jbct can we merge this. Currently, we are facing issues due to the Secrets Cleanup right after the fetch.

Is there anything holding this feature up?

Bump
We've encountered this issue again. What is the status of the PR?

Bump
We've encountered this issue again. What is the status of the PR?

Since it has been left unresolved for over a year now, some conflicts have mounted up. I don't know if I'll get around to fixing it anytime soon, though I imagine the conflict can't be too difficult to manage.


PSD and CLIP support for Peek

Description of the new feature / enhancement
Add support to preview .psd and .clip files (Photoshop and Clip Studio Paint files) on Peek
Scenario when this would be used?
It would be very useful as part of the illustrators workflow when working on a project with many images, it helps a lot to preview the images already made, or for reference, without having to open the .psd or .clip file that can be quite heavy and consume resources of the computer you are using in the image you are creating at that moment.
Thanks for reading :)
Supporting information
No response

/dup https://github.com/microsoft/PowerToys/issues/26283


Would you be open to accepting a PR to introduce tox?

Running the test suite locally currently has the following disadvantages:

Defining the tests in Makefile renders the test suite inaccessible on Windows
Developers must set up a virtual environment and install dependencies prior to running make test
Only one Python version can be tested at a time, causing the test suite to fall short of 100% coverage

I'd like to introduce a tox configuration so that developers like myself can simply clone the repo and run tox to exercise the entire test suite across all supported Python versions on any given platform.
Is this something you'd be open to?

I'd love to have this! Thanks for explaining the rationale too!

Awesome! I'll work to get this done. :+1:


Add resources sub directory and a Machines class

This PR adds a Machines class to the resources directory. This closes issue #354.

Hey Begaiym! Thanks for this!
I have a few comments regarding the info that you are logging back to the user.
Also: are we storing these events in the database? Are these things being registered to ensure we can have stats later.

Yes, everything is begin logged in the database in the background, since we didn't make nay changes there and just calling the same methods with different interface.
I just added some extra logs here, check them out.

Since we need to move forward with this feature but I cannot merge it without @hpenedones's approval and @hpenedones is out, I will close this PR and open a new one.


Failed to restart vespa server

Hi,
We add a content cluster to the online cluster, and vespa told us the to restart the service. We found an IO exception sometimes after vespa service restarts.  It seems that vespa can't find the document directory, however the directory exists in our server.

1567050444.865199       n28-020-206.byted.org   2369130 searchnode2     stderr  warning terminate called after throwing an instance of 'vespalib::IoException'
1567050444.865235       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   what():  IoException: NOT FOUND: Failed to list directory './var/db/vespa/search/cluster.aweme_video_tail/n0/documents' at listDirectory in /data00/home/bianyunlong/vespa/vespa/vespalib/src/vespa/vespalib/io/fileutil.cpp:757
1567050444.865262       n28-020-206.byted.org   2369130 searchnode2     stderr  warning Backtrace:
1567050444.865269       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/lib64/libvespalib.so(vespalib::IoException::IoException(vespalib::stringref, vespalib::IoException::Type, vespalib::stringref, int)+0x46) [0x7f8bd63d42e6]
1567050444.865279       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/lib64/libvespalib.so(vespalib::listDirectory(vespalib::small_string<48u> const&)+0x3d7) [0x7f8bd63334b7]
1567050444.865287       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/sbin/vespa-proton-bin(proton::ProtonDiskLayout::initAndPruneUnused(std::set<proton::DocTypeName, std::lessproton::DocTypeName, std::allocatorproton::DocTypeName > const&)+0x107) [0x577ff7]
1567050444.865296       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/sbin/vespa-proton-bin(proton::ProtonConfigurer::pruneInitialDocumentDBDirs(proton::ProtonConfigSnapshot const&)+0x1dc) [0x57389c]
1567050444.865305       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/sbin/vespa-proton-bin(proton::ProtonConfigurer::applyConfig(std::shared_ptrproton::ProtonConfigSnapshot, std::shared_ptrvespalib::ThreadStackExecutorBase, bool)+0x4a3) [0x574c73]
1567050444.865314       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/sbin/vespa-proton-bin() [0x575014]
1567050444.865322       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/lib64/libvespalib.so(vespalib::ThreadStackExecutorBase::run()+0xb6) [0x7f8bd63e0e66]
1567050444.865331       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/lib64/libvespalib.so(vespalib::unnamed_nonblocking_executor(vespalib::Runnable&)+0x9) [0x7f8bd63df679]
1567050444.865339       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/lib64/libfastos.so(FastOS_ThreadInterface::Hook()+0x113) [0x7f8bd61fd7c3]
1567050444.865347       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/lib64/libfastos.so(FastOS_ThreadHook+0x9) [0x7f8bd61fd969]
1567050444.865353       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /opt/tiger/vespa/lib64/vespa/malloc/libvespamalloc.so(+0x532b) [0x7f8bd901a32b]
1567050444.865359       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /lib/x86_64-linux-gnu/libpthread.so.0(+0x8064) [0x7f8bd5dcc064]
1567050444.865366       n28-020-206.byted.org   2369130 searchnode2     stderr  warning   /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f8bd1ff663d]
1567050445.054475       n28-020-206.byted.org   2364207/8204    config-sentinel config-sentinel.service event   crash/1 name="searchnode2" pid=2369130 signal="Aborted"
1567050445.054509       n28-020-206.byted.org   2364207/8204    config-sentinel config-sentinel.service info    searchnode2: incremented restart penalty to 62 seconds
1567050445.054518       n28-020-206.byted.org   2364207/8204    config-sentinel config-sentinel.service info    searchnode2: incremented restart penalty to 126 seconds
1567050445.054525       n28-020-206.byted.org   2364207/8204    config-sentinel config-sentinel.service info    searchnode2: will delay start by 125 seconds
1567050455.062743       n28-020-206.byted.org   2369329/8204    config-sentinel config-sentinel.service event   starting/1 name="searchnode"
1567050455.225110       n28-020-206.byted.org   2369329/36707   searchnode      proton.proton.server.bootstrapconfigmanager     info    Filedistributorrpc config is changed
1567050455.363732       n28-020-206.byted.org   2369329/36707   searchnode      proton.translogserverapp        config  configure Transaction Log Server tls at port 19113
1567050458.271537       n28-020-206.byted.org   2364399 container       stdout  info    [51.960s][info][gc] GC(9) Pause Young (Normal) (G1 Evacuation Pause) 380M->126M(4096M) 6.254ms
1567050469.231122       n28-020-206.byted.org   2369329 searchnode      stderr  warning terminate called after throwing an instance of 'vespalib::IoException'
1567050469.244523       n28-020-206.byted.org   2369329 searchnode      stderr  warning   what():  IoException: NOT FOUND: Failed to list directory './var/db/vespa/search/cluster.aweme_video_index_v2/n0/documents' at listDirectory in /data00/home/bianyunlong/vespa/vespa/vespalib/src/vespa/vespalib/io/fileutil.cpp:757
1567050469.244547       n28-020-206.byted.org   2369329 searchnode      stderr  warning Backtrace:
1567050469.244554       n28-020-206.byted.org   2369329 searchnode      stderr  warning   /opt/tiger/vespa/lib64/libvespalib.so(vespalib::IoException::IoException(vespalib::stringref, vespalib::IoException::Type, vespalib::stringref, int)+0x46) [0x7f651e4ba2e6]
1567050469.244561       n28-020-206.byted.org   2369329 searchnode      stderr  warning   /opt/tiger/vespa/lib64/libvespalib.so(vespalib::listDirectory(vespalib::small_string<48u> const&)+0x3d7) [0x7f651e4194b7]
1567050469.244567       n28-020-206.byted.org   2369329 searchnode      stderr  warning   /opt/tiger/vespa/sbin/vespa-proton-bin(proton::ProtonDiskLayout::initAndPruneUnused(std::set<proton::DocTypeName, std::lessproton::DocTypeName, std::allocatorproton::DocTypeName > const&)+0x107) [0x577ff7]
1567050469.244574       n28-020-206.byted.org   2369329 searchnode      stderr  warning   /opt/tiger/vespa/sbin/vespa-proton-bin(proton::ProtonConfigurer::pruneInitialDocumentDBDirs(proton::ProtonConfigS

Thanks for reporting. Could you share a bit more about your installation:

Which version of Vespa are you running ?
How was this version installed ? (The tiger in /opt/tiger/vespa/lib64/libvespalib.so looks suspicious)
Have you explicitly set any Vespa related environment variables prior to starting Vespa on the nodes ?

Thanks for reply.

7.0.0. I compile vespa on my server with master branch.
I specified install path to be /opt/tiger when building vespa.
No. Following is my conf/vespa.default-env.txt.

fallback VESPA_HOME /opt/tiger/vespa
override VESPA_USER tiger
override VESPA_UNPRIVILEGED no

Some follow up questions:

Do you use Docker in any way to run Vespa (e.g. mapping something under /opt/tiger into Docker containers) ?
Which tag or ref did you use for the git checkout for the source code in question ?

I will try to reproduce your observed issues. If you have checked out the source code HEAD at an arbitrary point in time please do not continue with this practice unless it is for Vespa development. Please use the release tags in https://github.com/vespa-engine/vespa/releases which are the tags of official open source releases. These are well tested in production in Verizon Media. It will also make it easier for us to track down reported bugs as we can use the exact same source code for analysis.

No, we run Vespa on server directly.
vespa-7.9.16-1
I do make with my own account and do make install as tiger.
I started vespa with systemd. I tried to restart service with thee scripts, and same error occurs.

I have compiled and installed the same version, loaded an application, fed data and restarting the service. But, I can not reproduce the behaviour you are seeing. It would be useful to look at your systemd scripts that you use.
If you started Vespa with systemd, but manually tried to stop and start with the scripts in /opt/tiger/vespa/bin, this could be an issue. Systemd will detect that the service stopped and tried to restart at the same time you restarting manually. Not sure if this is the case, but if you use systemd you should always use systemctl restart <name of your Vespa service>.
Also if you execute scripts manually, try to set ``èxport VESPA_HOME=/opt/tiger/vespa``` to see if that makes the problem go away.
Final recommendation is to use the current Vespa RPM and install it the same way as we do in our published Docker image:
https://github.com/vespa-engine/docker-image/blob/master/Dockerfile

I tried to set VESPA_HOME=/opt/tiger/vespa and it doesn't work.
This error only occurs on a few servers. And If I remove the var directory and redeploy application,  vespa could start.

Ok. Without having access to all the systemd scripts and your exact commands executed when you restart Vespa, it is difficult to figure out what is going on here. Also, the version of Vespa is quite old. My next suggestion would be to upgrade to the Vespa version to the current vespa-7.99.22-1 to see if the problem is still there.

https://docs.vespa.ai/en/operations/multinode-systems.html#aws-ec2 is updated with systemctl start/stop examples


Update gocode

This PR removes old gocode from nsf and adds gocode from mdempsky.  Any cache is not added yet, there are failing unit tests which I'm working on.

thanks! Just ping when CI is happy and you want a review.

@keegancsmith

I fixed tests and added some todos for feature work since gocode doesn't support some of them like imports autocomplete, builtin global functions autocomplete...
Some autocomplete tests are failing for go 1.8 since gocode dropped support for go 1.8 https://github.com/mdempsky/gocode/commit/4389b7c629e69da9a14ec72dc06f3f37fcea1e00 Should we consider dropping go 1.8 support in langserver (make sense to me)?

Yup dropping support of go1.8 sounds good to me. If I am not mistaken most tooling aims to support the last 2 minor releases. Do you mind changing the travis config to be "1.10.x" and "1.11.x" in this PR?

Finally took a look at the PR. You are removing functionality that was added in that is relied on, like SetBuildContext and InitDaemon. You should just be able to keep export.go, I believe that was added to export the functionality we hook into.
I also see there are lots of tests you have now commented out. Anyidea why they are breaking? Could it be due to the change in SetBuildContext, or is it just due to how much this fork of gocode has diverged from upstream?

If you could update the failing tests that would be great, then I'll merge in.

Sure I will luck at these failing tests, but some tests are failing since gocode doesn't support imports autocomplete, I thought it is better if I add this feature on separate PR or do you want me to add it in this PR?

Another PR works for me.

@keegancsmith Can you have a look now, I added Builtin: true flag and updated some tests which was not working before.

@lloiser @keegancsmith I finally found why completion tests was not working with BinaryCache.

Since I'm on macOS my GOOS is darwin, tests was using hardcoded linux. I changed tests to use runtime.GOOS instead.
Gocode has support for gb pased projects and there was a bug with importPaths, which I fixed in separate commit.

I never used https://getgb.io/, but I'm not sure if we should support that. I would rather drop gb support since custom GOPATH is a easy solution to someone who want to have project based workflow.


Remove vertical scroll from main map container

Right now there's a slight vertical scroll for the main map container. This is because the map view is sized using 100vh, which doesn't account for the height of the navbar.
We should redo the structure of the page to make the the main wrapper a column-oriented flex container, with the navbar taking up its fixed height and the main container growing to fill the rest of the available space.

Actually I also have a horizontal one

Seems fixed?

Seems fixed?

Nope. It's just easy to not see it since the map takes over the scroll for zooming if your mouse is over it. Put your mouse over the navbar and scroll down to see it.

Indeed!

I'll take a shot at this after #54 is closed!
I also noticed a slight horizontal scroll as well. I'll try fix both in my PR.

I'll take a shot at this after #54 is closed!
I also noticed a slight horizontal overflow as well. I'll try fix both in my PR.

I actually have some code for this already @SimplyBallistic, let's make it part of a separate PR to keep concerns separated.

I just added a PR with the code I had on a previous branch: #79. Feel free to look at that and make sure it works on your system too?


Software Dev: Hello World in Kotlin

This is a very simple program and I just thought of expanding the archive to include solutions in Kotlin.
Pls allot @csendranshi @clare0901 @orvil1026


Cannot install/run anything

You cannot install or run any library/application in the monorepo due to @slimevr/common being missing from the NPM registry.

Installing from the git repository also fails due to workspace:*

Fixed by 96b22a99bc22f14c6801a448dae2d7ee1dddcfd7.
As to why you couldn't install from git: this repository contains a PNPM workspace, which aren't supported by vanilla NPM. I recommend you to use pnpm yourself since it's install speed is vastly superior to vanilla NPM, not even mentioning the better module caching.


Update repository size on cron gc task

git gc cron could change the size of the repository therefore we should update the
size of the repo stored in our database.
Also significantly improve the efficiency of counting lfs associated with the
repository
Fix #14682
Signed-off-by: Andrew Thornton<EMAIL_ADDRESS>

Codecov Report

Merging #15177 (467e294) into master (290cf75) will increase coverage by 0.15%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##           master   #15177      +/-   ##
==========================================
+ Coverage   43.38%   43.54%   +0.15%
==========================================
  Files         668      668
  Lines       80620    80624       +4
==========================================
+ Hits        34980    35107     +127
+ Misses      39946    39809     -137
- Partials     5694     5708      +14

Impacted Files
Coverage Δ

modules/repository/check.go
0.00% <0.00%> (ø)

models/repo.go
53.72% <100.00%> (-0.09%)
:arrow_down:

modules/util/timer.go
42.85% <0.00%> (-42.86%)
:arrow_down:

modules/util/remove.go
65.38% <0.00%> (-15.39%)
:arrow_down:

models/lfs.go
17.92% <0.00%> (-4.72%)
:arrow_down:

modules/process/manager.go
72.83% <0.00%> (-2.47%)
:arrow_down:

services/pull/pull.go
42.82% <0.00%> (-0.49%)
:arrow_down:

models/error.go
38.57% <0.00%> (+0.47%)
:arrow_up:

models/repo_list.go
78.76% <0.00%> (+0.88%)
:arrow_up:

services/pull/check.go
26.02% <0.00%> (+2.05%)
:arrow_up:

... and 5 more

Continue to review full report at Codecov.

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

🚀

Related regression: https://github.com/go-gitea/gitea/issues/15634


[Azure SDK Storage] Update to 12.1.0

Update vcpkg ports for Azure SDK release. This release may contain multiple ports.

Thanks for your contribution!


release 4.4 - git plugin - java.lang.NoSuchMethodError: 'org.eclipse.jgit.lib.Ref org.eclipse.jgit.lib.Repository.getRef'

In release 4.4. the installed Git plugins has a problem that causes an exception with pipelines from SCM. Problem is probably caused by incompatibility between installed plugins:

git-client:3.0.0
git:3.9.3
See related ticket: https://issues.jenkins-ci.org/browse/JENKINS-53004?focusedCommentId=389294&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-389294

Effected container image:
https://catalog.redhat.com/software/containers/detail/5cdd918ad70cc57c44b2d279?tag=v4.4.0-202005121717&architecture=amd64
The issue is probably fixed on master, so it will be fixed in later releases, but the current 4.4 (latest) release is effected.

Hi @bszeti , thanks for reporting this, we will have a look at it


Create Homepage

[x] Add information for banners in the homepage
[ ] Style the homepage

@MauricioDinki
Project category name must be in spanish. It is also necessary to include the project id so that the 'conoce más' button could work.

@AlanSanchezP You need to run the command python manage.py compilemessages -l es to compile the traductions

@MauricioDinki
Banner description length is too short to put the descriptions that are in the PDF's.


vec() for a UnitfulDimMatrix doesn't return any information about units

Is this the preferred behavior? I was also thinking about a function along the lines of the following that would return a Vector{Quantity} with the correct units attached.

import Base:vec

function vec(mat::UnitfulDimMatrix)
    return vec([mat[i, j]unitrange(mat)[i]/unitdomain(mat)[j] for i in 1:first(size(mat)), j in 1:last(size(mat))])
end

function looks good or you could use the Quantity constructor. I don't think this will break anything else, but keep an eye on the tests if you get a chance to try it

my less elegant solution
"""
    function vec(A::AbstractUnitfulType)

    return a Vector{Quantity}
    note ambiguity whether this function should return a Vector{Quantity} or an `AbstractUnitfulType` with one column

# Arguments
- `A::AbstractUnitfulType`: input matrix
"""
function Base.vec(A::AbstractUnitfulType)
    qn = vec(parent(A))
    ur = unitrange(A)
    ud = unitdomain(A)
    qu = vec([ur[i]/ud[j] for i in 1:first(size(A)), j in 1:last(size(A))])
    return Quantity.(qn,qu)
end

I think that this doesn't work for a 1D UnitfulMatrix, see following example
julia> using Unitful, UnitfulLinearAlgebra
[ Info: Precompiling UnitfulLinearAlgebra [c14bd059-d406-4571-8f61-9bd20e53c30b]

julia> x = UnitfulMatrix(rand(5)u"K")
5-element UnitfulMatrix{Float64,1}
  0.901478 K
 0.0830108 K
  0.479585 K
  0.479013 K
   0.44052 K

julia> vec(x)
ERROR: BoundsError: attempt to access 1-element Vector{Unitful.FreeUnits{(), NoDims, nothing}} at index [2]

Looks to me like the issue is that size(x) returns (5,), so both first and last return 5. Would it be okay if, instead of iterating over size(x) we iterate over the size of the unitdomain and range? New method would look like
function Base.vec(A::AbstractUnitfulType)
    qn = vec(parent(A))
    ur = unitrange(A)
    ud = unitdomain(A)
    qu = vec([ur[i]/ud[j] for i in 1:first(size(ur)), j in 1:last(size(ud))])
    return Quantity.(qn,qu)
end

updated in PR #72


[dap] Don't use --start-paused when running in Profile/Release mode

This change mirrors a fix made in the legacy VS Code extension DAP for https://github.com/Dart-Code/Dart-Code/issues/3838.
The issue is that we were using --start-paused in profile mode which would cause a short delay when new isolates were spawned (because they would start paused and wait for us to unpause them). For some measurements of time (including a simple stopwatch) this could make code that uses isolates appear to be slower than it really is.
There was no need to use --start-paused for profile mode since debugging functionality is disabled (so we are not concerned about races in setting up breakpoints, etc.) so this simple skips it in those cases.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@christopherfujino there doesn't seem to be much info about the failure here:
https://ci.chromium.org/ui/p/flutter/builders/try/Mac framework_tests_misc/13487/overview

https://ci.chromium.org/ui/p/flutter/builders/try/Mac framework_tests_misc/13487/overview

I'm guessing this was an infra failure, the swarming task page just says "bot died" https://chromium-swarm.appspot.com/task?id=593f4101f7b6cb10&o=true&w=true


Add remove functions implementation

Phase 2, create and remove books

[x] Configuring the Redux Store
[x] Write book's actions and reducer
[x] In the React component responsible for adding new books set the data inputs in the local React state (set title and author - NOTE: categories and comments are NOT part of this step). Once your new book object is ready to be submitted to Redux store, dispatch a corresponding action.
[x] In the React component responsible for removing books - implement that event by dispatching a corresponding action.
[x] Use the redux-logger to check if your application is working correctly - Open your browser's console and look for the logger messages. Upon every action dispatch, the logger will print:

[x] prev state - the state of the whole Redux store before the current action was dispatched.
[x] action - the action object that is being dispatched.
[x] next state - the state of the Redux store after the current action was dispatched.

Thanks for your comment and recommendations. All the required changes have been implemented.


Fixing the "clusterclick" firing event generation.

There is a problem with determining the dragging of the map. The new code fixes it.

I signed it!


⚠ Avatar API Endpoint has degraded performance

In 5fbff3a, Avatar API Endpoint (https://avatar.roblox.com/v1/avatar-rules) experienced degraded performance:

HTTP code: 200
Response time: 5736 ms

Resolved: Avatar API Endpoint performance has improved in 8415a45 after 11 minutes.


Setup Github Actions

Create an action that runs at each PR

Installs ImageMagick
Run python3 sample.py

@faruktoptas @hrfee
Can you assign this to me.


pool_kernal_size error!

When I want to change the crop size of coco_dataset according to your config file, I found that there is an unexpected error.
pool__kernal_size must be divisible by the shape of inputs Input size:[40:80] pool_kernal_size[80,80]

And I try to trace the input image but find it wasnot cropped in the correct size.
However, when I set the crop size to 640*640, it works.

I wonder if you have achieved the crop with pad? I think this error is about crop


Document option to use Traefik for Ingress

Closing this pull request because Craig said no docs change is needed


[Bug] Directory permissions conflict, sensor publish feature

Hello AWS IoT,
I'm trying to implement the sensor publish feature using an EC2 machine as a mock device. The OS is Ubuntu 22.04.
I'm getting a permissions conflict that I believe is a bug. The conflict is regarding the permissions to the directory that contains the unix socket server, in my case /tmp/sensors/. Here's how it looks:

"cpu" is the socket server file.
If the permissions to said directory is different from 660, the device client doesn't start and throws an error. Something like "desired: 660, actual: 700".
However, my "server.py" script needs execute access to the socket server, otherwise I get this:

I know for a fact the problem is the "x" permission. If I change the permissions of /tmp/sensors/ to 700, server.py works perfectly. But then the device client doesn't start.
I'm thinking that permissions to /tmp/sensors/ the device client checks for should be 7XX, in line with every other directory permissions as per the image below:

Please advise and correct as needed.
Also please confirm that the permissions for the socket server file "cpu" are really 660.
Thanks!

Hello, thanks for reaching out! We actually ran into the same problem while testing and recently merged a PR that I believe should fix your issue: https://github.com/awslabs/aws-iot-device-client/pull/285
So to confirm, the "cpu" file should still be 660. The directory /tmp/sensors/ should be 700. Please let me know if it works after checking out the latest commit of device client.
Regards,
Roger

Hello Roger,
Thanks for the quick reply.
It seems we're not there yet, even with the latest commit checked out:

Also please note that I changed the sensors directory to /home/ubuntu/dc/sensors/. I don't expect that to be a problem. Still getting the same error:

Mistakenly closed, reopening.

@jos3neto Double check your config file and see if "addr" is the full filepath of your socket server file.
It should be something like this: "addr": "/tmp/sensors/my-sensor-server-file"
Not just the directory the contains the file, so not this: "addr": "/tmp/sensors/"

@RogerZhongAWS Here's the complete sensor publish config:

I see, thanks for sharing that. We will look into this further and see if we can make this work with a python script.
Regards,
Roger

Hello, sorry for the late update.
After looking into this again, I still cannot see where device client is failing to validate these permissions correctly. There is only one place in the source code where we perform this check and AFAIK, we have separated the required permissions between the file and directory in #285. The documentation has also been updated to match.
I will keep testing to make sure, but so far I have not been able to reproduce this issue myself.


IMN 538 - Fix user info fetch during contract creation

Closes IMN-538
From scala counterpart https://github.com/pagopa/interop-be-agreement-process/pull/263

I double checked, the same question I left here applies to the fix on the Scala code cc @nttdata-rtorsoli & @galales / @beetlecrunch


SQLAdapter installation failed

SQLAdapter Installation failed at the end.
VERBOSE: Check https://SQLAdapter.dbadapter.gtnckr.vcloud.vidiacloud.com:44300
WARNING: Can not execute [Test-ResourceProviderEndpoint] command at 9 time(s). Will retry. The error: System.Management.Automation.RuntimeException: Microsoft.S
QLAdapter.Admin endpoint is not responsive
VERBOSE: Check https://SQLAdapter.dbadapter.gtnckr.vcloud.vidiacloud.com:44300
WARNING: Can not execute [Test-ResourceProviderEndpoint] command at 10 time(s). Will retry. The error: System.Management.Automation.RuntimeException: Microsoft.
SQLAdapter.Admin endpoint is not responsive
VERBOSE: Check https://SQLAdapter.dbadapter.gtnckr.vcloud.vidiacloud.com:44300
VERBOSE: 16.14.03 :
VERBOSE: 16.14.03 : **************************************************************************************************************************
VERBOSE: 16.14.03 : SQLAdapter installation failed. Check logfile C:\Temp\MSSQLRP\Logs\DeploySQLProvider.ps1_20180517-153159.txt for details
VERBOSE: 16.14.03 : **************************************************************************************************************************
Transcript stopped, output file is C:\Temp\MSSQLRP\Logs\DeploySQLProvider.ps1_20180517-153159.txt
C:\Temp\MSSQLRP\DeploySQLProvider.ps1 : Can not execute [Test-ResourceProviderEndpoint] command. The error: System.Management.Automation.RuntimeException: Micr
osoft.SQLAdapter.Admin endpoint is not responsive
At line:1 char:1

.\MSSQLRP\DeploySQLProvider.ps1

  + CategoryInfo          : NotSpecified: (:) [Write-Error], RuntimeException
  + FullyQualifiedErrorId : System.Management.Automation.RuntimeException,DeploySQLProvider.ps1

Environment information:
Azurestack integrated system : 1803
MSSQLRP  : <IP_ADDRESS>
i have SQL IaaS Extention version <IP_ADDRESS> and <IP_ADDRESS> donwloaded in my azurestack integrated system.
Please Help...
Thank you,
Arie Apriadi

@arieapriadi Could you provide us with the link to the document you are referring to for installtion ?

@SaurabhSharma-MSFT i follow the guidance from this link:
https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-sql-resource-provider-deploy

Reference:

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

ID: 31804a1d-4c4f-70e6-556c-66c533e9b3e3
Version Independent ID: 78f9ac38-1463-c263-2add-63d7dcaab0bc
Content: Using SQL databases on Azure Stack
Content Source: articles/azure-stack/azure-stack-sql-resource-provider-deploy.md
Service: azure-stack
Product: unspecified
GitHub Login: @jeffgilb
Microsoft Alias: jeffgilb

Hi there, unfortunately we cannot provide technical support via these GitHub issues. I encourage you to visit the Azure Stack forum at https://social.msdn.microsoft.com/Forums/en-US/home?forum=azurestack or to open a service ticket for technical support.

@please-close

@arieapriadi We will now proceed to close this thread. If there are further questions regarding this matter, please go to the MSDN Azure Stack Forum to present this issue or create a service ticket with Azure Support.
Regards,
Mike


FirstPayment amount seems to be ignored

Hello @sandervanhooft
Something came up when I was debugging the other issue. I have set the value of the firstpayment amount very low.
/**
         * The default amount for a first payment. Can be overridden per Plan.
         */
        'amount' => [

            /**
             * A string containing the exact amount you want to charge for the first payment, in the given currency.
             * Make sure to set the right amount of decimals. Non-string values are not accepted by Mollie.
             */
            'value' => '0.10',

            /**
             * An ISO 4217 currency code. The currencies supported depend on the payment methods that are enabled on
             * your Mollie account.
             */
            'currency' => 'EUR',
        ],

And this is the value of the plan I provide:
/**
     * The subscription plans.
     */
    'plans' => [

        /**
         * The plan reference.
         */
        'membership' => [

            /**
             * The amount to be billed each billing cycle.
             */
            'amount' => [

                /**
                 * A string containing the exact amount you want to charge each billing cycle, in the given currency.
                 * Make sure to set the right amount of decimals. Non-string values are not accepted by Mollie.
                 */
                'value' => '4.99',

                /**
                 * An ISO 4217 currency code. The currencies supported depend on the payment methods that are enabled on
                 * your Mollie account.
                 */
                'currency' => 'EUR',
            ],

https://i.gyazo.com/61dd25e5a9b7263c0fc337534c44a1a6.png (Visual aid)
When looking at these test payments I noticed that all these payments amounted to €4.99 which is the plan amount. I'm wondering if these should be amounting to €0.10 since they're all first payments (since a mandate wasn't generated).

By default the subscription amount is used, unless a trial period has been set. Then the first payment amount is used.

Also note that there are absolute minimums for the subscription amounts, especially relevant when using creditcard: https://help.mollie.com/hc/en-us/articles/115000667365-What-are-the-minimum-and-maximum-amounts-per-payment-method

I see, thanks for clearing that out!