How to use azureServiceTokenProvider = new AzureServiceTokenProvider("RunAs=App;AppId={clientId}") to fetch access token to access any of the azure resources

I tried fetching the access token to access all resources in azure using
azureServiceTokenProvider = new AzureServiceTokenProvider("RunAs=App;AppId={clientId}");
serviceCreds = new TokenCredentials(await azureServiceTokenProvider.GetAccessTokenAsync("https://management.azure.com").ConfigureAwait(false));
But I get an exception
Connection String: RunAs=App;AppId="ClientId of user managed identity", Resource: https://management.azure.com, Authority: . Exception Message: Tried to get token using Managed Service Identity. Unable to connect to the Managed Service Identity (MSI) endpoint.

@divyamoorthyTR, Can you please share the Microsoft doc that you are referring to while trying this out, so that we can align the best team to help you further.

I am referring https://docs.microsoft.com/en-us/azure/key-vault/service-to-service-authentication#running-the-application-using-managed-identity-or-user-assigned-identity and https://docs.microsoft.com/en-us/azure/key-vault/service-to-service-authentication#connection-string-support to fetch access token using user managed identity

@divyamoorthyTR  We would suggest you to open a Technical Support Ticket with us on this as we would need access to the environment as this requires deeper troubleshooting.


Outdated information

The screens used here no longer exist in the product.  Please update to show the new query functionality.

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

ID: 6ec49198-bda6-5138-159f-f80ef187b9b0
Version Independent ID: 62bb765d-10f1-f04b-d293-6184be709b02
Content: Visibility into cloud app accounts
Content Source: CloudAppSecurityDocs/accounts.md
Service: cloud-app-security
GitHub Login: @dcurwin
Microsoft Alias: dacurwin

Thanks for your suggestion. We'll investigate and get back to you.

Thanks again for your suggestion. We've updated the images.


Move a heap to a new thread?

I'm currently using mi_heap_new as a kind of arena allocator
It works very well when allocations only occur on a single thread
What do you suggest doing if the data needs to move to another thread? By "move", I mean arrays potentially need to be re-allocated on a different thread than the one it was created on.
The specific usecase is an HTTP server where most requests are processed by one thread, but if it's a websocket connection or a connection which will need to run some JavaScript, it runs that in a separate thread

In case it helps, here's the code for the arena allocator (zig lets you pass in memory allocators to most functions)
const mem = @import("std").mem;
const builtin = @import("std").builtin;
const std = @import("std");

const mimalloc = @import("./allocators/mimalloc.zig");
const Environment = @import("./env.zig");
const FeatureFlags = @import("./feature_flags.zig");
const Allocator = mem.Allocator;
const assert = std.debug.assert;

pub const Arena = struct {
    heap: *mimalloc.mi_heap_t = undefined,

    pub fn backingAllocator(this: Arena) Allocator {
        var arena = Arena{ .heap = this.heap.backing() };
        return arena.allocator();
    }

    pub fn allocator(this: Arena) Allocator {
        return Allocator{ .ptr = this.heap, .vtable = &c_allocator_vtable };
    }

    pub fn deinit(this: *Arena) void {
        mimalloc.mi_heap_destroy(this.heap);
    }

    pub fn reset(this: *Arena) void {
        this.deinit();
        this.* = init() catch unreachable;
    }

    pub fn init() !Arena {
        return Arena{ .heap = mimalloc.mi_heap_new() orelse return error.OutOfMemory };
    }

    pub fn gc(this: Arena, force: bool) void {
        mimalloc.mi_heap_collect(this.heap, force);
    }

    // Copied from rust
    const MI_MAX_ALIGN_SIZE = 16;
    inline fn mi_malloc_satisfies_alignment(alignment: usize, size: usize) bool {
        return (alignment == @sizeOf(*anyopaque) or
            (alignment == MI_MAX_ALIGN_SIZE and size > (MI_MAX_ALIGN_SIZE / 2)));
    }

    fn alignedAlloc(heap: *mimalloc.mi_heap_t, len: usize, alignment: usize) ?[*]u8 {
        if (comptime FeatureFlags.log_allocations) std.debug.print("Malloc: {d}\n", .{len});

        // this is the logic that posix_memalign does
        var ptr = if (mi_malloc_satisfies_alignment(alignment, len))
            mimalloc.mi_heap_malloc(heap, len)
        else
            mimalloc.mi_heap_malloc_aligned(heap, len, alignment);

        return @ptrCast([*]u8, ptr orelse null);
    }

    fn alloc(
        arena: *anyopaque,
        len: usize,
        alignment: u29,
        len_align: u29,
        return_address: usize,
    ) error{OutOfMemory}![]u8 {
        _ = return_address;
        assert(len > 0);
        assert(std.math.isPowerOfTwo(alignment));

        var ptr = alignedAlloc(@ptrCast(*mimalloc.mi_heap_t, arena), len, alignment) orelse return error.OutOfMemory;
        if (len_align == 0) {
            return ptr[0..len];
        }

        // std.mem.Allocator asserts this, we do it here so we can see the metadata
        if (comptime Environment.allow_assert) {
            const size = mem.alignBackwardAnyAlign(mimalloc.mi_usable_size(ptr), len_align);

            assert(size >= len);
            return ptr[0..size];
        } else {
            return ptr[0..mem.alignBackwardAnyAlign(mimalloc.mi_usable_size(ptr), len_align)];
        }
    }

    fn resize(
        _: *anyopaque,
        buf: []u8,
        buf_align: u29,
        new_len: usize,
        len_align: u29,
        return_address: usize,
    ) ?usize {
        _ = buf_align;
        _ = return_address;

        if (new_len <= buf.len) {
            return mem.alignAllocLen(buf.len, new_len, len_align);
        }

        const full_len = mimalloc.mi_usable_size(buf.ptr);
        if (new_len <= full_len) {
            return mem.alignAllocLen(full_len, new_len, len_align);
        }

        return null;
    }

    fn free(
        _: *anyopaque,
        buf: []u8,
        buf_align: u29,
        return_address: usize,
    ) void {
        _ = buf_align;
        _ = return_address;
        mimalloc.mi_free(buf.ptr);
    }
};

const c_allocator_vtable = Allocator.VTable{
    .alloc = Arena.alloc,
    .resize = Arena.resize,
    .free = Arena.free,
};

What you could try is to use more than one heap, basically one for each involved thread...
It looks as if destroying a heap can be done on any thread, so you could get rid off all those heaps at once when you're finished. Haven't tried that myself though...


How to completely delete pending registration account?

Some robot tried to register on my server, this robot didn't pending registration. I remove this account, but there was a footprint left of him:

(all of 3 current registered accounts are confirmed)
Also in /admin/channels/ there is only 3 channels now.
How to completely delete pending registration account and all his tracks?

This was a bug and is already fixed in dev branch. The pending registration count will cleanup itself.

@git-marijus i updated Hubzilla to 3.4:

Is this fix not included in the release?
Please indicate me on this commit, i try to clean 'pending registration count' manually.

@git-marijus
Switched on dev branch today, it looks that is not fixed:

Same here:

I've submitted a patch

@zotlabs Now fine:

Thanks!

Here also. Thanks Mike.


On safari when clicking on assets it always takes me to the video component (last component)

Bug🐛: On safari when clicking on assets it always takes me to the video component (last component)
Page: https://next.carbondesignsystem.com/libraries/ibmdotcom-web-components/latest/assets (not specific to this page)
Browser: Safari
Suggestion: looks like the video anchor link is taking over the whole page
Originally posted by @ariellalgilmore in https://github.com/carbon-design-system/carbon-platform/discussions/1268#discussioncomment-3684144

Hey team! Please add your planning poker estimate with Zenhub @andreancardona @francinelucca @jdharvey-ibm


Something wrong with 64-bit compilation.

Great FGTranslator, but doesn't compile with 64-bit architecture. Is it possible to fix it?

@sarslander what kind of error are you seeing? The demo supports arm64, armv7, and armv7s architectures. Can you run it?

if I set 'Build for active architecture' to NO
Undefined symbols for architecture arm64:
"OBJC_CLASS$_TMCache", referenced from:
objc-class-ref in FGTranslator.o
"OBJC_CLASS$_AFXMLParserResponseSerializer", referenced from:
objc-class-ref in FGTranslateRequest.o
"OBJC_CLASS$_AFJSONResponseSerializer", referenced from:
objc-class-ref in FGTranslateRequest.o
"OBJC_CLASS$_AFHTTPRequestOperation", referenced from:
objc-class-ref in FGTranslateRequest.o
"OBJC_CLASS$_SVProgressHUD", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I set 'Build Active architecture Only' to YES, the demo works fine

'Build Active architecture Only' is set to YES for Debug and NO for Release. Release builds should work fine. Is there a reason why you're changing the YES setting for Debug?

reinstall pod and the problem gone. Thanks for the great library!

Thanks @sarslander , glad it works. :)
Looks like Cocoapods changes the active architecture when installing pods: http://guides.cocoapods.org/using/troubleshooting.html#running-into-build-failures-after-migrating-to-xcode-5-and-cocoapods-0.25.0. Search for "ONLY_ACTIVE_ARCH" in the link above if you're curious.


Add a license to the project

Since this is an open source project, it should have some sort of license.
Currently, the package.json file states that the projects is licensed under the ISC license, but there is no license file in the project.
I'd suggest to either:

Add the full ISC license to the project, preferably in a file named license.

Choose a different license. For more info on choosing licenses, I recommend checking out Choose a License.

Thanks @itaisteinherz, you are right, we need to add a license to the project. I see no reason not to choose the ISC license, which is the default with npm init. Any reason you can think of why we should choose a different one?

I usually use the MIT license for my personal projects, but I see no real reason to prefer it instead of the ISC license (although I'm not a lawyer, and my knowledge is basically limited to googling the subject).
This excerpt from Choose a License sums it up quite well:

The ISC license is functionally equivalent to the BSD 2-Clause and MIT licenses, removing some language that is no longer necessary.

Yes, I also usually use the MIT license, but see no reason not to just go ahead with the ISC one in this case. I'm a bit busy with work related things the rest of the week, but I'll go ahead and add the license this weekend. Thanks again @itaisteinherz!

The license has been added: https://github.com/benhayehudi/pronoun_highlighter/commit/6afacab00eae5a9ab7395f8f9cb5432fc9e09d73. Thanks again for bringing this up and ensuring it happened.

I've opened #14 to make some license-related meta improvements.


Fix autocomplete issue when multiple apps run autocomplete from etc/bash_completion.d directory

If there is more than 1 app that uses bash_autocomplete from /etc/bash_completion.d, the first one initialize PROG to it's name.
Then, for the others apps, PROG is already set so it's doesn't complete the right cli app.
I've just unset PROG variable to fix this issue.

Looks great, thank you @tbaud0n !


Wrong 'img_norm_cfg' setting

It seems that you used the wrong img_norm_cfg for the resnet50 (pytorch format).
It should be
img_norm_cfg = dict(
   mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)

Thank you for pointing out : ), we have updated the configs to use the right img_norm_cfg.

I  noticed that the img_norm_cfg  is the same to that of UniAD .   Could you please explain whether it will affect model's performance?


Add package dependency

Check the dependency and add necessary dependency that are used by autoware pakcages

When can this issue be closed? Are there any issues left?

I think can close this issue.
@taikitanaka3
What do you think?

@taikitanaka3


UI leftovers

Autocomplete for address in send TX screen
Replace old logo - in distr folder and in notifications
Replace old loader
Need design for offline banner

Do we need to add this to the list or is it done?

Replace old desktop and taskbar icon


Add eval to cli

@yardencsGitHub this works for me when testing but after thinking about it more, I think it is worth adding back learning curve functionality. All the other refactoring we've done will actually make it relatively painless I think.
Will take a stab at it today

I tested training with a BF and found something interesting.
After some training a checkpoint was saved when the accuracy improved on the validation set.
Then, in the next measurement the accuracy on the validation set did not improve  and the checkpoint was not saved (all good here).
But, in the next measurement the accuracy improved but was not better than 2 validations ago. Still, a checkpoint was saved.
This means that training may be saving a local optimum and not a global one.
On Apr 22, 2020, at 9:42 AM, David Nicholson<EMAIL_ADDRESS>wrote:
@yardencsGitHub https://github.com/yardencsGitHub this works for me when testing but after thinking about it more, I think it is worth adding back learning curve functionality. All the other refactoring we've done will actually make it relatively painless I think.
Will take a stab at it today
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/NickleDave/vak/pull/179#issuecomment-617786999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEEFWKJR5OGQKUNPPJFPF3LRN3X55ANCNFSM4MOFVD4A.

Do you have the log for that run and if so can you please raise an issue
and attach that log too it?
Not sure how this could happen, looking at the code right now
David Nicholson, Ph.D.
https://nicholdav.info/
https://github.com/NickleDave
Prinz lab http://www.biology.emory.edu/research/Prinz/, Emory University,
Atlanta, GA, USA
On Wed, Apr 22, 2020 at 12:17 PM yardencsGitHub<EMAIL_ADDRESS>wrote:

I tested training with a BF and found something interesting.
After some training a checkpoint was saved when the accuracy improved on
the validation set.
Then, in the next measurement the accuracy on the validation set did not
improve and the checkpoint was not saved (all good here).
But, in the next measurement the accuracy improved but was not better
than 2 validations ago. Still, a checkpoint was saved.
This means that training may be saving a local optimum and not a global
one.
On Apr 22, 2020, at 9:42 AM, David Nicholson<EMAIL_ADDRESS>wrote:
@yardencsGitHub https://github.com/yardencsGitHub this works for me
when testing but after thinking about it more, I think it is worth adding
back learning curve functionality. All the other refactoring we've done
will actually make it relatively painless I think.
Will take a stab at it today
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/NickleDave/vak/pull/179#issuecomment-617786999>, or
unsubscribe <
https://github.com/notifications/unsubscribe-auth/AEEFWKJR5OGQKUNPPJFPF3LRN3X55ANCNFSM4MOFVD4A

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/NickleDave/vak/pull/179#issuecomment-617879843, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AC3BTCTRMTMXTSUUOQXOUR3RN4KAVANCNFSM4MOFVD4A
.


PR statuses and review request / request changes

I have 2 inquires:

Is there a way to get all the statuses a PR went through (and not just the current one)? I would like to know when a PR was changed from draft to "ready for review" even if it's currently closed/merged.
Is there a way to get all review requests and request changes action of a PR? I would like to calculate the time the PR was waiting for the reviewer only.

Answered here: https://mergestatcommunity.slack.com/archives/C02KEJ5M7RA/p1698216244241099


Support dot-repeat, e.g. for d]g

huh, I came here exactly for this. dot repeatability would be nice indeed!

I'll take a look, see if this is possible. I implemented it for one of my other plugins - debugprint - https://github.com/andrewferrier/debugprint.nvim/blob/e555b35057373f9cd7bd2d2181f508ee5f885d6e/lua/debugprint/init.lua#L228 - but in that case I was handling the action, whereas this plugin is "just" for a textobj. So I'm not sure how to do that. Will need to take a look at it and see if it's possible.


[HttpClient] Display response bodies

Display the response bodies of HTTP client requests in the Web Services tab.  Assume (for now) minimal formatting (i.e. a text blob).

If we want to have better formatting (e.g. for JSON or XML, whether still text-based or object-based), the estimate will obviously go up accordingly.


docs: Radio Documentation

Closes #35

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

GitHub release
v1.0.0

Your semantic-release bot :package::rocket:


Top 5 errors/warnings in CI

fixes #5087

This change is

test-me-please

00:22:24.122  test/helpers/logutils/utils_test.go:21: ExampleLogErrorsSummaryEmpty refers to unknown identifier: LogErrorsSummaryEmpty

test-me-please

test-me-please

Coverage remained the same at ?% when pulling 7691e2029afb9312f7e7ffc9daf975f80610e9c8 on nebril:pr/nebril/ci-top-warnings into d2aec81683860d2bac208f6be04c4a14cda3521e on cilium:master.

@eloycoto I did not use sort.Slice because it requires you to use closure to define the less function, which is for me less explicit than implementing sort.Interface by the byImportance type.

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

/home/jenkins/workspace/Cilium-PR-Ginkgo-Tests-Validated/src/github.com/cilium/cilium/test/ginkgo-ext/scopes.go:339
Test Panicked
/usr/local/go/src/runtime/panic.go:502

test-me-please

test-me-please

@nebril Did you look into the failure? It seems real.

@tgraf yeah, the test panicked seems like it could be real, I am on it.

test-me-please

test-me-please

test-me-please

test-me-please


Cache Warmup with Annotations

I generate the _proxies, _annotations over the vendor/bin/warmup script.
Everything looks fine, but the annotation reader kills me.
PHP Fatal error:  Uncaught exception 'InvalidArgumentException' with message 'The directory "/var/www/api/data/cache/aop/_annotations" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.' in /var/www/api/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php:194

All _annotation files are generated with the script, this exception is not necessary.
Is it possible to use Annotations with the feature of a read-only cache dir?
Greetings Jan

It seems that the cache warmup is not generating all annotations.
I have the following annotation from the demoexample:
<?php
/**
 * Go! AOP framework
 *
 * @copyright Copyright 2012, Lisachenko Alexander<EMAIL_ADDRESS> *
 * This source file is subject to the license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Demo\Annotation;

use Doctrine\Common\Annotations\Annotation;

/**
 * @Annotation
 * @Target("METHOD")
 */
class Cacheable extends Annotation
{
    /**
     * Time to cache
     *
     * @var int
     */
    public $time = 0;
}

A "time" annotation need to be generated in the warmup.
The call from the demoaspect:
$invocation->getMethod()->getAnnotation('Demo\Annotation\Cacheable')->time

wants to generate the annotation file -> error
Greetings Jan

Thank you for reporting the issue!
I had a look into the source code of doctrine/annotation package and can confirm that this issue is present, however I'm not sure that doctrine/annotation library can work with read-only filesystems. I saw exactly the same error when tested my app on Google AppEngine, but decided to ignore it and prepared annotations cache by hand.
To fix this issue, a separate issue should be reported and discussed on doctrine/annotation project, otherwise it will be impossible to use a generated cache with read-only filesystem.

Please, could you tell me your version of framework and doctrine/annotations packet. Additionally, attach a trace for this exception. Thanks!

Hi,
we are using the Version "v1.2.4". Maybe that helps. But there is another approach.
The "GoAspectContainer" creates the "FileCacheReader" in the constructor. With a DI (or config) it maybe possible to inject a BlackHoleContainer or a MemcacheReader, ReadOnlyReader.
Hope this helps.
Greetings Jan

Hi, @jg-development!
You can adjust definition of annotation reader in you own container. To do this, just create a class that extends \Go\Core\GoAspectContainer and then write a class name for your container in the containerClass option for kernel initialization.
In your container class, just reconfigure a definition of aspect.annotation.reader service:
        $this->share('aspect.annotation.reader', function (Container $container) {
            $options = $container->get('kernel.options');
            $reader  = new AnnotationReader();
            if (!empty($options['cacheDir'])) {
                $reader  = new FileCacheReader(
                    $reader,
                    $options['cacheDir'] . DIRECTORY_SEPARATOR . '_annotations' . DIRECTORY_SEPARATOR,
                    $options['debug']
                );
            }

            return $reader;
        });

Hope, this information can help you to avoid issues with read-only filesystem and doctrine restrictions.

Hi,
I will try that and give some Feedback... thx in advance.
By the way.... the warmup in the master branch works like a charm, with 0.6.0 90% errors.
Causing a f**** upped deployment, we can only use tags. Do u now, when a new tag is coming out
from the master branch?
Greetings Jan

Hi, @jg-development, sorry missed your comment somehow )
Indeed, master branch has significant changes in the logic of processing of files and rely heavily on autoloading, so instead of analyzing everything, framework only check files that are whitelisted. Also several transformers are disabled (first one is transformer for include|require operators and others are using quick exit if aspects are not applied to the concrete file)
Prepared, 1.0.0-alpha.1 tag for you, thank you for participation.


Support for Payment Element options.defaultValues & example to Payment Element section

I have added the options array to the Payment Element ATM it is only accepting defaultValues. I will work on other PR for the rest of the objects which stripe accepts.
Typespec has also been added
Been wanting this for a while so I hope it is welcomed
Should solve #71 #68

Closes #68 , #71

Anytime, thanks for creating the package!


Support for telegram

Initiate the necessary infrastructure work. @omer-ayhan

Added telegram support and  published on vscode marketplace. 🎉 @omer-ayhan


Version 1.47.2 not available at https://packages.microsoft.com/yumrepos/vscode/

The YUM repo is missing the latest version of code.  There is no version 1.47.2.

It seems to me also insiders versions missing there too after July 15th.

@Tyriar will you respond. Yum repo is still out of date!!!

@mikij I'm currently looking into it, was sick yesterday.

@Tyriar Sorry to hear that. Hope you are better now.

This is fixed, there was an issue with the service we use to publish the packages which is all good now. Thanks for the notification.

Great thank you.


Add support for Scaleway nodeTypes

Is your feature request related to a problem? Please describe.
When using Serverless-ESbuild with scaleway-serverless-plugin deployment fails because of missing scaleway nodetypes
Describe the solution you'd like
I would like to deploy to scaleway
Describe alternatives you've considered
I have created a fix, and will PR that fix noting this issue

@floydspace Coudl you give the PR  check? I would also like to add an example using serverless-ESbuild to the scale way demo repo. But I'm blocked until this one is implemented.


deploy dolly langchain demo to mlflow issue

Hello all,
I've been trying to follow the databricks dolly-3b model and deploy a langchain pipeline to mlflow. While that part works successfully, when I reload it (using the code provided on the demo) after downloading it using the mlflow pyfunc class and try to get a prediction, I always seem to get an error, which is
2023/08/11 11:22:37 WARNING mlflow.langchain.api_request_parallel_processor: Request #0 failed with AttributeError("'tuple' object has no attribute 'page_content'")```

I am a bit confused by the error as I am entering a document format for langchain, which should not be a tuple. I am posting the code and the environment details below.
import torch
from langchain import PromptTemplate
from langchain.llms import HuggingFacePipeline
from langchain.chains.question_answering import load_qa_chain

def build_qa_chain():
  torch.cuda.empty_cache()
  model_name = "databricks/dolly-v2-3b" # can use dolly-v2-3b or dolly-v2-7b for smaller model and faster inferences.

  # Increase max_new_tokens for a longer response
  # Other settings might give better results! Play around
  instruct_pipeline = pipeline(model=model_name, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto",
                               return_full_text=True, max_new_tokens=256, top_p=0.95, top_k=50)
  # Note: if you use dolly 12B or smaller model but a GPU with less than 24GB RAM, use 8bit. This requires %pip install bitsandbytes
  # instruct_pipeline = pipeline(model=model_name, trust_remote_code=True, device_map="auto", model_kwargs={'load_in_8bit': True})
  # For GPUs without bfloat16 support, like the T4 or V100, use torch_dtype=torch.float16 below
  # model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype=torch.float16, trust_remote_code=True)

  # Defining our prompt content.
  # langchain will load our similar documents as {context}
  template = """Below is an instruction that describes a task. Write a response that appropriately completes the request.

  Instruction:
  You are a gardener and your job is to help providing the best gardening answer.
  Use only information in the following paragraphs to answer the question at the end. Explain the answer with reference to these paragraphs. If you don't know, say that you do not know.

  {context}

  Question: {question}

  Response:
  """
  prompt = PromptTemplate(input_variables=['context', 'question'], template=template)

  hf_pipe = HuggingFacePipeline(pipeline=instruct_pipeline)
  # Set verbose=True to see the full prompt:
  return load_qa_chain(llm=hf_pipe, chain_type="stuff", prompt=prompt, verbose=True)

def publish_model_to_mlflow():
  # Build our langchain pipeline
  langchain_model = build_qa_chain()
#   input_schema = Schema([
#     ColSpec("double", "input_documents")
# ])
#   output_schema = Schema([
#     ColSpec("double", "output_text")
# ])
  with mlflow.start_run() as run:
      # Save model to MLFlow
      # Note that this only saves the langchain pipeline (we could also add the ChatBot with a custom Model Wrapper class)
      # See https://mlflow.org/docs/latest/models.html#custom-python-models for an example
      # The vector database lives outside of your model

      #Note: for now only LLMChain model are supported, qaChain will be added soon

      model_signature=ModelSignature(inputs=input_schema, outputs=output_schema)
      print(model_signature)
      mlflow.langchain.log_model(langchain_model, artifact_path="model")
      print(run.info)
      model_registered = mlflow.register_model(f"runs:/{run.info.run_id}/model", "compliance-bot")

  # Move the model in production
  client = mlflow.tracking.MlflowClient()
  print(model_registered)
  print("registering model version "+model_registered.version+" as production model")
  client.transition_model_version_stage("compliance-bot", model_registered.version, stage = "Production", archive_existing_versions=True)

def load_model_and_answer(similar_docs, question):
    model_uri='runs:/2f24b734587d41a3a68891d2f1b85c2d/model'
    # similar_docs = get_similar_docs(question, similar_doc_count=1)
    chain = mlflow.pyfunc.load_model(model_uri)
    chain.predict({"input_documents": similar_docs, "human_input": question})

question = "What is the email address for this?"
hf_embed = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")
Chroma_db = Chroma(collection_name="sample_docs", embedding_function=hf_embed, persist_directory=gardening_vector_db_path)
similar_docs = Chroma_db.similarity_search(question, k=1)
similar_docs
load_model_and_answer(similar_docs, question)

The error occurs at this line of code
load_model_and_answer(similar_docs, question)

I tried asking on the demo github and the databricks site, but didn't seem to get a response, so I am posting here.
Environment:
chromadb==0.3.22
langchain==0.0.199
transformers==4.29.0
accelerate==0.19.0
bitsandbytes
mlflow ==2.5
Databricks Runtime=13.0 ML (includes Apache Spark 3.4.0, Scala 2.12)
If it is an issue with the input format, then I would greatly appreciate what the proper format should look like.
In addition, I have encountered the same issue with the dollybricks demo, specifically part 4 where we deploy the model to mlflow and then reload it.

You seem to be passing langchain Document objects to the MLflow model wrapper. That's not how it works. See the example at https://github.com/mlflow/mlflow/blob/master/examples/langchain/retrieval_qa_chain.py for how to call a QA chain logged to MLflow.
(This isn't quite a question about Dolly)

Thank you for the information. I'm just wondering what the proper formatting would be, as I've tried multiple inputs and none of them seem to work.


A small guide on hacking neon?

I'm a newbie to both Rust, and node-gyp but I found this project on twitter and thought it was pretty cool. I want to contribute to this repo and learn Rust too. So can you write a little "Hacking neon for dummies" guide to help newcomers like me get started? I just installed Rust, discovered Cargo, and am just checking out the code in this repo.
Thanks!

+1

@ArsalanDotMe @marxo A quick progress report: I've got a docs site set up, and I've stubbed out a hacking guide, but no contents yet. Steadily making progress though!
For the time being, if you're interested in contributing please feel free to come hang out on the community slack (grab an automatic invite to join) and ask questions on #neon. (Or you can join #neon on irc.mozilla.org if you prefer IRC.)

@dherman I tried to grab an automatic invite, but the site returns an "Application Error" page. Could you send one to my email address (on my GitHub profile). Thanks!

I love writing guides FWIW, though I'm hesistent to dive into this until:

I know neon a lot more (working on it).
I feel like the docs I'm writing are going to stick, pending big API changes.

Let me know if there are any areas in specific we should tackle sooner rather than later.

Let's open an issue in the guides repo for this. @nixpulvis I'm excited you want to help with this and I hear you Re: not wanting to write about stuff that's likely to change. I think Classes 2.0 and VM 2.0 are the biggest changes coming, so maybe we can discuss this during/after those RFCs.


Start uWSGI after synced folder mounts

It looks like #9 is caused by the synced folders not being mounted at the time the upstart init script runs. uWSGI can't find the flask app and errors out. I've changed the 'start on' for the init from the vagrant box booting up to waiting for the appropriate mounting signal. I'm new to both puppet and github, so any feedback would be appreciated.

I've not got a setup for this to test, but I've read through some of the cases and this looks like a solid fix. Thanks so much for chipping it in, @jmulmer (and sorry for taking ages to respond.)


Set user profiles in mixpanel for palomaswap actions

Background
Describe the problem that we are trying to solve with this feature.
If a path to a solution is known, feel free to write it down, but have an open mind
In order to set up cohorts, we need to set up user profiles in mixpanel via the people api - related to https://github.com/VolumeFi/paloma/issues/97
https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelpeople
https://help.mixpanel.com/hc/en-us/articles/115004501966-User-Profiles-Overview
What should be tracked
mixpanel.people.set()

[ ] paloma wallet --> tracked on wallet connect, first page load and swap
[ ] region, country code city (mixpanel properties) --> tracked on wallet connect, first page load and swap

mixpanel.people.set_once

[ ] first seen at (date wallet connected for the first time) --> tracked on wallet connect
[ ] first swap at (date of first swap) --> tracked on swap

mixpanel.append

[ ]  evm wallets (evm wallet(s) used for swaps) --> tracked on swap

https://github.com/palomachain/paloma-swap-ui/pull/80


engine_traits: Add some doc comments

What problem does this PR solve?
Add some API docs to engine_traits.
Related changes
https://github.com/tikv/tikv/issues/6402
Check List
Release note

No release note.

/merge

/merge

/merge


Improve handling of different visibility formats

Currently, when generating visibilities with OSKAR, they are written to disk in both measurement set (MS) and the .vis binary format, essentially doubling the amount of disk space used. This needs to be fixed, especially for larger runs.
When generating visibilities with RASCIL, data is only saved to disk in .vis format.
Internally, Karabo currently works with two different types of visibilities: OSKAR returns karabo.simulation.visibility.Visibility objects whereas RASCIL returns ska_sdp_datamodels.visibility.Visibility objects. It would make sense to create a generalized visibility class and only return objects of this new class.
For the subsequent dirty imaging, we have three imagers.
OSKAR can only handle karabo.simulation.visibility.Visibility objects. Seems like it can work off MS as well as .vis files, preferring .vis, but this needs to be verified.
RASCIL can handle karabo.simulation.visibility.Visibility as well as ska_sdp_datamodels.visibility.Visibility objects and supports MS as well as .vis files.
WSClean can only handle karabo.simulation.visibility.Visibility objects and requires the MS format.
Image cleaning currently requires the MS format (to do dirty imaging + cleaning in one go) or an existing dirty image (only supported by WSClean, not RASCIL, see https://github.com/i4Ds/Karabo-Pipeline/issues/572).
There is existing functionality to convert from .vis to MS:

We're already using rascil.processing_components.create_visibility_from_ms in the Karabo code base.
From the OSKAR 2.0.3 release notes: "Added a binary utility to convert an OSKAR visibility file to a Measurement Set."

Proposed solution:

[x] OSKAR simulation: only write to disk in MS format
[ ] RASCIL simulation: change from .vis to MS output
[ ] Create generalized visibility class, return objects of the new class from all simulations
[ ] Change dirty imager interface to only accept objects of the new visibility class
[ ] Change image cleaner interface to accept an object of the new visibility class rather than a path to an MS
[ ] Change karabo.data.obscore.ObsCoreMeta.from_visibility to work from MS, not .vis

Agree to have as default the MS format since it has more support :+1:
I think it's worth to not drop the .vis support wherever possible, if the overhead is not large. E.g. karabo.data.obscore.ObsCoreMeta.from_visibility  could support both easily.

In addition, I also would like to get access to the short-term-memory path including it's fixed filename before it's created. the reason is to easily customize e.g. the filename, but not the short-term-memory directory. This is a useful feature if you don't want to rename the files afterwards, but before creation.

As discussed in 2024-08-22 meeting, the OSKAR default should be changed to MS.
Later, we should have automatic data type conversion when needed, ideally streaming - without touching the disk. Even later, these choices could be optimized by generating & optimizing the full data flow graph (i.e. lazy evaluation). But that's 2030 territory :)

We should keep design/APIs flexible enough to add support for other file formats in the future. MSv3 or DASK-MS are formats that are being discussed, so we'll probably need to support one/two of these in the future.
We're fine if .vis support is not as good, or not well-supported at the moment. But we should design our code with the understanding that we'll need support for more formats in the future.


missing libgen.h

when catkin the package, cmd shows that it lacks libgen.h.

@Pyrokine what package are you trying to build?

move_server package in the navigation package

I comment the wrong name. It's map_server

Hi @Pyrokine, can you share more information where you checkout the source code for navigation packages and the steps you took to build?
JFYI, as of today, the Windows build navigation code is in ms-iot fork: https://github.com/ms-iot/navigation/tree/init_windows, and the upstream repository doesn't have the ported changes yet (but the PRs are out, awaiting feedback.)

Thanks a lot. I built the original package from ros-planning/navigation. I found those package you forked from ros and it works.


KinematicBody2D collision detection occurs depending on movement of it and the collider

Godot version:
3.2.3 stable
OS/device including version:
xubuntu 20.04
Issue description:
KinematicBody2D only detects collisions from all sides when stationary(and not even that in some cases)
when moving it only detects collisions from the direction its moving towards even though there is no oneway collision enabled.
the project in the video is the same as the reproduction project attached below.
the "collision detectors" should all disappear when colliding with the "actors"
they all have identical code meaning they should all detect collisions the same way and "queue_free()" themselves
https://user-images.githubusercontent.com/50218986/109421238-c6c9ac80-79d6-11eb-97dd-5b210bb54b84.mp4
Steps to reproduce:

create KinematicBody2D moving along one axis
create KinematicBody2D colliding with the first one from a direction that isnt the one the first one is moving towards
check for collision on the first one

Minimal reproduction project:
no sprites, so enable [ Debug > Visible Collision Shapes ]
collision_test.zip

In general, it would be much safer to detect collision from both kinematic bodies, because move_and_collide is not meant to detect if other bodies have collided with the kinematic body, but only if the current kinematic body is bumping into something else. So there will always be some edge cases that are not supported. When using move_and_slide on the other kinematic body, you can use get_slide_count to check if a collision happened.
About the specific scenarios:
In 3.2.4 RC3, all stationary cases detect collision  (which is more consistent), although I'm not sure this should be the expected behavior since they don't technically bump into anything.
For the (-15, 0) case:
This one looks like it's the expected behavior. Since the left kinematic body is moving away from the other one, it does make sense for move_and_collide to return no collision, as at the moment this function is called, it does not bump into the other kinematic body and can safely move with no hit (the right kinematic body has already moved left and stopped right at the collision).
For the (0, -10) case:
It would be interesting to investigate what's going on with this one and see if things could be made more consistent with the stationary cases. Since in this scenario the left kinematic body (moving upwards) doesn't technically bump into anything, I wonder if we can consider this is correct, and change the collision detection so that stationary cases don't detect collision either.

first of all thanks for you answer :)

In 3.2.4 RC3, all stationary cases detect collision (which is more consistent)
yeah i'm just looking for consistency. i can somewhat accept if move_and_collide doesn't detect passive collisions but then i would expect it for all of them. if what you wrote about 3.2.4 is gonna be in the next stable though its just gonna be even less consistent...
so maybe this doesn't make sense and i'm too smol brain but i would say either

a) only detect active collisions (meaning when bumping into something) and it shouldn't matter if its moving away from it
or
b) detect all collision no matter the position or velocity
if its gonna stay the old or some other way i think it would be a good idea to document its behavior in some way.
also the bottom left case really freaked me out, where the outcome is really just decided by the x position of the detector being a multiple of 5 or not ~

In 3.2.4, since all stationary cases detect collision, it will be a bit more consistent as the edge case in the bottom left is not happening anymore.
a) would be probably the way to go to make everything consistent though, as b) would be difficult to do without breaking the current API in other scenarios.
In any case, your best shot for consistency is really to detect collision from both KinematicBody2D motions, otherwise your game's behavior will be still dependent on how the collision algorithm handles edge cases.

a) would be probably the way to go to make everything consistent though

i agree :)
so the 3.2.4 change for stationary cases should be cancelled then?

In any case, your best shot for consistency is really to detect collision from both KinematicBody2D motions

yeah thats what i'm gonna do, thx
should this issue remain open until something is done or how do we manage this stuff?

should this issue remain open until something is done or how do we manage this stuff?

Yeah, it can stay open until things are made more consistent.

alrighty thanks again!


Fix contact screen id: your contact information in docassemble.RentalRepairLetter:Repair_Letter_Tenant.yml

Validation doesn't use field parameter

Resolved in https://github.com/SuffolkLITLab/docassemble-RentalRepairLetter/commit/f834f90c33de5a43ee2ee0c1b5b7a4a1d75df86f


utc date but not time?

Why are the month/date using UTC but not the hour and minute?

@puckey sorry for the delay, that was a mistake on my part really, and although not 100% accurate was suitable for my use cases at the time. I have pushed some significant changes just now that allow specifying whether to use UTC or local times and dates and including some output and logic for timezone offsets and day light savings.


Permit to merge the codebase to Apache Tapestry 5.5 and IP clearance?

@dmitrygusev, I'd like to merge your module to Apache Tapestry 5.5. Would you be ok with it and support the merge? Your module is more advanced and I don't see any compelling reason to maintain multiple implementations of JPA support. If you agree, we'd need to track down all contributors to your module and have them agree as well. I see one pull request that's not merged but are there any other contributors in addition to you?

Hey Kalle,
Me and the rest of the Satago Team, including @pedrocborges and @adamhorner -- CTO of Satago, are all for it. There shouldn't be any other contributors to the library.
That pull request #1 still stays, and would be nice to fix addressed bug before releasing this as a part of T5.5. It needs some work, meaning that I'd like to change the fix from that PR a little, ideally covered with some tests. What stops me is that this project doesn't have any test infrastructure at the moment, and I don't have the need of fixing the bug right now: there is a workaround that works for our projects.

Thanks @dmitrygusev, that's excellent. Do you mean there are no other contributors to this library besides yourself or in addition to @pedrocborges and @adamhorner? If the latter, can you guys comment on this issue as well so we have an agreement on file from everybody involved. Yeah, perhaps best to merge the pull request first and then work it into T5. I'll see what I can do myself.

Hi Kalle, @pedrocborges and I are the only other contributors. I'm very happy for you to merge the code (which is mainly the work of @dmitrygusev) into the core codebase for T5. I'll get Pedro to comment too, let us know if there is any other way we can help.
Thanks, Adam.

Hi Kalle, like @adamhorner said we're all in favour of pushing this into the tapestry stack. I just second the concerns of @dmitrygusev about the two small issues we found while using it in our own web-app.

I made an initial license review of the codebase. Given that this codebase is already under Apache License V2, there's no need for you to necessary sign ICLA or CCLA (Individiual Contributor License Agreement or Corporate Contributor License Agreement). However, you've explicitly mentioned that Satago Ltd. owns copyright to the works (instead of individual authors). Your company will retain copyrights to the lines of code you've written but I'd ask you to remove the copyright line form each individual file (the license notice should stay). Instead, we'll add a NOTICE file to the module and notice your copyrights there. It's an ASF recommendation that the donating party modifies the copyright notices themselves instead of ASF committers. See http://www.apache.org/legal/src-headers.html#faq-why for more info. I'll send a few pull requests your way in the coming days.


System.NotImplementedException:Implement it based on poi 4.2 in the future

System.NotImplementedException:Implement it based on poi 4.2 in the future
use npoi version 2.5.5
if (excelFilePath.EndsWith(".xls"))                     {                         using (StreamReader input = new StreamReader(excelFilePath))                         {                             workbook = new HSSFWorkbook(new POIFSFileSystem(input.BaseStream));                         }                     }

Please upload the original xls file.

Please upload the original xls

Please upload the original xls file.


URL Auto Redirector 1.1.0

[x] I18N Support (Chinese)
[x] Optimisation: sync options via chrome.message
[x] Optimisation: single copy defaultRules
[ ] AliPay & PayPal donation links
[x] Performance improvement
[x] Functional Testing

PayPal is not available for account reason @lzb

AliPay support is delayed. Because I haven't figured out the UI design.


Reproducing Cifar-10 results for VQ-VAE

Hi,
I am trying to reproduce the likelihood lower bound results for Cifar-10 mentioned in Section 4.1 of the "Neural Discrete Representation Learning" paper. There are a few questions I hope you could answer:

Section 4.1 of the paper mentions all residual blocks have 256 hidden units. I am assuming this means there are 256 output channels out of a residual block (from the "residual_stack" function). However, at the bottom of Section 3.2 it says the latent dimension for Cifar-10 is 8 x 8 x 10. Does it mean the last residual block outputs a feature map with number of channels 10 instead of 256?

Section 3.2 defines the variational lower bound as p(z_q(x)) log[p(x | z_q(x))]. However, it is unclear how to compute log[p(x | z_q(x))]. The loss function uses MSE instead of the actual log-likelihood.

Thanks!

Hi @shihux,
I will pass these questions on to the authors of the VQ-VAE paper.

Closing out some old issues, please reopen if this is still a blocker.


Setup Gitter rooms

It seems there is wiremod community on Gitter, but there are no rooms. :sob:
Create some rooms!

wtf is gitter

I don't know what happened to the room, but it was there. I stopped using it because it was pretty dead.

wtf is gitter

You can look at it like real-time chat (like Steam group chat, though Steam chat is just plain text). Gitter supports Markdown, each room can be configured (i.e. show different welcome message, only allow GitHub users to join chat, etc.). It can also display various activity for the repository. Simple, beautiful, and free!
Create a test repository, and try it :)

I stopped using it because it was pretty dead.

Maybe because there isn't any link to it?
There is a feature on Gitter, to automatically push a pull request which will add a "badge" in readme.

you mean it's like IRC, except I need to keep a website open all the time?

You can connect to gitter with IRC too (https://irc.gitter.im/). I would define it as irc chat with fancier web interface.

It's worth mentioning, we already have an IRC channel: irc.gamesurge.net #wiremod. So this issue is really "move the existing IRC channel to a server with a proprietary web interface".

Never heard of that before @AbigailBuccaneer.
Seriously, update readme with those information...

Alright so the room is there, but it's only for Wiremod members I guess, thatswhy you don't see it. I think it was supposed to be used for dev chats, and there are few messages from jan 2015.

wtf is gitter

You are in the room

So if I miss something on IRC, are there any logs for me to catch up?

if you want a record, use reddit or a github issue, whichever is appropriate

I feel like discord would be a better choice.

Use Discord for this purpose: https://discord.gg/cqJ45CT

Note that the discord is official.


CPU usage >400%. All fans up. Heating.

VSCode Version: 1.45
OS Version: macOS Catalina 10.15
Memory: 8 GB 2133 MHz LPDDR3
Processor: 1.4 GHz Quad-Core Intel Core i5

Steps to Reproduce:

Open VS Code and let it be open for a great time.
Occasionally this cause the CPU usage shoot like the oil prices did in 1979. (Note: this is not deterministic as it might happen or it may not.) I will add more if I find some.

Process name that I got from htop
/private/var/folders/yb/0sc33cj53m57kjd7kmqsdjd40000gn/T/AppTranslocation/4C83E0B3-FD2A-428A-BBFC-C7E084B92F0A/d/Visual Studio Code.app/Contents/Frameworks/C
Does this issue occur when all extensions are disabled?: Yes

Please update to 1.46 which was published on Wednesday. It might not solve your problem, but the team only supports the current version.

Also see https://github.com/microsoft/vscode/wiki/Performance-Issues

To find out more about this issue, we need to get at the process that is causing the high load. VS Code creates multiple processes, each with different tasks.
When Code is consuming lots of CPU, please run "code --status" from the command line (or "code-insiders --status" if you are using VS Code Insiders edition).
Please attach the output of this command to this issue. Thanks!

Ok, So I can reproduce it.  Sorry if its not a bug.

Open some project(dir) in VS code.
And then delete the VS-Code.(I accidentally deleted the installed app, when I was doing clean up on my system).
The CPU usage will go up like anything after that.

Can you follow this wiki and post the results back here to understand more about why performance is so bad for you: https://github.com/Microsoft/vscode/wiki/Performance-Issues
Thanks!


Confusion around scheduling a sequence

Hi, if this is a bug, I think it's probably just a gap in the documentation.
My use-case is that I want to create a UI to load and show a single MIDI track with timeline. I don't necessarily know the best construct to use as I've been going between Sequence, Part, Pattern and Loop (or just scheduling notes on a synth).
Ultimately I chose Part because I need to schedule notes arbitrarily (however the MIDI track comes in) and not like Sequence which I understand just schedules the notes at a single interval between all.
Part is the only way that I can seem to get Tone to accept changing the BPM (it usually has no affect for me).
I've also had trouble getting the position of the playback. Getting time in seconds works well until I change the BPM and then the transport time doesn't align to playback anymore. I've stayed away from the bars/beats/sixteenths way of doing time just because I want to work with the time I get from MIDI without worrying about conversion.
I landed on getting "progress" for time. But even this didn't work until I explicitly set looping=true, and the loopStart and end.
Now I have things mostly working and stumbling on how to get seek working.
I'm basically questioning, given how much trouble I've had through trial and effort, If I'm doing things correctly. I've seen other folks mention a "Player" object, but the docs say this is for playing sounds/samples I believe.
I'd love to know what the proper way is to play a sequence of notes with scheduled times that is rate adjustable, and seekable.
Thanks!

I think I'm just going to close this. I feel like I mostly worked things out.
The Part object seems to be working, and the more I think about BPM the less I want to use it because the timing from MIDI is really independent from BPM (where Tone assumes that times are 120BPM, but my MIDI note times could be anything). So I'm going with playback rate instead and I'll just calculate that from BPM.
Seeking was confusing - because I assumed it would be done on the Part object, but it looks like the Transport is where that should happen.
And then pausing/resuming playback had some doubling up and it was a bit of trial and error to know what to stop/cancel between the Part and the Transport.
Overall, a nice explainer for when to use which concept/object for playback would be great, but I totally get that this is a side project with single maintainer (AFAIK).


macOS: scroll event handling

Adds handling of mouse scrolling using the mouse wheel or touch pad for macOS. Although basic event handling for macOS had been added before in #52, it looks to me like support for this was still missing. I had a look at all other public forks of this library and could not find someone working on this.
So I looked up the API documentation for it [1] and had a look at the existing code for mouse_move to make a change that feels consistent with the existing code. There seem to be two kinds of scroll delta values [2] [3] [4], precise and imprecise ones. I expect the precise deltas to be used when a touchpad is used and the imprecise ones if a mouse wheel is use. But I can only test the mouse wheel scenario, as I have a desktop computer and thus no touch pad to test with.
If this is something you'd like to merge, feel free to do so. If this code needs to be improved, give me feedback and I will try to address it or just make adjustments yourself. But if you have other plans and do not want to merge this, that's fine too.
[1] https://developer.apple.com/documentation/appkit/nsresponder/1534192-scrollwheel?language=objc
[2] https://developer.apple.com/documentation/appkit/nsevent/1525758-hasprecisescrollingdeltas
[3] https://developer.apple.com/documentation/appkit/nsevent/1524505-scrollingdeltax

thanks! sorry this took so long to merge :sweat_smile:

:+1:


View doesn't scroll up when selecting last page of a dataset

Describe the bug

When selecting the last page of a large dataset, it might have less rows of data than the pages before. If you navigate the dataset with the buttons below the dataset, the last page often is out of view because it takes less space.
Expected behavior

The view should be anchored so that the last row of data is on the bottom of the view.
How to reproduce

Run any query in TG that results in >100 entries and use the buttons below the dataset to navigate to the last page.
Screenshots

Software version

6.0.0
Desktop (please complete the following information if relevant):

OS:
Browser:
Version:

Additional context

Closed as duplicate, see #257


Problem: Tests cleanup incomplete

Following is a comprehensive list of test modules which need to be cleaned/removed/activated (each module has been annotated with the possible action item):

[x] test_utils.py (activate/remove tests)
[x] test_txlist.py (activate/remove tests) #2390, #2389
[x] test_core.py (activate/remove tests) #2390
[x] test_block_model.py (Depricate/Remove) #2384
[x] test_config_utils.py (activate/remove tests) #2402
[x] remove test_consensus.py #2384
[ ] test_bigchain_api.py (activate/remove tests) WIP: Zach, part 1: #2415 and part 2: ____
[ ] check if get_owned_ids is deprecated
[x] common/test_schema.py (activate/remove tests) #2404
[x] commands/test_utils.py (activate/remove tests) #2452
[x] store_transaction is deprecated, replace it in tests with store_bulk_transaction #2452
[x] common/conftest.py (remove unused fixtures) #2404
[ ] clean up fixtures from conftest.py (remove unused fixtures)
[ ] remove pytest.mark.genesis marker
[ ] remove pytest.mark.tendermint marker i.e. once the above cleanup is done there should be no need for this marker.
[ ] rename localmongodb to mongodb
[x] remove parameters BLOCK_INVALID, BLOCK_VALID, TX_VALID, BLOCK_UNDECIDED, TX_UNDECIDED, TX_IN_BACKLOG #2374

@kansi As I write this, on August 12, there is a task that reads:

rename localmongodb to mongodb

While I can understand why that might seem like a nice idea, I'm not sure it's necessary. It will break all existing deployment tooling, including external tooling created by our users. (For example, the command bigchaindb configure localmongodb would stop working.)
In short, it's not broken, so let's not fix it.


Y230: Why are "unused", "strict", and "esnext" set to false"?

Hi,
I was wondering why unused, strict and esnext are set to false in jshint options, Y230. They seem like good options to keep turned on.
Is there a particular reason for these settings?
Thank you.

I think unused: true is a bit much, I like it better just using unused: "vars" because when writing code like this:
scope.$watch('vm.value', function(newValue, oldValue) {
data.value = newValue;
setValues(data);

});
It's still a good reminder that you also could use oldValue if you decide to change something in the function.
But I also can see that unused: false can have it's pros as I often implement something I want to use in the future, but currently only is a empty construct and I don't want the style checks to fail because of such things.

you can certainly tinker with the settings, but these are a good balance of useful and not annoying.


add the toClass component helper

In response to https://github.com/acdlite/recompose/issues/34.

Thanks!


iPad Pro Icon size.

The iPad Pro introduces a new Icon size.
167x167 pixels @2x

Hi, thanks for the feedback, #7 is merged now, so this can be closed.

Hi, thanks for the feedback, #7 is merged now, so this can be closed.


Bug 2094486: save affinity ruly button is too small

📝 Description
the "Save affinity rule" button is smaller than other modal primary button
🎥 Demo
before:

after:

Signed-off-by: Aviv Turgeman<EMAIL_ADDRESS>

/lgtm


Changed Image.rtol to a warning and increased default tolerance

An exception turned out to quite disruptive to a large number of users and the error was less than informative. We've now further increased the tolerance and switched from an exception to more informative warning. Additionally I have also ensured that the ImageInterface would not simply accept irregularly sampled coordinates and replace them with bounds.

[x] Updates unit tests

Needs updated test data due to the Options notebook unfortunately.

Looks like there's some unit test failures from some really old unit tests which still compare .data, will update those first thing tomorrow.


feat/affect-return

Please review before merging.

:tada: This PR is included in version 1.7.0 :tada:
The release is available on:

GitHub release
v1.7.0

Your semantic-release bot :package::rocket:


Icon-only buttons have extra padding

Looks like some buttons have a couple pixels of padding to the right

Goon has fork-adjusted this iirc since we use a newer fontawesome version than tg


WASI-NN should not apply input quantization

Currently, the TFLite wasi-nn implementation performs quantization if quantization scale and zero-point exist (https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/iwasm/libraries/wasi-nn/src/wasi_nn_tensorflowlite.cpp#L323)
This results in poor performance with ssd_mobilenet_v1_1_metadata_1.tflite Direct download link.

The SSD mobilenet v1.1 model has the following input details:
import numpy as np
import tensorflow as tf
i = tf.lite.Interpreter(model_path="ssd_mobilenet_v1_1_metadata_1.tflite")
i.allocate_tensors()
input_details = i.get_input_details()[0]
input_details

{'name': 'normalized_input_image_tensor',
 'index': 175,
 'shape': array([  1, 300, 300,   3], dtype=int32),
 'shape_signature': array([  1, 300, 300,   3], dtype=int32),
 'dtype': numpy.uint8,               <--------------------------------------------------------
 'quantization': (0.0078125, 128),
 'quantization_parameters': {'scales': array([0.0078125], dtype=float32),
  'zero_points': array([128], dtype=int32),
  'quantized_dimension': 0},
 'sparsity_parameters': {}}

The model works well without the RGB input (300x300x3 uint8_t) being quantized. (See my bug at https://github.com/joonb14/TFLiteDetection/issues/1 for a full Jupyter Notebook example.) When I try to apply quantization (in either python or by running the input through wasi-nn) I get very poor results.
To work-around this issue, I had to apply an inverse function when creating the input tensor:
// Taken from the model's input_details:
#define QUANTIZATION_SCALE 0.007812
#define QUANTIZATION_ZERO_POINT 128.0

// in create_input(...)

    for (int i = 0; i < input.elements; ++i)
    {
        input.input_tensor[i] = data[i];
        // WAMR / wasi-nn bug. Model does not expect quantized data but it is done internally regardless:
        // Reversing the internal WAMR quantization:      it[i] = (uint8_t)(input_tensor_f[i] / scale + zero_point);
        input.input_tensor[i] = (input.input_tensor[i] - QUANTIZATION_ZERO_POINT) * QUANTIZATION_SCALE;
    }

    return input;
}

With above workaround, I get the exact same (good) results in both Python and when running with iwasm (wasi-nn enabled).
I'm confused by https://www.tensorflow.org/lite/performance/post_training_integer_quant#run_the_tensorflow_lite_models which states that if input_details['dtype'] == np.uint8: quantization should be applied to the input (what wasi-nn does)...

Hi,
if I visualize the model with netron I get the following,

As you can see, the quantization section of the input indicates that the original distribution of your data is [-1, 1) (float/double). As the model has been trained with that range of values it is waiting for values between [-1, 1] so that the inferencer can quantize it. That is, convert from [-1, 1) to [0, 255] (uint8).

-1 * (1/0.0078125) + 128 = 0
0.9921875 * (1/0.0078125) + 128 = 255

In the Python inferencer the quantization is not done automatically. Therefore, it expects the user to do it. As you comment in https://github.com/joonb14/TFLiteDetection/issues/1, you are right, the processor lacks the preprocessing of the input tensor to quantize it. However, since instead of loading the images with the range of values with which the model has been trained, you have loaded the images in uint8 the quantization is implicit, by coincidence.
On the other hand, in wasi-nn the quantization is done internally and, therefore, expects the original range of values. In your solution you have transformed [0, 255], which is a data distribution that does not correspond to the one the model has been trained on, to [-1, 1), which is the valid one. In this way, the model will be able to perform the transformation to the correct range of values by itself.
Note that wasi-nn expects values in the range with which it has been trained. Any other assumption is (in most cases) wrong, since the distribution of the data when making the inference should be the same as the training (there are always exceptions).

Note also that if we wanted the users themselves to quantize the values we have 2 options:

We need a way for wasi-nn to pass the scale and offset information to them, which is not possible at this time.
The user knows the values in advance and writes them in code.

@tonibofarull, I just skimmed this issue but perhaps the information that you're looking to pass on could be done if we added a new metadata feature to wasi-nn? I've been looking for examples where this would be useful. Would the metadata need to be attached to the tensor or the graph or the context?

The metadata is already in the model, at least in the case of TFLite.
The problem reported by @CIPop is that the input range expected by wasi-nn is the one used for training, which from my point of view is correct, instead of directly asking for the quantized version. In this case, the quantization turned out to be uint8 which is the same format as obtained by reading the images. However, it could have been uint16 or any other.
Perhaps what we can do is allow users to decide whether to quantize manually or let the runtime assume the input is that of the training.

@tonibofarull I just verified that with the expected [-1..1] input range, WASI-NN performs as expected. Thank you for the in-depth explanation!
In WAMR's WASI-NN wasi_nn.h we could add documentation
The pre-processing should be:

Obtain input - coincidentally, uint8_t `300x300x3, values [0..255]
Transform input to float 300x300x3, values [-1..1]
Based on the model input type (uint8_t), apply quantization parameters. This transforms the input back to uint8_t 300x300x3, values [0..255].

The important part is that, while the tensors in steps 1 and 3 have the same shape and type, the values are clearly different.
Tested in Python:
res_im = im.resize((300, 300))
np_res_im = np.array(res_im)

# Transform from input RGB [0..255] to [-1, 1]
np_res_im = (np_res_im / 255) * 2 - 1

# From https://www.tensorflow.org/lite/performance/post_training_integer_quant#run_the_tensorflow_lite_models
# Check if the input type is quantized, then rescale input data to uint8
if input_details['dtype'] == np.uint8:
    input_scale, input_zero_point = input_details["quantization"]
    np_res_im = np_res_im / input_scale + input_zero_point

np_res_im = np.expand_dims(np_res_im, axis=0).astype(input_details["dtype"])

# Quantized input [0..255].
print(np_res_im)

Tested in WASI-NN / C:
    for (int i = 0; i < input.elements; ++i)
    {
        // WASM-NN expects non-quantized RGB data (-1..1)
        input.input_tensor[i] = ((float)data[i] / 255) * 2 - 1;
    }

Given @tonibofarull's explanation, the official TFLite quantization documentation, I am now convinced this isn't a WASI-NN / TFlite implementation bug.
This explanation is a bit ambiguous:

Lets assume the expected image is 300x300 pixels, with three channels (red, blue, and green) per pixel. This should be fed to the model as a flattened buffer of 270,000 byte values (300x300x3). If the model is quantized, each value should be a single byte representing a value between 0 and 255.

The second sentence is true only if the model is indeed quantized. I would expect that non-quantized models would accept a flattened buffer of 270000 float values.
Feel free to close unless you'd like to keep open to add the extra meta-information API that allows external quantization.


Explorer status duplicated and blinking

Hello I got 2 repository states and one of them is blinking.
Here is the gif reproducing the issue:

Not dramatic, but a little annoying !
Boris

Nice. Which stats are correct 0 0 or +3 ~0 -0?

The blinking one is correct.
I use RepoZ 5.5.
Could it be due to a previous installation, not well cleaned ?
Or is there another kind of tool that could be installed on my PC and provide similar function as RepoZ ?

If I would know of another tool, I would not have written RepoZ I guess.
A previous installation surely not because it needs to be running to update the titles. Please make sure that there is only a single RepoZ.exe running in your task manager.
Could this be a repository with submodules maybe? So that RepoZ finds different repositories in that given path?
What happens for other repositories, like if you clone RepoZ locally?

One single RepoZ.exe is running
With process Explorer, I searched "RepoZ.exe":

Probably more than expected ?
There is no submodules in my repo.
RepoZ repo locally:

I understood !
https://stackoverflow.com/questions/75950114/get-rid-of-extended-git-repository-information-shown-in-the-title-bar-of-explore
Sorry, it was a feature I activated and forgot...


Fix vulnerability to CSRF token fixation attack

This is how the vulnerability can be exploited:
Let's say Alice visits Bob house and opens http:/bank.com.
Bob's wifi can set her session with a known csrf.
Even if she would be transferred to https after login it would be too late.
Later she visits another site and Bob's wifi can inject enough javascript to post a valid request to bank.com with a valid session & csrf and steal her money.
Reseting the csrf on sign-in would render that request invalid and save the day.
Jose Valim wrote about it here

The good news is no banks use this library afaik ;)
Thanks for the PR! I'm cutting a release now with this update.

Thanks!
It's worth noting that this change breaks compatibility with many apps that store csrf token only once, before login.

Oh, that's a good point. @rondale-sc, would you care to comment?

Hey Paul,
Let me also review this before cutting a release.
—
Sent from Mailbox
On Sat, May 30, 2015 at 7:50 AM, Paul Elliott<EMAIL_ADDRESS>wrote:

Oh, that's a good point. @rondale-sc, would you care to comment?
Reply to this email directly or view it on GitHub:
https://github.com/paulelliott/authem/pull/27#issuecomment-107048919

Yeah, I'm going to hold off on a release. I tested it against an app and it seemed to work fine, but I hadn't considered the implication for other types of apps.
Also, Travis is unhappy :(

I've read the article and seems like it describes a whole different scenario. The article describes techniques of bypassing the CSRF protection and making the request do the thing despite the fact the check's failed.
Still, I think that resetting CSRF token after successful login might be a good default.

Let me push some codestyle changes before we but the release

Sure. Take your time. No rush on a release.


Workflows for closing Old PRs and Issues

[ ] Workflow for closing old Issues
[ ] Workflow for closing old PRs

@punyakrit please assign me this issue


Don't allow find/replace if read only (#13774)

Adds check in doReplace function to prevent Find/Replace in read only document (issue #13774)
/cc @kenstuddy

Nice stuff @toryherman!

Cool to see a PR for this bug, thanks for CCing me on it.

Cool to see a PR for this issue, thanks for CCing me on it.

Thanks @toryherman for the PR! And thanks to @petetnt for reviewing this.


Circular reference causes a "Template render error" error

Hey all,
New user here, absolutely loving the asyncapi and the generator. Thanks for all the effort!
Not 100% sure if the below is a bug or us defining the schema incorrectly, but would really appreciate a little bit of help. Just for the context: we're trying to express a schema, similar to how most data processing libraries like spark define their type system (recursive struct with fields).
Describe the bug
Circular reference causes a "Template render error" error
How to Reproduce
asyncapi: 2.0.0
info:
  title: Circular Reference test
  version: 1.0.0
  description: Smiley face
channels:
  /:
    subscribe:
      message:
        $ref: '#/components/messages/SchemaMessage'
components:
  messages:
    SchemaMessage:
      payload:
        $ref: '#/components/schemas/Schema'
  schemas:
    Schema:
      type: object
      properties:
        kind:
          oneOf:
            - $ref: '#/components/schemas/Schema'
            - type: string
            - enum:
              - boolean
              - string

Expected behavior
I believe a similar issue has been solved here: https://github.com/asyncapi/parser-js/issues/83#issuecomment-673921723
It would be amazing if the generator at least didn't crash on the above schema unless it's incorrect.
Thank you so much!

@several27 hey, sorry for late response mate, was super busy with other topic. Yeap, I solved support for curcular references in HTML and markdown templates but not for complex schemas like oneOf, anyOf and allOf (yeah, they are maybe not complex in general, somehow this is how I call them in my head 😄).
The real challange and why I did not support it from start is the lack of good sample data. Whatever we do now in the template requires good sample so we can later always test against it to make sure we do not have regression. We maintain this dummy file https://github.com/asyncapi/generator/blob/master/test/docs/dummy.yml that has all possible use cases. We are missing good use cases, as complex as possible exactly for oneOf, anyOf and allOf. We have issue for it -> for https://github.com/asyncapi/generator/issues/429 and now just need to combine examples from different locations, introduce more complexity, add circular refs and update dummy.yml. Then I can start working on supporting more circular refs cases. Some help with dummy.yml would be ❤ appriciated.

and yeah, I bet I will have to work on it first in the parser, but this is just implementation details. Most important is good sample data

here a real world example:
dpValueVariantType:
      anyOf:
        - type: integer
        - type: number
        - type: string
        - type: boolean
        - type: object
        - type: array
          description: "Each array element is of type dpValueVariantType."
          items:
            $ref: "#/components/schemas/dpValueVariantType"

you might argue that this doesn't make much sense because the restriction to dpValueVariantType is actually no real restriction and you are right. This is more to document, that all that types can be used.
Maybe I will remove 'object' from the list, then it will make sense.

here a real world example:
dpValueVariantType:
      anyOf:
        - type: integer
        - type: number
        - type: string
        - type: boolean
        - type: object
        - type: array
          description: "Each array element is of type dpValueVariantType."
          items:
            $ref: "#/components/schemas/dpValueVariantType"

you might argue that this doesn't make much sense because the restriction to dpValueVariantType is actually no real restriction and you are right. This is more to document, that all that types can be used.
Maybe I will remove 'object' from the list, then it will make sense.

@nospam2000 thanks 🙏🏼
I think I would leave the object, and even put a real object there with circular refs. I don't think the example needs to make sense (look at our dummy asyncapi example 😄 ). Example that we need should represent as many possible options as possible

@nospam2000 thanks 🙏🏼
I think I would leave the object, and even put a real object there with circular refs. I don't think the example needs to make sense (look at our dummy asyncapi example 😄 ). Example that we need should represent as many possible options as possible

Now in reality I needed to remove "type: boolean" because our booleans are in fact 1 bit integers :-)

Now in reality I needed to remove "type: boolean" because our booleans are in fact 1 bit integers :-)


Add option to use "undercurl" for diagnostic "underline" errors

Hi,
it would be great to have a way to set "undercurl" instead of "underline" for the Lsp diagnostic errors, without overriding the colors manually. Currently it's hardcoded. Like a single option on the setup or something like that.
What do you think?

Hi, sure I could add a config option in the setup for it! Do you think it should apply to errors, warnings, information, and hints together or be separate? Also I think I'll make it so you can just change it to any style or combination like bold, italic, etc.

For me, having single option for all of them would do the trick, but if you want to offer more flexibility, that's even better. I'm ok with either.

Alright, I added a convenient option that does all 4 with styles.diagnostics and also a way to overwrite just the styles of any highlight group with custom_styles. Check it out and let me know what you think!

Works like a charm, thanks!


oq: 1.3.2 -> 1.3.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/Blacksmoke16/oq/releases.
meta.description for oq is: "A performant, and portable jq wrapper"
meta.homepage for oq is: "https://blacksmoke16.github.io/oq/"
meta.changelog for oq is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.3.3 with grep in /nix/store/mn7brcs3vvsx0xwk5yj131v75j5072k1-oq-1.3.3
found 1.3.3 in filename of file in /nix/store/mn7brcs3vvsx0xwk5yj131v75j5072k1-oq-1.3.3

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
oq

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/mn7brcs3vvsx0xwk5yj131v75j5072k1-oq-1.3.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A oq https://github.com/r-ryantm/nixpkgs/archive/2a8ce2f681df5f145be67d97852b70b9f6ad4816.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/mn7brcs3vvsx0xwk5yj131v75j5072k1-oq-1.3.3
ls -la /nix/store/mn7brcs3vvsx0xwk5yj131v75j5072k1-oq-1.3.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

oq

Maintainer pings
cc @Br1ght0ne for testing.

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

1 package built:

oq


Updating stackclub doc finding

Update where_is function
Updates to FindingDocs.ipynb and ImportTricks.ipynb notebooks.
Replace a missing gist url with a url to a matplotlib example
Closes #234

Note that ImportTricks.ipynb is pulling where_is from master, so it will fail until this PR is merged.
This PR is ready for review.

@fforster if you can check that FindingDocs.ipynb works and that ImportTricks.ipynb only fails on the where_is demo?


Master Infusion Crystal Bug

Describe the bug:
Crafting the infernium blocks into prudentium blocks uses up the master infustion crystal when it is not supposed to.
To Reproduce:
Craft any of the block upgrade recipes for the infernium to impermium blocks and it will happen.
Expected behavior:
Supposed to not use up the master infusion crystal in the center of the recipe.
Screenshots:
https://imgur.com/a/dRfUOKL
Versions:

Minecraft: 1.16.5
Fabric: 0.11.3
Mystical Agriculture: Refabricated: 1.16

same thing happening to me, infusion crystal is also being deleted by ae2 molecular assemblers and tech reborn auto crafter when crafting essence in block form AND non-block form

I have created a simple kubejs script to fix this issue, it replaces the recipes, just pop the file into server_scripts for what ever modpack you are using that has kubejs. if you don't have cube, I suggest looking up how to make datapacks and replace the files using that (same path as the mystical block recipes, "find a file" in GIT with the serch term "block_combine")
`events.listen("recipes", function (event) {
// prudentium_block
event.custom({
"type": "mysticalagriculture:infusion_crystal",
"pattern": [
" # ",
"#X#",
" # "
],
"key": {
"#": {
"item": "mysticalagriculture:inferium_block"
},
"X": {
"item": "mysticalagriculture:master_infusion_crystal"
}
},
"result": {
"item": "mysticalagriculture:prudentium_block"
}
}).id('mysticalagriculture:prudentium_block_combine')
// tertium_block
event.custom({
    "type": "mysticalagriculture:infusion_crystal",
    "pattern": [
        " # ",
        "#X#",
        " # "
    ],
    "key": {
        "#": {
        "item": "mysticalagriculture:prudentium_block"
        },
        "X": {
        "item": "mysticalagriculture:master_infusion_crystal"
        }
    },
    "result": {
        "item": "mysticalagriculture:tertium_block"
    }
}).id('mysticalagriculture:tertium_block_combine')

// imperium_block
event.custom({
    "type": "mysticalagriculture:infusion_crystal",
    "pattern": [
        " # ",
        "#X#",
        " # "
    ],
    "key": {
        "#": {
            "item": "mysticalagriculture:tertium_block"
        },
        "X": {
            "item": "mysticalagriculture:master_infusion_crystal"
        }
        },
    "result": {
        "item": "mysticalagriculture:imperium_block"
    }
}).id('mysticalagriculture:imperium_block_combine')

// supremium_block
event.custom({
    "type": "mysticalagriculture:infusion_crystal",
    "pattern": [
        " # ",
        "#X#",
        " # "
    ],
    "key": {
        "#": {
        "item": "mysticalagriculture:imperium_block"
        },
        "X": {
        "item": "mysticalagriculture:master_infusion_crystal"
        }
    },
    "result": {
        "item": "mysticalagriculture:supremium_block"
    }
}).id('mysticalagriculture:supremium_block_combine')

})`


How to set min_refresh_interval to 1s/500ms in Azure Managed Grafana

Hi Anshul
Thank you very much for sharing. I adapted you project to .NET 6 for the edge micro service, F1 2020 (since F1 2019 didn't start on steam on my Windows 11 PC) and tried to use azure managed grafana.
However, I don't see a way to set the min_refresh_interval environment variable in azure managed grafana. I know, this is out of your scope, but do you know by chance whether this is possible?
Thank you,
Roland

Hi Roland,
Great to hear your progress. I don’t believe managed Grafana or Grafana cloud supports <5s refresh. You might want to spin a VM via Azure marketplace & modify the settings, alternatively you can run it locally in a container.
https://azuremarketplace.microsoft.com/en-in/marketplace/apps/grafana-labs.grafana_oss?tab=overview

Hi Roland,
Great to hear your progress. I don’t believe managed Grafana or Grafana
cloud supports <5s refresh. You might want to spin a VM via Azure
marketplace & modify the setting, alternatively you can run it locally in a
container.
https://azuremarketplace.microsoft.com/en-in/marketplace/apps/grafana-labs.grafana_oss?tab=overview
thanks!
On Mon, 2 May 2022 at 2:58 PM, Roland Krummenacher @.***>
wrote:

Hi Anshul
Thank you very much for sharing. I adapted you project to .NET 6 for the
edge micro service, F1 2020 (since F1 2019 didn't start on steam on my
Windows 11 PC) and tried to use azure managed grafana.
However, I don't see a way to set the min_refresh_interval environment
variable in azure managed grafana. I know, this is out of your scope, but
do you know by chance whether this is possible?
Thank you,
Roland
—
Reply to this email directly, view it on GitHub
https://github.com/anshulsharmas/F1_ADX/issues/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGIVBORLOO4SMSJLAWBYFVLVH54JDANCNFSM5U3ESWSA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Simplify release process

Let's setup semantic-release and commitizen to simplify and automate the release process. Great video guide to all of it here: https://egghead.io/lessons/javascript-how-to-write-a-javascript-library-automating-releases-with-semantic-release

We should probably also be more diligent about squashing PRs before merging.

After stewing on this for a bit, it might be nice, but is probably more work than it is worth to setup. Also, how do you handle multiple breaking changes only causing a single major version bump? (perhaps semantic-release accomodates this, but I don't really know).

cc @knowbody if you have some time to set this up, I think this would solve the whole "Radium is never updated" thing :), and make my life a whole lot easier

On my flight back to London. I'll look at it when I land.
On Sun, Dec 27, 2015 at 8:47 PM -0800, "Ian Obermiller"<EMAIL_ADDRESS>wrote:
cc @knowbody if you have some time to set this up, I think this would solve the whole "Radium is never updated" thing :), and make my life a whole lot easier
—
Reply to this email directly or view it on GitHub.

Closing this out. We've got publishr now helps make this a little less painful.


Are there any plan to release a native build for ARM - MacOS M1 chip?

Unfortunatelly not, may be there is a way how to do it using github actions.

Can you give me a hint of what I should do？

You shoud fork this repo, and then look how the github actions are done in case of dcevm11 : https://github.com/TravaOpenJDK/trava-jdk-11-dcevm/actions , I would also suggest following project: https://github.com/uraimo/run-on-arch-action , may be you can go through Trava forks, may be some already solved this problem. Let know how you get on.

I downloaded the latest release "java8-openjdk-dcevm-osx.tar.gz" and install on my computer.The jvm can redefine the loaded class.It that means no promble?

Nice!


[RFC] Service client changes

Problem
Load balancing is currently done by explicitly creating a LoadBalancingClient and then using the CodecClientFactory (e.g. Redis.client.apply(sender: Sender[P, M]) to "lift" the client in to the appropriate client type (e.g. RedisClient).
val generator = (address: InetSocketAddress) => {
  Redis.client(address.getHostName, address.getPort)
}

val addresses                 = List.fill(3)(new InetSocketAddress("localhost", 6379))
val loadBalancingRedisClients = new LoadBalancingClient[Redis](worker, generator, 3, addresses)
val redisClient               = Redis.client(loadBalancingRedisClients)

I think it would be more user friendly if the client handled load balancing itself with a configurable retry policy. It should work for callbacks and futures.
Redis.client(addresses, RetryPolicy.RoundRobin(max = addresses.lenth, expoentialBackoff = true))

Notes from previous conversations

Add retry into on the serviceclient (separate for now, tbd later)
Yes, I think the way to do this is add a new config setting like "maxRetries" to ClientConfig, and then create a "RetryFilter" that extends Sender and wraps the client that is currently created.
Add loadBalancingClient to LiftedClient (or similar location)
So I think what we want to do here is create a ClientFactory for LoadBalancingClient.  This factory would require a regular client factory as a constructor param or something like that.  Then you can do something like Http.loadBalancingClient
Concept of filters to be applied to the send command (decorator)
So I think here we need to determine if this needs to be anything more than just a class that extends Sender and takes another sender as a constructor parameter.  Right now I don't think so, which means we already have everything we need to add filters.  Maybe there's some kind of DSL we would build around this, but it's not apparent that we need this.
Have the LBC expose a hostManager for client manipulation
So the idea here is the LBC doesn't expose a HostManager, but rather it requires one as a constructor parameter.  So you as the user would first create your own HostManager, pass it in when creating the LBC, and the result from that would just be a HttpClient (or whatever protocol you're using).  So you don't interact with LBC directly to change the hosts, but instead through the HostManager that you created.  If this isn't clear I'll write up some code examples.
Possibly have an error if only one client is passed to the LBC?
Interesting, I can see pro's and cons to this.  Actually....now that I think about it we probably don't want to do that.  For example maybe you have a situation where on startup you only have one host to connect to, but later on (like from config polling), you add more.  We don't want to forbid something like that.
Maybe have a convenience function called maxPossibleRetries that'll take the host size and the retry size and give you the min (for troubleshooting in config environments), this could be overkill.
Definitely something that can go on HostManager, but like I said we won't be able to add any methods to LBC itself since it'll just be a Sender

I agree with most of that (I think I wrote some of it lol!).
So all of the lifting stuff should stick around, but ideally we can abstract it all away from the user.  Maybe if a user wants to write their own module or filter, they can then use the lifting to build their own API around it.  But I totally agree that a regular application developer should not need to deal with it.
Load Balancing via Constructor and/or Mixin
What I think is possible is that, for example with the RedisClient constructor, we could have two constructors.  One takes in a single host/port, and another takes in a HostManager as described above.  The first would just create a single client while the second would create a load-balanced client:
//create a simple client
val client1: RedisClient = Redis.client("localhost", 6379)

//create a HostManager
val manager = new HostManager
manager.addHost("localhost", 6380)
val client2: RedisClient = Redis.client(manager)
manager.addHost("localhost", 6381) //sets up new connection under the hood

Under the hood this would create a LBC (which would take in the host manager as a constructor param) and lift it into a RedisClient.
It would be tempting to eliminate the first option and just make every client load-balanced, even when you only have one host, but I would like to avoid that if possible.  LBC does add some overhead and if eventually we create other type of modules like LBC, we don't want to always bake them all in.
Retries
I definitely think retries should be done via a filter.  This is now possible to do in 0.9.0, though there is not yet a formalized notion of a "filter".  But basically it would just be a trait that implements Sender and wraps another Sender.  When the ClientFactory is creating the client, it can see if retries is > 0 and if so, wrap the client in a retry filter before it gets lifted.  The filter then just flatMaps on incoming requests to do retries/backoffs.
Final Thoughts
Load balancing and retries offer two use cases for augmenting a client.  I hope we can figure out a solution that can address these cases in a somewhat generic fashion, so any other plugins/modules we create won't require so much work.

I hacked together some basic code that I think does what you explained with the hostmanager and loadbalancer concepts: https://github.com/tumblr/colossus/compare/develop...sc?expand=1
I didn't understand the retry filter idea. At least with a load balancer, I think the standard strategy for a particular request is to iterate over each client until one works or none are left. To do that, the filter would need to keep track of which client has been sent to (or be able to generate a list to try).

Yeah that code mostly reflects what I was thinking.
The retry filter is for when you want to do retries without a load-balancer.  I know I've had conversations in the past about trying to pull retries out of the load-balancer so you could do just load-balancing, just retries, or both together.  The problem is as you said though, you need a way to keep track of tried hosts per request.  The solutions I've thought of seem really messy, so I don't think that's the way to go.
So I see two options:

Forget about trying to separate out retries.  So even if you're just connecting to one host over one connection, if you want retries you have to use a load-balancer.  In which case I'd say the name "Loadbalancer" isn't even accurate anymore, and we should think of a different name, maybe something like "RichClient"......This also starts to lead me to believe that maybe we should make this layer a part of every client by default, since it seems like more often than not you're going to want this stuff.

Have a separate retry filter for single connections, but try to minimize code duplication.  This is what I was originally thinking to do.

I'm leaning on having this layer on every client. We could have a special HostManager class that is used when there is only one host with no retries, which effectively would call directly to the underlying client with no extra logic. Therefore, we would only be adding one extra method call. Maybe the JVM is smart enough to compile that away :)

Having thought about it more, we effectively would still allow the user to create a "one host, no retries" client, so there is no need for an extra layer. If the user wants "one host, x retries" then there has to be an extra layer with logic.

@benblack86 yep that's pretty much what I'm thinking.  All of this logic should be able to be done inside the client factory and be transparent to anyone creating a client.


Empty Context Processor

I have a case where I sometimes add a variable to context via a context processor and sometimes it is an empty dict depending on some logic. In such a case Django Debug toolbar errors with 'NoneType' object is not iterable
I believe it the issue is in the "_request_context__init__" method in the panel.py file.  Seems we are checking for the context processors here but did not put in the logic for if none.  My fix was to simply change the line:
line 57.  updates.update(context)
to
if context:  updates.update(context)
Not sure if this has other implications but seems to work for now.  If it is not a bug and is my own misunderstanding please let me know. I figured I would let you guys know...keep up the good work.

I have the same problem - it comes when a user has not authenticated yet. I patch my local install by adding
if context:
    updates.update(context)

I'll put a pr for it.

I think I found what caused this in my case...
I had a custom context processor in my django config for templates. One of my processors was to get a few user props for logged in users, and was only returning a context for logged in users. It seems the a context processor must ALWAYS return, even if empty.
If I have a processor "context_processors.user",
def user(request):
    """Context processor for user information."""
    if not request.user.is_anonymous:
        return {
            "permissions": request.user.get_permissions(),
            "user": request.user,
            "favorites": request.user.get_starred_reports(),
        }
    # context processor must ALWAYS return a dict
    return {}

@matthiask There's a relatively recent ticket for adding a check to Django for context processors that return a non-dictionary value. I've seen this occur a few times now. I'm in favor of logging an warning/error in the console when this is encountered, but allow the toolbar to continue processing. This is a painful problem for developers and a source of support tickets for us.

Yes, I agree. It would definitely be an improvement if django-debug-toolbar wouldn't crash :)


change event for a field in *.ts file

I have a field with this name 'ApplicantHealthStatusHistories_CommisionId'
in a ts file.
I want to check if this value changed, something happens but I don't know how to check this change.

Try something like this inside your XYZDialog.ts file:
protected form: XYZForm;

constructor() {
    super();

    this.form = new XYZForm(this.idPrefix);

    this.form.ApplicantHealthStatusHistories_CommisionId.change(e => {
        console.log("It changed");
    });
}

the ApplicantHealthStatusHistories_CommisionId is a foreign key as sub table in this form.
it shows a related table on this form ,so it doesn't have change event but I want to if some record added to this table
a message will show like change event.


sendAll "fix", user pkgdb patch

Removed the re-implementation of sendAll because latest network library should have the correct implementation for lazy ByteStrings. Do not convert to a strict ByteString. Have not been able to reproduce the incomplete response issue since implementing this fix.
Do Not Bail on the scan process if the user package db path is empty (or ghc-pkg does not produce output.) Just use an empty string as the path name. This also fixes other issues with SublimeHaskell not being able to get completions, not being able to show signatures for hovers, etc.
hsdev.cabal dependencies were sorted, which makes them easier to update. Happy to revisit the constraints so that the lower bound is GHC 8.0.2 and the upper bound is GHC 8.2.2.

Looks good. I'll also try to build in on windows tomorrow.


Update project dependencies

This updates all Android build dependencies to the latest versions (as of March 2nd 2017).
Please NO GitHub rebase/squash merges. If you'd like me to combine some or all of the commits, please let me know, and I will update my branch. Thank you.

Sure. Let me add some explanations. :)

The stable version of Android Studio 2.3.0 and the matching Gradle plugin were released today - I amended Update Gradle wrapper and plugin using a fixup commit, to reflect the latest version.

The stable version of Android Studio 2.3.0 and the matching Gradle plugin were released today - I amended Update Gradle wrapper and plugin using a fixup commit, to reflect the latest version.

Thanks!

Thanks @friederbluemle :D


exec() breaks if executed in a deleted directory

Sample:
$ node
> sh = require('shelljs')
> sh.mkdir(sh.tempdir() + '/deleteme')
> sh.cd(sh.tempdir() + '/deleteme')
> sh.rm('-rf', sh.tempdir() + '/deleteme')
> sh.exec('echo hi')

This works in bash:
$ mkdir /tmp/deleteme
$ cd /tmp/deleteme/
$ rm -rf /tmp/deleteme/
$ echo hi
hi

@nfischer: What do you think about this? I'm not really sure if we should support this. (Nor if it's possible, because we execute each command separately, and we can't cd into a deleted directory).

I don't think we should support this.

I'm not sure how we would, since exec() forks a shell, which has to start in some directory (and cwd makes the most sense)
I don't think this affects a large number of users
It actually does work if you swap exec(...) with the native shelljs echo()

I vote to close this issue. @amjibaly if you really need this behavior, provide a more useful example and I'll gladly reconsider.

Me too... Closing. @amjibaly: feel free to reopen if you have useful example.