Cannot resolve types in referenced assemblies

While deserialization, if the reference assembly is not resolved yet, Ceras throws a System.Exception.
Additional information: Cannot find type X after searching in all user provided assemblies and all loaded assemblies...
Maybe it is a normal behaviour of deserializer, but not sure. I came through with 3 different (not so cool) approach

I generated a dummy object with this type before deserialization and it worked.
I traversed the dependency hierarchy using a graph traversal logic and load all assemblies manually
with Assembly.Load
I tried to load all .dll files in the executable folder with Assembly.Load (in a try-catch scope)

Do I miss something?

There are multiple ways to solve this.
Tell me a bit more about the situation so I can help best.
What type is it that ceras is trying to deserialize that is not yet loaded?
Where does that type usually come from?
Are you able to directly access that type statically? Like a normal project/dll reference in visual studio?
Or is it like a sort of "plugin" that you have to discover through reflection?  Where you only know that the target types implement one of your "IPlugin" interface and you have to search for them...

Type is user-defined class, like "class MyClass"
This type is defined in assembly Ref1.dll and this assembly is referenced in the project references,
I could directly access this type statically, it is not a plugin.
My guess is, this reference is not loaded by AppDomain till first usage for an optimization.
For instance, if a create a dummy object with type "MyClass", related assembly (Ref1.dll) is loaded now and then I could deserialize the binary successfully.

Yes, that makes sense.
That's a pretty simple scenario.
So what solution do you think would be the best actually?

You could just access the type manually (writing typeof(MyClass) somewhere in the method) which is what you're already doing...
I could modify the type-loader to expand the search to other assemblies, but I'm not sure if that will scale well. Gathering all assemblies and all types inside it.
I could add some way where you could add custom assemblies to the type resolver. Maybe something like config.SerachTypesInAssemblies.Add(typeof(MyClass).Assembly);

Actually I'm not even sure if it is possible to find the assembly or if it gets loaded later and isn't even available until then...
I'll investigate that a bit later today.
Let me know what kind of solution you can imagine or what solution you would like to use, and then we can figure something out :)

Yes, that makes sense.
That's a pretty simple scenario.
So what solution do you think would be the best actually?

You could just access the type manually (writing typeof(MyClass) somewhere in the method) which is what you're already doing...
I could modify the type-loader to expand the search to other assemblies, but I'm not sure if that will scale well. Gathering all assemblies and all types inside it.
I could add some way where you could add custom assemblies to the type resolver. Maybe something like config.SerachTypesInAssemblies.Add(typeof(MyClass).Assembly);

Actually I'm not even sure if it is possible to find the assembly or if it gets loaded later and isn't even available until then...
I'll investigate that a bit later today.
Let me know what kind of solution you can imagine or what solution you would like to use, and then we can figure something out :)

I prefer Method3 ( I could add some way where you could add custom assemblies to the type resolver). But if you think it is not a neat way, I could survive with the first solution.

@thorichelli I'll add an api for that and post here once its done. :+1:
When the other issues are fixed as well I'll upload a new rc version to nuget :)

This commit adds CustomSearchAssemblies
https://github.com/rikimaru0345/Ceras/commit/c3a2521f995a63085a855ee086909dbae5a71ed9
create a SimpleTypeBinder (or cast the one that is there by default in the config).
Then add your assemblies to simpleTypeBinder.CustomSearchAssemblies.
If you've created a new type binder you need to assign it to config.Advanced.TypeBinder.
That should solve it. Let me know if there are any problems :smile:

The new version is live on nuget now:
https://www.nuget.org/packages/Ceras/4.0.22


Implement Flask-RESTX (Refactoring basic Flask)

As an Order Manager
I need to move from a basic Flask application to one that uses Flask-RESTX
So that I can successfully continue building RESTful APIs with Flask
Assumptions
•	Flask-RESTX provides additional features and tools that can help simplify development and reduce the risk of errors
Acceptance Criteria

Micro Service refactored to use Flask-RESTX
All HTTP errors return json error massages (not html)
Test cases run, confirmed that implementation still works like the original

Requirement 5: Refactor using Flask-RESTX and Swagger, Story 1/2

Hey team! Please add your planning poker estimate with Zenhub @bartconsedine @EmiliePourchet @LotteLa @marianaruizallende @nilesh1401 @Victoria-Obasa


[5.7] Bug fix related to extra calls to resolving callbacks

Add missing tests for the resolving callbacks on the container

bug fix related to multiple calls to resolving callbacks
The issue is described here :
https://github.com/laravel/framework/issues/23699
Also a retry for:
https://github.com/laravel/framework/pull/23701
https://github.com/laravel/framework/pull/23290

@GrahamCampbell Should this be on master ? or 5.7 is ok ?

Note that exact same problem exists for afterResolving callbacks too,
By placing the check down within the getCallbacksForType we target both.
A test is also added to show that this problem is affecting afterResolving as well.

A lot of tests are added, I know they may look more than needed, but each of them cover a unique case and they all should exists.
Seems to be finished on my side.
And happy new year. 🎄 🎄

Note that an other way of fixing it is made here: https://github.com/laravel/framework/pull/27014
which I think is a lot better,


Windows bat file doesn't use quotes for env vars (as opposed to bash)

thanks! will be in next DR :-)


buildFHSUserEnv dns broken when hosts resolv.conf is a symlink

Issue description
Using buildFHSUserEnv in a (unprivileged) nix installation on a debian host system generates the following sequences of symlinks (in the fhs environment) for me:
/etc/resolv.conf -> /nix/store/[...]-usr-target/etc/resolv.conf -> /nix/store/[...]-chrootenv-etc/etc/resolv.conf -> /host/etc/resolv.conf -> /etc/resolvconf/run/resolv.conf
The last one comes from the host system and is invalid inside the sandbox (it should now point to /host/etc/resolvconf/run/resolv.conf).
Technical details
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

system: "x86_64-linux"
host os: Linux 4.9.0-8-amd64, Debian GNU/Linux, 9 (stretch)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.2

on nixpkgs-19.09pre173080.1222e289b50

The code here assumes that all files referenced are not symlinks. Its not trivial to fix however, because the paths the links refer to don't exist at the time the etcPkg derivation is build, so it can't just look up the real paths.

I was looking for something else and found this issue.
Huh, that is painful, and doesn't seem like it should be reliable on NixOS either. I guess this explains why systemd-nspawn either bind-mounts or copies resolv.conf into the container.
I bet /etc/zoneinfo and /etc/localtime are broken for you as well, right? Those point into the Nix store on NixOS but IIRC they point into /usr somewhere on most distros, and that directory is not bind-mounted because it's what's supposed to be built for the chroot...
I see there's been a fair bit of commit activity on the whole build-fhs-userenv directory since the version you linked to. I haven't checked whether any of it is relevant to your issue but you might want to take a look at nixpkgs master.
I think the quick workaround for you, if you're using the version you linked to, is to remove ${env}/* from this line: https://github.com/NixOS/nixpkgs/blob/5e5e57c5728722450091160b2b0dbf53a311b230/pkgs/build-support/build-fhs-userenv/default.nix#L14
Then it should just symlink /host/etc to /etc and your symlink to /etc/resolvconf will work fine.
I'm not sure what a good long-term fix is though.

Yes, /etc/zoneinfo and /etc/localtime are broken as well, though less critical for my purposes.
My stop-gap solution was/is to change this https://github.com/NixOS/nixpkgs/blob/5e5e57c5728722450091160b2b0dbf53a311b230/pkgs/build-support/build-fhs-userenv/env.nix#L87 line and hard code the correct (as in correct on my system) path there.
Obviously not a good solution to the general problem.

I see there's been a fair bit of commit activity on the whole build-fhs-userenv directory since the version you linked to. I haven't checked whether any of it is relevant to your issue but you might want to take a look at nixpkgs master.
Nope, sadly no change  for me.

Well a low tech solution might be to just add some options to buidFHSUserEnv which allow to conveniently specify the right paths on the host system. That would sort of document, that there might be a problem, and the user will usually know what the correct paths ought to be.

This is probably resolved by using buildFHSUserEnvBubblewrap from #94442, but I no longer have this setup, so can't confirm.
Still I guess if people have issues like this with the new  bubblewrap based infrastructure, they can open a new issue.


feat: pass user config to the on_setup hook

This is to allow 3rd party plugins to discern between what is
lspconfig's vendored server config and what the user provided.
Currently, these are merged into a single table which is passed to the
on_setup hook. Passing user_config as a 2nd argument would allow 3rd
party plugins to apply a more sensible precedence of configs.

LGTM


Upgrade to the latest version of Storybook

Summary
A major version of Storybook is out and it has MDX support.  It would be neat to migrate to the latest version and also potentially move to using MDX instead of storybook-readme?

#301


updated NPM ignore to contain only transpiled code

What

Updated NPM scripts to run build before publishing
Removed all source codes from NPM

Where
.npmignore file
Tests

Installed as module and tested basic functionality
Unit test N\A

Coverage remained the same at 100.0% when pulling fbdbd7946e9a00697fb0cea0cfff66c00cd20831 on npm-fix into b7ce4233a2376ecd88081452807c69033c5cf5ca on master.

Coverage remained the same at 100.0% when pulling 402b06f0eef2df8127c713c78e7c32c47f4e97ae on npm-fix into ee08d8631501f8af41b3cf991f9bd79cd5cade56 on master.


Bump vite and (some) otel packages

Replaces https://github.com/sillsdev/languageforge-lexbox/pull/874
Initially I deleted the viewer pnpm-lock.yaml, because I realized that it shares the frontend's lockfile. But, I'm not sure how deleting it might affect the local-web-app and mabye other stuff.
So, I temporarily used shared-workspace-lockfile=false (which seems to be undocumented. pnpm has not convinced me 😉) in .npmrc to update the viewer lock file, which was waaay out of date 😆.

I know, I deleted the viewer pnpm-lock.yaml...it seems to me that the viewer shares the frontend's lock file. 🤔

I'm planning to open a follow up PR that removes the lock file, because that's probably the right thing to do.


Implemented overrideInternal for Metal

The internal pointer is interpreted as being of type id MTLTexture.

cc @attilaz

Metal changes looks good to me.
Avoiding release in destroy seemed strange (I was thinking about incrementing refcount in overrideinternal, to avoid losing texture when user released outside references, but I see this is the policy in other renderers and this is for advanced users)

void overrideInternal(uintptr_t _ptr)
{
destroy();
m_flags |= BGFX_SAMPLER_INTERNAL_SHARED;
m_ptr = (id)_ptr;
}
Cast of 'uintptr_t' (aka 'unsigned long') to 'id' is disallowed with ARC
// Xcode is arc
What should I do?

disable ARC


Flutter Gallery App does not run on 3rd Gen Moto G running Android 6.0

Steps to Reproduce

Get a Moto G, 3rd generation running Android 6.0
Install Flutter Gallery from Play Store
Open the app

See this video:
https://drive.google.com/file/d/0Bz-6p6pPbXi_ZTJlb1BJejlqaW8/view?usp=sharing

Yes, this is an unfortunate regression (https://github.com/flutter/flutter/issues/6347) which happened to be in the tree when we last updated the gallery 6 months ago.  We have a bug about pushing a new version: https://github.com/flutter/flutter/issues/7983
For now I would recommend not using the version on the Play store.  It's possible we should remove it or update it sooner than planned if we believe it's setting a bad first impression. @sethladd
It's straightforward to build/install yourself using flutter run --release inside examples/flutter_gallery.  Also our (public) builders make a new apk on every commit, e.g search for galery in:
https://build.chromium.org/p/client.flutter/builders/Linux/builds/2919

We believe we have shipped a version with a fix. Please don't hesitate to reopen if you still see this.


Fix Table::grow; more tests

API CHANGE: Add init parameter to Table::grow/wasm_table_grow.
API CHANGE: Make init parameter default to nullptr for Table::make and Table::grow.
Correctly handle nullptr as init value in Table::make/wasm_table_make.
Check against max size for Table::grow/wasm_table_grow, since V8 does it in a different place.
Add tests for Table::make/wasm_table_make and Memory::make/wasm_memory_make.
Add tests for growing at and beyond max limit.

This probably subsumes PR #39.

@lostman, FYI.


Implemented VirtualMedia actions - insert and eject media

Added routes
Implemented VirtualMedia actions - insert and eject media
Updated Unit tests

Few files have indentation issues, please run go fmt in all changed source dirs

Please check now


Added translation for cdn-links.md

Hindi Translation Progress #1
Adding the Hindi translation for the CDN Links page.

just 2 comments. This should be easy to fix. Thanks :)

Thanks @AninditaBasu!


Angular 6 doesn`t work with Knobs

If you are reporting a bug or requesting support, start here:
Bug or support request summary
Cannot use Angular 6 (webpack 4) with knobs. Works fine without knobs
Uncaught Error: Unexpected value 'undefined' declared by the module 'DynamicModule'
compiler.js:215 Uncaught Error: Unexpected value 'undefined' declared by the module 'DynamicModule'
    at syntaxError (compiler.js:215)
    at compiler.js:10508
    at Array.forEach (<anonymous>)
    at<EMAIL_ADDRESS>(compiler.js:10506)
    at<EMAIL_ADDRESS>(compiler.js:22567)
    at<EMAIL_ADDRESS>(compiler.js:22548)
    at<EMAIL_ADDRESS>(compiler.js:22508)
    at<EMAIL_ADDRESS>(platform-browser-dynamic.js:143)
    at<EMAIL_ADDRESS>(core.js:4790)
    at draw (helpers.js:89)

Steps to reproduce

install storybook
update packages to v4.0.0-alpha.3
install knobs
import

import { text, withKnobs } from '@storybook/addon-knobs';

add decorator before stories

addDecorator(withKnobs)

or in story
storiesOf('Button', module)
.addDecorator(withKnobs)

Please specify which version of Storybook and optionally any affected addons that you're running
    "@angular/core": "^6.0.3",

    "@angular/cli": "~6.0.5",

    "@angular/compiler-cli": "^6.0.3",

    "@storybook/addon-actions": "v4.0.0-alpha.3",
    "@storybook/addon-knobs": "v4.0.0-alpha.3",
    "@storybook/addon-links": "v4.0.0-alpha.3",
    "@storybook/addon-notes": "v4.0.0-alpha.3",
    "@storybook/addons": "v4.0.0-alpha.3",
    "@storybook/angular": "v4.0.0-alpha.3",

With story configuration as
import { text, withKnobs } from '@storybook/addon-knobs';

import { Welcome, Button } from '@storybook/angular/demo';

storiesOf('Button', module)
  .addDecorator(withKnobs) // works fine without this line (no knobs)
  .add('with text', () => ({
    component: Button,
    props: {
      text: 'Hello Button',
    },
  }))

the code in helpers.ts fails:

var initModule = function (currentStory, reRender) {
    if (reRender === void 0) { reRender = false; }
    var storyObj = currentStory();
    var component = storyObj.component, template = storyObj.template, props = storyObj.props, styles = storyObj.styles, _a = storyObj.moduleMetadata, moduleMetadata = _a === void 0 ? {} : _a;

component is undefined, so declaration has undefined

function withKnobs(storyFn, context) {
return wrapperKnobs()(storyFn)(context);
}
Context had undefined fileName parameters
kind:"Button"
parameters:{fileName: undefined}
story:"with some emoji"

Hey @ev45ive, this looks similar to #3614. Can you try either

could you try it out with storybook v4.0.0-alpha.7 and see whether it resolves your issue? https://github.com/storybooks/storybook/issues/3614#issuecomment-390807269

or

You have to import knobs from @storybook/addon-knobs/angular, not from @storybook/addon-knobs. It works with 3.4.5. https://github.com/storybooks/storybook/issues/3614#issuecomment-392150241

and see whether it resolves the issue?

Changed import to  @storybook/addon-knobs/angular
Then it complained about 'react' 'react-dom' and 'babel-core'
then it worked perfectly! Thanks a lot @Keraito !
Please make sure Docs are updated - now its misleading telling you to include @storybook/addon-knobs instead of @storybook/addon-knobs/angular
https://github.com/storybooks/storybook/tree/v4.0.0-alpha.7/addons/knobs#with-angular

master docs are for alpha, here's docs for 3.4
https://github.com/storybooks/storybook/tree/release/3.4/addons/knobs
Sorry for the confusion
-- https://github.com/storybooks/storybook/issues/3614#issuecomment-392325624

No problem @ev45ive, glad it worked for you. Thank you for noticing us, we are aware of this (see quote above) and this is actually something that has to do with how we manage branches. Sorry for the confusion.


LogicApp: Certificate Authentication for HTTP GET Action not working (Clone of  #51400)

Hi, I'm trying to add HTTP GET action with Client Certificate authentication to my logic app, but receiving an error: BadRequest. Could not load the certificate private key. Please check the authentication certificate password is correct and try again..
I'm converting *.pfx file to the base64string as described in https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-securing-a-logic-app#client-certificate-authentication. And I'm using the password which I'm using during installation certificate on my local machine (just with double click on it). And on the local machine it is installing good with that password.
I tried to generate a different self-signed certificates and convert them to base64string with powershell, but every time I'm getting the same error.
I'm generating certificates with Powershell script:
`param(
[Parameter(Mandatory=$true)][string] $name,
[Parameter(Mandatory=$true)][string] $password
)
$cert = New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -KeyAlgorithm RSA -KeyLength 4096 -KeyFriendlyName "$name" -DnsName "Test.$name"
$pwd = ConvertTo-SecureString -String "$password" -Force -AsPlainText
$path = 'cert:\localMachine\my' + $cert.thumbprint
Export-PfxCertificate -cert $path -FilePath "$name.pfx" -Password $pwd`
Input parameters: TestCert Aa123456
Could you please help me to understand why can't I use my certificates with logic app HTTP calls?
Best regards,
Rostyslav

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

ID: 88388cfb-3f47-e89b-ad03-01d0c9674dc6
Version Independent ID: 21df1ee4-6487-b054-2a62-152e7bc768f6
Content: Call service endpoints by using HTTP or HTTPS - Azure Logic Apps
Content Source: articles/connectors/connectors-native-http.md
Service: logic-apps
GitHub Login: @ecfan
Microsoft Alias: estfan

Hi @stefrostik Thanks for reaching out. We will review and update as appropriate.

Hi, @DixitArora-MSFT , do you have any updates on this? This problem is very critical for me.

@ecfan Please provide your inputs on this ?

Hi, @ecfan , @DixitArora-MSFT , please update the status of this problem.

@stefrostik I am checking with Product Group internally and already expedite the process from my end. Will keep you posted for any further updates , once I got any update.

@DixitArora-MSFT , thanks, sorry for pushing.

@stefrostik It is taking time in taking response. As it is quite urgent for you, Just checking if you have a support plan and open the support request ? Please do let me know if you don't have.

@stefrostik Please let me know if you don't have the support plan, If not, just let us know as we're able to grant you a one-time free support case to resolve this issue. Recommendation in this case to open a support case to troubleshoot this issue together with a service engineer who has deeper insight to your environment.
For now I will proceed with closure of this. Please tag me in your reply and we will gladly continue the discussion and we will reopen the issue.
This channel is for driving improvements towards MS Docs, for any product related question/issue I would recommend you to create a thread on the forums- MSDN / Stackoverflow. Once you post your issue on forums, it will have visibility across the community which is a better suited
audience for such types of issues.


adding gauge metric for filterCache.hitratio

next to the document, query result and field value cache the filter
cache is quite important as well and this commit will expose it as
a core metric

as no one seems interested and I don't use signalfx anymore I will close this one..


Unclosed script/style tag handling Fixes #1614

Explicitly handle unclosed

Also, I ran a real-world webpage (https://www.atlassian.com/git/tutorials/rewriting-history) through pygmentize with html formatting on both the old code and the new and got the same pygmentized output. So happy path seems to be unaffected.


Unable to load application or execute command 'web'.

From a clean env,
DNVM install
DNVM use default
DNU restore
DNX . Web
System.InvalidOperationException: Unable to load application or execute command
'web'.
at Microsoft.Framework.ApplicationHost.Program.ThrowEntryPointNotfoundExcepti
on(DefaultHost host, String applicationName, Exception innerException)
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host,
String applicationName, String[] args)
at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
C:\Users\Vincent\Downloads\YoloDev.Dnx.FSharp-master\YoloDev.Dnx.FSharp-master\s
ample\HelloFSharp>dnx . kestrel
System.InvalidOperationException: Unable to load application or execute command
'kestrel'.
at Microsoft.Framework.ApplicationHost.Program.ThrowEntryPointNotfoundExcepti
on(DefaultHost host, String applicationName, Exception innerException)
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host,
String applicationName, String[] args)
at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)

HelloFSharp is not a web application. It does not have web or kestrel commands defined. Try dnx . run.

I'm closing this issue. Please let me know if you can't get it to work.

Thank.
Still not good :(
Witch dnx version are you using ?
Got many many errors on  1.0.0-beta6-12032

Can you show me the output? Also, what command are you running, and where?

dnvm list

Active Version           Runtime Architecture Location                       Alias

   1.0.0-beta4       clr     x64          C:\Users\Vincent\.dnx\runtimes
   1.0.0-beta4       clr     x86          C:\Users\Vincent\.dnx\runtimes
   1.0.0-beta4       coreclr x64          C:\Users\Vincent\.dnx\runtimes
   1.0.0-beta4       coreclr x86          C:\Users\Vincent\.dnx\runtimes
   1.0.0-beta6-12032 clr     x86          C:\Users\Vincent\.dnx\runtimes default

dnvm use default
dnu restore
dnu . run

too many errors to list here.
show you last one
C:\YoloDev.Dnx.FSharp-master\src\YoloDev.Dnx.FSharp\FSharpCompiler.cs(
234,13): error CS0103: The name 'PlatformHelper' does not exist in the current context
   at Microsoft.Framework.Runtime.Roslyn.RoslynProjectReference.Load(IAssemblyLoadContext loadContext)
   at Microsoft.Framework.Runtime.Loader.ProjectAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext load
Context)
   at Microsoft.Framework.Runtime.Loader.ProjectAssemblyLoader.Load(AssemblyName assemblyName)
   at dnx.host.LoaderContainer.Load(AssemblyName assemblyName)
   at dnx.host.DefaultLoadContext.LoadAssembly(AssemblyName assemblyName)
   at Microsoft.Framework.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory)
   at Microsoft.Framework.Runtime.Loader.LoadContext.LoadAssemblyImpl(AssemblyName assemblyName)
   at Microsoft.Framework.Runtime.Loader.LoadContext.ResolveAssembly(Object sender, ResolveEventArgs args)
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

Maybe I have problem on dnx installation ^^

Try dnx --version and dnx . run (not dnu . run). You might be running on beta4, which will not work. Also, there is obviously the chance that the later versions of DNX broke something, I haven't tested it in ~1 week (meaning it's highly likely something broke ^^).


make Contact us page Functional: Interactive Phone Number and Email Integration #714

Description
when clicking on the mobile number of Gmail there was no effect now a popup and the number is copied to clip board depending on the device.
Fixes #714
Screenshots
https://github.com/SurajPratap10/Imagine_AI/assets/99162236/cae9d7cc-4dde-4f43-9d16-2059978b3402

Checklist

[x] Tests have been added or updated to cover the changes
[x] Documentation has been updated to reflect the changes
[x] Code follows the established coding style guidelines
[x] All tests are passing

@SurajPratap10 plz review the changes


control.getAttribute returns array of attributes for Form Component control

Steps to reproduce:

Add the Form Component to a lookup control on a form
Call formContext.getControl('lookupControlName').getAttribute() on the lookup control.

Expected outcome:

Per docs at: https://github.com/MicrosoftDocs/powerapps-docs/blob/main/powerapps-docs/developer/model-driven-apps/clientapi/reference/controls/getAttribute.md

getAttribute should return an attribute object.

Actual Outcome:

getAttribute returns an array of Attributes from the form that is referenced in the FormComponent control.

@beyro
Thanks for your feedback.
The feedback mechanism works best when you start from the published topic, rather than the source code in GitHub. This way the feedback gets routed to the owner based on the topic metadata and we can respond faster.
This topic: control.getAttribute (Client API reference) describes the method to find the attribute that is bound to the control. As you mention, this should be a single attribute.
I'm not sure what you mean by 'Form Component' or how you would apply it to a lookup.
Does it make sense that there should be multiple attributes returned?
If you want to report a bug, I recommend you contact technical support.
If you think there is a missing use case for this not covered in the docs, please explain more about what that is.
Thanks,

@JimDaly Thanks for the reply and your patience with my roundabout way of getting this feedback to you... I see now I should use the Feedback button at the bottom of the topic page - will use that next time!
This could be either a bug or a missed use case in the docs so I guess I'm looking for clarification of expected behavior.
When I say "Form Component Control", I mean the Form Component PCF control that is available with Dynamics 365 OOTB as described in the docs here:
https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/form-component-control
When you add this control to a lookup field, then calling control.getAttribute on it, returns an array of all the attributes on the  XML tag in the "Forms" property of the PCF control.
Based on the getAttribute docs, this is not expected behavior, but I thought maybe it is expected and the docs just need to be updated because it kind of makes sense to be able to access the attributes of the referenced form in this way.

@beyro
Thanks for the explanation. I wasn't aware of the form component control.
That definitely doesn't seem like expected behavior.
The docs say: Edit related table records directly from another table’s main form > Client API

Client API
A form context is available for the form component control. It can be accessed via the main form's form context by accessing the control via an API, such as getControl. Before you access data for the related table in the form component control, event handlers should wait for the isLoaded API for the control to return true.

If I'm understanding you correctly, your code running on the main form and you are accessing the control using something like the sample here: isLoaded (Client API reference) > Example
function getAttributeValue(executionContext) {
    var formContext = executionContext.getFormContext();
    var quickViewControl = formContext.ui.quickForms.get("<QuickViewControlName>");
    if (quickViewControl != undefined) {
        if (quickViewControl.isLoaded()) {
            // Access the value of the column bound to the constituent control
            var myValue = quickViewControl.getControl(0).getAttribute().getValue();
            console.log(myValue);

            // Search by a specific column present in the control
            var myValue2 =  quickViewControl.getControl().find(control => control.getName() == "<AttributeSchemaName>").getAttribute().getValue();
            console.log(myValue2);

            return;
        }
        else {
            // Wait for some time and check again
            setTimeout(getAttributeValue, 10, executionContext);
        }
    }
    else {
        console.log("No data to display in the quick view control.");
        return;
    }
}

The Remarks for IsLoaded says:

The data binding for the constituent controls in a quick view control may not be complete during the main form OnLoad event because the quick view form that the control is bound to may not have loaded completely. As a result, using the getAttribute or any data-related methods on a constituent control might not work. The isLoaded method for the quick view control helps determine the data binding status for constituent controls in a quick view control.

If you haven't waited for the IsLoaded event, perhaps the multiple attributes is how it '.. might not work'?
Can you confirm you are waiting for IsLoaded?

@JimDaly
Yes, I am waiting for isLoaded but I am not getting the control via formContext.ui.quickForms.get like in the example.
I am getting it while iterating through the controls of a section something like the example below. This script is running on a Case form and the Form Component control is linked to the Work Order Service Task main form:
const section = formContext.ut.tabs.get('tabName').sections.get('sectionName')
section.controls.forEach(c => {
    if (c.isLoaded) {
        const attribute = c.getAttribute()
        // attribute is now a collection of attributes
        // The below outputs the attributes found on the Work Order Service Task Main form
        attribute.forEach(a => console.log(a.getName()))
        // msdyn_surveyboundedoutput
        // msdyn_workorder
        // msdyn_customerasset
        // msdyn_workorderincident
        // msdyn_agreementbookingservicetask
        // msdyn_booking
        // msdyn_name
        // ownerid
        // msdyn_lineorder
    }
})

Interestingly, while the Form Component control does implement isLoaded like a QuickView control, it seems that Form Component controls are not part of the collection formContext.ui.quickForms.
Also, if you call formComponentControl.getControlType, it returns 'formcomponent', which is not one of the documented control types found here: getControlType

@beyro
I've assigned this to @adrianorth because he is the author of control.getAttribute (Client API reference)

@beyro
Have had a thread with the dev team and this is what we have so far:

A control can be associated with more than one attribute, so it seems it is possible for this method to return multiple attribute references. The control would have multiple attributes in the manifest. So we should update this topic to reflect that.

The Form Component control you are using is bound to a single lookup attribute, so it should not return multiple attributes. So, unless there is some other reason to expect multiple attributes to be bound to the control, you should contact technical support to report this.

@JimDaly @adrianorth
Sorry for the delay in getting back to you on this.
It seems that getting the Form Component control via formContext.getControl is returning the formContext of the main form  referenced by the Form Component control.
If you call formContext.getAttribute() with no arguments from any main form, it also returns an array of all attributes on the form similar to how `formContext.,getControl('nameOfControlBoundToFormComponent').getAttribute() returns a collection of attributes.
In the docs for the Form Component control, it says

A form context is available for the form component control. It can be accessed via the main form's form context by accessing the control via an API, such as getControl. Before you access data for the related table in the form component control, event handlers should wait for the isLoaded API for the control to return true.

I think this is saying that if you call formContext.,getControl('nameOfControlBoundToFormComponent'), it should return you the formContext of the bound main form.
This seems to be true because calling
formContext.getControl('nameOfControlBoundToFormComponent').getAttribute("msdyn_workorder").getValue()

works to get a specific attribute from the main form linked through the Form Component.
So I think this is behaving as expected, but the Form Component docs are not 100% clear - it would be great to have an example added to illustrate this part:

"A form context is available for the form component control. It can be accessed via the main form's form context by accessing the control via an API, such as getControl"

Waiting on comment from @chmoncay.

Changes have been made to the following to address issues raised here:
https://learn.microsoft.com/power-apps/developer/model-driven-apps/clientapi/reference/controls/getcontroltype
https://learn.microsoft.com/power-apps/developer/model-driven-apps/clientapi/reference/controls
https://learn.microsoft.com/power-apps/developer/model-driven-apps/clientapi/reference/attributes
Thank you @chmoncay  and @fafuxa-ms !
Closing this.

Thanks everyone. The new docs make the form component control behavior much
clearer!
On Mon, Jan 9, 2023, 1:48 PM Jim Daly @.***> wrote:

Changes have been made to the following to address issues raised here:
https://learn.microsoft.com/power-apps/developer/model-driven-apps/clientapi/reference/controls/getcontroltype
https://learn.microsoft.com/power-apps/developer/model-driven-apps/clientapi/reference/controls
https://learn.microsoft.com/power-apps/developer/model-driven-apps/clientapi/reference/attributes
Thank you @chmoncay https://github.com/chmoncay and @fafuxa-ms
https://github.com/fafuxa-ms !
Closing this.
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/powerapps-docs/issues/3753#issuecomment-1376373368,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGGPB7W33GBJEELH5Z2ARILWRSBRDANCNFSM6AAAAAARHLCXF4
.
You are receiving this because you were mentioned.Message ID:
@.***>


Do not resolve json module when outFile is set.

Search Terms
Support for well-typed JSON imports;
Exclude JSON imports when outFile is set;
Use JSON file structure as type definition;
Suggestion
Add a way to exclude JSON modules from compilation.
Use Cases
This could be useful on type definitions (no need to create and maintain interfaces).
Current Implementation
Example project:
out/main.js
file.json
main.ts
tsconfig.json

file.json:
{
    "stringProp": "test",
    "numberProp": 1,
    "objProp": {
        "stringProp" : "example",
        "arrayProp": [1,0]
    }
}

main.ts
let data: typeof import('./file.json');

console.log(data.objProp.stringProp);

tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "module": "amd",
    "outFile": "./out/main.js",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "resolveJsonModule": true
  },
  "exclude": [
    "./out"
  ]
}

RESULT:
out/main.js (this code won't run in browser, I need to manually remove json part from output)
{
    "stringProp": "test",
    "numberProp": 1,
    "objProp": {
        "stringProp": "example",
        "arrayProp": [1, 0]
    }
}
var data;
console.log(data.objProp.stringProp);

EXPECTED RESULT:
out/main.js
var data;
console.log(data.objProp.stringProp);

Examples
Leave current syntax:
let data: typeof import('./file.json');

Or use declare keyword as flag:
declare type ImportedType = typeof import('./file.json');

Or add new flag to tsconfig.json file.
Checklist
My suggestion meets these guidelines:

[X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[X] This feature would agree with the rest of TypeScript's Design Goals.

Probably related to https://github.com/Microsoft/TypeScript/issues/24744
I would love to have an option to just read type information from json files without including them in the transpilation process. Especially if they are outside rootDir, they mess up the output directory structure.

We can be sure that it's incorrect to just splat in a JSON file into a --out compilation; they should simply be skipped.

Hey @mehlian, are you using TypeScript 2.9? That's the only version I could find that exhibits the behavior you described. 3.0 says you can only use resolveJsonModule with module: commonjs, and then from 3.1 on, I get this output:
define("file", [], {
    "stringProp": "test",
    "numberProp": 1,
    "objProp": {
        "stringProp": "example",
        "arrayProp": [1, 0]
    }
});
var data;
console.log(data.objProp.stringProp);

Which is still wrong because you don't need the contents to be emitted as a result of a typeof import, but at least the emit is valid JavaScript.
I'm going to start on getting rid of the superfluous module inclusion, but just wanted to let you know that you should be significantly less broken in TypeScript 3.1 and later.

Actually, I don't think this has anything to do with JSON (post 3.1). Consider the project:
// tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "module": "amd",
    "outFile": "./out/main.js",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "resolveJsonModule": true
  },
  "exclude": [
    "./out"
  ]
}

// a.ts
export const a = 3;

// main.ts
console.log('Not importing anything');

Its output is
define("a", ["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.a = 3;
});
console.log('Not importing anything');

a.ts is included because it's matched by the project's default include pattern. Doesn't matter whether it's imported as a value, a type, or not at all. If you add a files, include, or exclude that causes a.ts not to be picked up, of course it drops out of the emit, since it's not referenced at all.
So let's say we add files: ["main.ts"] to the tsconfig, and use a typeof import('./a'):
// tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "module": "amd",
    "outFile": "./out/main.js",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "resolveJsonModule": true
  },
  "files": ["./main.ts"]
}

// a.ts
export const a = 3;

// main.ts
type A = typeof import('./a');

Now, a.ts isn't a root file, and its value is never used, only its type. But the module still shows up, ostensibly needlessly, in the out file.
As a final step in the thought experiment, I removed the outFile, module, moduleResolution, and resolveJsonModule options from the tsconfig and compiled with default options (still with files: ["main.ts"]), and indeed an a.js` does get produced, even though it never gets consumed.
So on the one hand, the current behavior of JSON modules in AMD is totally consistent with any other type of module in any other type of module system. On the other hand, the whole thing feels slightly worse when combined with outFile.
It feels like there are several different arguments that could be made, including never emitting JavaScript for files that are only ever brought into the program for their types, but that could technically be a breaking change. @RyanCavanaugh thoughts?

We don't really make distinctions about how/why any given implementation file ended up in your program.
I can think of plausible examples that would be badly broken by trying to be clever about it, e.g.
// register.ts
export function register(name: string, obj: any) {
  lookup[name] = obj;
}
export function lookup(name: string) {
  return lookup[obj];
}

// class1.ts
import { register } from "./register";
export class C { }
register("C", C);

// file.ts
import { lookup } from "./register";
type C1 = typeof import("./class1");
const C = lookup("C") as C1.C;

Ah yeah, I was thinking of the case where a seemingly unused module gets picked up by something in the runtime environment that TypeScript doesn't know about (e.g. config file with magic name that framework X knows to look for). Modules with side effects would be even worse.
Are you suggesting that there's no bug here because everything works consistently and predictably, or are you suggesting that JSON modules imported only for their types get special treatment since they're obviously side-effect free? I kind of feel like we're seeing expected behavior here, although I resonate with this:

I would love to have an option to just read type information from json files without including them in the transpilation process. Especially if they are outside the sources dir, they mess up the output directory structure.

But that seems to be tracked separately at #24744.

I think I'd err on the side of fewer special cases and say this is working as intended. Using outFile is increasingly rare anyway and people should configure their own bundlers if they need more complex behavior than the set of options we already offer.

@andrewbranch yep, I can confirm that my example project was tested on TypeScript 2.9.1.
So, based on your comments this behavior won't change.


add mips arch support?

Probably not, I haven't touched MIPS ASM.  if you want adapter it for yourself, need rewrite these relocTypes(R_ADDRMIPS, R_CALLMIPS, R_ADDRMIPSU, R_ADDRMIPSTLS, R_JMPMIPS)


UDP? Why not TCP :P

Just messing about with github, to see if you're paying attention.

UDP, because logging should be fire-and-forget. If a logging node goes down, anything streaming to it should not be impacted.


Update forbiddenapis to v2.0

{quote}
The main new feature is native support for the Gradle build system (minimum requirement is Gradle 2.3). But also Apache Ant and Apache Maven build systems got improved support: Ant can now load signatures from arbitrary resources by using a new XML element  that may contain any valid ANT resource, e.g., ivy's cache-filesets or plain URLs. Apache Maven now supports to load signatures files as artifacts from your repository or Maven Central (new signaturesArtifacts Mojo property).
Breaking changes:

Update to Java 6 as minimum requirement.
Switch default Maven lifecycle phase to verify.

Bug fixes:

Add automatic plugin execution override for M2E. It is no longer needed to add a lifecycle mapping to exclude forbiddenapis to execute inside Eclipse's M2E
{quote}

Triggered by mvn verify


Missing fields when using -a with bedtobigbed

Hello,
I have found a discrepancy in the number of fields and some other metadata when using bigtools vs ucsc and it is having an impact on how things appear in the browser.
Basically, when I test with bigbedinfo I see differences in field number and other metadata columns (the correct number of fields is 17):
# bigtools
version: 4
fieldCount: 3
isCompressed: yes
isSwapped: 0
itemCount:<PHONE_NUMBER>552
primaryDataSize: 367,623,108
primaryIndexSize: 20,200
zoomLevels: 6
chromCount: 2
basesCovered: 97,494,196
meanDepth: 44.449296
minDepth: 1.000000
maxDepth: 3195.000000
std of depth: 69.740202
version: 4

# UCSC
fieldCount: 17
isCompressed: yes
isSwapped: 0
itemCount:<PHONE_NUMBER>552
primaryDataSize: 386,514,961
primaryIndexSize: 46,952
zoomLevels: 8
chromCount: 2
basesCovered: 101,269,035
meanDepth: 82.861921
minDepth: 1.000000
maxDepth: 4056.000000
std of depth: 96.352168

I have uploaded all the data in my test to:
https://s3-us-west-2.amazonaws.com/stergachis-public1/index.html?prefix=Mitchell/temp/bigtools-test/
And here is the script I am running:
zcat my.bed.gz | bigtools bedtobigbed -a decoration.as -s start - hg38.fai bigtools.bb
bedToBigBed -as=decoration.as -type=bed12+ my.bed.gz hg38.fai ucsc.bb

bigbedinfo bigtools.bb
bigbedinfo ucsc.bb

Any help with an obvious error on my part would be great!
Cheers,
Mitchell

working on this, should have a solution soon

Sorry to be a bother but have you had a chance to look at this?

Sorry for the delay - just published bigtools 0.5.1 which should fix the fieldCount and definedFieldCount when an autosql is passed.

Awesome, it's working for me. I'll approve the bioconda PR once it passes tests :)

Hi @jackh726,
Found an issue with the new release that I think is requiring the autosql argument to be passed everytime.
I have a standard three column bedfile and when I try:
zcat results/ONT_heuristic/coverage/unreliable-coverage-regions.bed.gz | bigtools bedtobigbed -s start  - ~/assemblies/hg38.analysisSet.fa.fai tmp.bb

I get
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

But if I add the SQL argument, it works:
zcat results/ONT_heuristic/coverage/unreliable-coverage-regions.bed.gz | bigtools bedtobigbed -s start -a tmp.as - ~/assemblies/hg38.analysisSet.fa.fai tmp.bb

And here tmp.as is just the three-column definition:
table bed3 "bed3"
(
string  chrom;  "Reference sequence chromosome or scaffold"
uint    chromStart; "Start position in chromosome"
uint    chromEnd;   "End position in chromosome"
)

I am also noticing that I have to filter out lines starting with the BED comment character (#), whereas I don't think I needed to before, but I am not sure about that.
For now, I can add the as files for all my commands, but I wanted to let you know.
Cheers,
Mitchell

v0.5.2 should at least not error when not passing an autosql (this only happened when passing the bed via stdin)
I still need to add the following:

autosql parsing when using stdin
Filtering of commented lines

I have not had time to put together a test case to share yet, but now it seems to me that the --autosql argument is ignored when using stdin with 0.5.2 whereas it worked with 0.5.1. But I am realizing maybe that is what you meant with:

autosql parsing when using stdin

?

Ah no, that should work but I made a mistake. Will update with fix either later today or tomorrow.

Great thank you!
Sorry for all the questions/comments, but I think I am also noticing that setting the zoom level on the command line is not respected when I check after the file is created with bigbedinfo.

No worries - the testing is helpful. I'll take a look at that too

Awesome thanks!
I was playing with the zoom level because I thought it might fix an issue I am seeing where some data will disappear as I zoom in when using decorator tracks.
e.g.

to

Ah that's weird, if you can get a reproduction, I can look into it.

Thanks, I made a test case here that reproduces the issue in this region of hg38 chrX:47191183-47195924, and uploaded it here:
https://s3-us-west-2.amazonaws.com/stergachis-public1/index.html?prefix=Mitchell/tests/bigtools-test/
And within that dir is a "hub.txt" that you can load on UCSC to see the issue:

When making the small test case, I did find that depending on the size of the dataset, I sometimes would or wouldn't see the issue pop up. This was the smallest file I could get where the issue appeared.

Just wondering if you got a chance to look at this? Thanks in advance!

Sorry, this fell off my radar. I'm looking at this now - will let you know.

So, I ran out of time looking at this for now, but here are my general thoughts:
It doesn't seem like this is an issue with the data that is written. I.e. it doesn't look like there's a bug that is causing some data to not be written to the final bigBed.
Rather, I think this is more likely a quark fundamentally attributed to zooms. My hunch is that because you're writing the bigBed from stdin, the heuristics for calculating/including zoom levels just has a poor interaction here. And really, I think it all comes down to the decoration bigBed. I think likely the calculated zoom sizes are just too big.
The easiest check here is just write the declaration bigBed with nzooms=0, which should force the genome browser to use the primary data. I have wanted to add an option to be a little bit more explicit about what zooms to write, so this might be the push to do that. I expect you would then want to manually set the initial zoom to be small.

I'll try to get back to this maybe later today or this week and test out my theory about writing the decoration bigBed with no zooms (if you don't get to it).

To help out a little I just tested creating from stdin and from a pre-made bed file, and both with a variety of zoom levels (including 0), and unfortunately none of the combinations made these items visible on UCSC.
I extended the script and trackhub so that it also contains a ucsc test just to confirm that it works with the OG tooling:

So I don't think it is something I can fix by forcing the zoom level.
(reminder: I am using bigtools 0.5.1 since 0.5.2 since the --autosql argument seems to be ignored in this case with 0.5.2).

Thanks, this is helpful. I'll keep looking into it, but I'm really not sure!

Just being a squeaky wheel. Thanks in advance!

Sorry! Gotten back to this a bit. Still looking, but it's definitely a zoom-related issue with the decoration track.
Using the ucsc read bigBed with the bigtools decoration bigBed results in the same pattern that you see above (no zooms). Manually specifying 4 zooms (haven't yet added the ability to specify zoom sizes, so the default sizes are 40,160,640,2560) actually results in no decorated items showing. Next step here is for me to manually specify the zooms and see if that fixes it.
As a side point, I'm noting that the basesCovered summary item (and the others) are not the same across ucsc and bigtools, which is probably unrelated, but interesting. itemCount is the same (and calling bigBedToBed on both results in the same output).

Just making a note that I am still interested in this.
I'd very much like to move this into our production pipeline since it is a fantastic speed up.
Thanks again for the tool!

Gah! Sorry! I keep forgetting to get back to this... really sorry about the slow progress here.

So, have been investigating this a bit further. And, well, I'm perplexed.
To recap: previously, making a hub with the ucsc data file and bigtools decoration file did not work, but ucsc decoration file and bigtools data file did work.
I added the functionality to manually specify zooms (instead of bigtools calculating them, which is a bit different than ucsc), tried that and it didn't work. So, these none of 0 zooms, 4 zooms (different), or 4 matched zooms work.

As a side point, I'm noting that the basesCovered summary item (and the others) are not the same across ucsc and bigtools, which is probably unrelated, but interesting. itemCount is the same (and calling bigBedToBed on both results in the same output).

I then looked into this, in case it's related. Which ended up being it's own rabbit hole. Essentially, rather than focusing on basesCovered, I looked at maxDepth. I made a smaller file (dec.cut1-3.maxdebug.bed.txt) that differed between ucsc and bigtools (ucsc says maxDepth as 200, bigtools says 185). I did a separate pileup with bedtools (bedtools genomecov -bg -g hg38.fai -i dec.cut1-3.maxdebug.bed > dec.cut1-3.maxdebug.pileup.bed) and that shows the max depth as 185...so it seems like a probably bug in the ucsc bedToBigBed, or I'm just missing something.
Along the way, I tried making a bigBed with a single zoom of 1 bp, and realized there was a bug in bigtools (essentially, when there are overlapping regions, I was not counting past the first region). I fixed this, but it still doesn't fix the decoration problem (which, is not that surprising given that no zooms also doesn't work).
So...still working on it.
(I have a testing branch here with ongoing fixes: https://github.com/jackh726/bigtools/tree/dec-testing2)

Okay next weird thing - subsetting the input bed file where the fourth column == "m6A" seems to result in identical outputs...

Thanks for starting to investigate!
I will say the second thing doesn't surprise me that much. For example, depending on the size of the region I was making for the test case different fibers in different regions disappeared.
Would it be helpful to ask UCSC anything? I know a person or two on the browser team.

Yeah, at this point its probably worth asking the ucsc folks.
I've tried "minimizing" the decoration file in different ways prior to running it through bigtools (subsetting to only m6A, removing FIRE lines, only including regions overlapping the target window) and each time i can't reproduce the problem in the genome browser. Subsetting the data file to one entry that is missing the decorations and one that isn't does reproduce the problem though.
I might have some time to poke at this a bit more today. I'm really just perplexed because it doesn't seem like a file format issue (given that just subsetting the initial bed file has yet to reproduce the issue) and some of the decorations are correct even in the reproduction...

I reached out the to creator of the decorator tracks and linked the issue and asked for any advise he might have. I do know he's has since started working on his masters degree so not sure he'll have time to look.
Did I understand you correctly in that you were able to get a single read version that recreates the issue? If so I'd add it to the track hub if you could share the file.

I did have one idea. There is an option in ucsc bedtobigbed that allows a 1bp overlap between blocks in bed12 files which is something I take advantage of with the m6a track specifically. Is that something that might hit some corner case in bigtools?

My test hub is here: https://users.abdenlab.org/hueyj/bigtools-test/hub.txt
re. 1bp overlap (https://github.com/jackh726/bigtools/issues/49?) I think that makes no difference - ucsc does some checks that needs that flag, and bigtools doesn't do those

For my hub (as it is right now, might be down - we're having server troubles):

the "bigtools-test" track is only two regions in the "read" bed file, one missing decorations in the repro, one fine
the "bigtools-test-sub" track is the same as the above, but the decoration bed file was subsetted to only include entries matching the above two regions
can ignore the "bigtools-test-4zooms" and "bigtools-test-matchedzooms" tracks
the "ucsc-test" track is the same two regions in the "read" bed file, with the full decoration bed file passed through ucsc bedToBigBed
the "bigtools-test-matchedzooms-m6A" and "ucsc-test-m6A" tracks are like "bigtools-test" and "ucsc-test", but the decoration files are filtered to only have '$4 == "m6A"'

Btw, I just published version 0.5.3, which should fix https://github.com/jackh726/bigtools/issues/48#issuecomment-2258917404 and a few other things I found when testing this. It doesn't fix the main issue though, which I unfortunately still haven't found the cause of.

Great, I will update to that version for the other fixes!
One more corner case I have thought of for this data. These bed12 files do sometimes have a zero-length "block/exon". Do you think that could be causing an issue in bigtools?

Nevermind, on the zero length. That is not something I am doing here, got confused with another tool I am working on

Went ahead and renamed the issue to reflect the current state of things - figured there's enough background that even it's better to just keep it here than split it out (even though the original issue is solved)


CamVid dataset

Hi,
In the paper you mentioned about using CamVid as another dataset for experiment. Would you mind to share the code of CamVid as well ?

I probably do not have enough time to clean the code for CamVid for now. Sorry about that.


MaximumLikelihoodAmplitudeEstimation returning wrong answer from PhaseOracle

Environment

Qiskit Terra version: 0.18.3
Python version: 3.9.8
Operating system: OSX

What is happening?
For some reason, the MaximumLikelihoodAmplitudeEstimation is giving a wrong answer when the problem uses a PhaseOracle created from a DIMACS file. Seems to work correctly when using a similar, hand-madeQuantumCircuit as an oracle.
How can we reproduce the issue?
from qiskit import QuantumCircuit
from qiskit.algorithms import EstimationProblem
from qiskit.circuit.library import PhaseOracle, GroverOperator
from qiskit.algorithms import (AmplitudeEstimation,
                               MaximumLikelihoodAmplitudeEstimation)
from qiskit.providers.aer import QasmSimulator
backend = QasmSimulator()
n = 3

# create state preparation operator
state_prep = QuantumCircuit(n)
state_prep.h(range(n))

# create Grover operator from problem file
oracle = PhaseOracle.from_dimacs_file("examples/3sat.dimacs")
grover_op = GroverOperator(oracle)

problem = EstimationProblem(state_prep,
                            [*range(n)],
                            grover_operator=grover_op)

# Correct result
estimator = AmplitudeEstimation(7, quantum_instance=backend)
result = estimator.estimate(problem)
result.estimation
>>> 0.1295244

# Incorrect result!
estimator = MaximumLikelihoodAmplitudeEstimation(7, quantum_instance=backend)
result = estimator.estimate(problem)
result.estimation
>>> 0.4902973909096974

I've attached the DIMACS file (with a .txt extension so github will accept it): 3sat.dimacs.txt
Replacing oracle with:
# create Grover operator by hand
oracle = QuantumCircuit(3)
oracle.h(2)
oracle.x(2)
oracle.ccx(0,1,2)
oracle.x(2)
oracle.h(2)
grover_op = GroverOperator(oracle)

behaves correctly.
What should happen?
The final output should be close to 0.125.
Any suggestions?
No response

This is a strange behavior indeed! But it doesn't seem to be related to the PhaseOracle itself. Here is a more minimal example to recreate the same bug
from qiskit import QuantumCircuit
from qiskit.algorithms import EstimationProblem
from qiskit.circuit.library import PhaseOracle, GroverOperator
from qiskit.algorithms import MaximumLikelihoodAmplitudeEstimation, IterativeAmplitudeEstimation
from qiskit.providers.aer import StatevectorSimulator

backend = StatevectorSimulator()
n = 2

# create state preparation operator
state_prep = QuantumCircuit(n)
state_prep.h(range(n))

# create Grover operator from problem file
oracle = QuantumCircuit(n)
oracle.x(1)  # w/o the two X gates around the target qubit, MLAE gives the correct result
oracle.cz(0,1)
oracle.x(1)
grover_op = GroverOperator(oracle)

problem = EstimationProblem(state_prep,
                            [*range(n)],
                            grover_operator=grover_op)

# Correct result
estimator = IterativeAmplitudeEstimation(0.01, 0.05, quantum_instance=backend)
result1 = estimator.estimate(problem)
print(result1.estimation)

# Incorrect result!
estimator = MaximumLikelihoodAmplitudeEstimation(3, quantum_instance=backend)
result2 = estimator.estimate(problem)
print(result2.estimation)

@Cryoris thanks for looking into this! I see now I added some useless X-gates, but there still should be only one solution. If I run your second example I get:
0.12499999999999994
0.002667906599823475

which is still wrong :/
I took the dimacs file from the textbook and added a couple of lines to eliminate the other solutions.

Hi Frank, do you mean if you're running my exact snippet from above you're getting these results? Or you're getting them once exchanged for your dimacs file?

I believe this issue was addressed above and as such I am closing it.


Added New Project : QR Code Generator

Description
Added New Project
With README.md
With Images
Added Project to Index

[ ] Issue_no: <insert your issue no here>
[x] Not applicable

Type of change
Choosing one or more options from the following as per the nature of your Pull request.

[x] New project insert
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Documentation Update

Project

**Your Project Name: **QR Code Generator

**Short Description: ** Get QR Code of any text in a PNG image.

Checklist:
Please tick all the boxes that are fulfilled by your Pull Request.

[x] I have named my files and folder, according to this project's guidelines.
[x] My code follows the style guidelines of this project.
[x] I have commented on my code, particularly in hard-to-understand areas.
[x] I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
[x] My changes do not produce any warnings.

please give a little more description inreadme.md about code

Sure

Added more description in the project readme


Background doesnt fill when hiding header

Describe the issue:

When hiding header/using kiosk mode together with a background for the view, the background doesn't fill the screen all the way down. I have tried to look for an option that could fix this, but didnt find any.
Config YAML:

cch:
  disable: false
  header: true
  menu: show
  sidebar_swipe: true
  notifications: show
  voice: hide
  options: clock
  clock_format: 24
  clock_date: true
  date_locale: sv-SE
  swipe: true
  exceptions:
    - conditions:
        user: dashboard
      config:
        show_tabs: 8
        kiosk_mode: true

HA and/or Browser Error:

Versions and Browser:

HA 0.95.4
CCH 1.2.8
Chrome 75.0.3770.100
Yaml mode

Please give the pre-release 1.2.9 a try and let me know if that helps.

Is this still an issue?

Seems to be fixed now! 🎉


error: tunnel failed - proxy port is not in allowed port ranges

I noticed something unexpected when I was testing the Go ziti tunnel proxy. The problem was that the specified proxy port didn't match the allowed ports in the client config, but that constraint doesn't really make sense for an opaque proxy port. It still makes sense for a transparent proxy. For example, the allowed port was 80/tcp, and I tried to bind port 8080 and the client proxy always emitted an error.
I expected to be able to bind an arbitrary TCP port to map to any named Ziti service the identity is authorized to dial. I found the dialing tunneler enforced a constraint that seems to have been intended for transparent proxies to ensure that only the expected traffic maps to the expected Ziti service.
The difference seems to be whether the mapping of port-to-service is expressed in the edge client config or as runtime configuration of the client itself. The explicit client-side config should have higher precedence.
Command to reproduce uses a ZEDS identity to dial the HTTPBin service on an illegal port
$ docker run --rm --name ziti-proxy --publish 8080:8080 --env ZITI_IDENTITY_JSON="$(</tmp/test4.json)" --env PFXLOG_NO_JSON=true --workdir /netfoundry openziti/ziti-tunnel proxy zedsDemoHttpHttpbin:8080

WARN: the identities directory is only available inside this container because /netfoundry is not a mounted volume. Be careful to not publish this image with identity inside or lose access to the identity by removing the image prematurely.
DEBUG: waiting 1s for /netfoundry/ziti_id.json (or token) to appear
INFO: found identity file /netfoundry/ziti_id.json
DEBUG: evaluating positionals: proxy zedsDemoHttpHttpbin:8080
INFO: running "ziti tunnel proxy --identity /netfoundry/ziti_id.json zedsDemoHttpHttpbin:8080"
[   0.000] WARNING edge/tunnel/dns.flushDnsCaches: {error=[exec: "resolvectl": executable file not found in $PATH]} unable to find systemd-resolve or resolvectl in path, consider adding a dns flush to your restart process
[   0.512]    INFO edge/tunnel/intercept.SetDnsInterceptIpRange: dns intercept IP range: <IP_ADDRESS> - <IP_ADDRESS>
[   0.512]    INFO ziti/ziti/tunnel.startIdentity: loading identity: /netfoundry/ziti_id.json
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[Http-Zeds-Demo-whatismyip]} adding service
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[0-rmwO1qx] serviceName=[Http-Zeds-Demo-whatismyip]} starting tunnel for newly available service Http-Zeds-Demo-whatismyip
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[service1 webhookz1 Z29vZ2xlLW9hdXRoMnwxMTYwMTQzMjA2MDgwNTM4ODkyOTQ=]} adding service
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[3XWj21jKfRbsKUcqImy43o] serviceName=[service1 webhookz1 Z29vZ2xlLW9hdXRoMnwxMTYwMTQzMjA2MDgwNTM4ODkyOTQ=]} starting tunnel for newly available service service1 webhookz1 Z29vZ2xlLW9hdXRoMnwxMTYwMTQzMjA2MDgwNTM4ODkyOTQ=
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[3XWj21jKfRbsKUcqImy43o] serviceName=[service1 webhookz1 Z29vZ2xlLW9hdXRoMnwxMTYwMTQzMjA2MDgwNTM4ODkyOTQ=]} Hosting newly available service
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[http-myipaddress]} adding service
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[9fHowE1qXR] serviceName=[http-myipaddress]} starting tunnel for newly available service http-myipaddress
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[zedsDemoHttpHelloWorld]} adding service
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[B.v.O7JfXR] serviceName=[zedsDemoHttpHelloWorld]} starting tunnel for newly available service zedsDemoHttpHelloWorld
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[zedsDemoHttpHttpbin]} adding service
[   0.686]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[PvrVQBJfX] serviceName=[zedsDemoHttpHttpbin]} starting tunnel for newly available service zedsDemoHttpHttpbin
[   0.709]    INFO edge/tunnel.(*contextProvider).accept: {service=[service1 webhookz1 Z29vZ2xlLW9hdXRoMnwxMTYwMTQzMjA2MDgwNTM4ODkyOTQ=]} hosting service, waiting for connections
[   0.734]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[https-myip-routerhosted]} adding service
[   0.734]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[Re-5yZVqxR] serviceName=[https-myip-routerhosted]} starting tunnel for newly available service https-myip-routerhosted
[   0.734]    INFO edge/tunnel/intercept/proxy.(*interceptor).handleTCP: {service=[zedsDemoHttpHttpbin] addr=[<IP_ADDRESS>:8080]} service is listening
[   0.734]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[zedsDemoHttpFireworks]} adding service
[   0.734]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[RkxoZ-VfX] serviceName=[zedsDemoHttpFireworks]} starting tunnel for newly available service zedsDemoHttpFireworks
[   0.734]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[zedsDemoHttpsHttpbin]} adding service
[   0.734]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceName=[zedsDemoHttpsHttpbin] serviceId=[jwMlPbkqXR]} starting tunnel for newly available service zedsDemoHttpsHttpbin
[   0.735]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[zedsDemoHttpWhatIsMyIp]} adding service
[   0.735]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[owB2Rn.fXR] serviceName=[zedsDemoHttpWhatIsMyIp]} starting tunnel for newly available service zedsDemoHttpWhatIsMyIp
[   0.735]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[https-whatismyip]} adding service
[   0.735]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[r9lqikJfX] serviceName=[https-whatismyip]} starting tunnel for newly available service https-whatismyip
[   0.735]    INFO edge/tunnel/intercept.(*ServiceListener).HandleServicesChange: {service=[zedsDemoHttpsWhatIsMyIP]} adding service
[   0.735]    INFO edge/tunnel/intercept.(*ServiceListener).addService: {serviceId=[v0bIRQoqxR] serviceName=[zedsDemoHttpsWhatIsMyIP]} starting tunnel for newly available service zedsDemoHttpsWhatIsMyIP
[   8.966]   ERROR edge/tunnel.DialAndRun: {error=[unable to dial service 'zedsDemoHttpHttpbin': dial failed: exceeded maximum [2] retries creating circuit [c/jJEuHqi5oQ]: error creating route for [s/jJEuHqi5oQ] on [r/d6evgSoqXR] (error creating route for [c/jJEuHqi5oQ]: port 8080 is not in allowed port ranges)] service=[zedsDemoHttpHttpbin]} tunnel failed

Closing. I don't think we should invest in this any more. We should favor the linked issue you refer to. If you think this really needs to be completed, we can reopen this issue

This is actually a configuration issue. The tunneler is working as expected/intended.
Looking at the host.v1 configuration for the zedsDemoHttpHttpbin service:
{
    "allowedPortRanges": [ { "high": 80, "low": 80} ].
    "allowedProtocols": [ "tcp" ],
    "forwardPort": true,
    "forwardProtocol": true,
    "address": "<IP_ADDRESS>"
}

forwardPort is enabled, and port 80 is the only port in the whitelist. The zedsDemoHttpHttpbin would be usable by more clients if it set the server port to a specific value instead of attempting to forward the port that was intercepted by the client tunneler. e.g. a host.v1 config like this:
{
    "protocol": "tcp",
    "address": "<IP_ADDRESS>",
    "port": 80
}


utils.logging_utils

Hi and thanks for the cool software!
I am getting this:
ModuleNotFoundError: No module named 'utils.logging_utils'
When I do this:
pip install utils.logging_utils
I get this:
No matching distribution found for utils.logging_utils
Would you have any suggestion for this? Thank you! :D
$ python
Python 3.6.8 (default, Apr  9 2019, 04:59:38)
[GCC 8.3.0] on linux

I am now fixing several of the issues with the project as I have some free time this week. Some relative imports, such as this one, are errant. I will fix this.

Fixed in https://github.com/wardbradt/peregrine/pull/61


add exception to egress policy for port 8080

There needs to be an exception to the allow-system-egress policy to allow for access to new Internal load balancer for the tembo-ai gateway.
We should allow access to <IP_ADDRESS>/8 on port 8080.  This will allow the ai-proxy pods access to the load balancer for the inference-gateway on all clusters.

This network policy is too permissive, as it grants wide IP range access to all workloads in a customer namespace. We need to carefully sandbox the network for customer-controlled workloads. I think it would be OK to apply a policy like this on the other network policy that applies only to the ai-proxy

Yes thanks.  I missed that specific policy.  I just updated it and it should be good now, hopefully.

I am not sure that all these statements work together in a single network policy, it might have to be separate network policies. I would try applying kind of configuration this manually in dev by disabling the reconcile on an instance, then apply this configuration, then see if it works. I think there is a pretty good chance this does not work because I recall there might be issues with specifying both ports and / or IP ranges in the same policy as namespace-selector based policies.

Ah yeah that is correct.  I have created a new policy with what worked when testing.


fix: subfield errors should be consider validated based on its parent

Fix #596

@lifeiscontent It seems like our CI fails to start the playground app randomly since we changed the build setup. Let me know if you have any ideas why.


sad, its not working in address or rmd160 mode. please fix this

-f address, -f rmd160 collides with other -f 1 0r -f 2 parameters

even -x , not working

It is working

Yea, it's working now., I think i forked from another old repository. Thanks


Broken Inference after v0.2.2 release

Hi,
Its gonna be hard for me to pinpoint this broken inference because I am not getting any logs except sometimes I get CUDA errors. But its intermittent. After the new version release I have have two broken models. First one is:

casperhansen/mixtral-instruct-awq

core_model = AutoModelForCausalLM.from_pretrained(core_model_name, device_map="auto", attn_implementation="flash_attention_2")

Which is currently running on v0.1.8 but not on v0.2.2
Behavior is sometimes it will refuse to answer or simply stall and take a long time. When it answers it takes like 10 times longer than v0.1.8. Sometimes it will error out with CUDA errors. But most of the time it doesn't answer.

TheBloke/laser-dolphin-mixtral-2x7b-dpo-AWQ

Same model load but this model consistently answers but takes like 15min to answer instead of 3 secs that it does with v0.1.8
I have build all tied to v0.1.8 and everything works but not sure how to upgrade to v0.2.2.

Hi @christian-ci, have you tried using AutoAWQ instead of AutoModel? And have you tried with a fresh environment?
One source of error could be that we upgraded to torch 2.2.0 while your environment is still on an older version.

Thanks! Will verify this and get back to you! I think we are using 2.1.0 So will verify.

@casper-hansen So I checked using 12.1 and pytorch 2.2.0. It works with AutoModel but its incredibly slow like 4 times as slow and I noticed it is only using 35% on the each GPU. I use two in this case for the mixtral model. I then used AutoAWQ from_pretrained and its works but also same issue with only using 35% and very slow. I then used AutoAWQForCausalLM.from_quantized with and without flash attention and got this:
File ~/.local/lib/python3.10/site-packages/transformers/pipelines/text_generation.py:241, in TextGenerationPipeline.__call__(self, text_inputs, **kwargs)
    239         return super().__call__(chats, **kwargs)
    240 else:
--> 241     return super().__call__(text_inputs, **kwargs)

File ~/.local/lib/python3.10/site-packages/transformers/pipelines/base.py:1177, in Pipeline.__call__(self, inputs, num_workers, batch_size, *args, **kwargs)
   1173 if can_use_iterator:
   1174     final_iterator = self.get_iterator(
   1175         inputs, num_workers, batch_size, preprocess_params, forward_params, postprocess_params
   1176     )
-> 1177     outputs = list(final_iterator)
   1178     return outputs
   1179 else:

File ~/.local/lib/python3.10/site-packages/transformers/pipelines/pt_utils.py:124, in PipelineIterator.__next__(self)
    121     return self.loader_batch_item()
    123 # We're out of items within a batch
--> 124 item = next(self.iterator)
    125 processed = self.infer(item, **self.params)
    126 # We now have a batch of "inferred things".

File ~/.local/lib/python3.10/site-packages/transformers/pipelines/pt_utils.py:125, in PipelineIterator.__next__(self)
    123 # We're out of items within a batch
    124 item = next(self.iterator)
--> 125 processed = self.infer(item, **self.params)
    126 # We now have a batch of "inferred things".
    127 if self.loader_batch_size is not None:
    128     # Try to infer the size of the batch

File ~/.local/lib/python3.10/site-packages/transformers/pipelines/base.py:1102, in Pipeline.forward(self, model_inputs, **forward_params)
   1100     with inference_context():
   1101         model_inputs = self._ensure_tensor_on_device(model_inputs, device=self.device)
-> 1102         model_outputs = self._forward(model_inputs, **forward_params)
   1103         model_outputs = self._ensure_tensor_on_device(model_outputs, device=torch.device("cpu"))
   1104 else:

File ~/.local/lib/python3.10/site-packages/transformers/pipelines/text_generation.py:328, in TextGenerationPipeline._forward(self, model_inputs, **generate_kwargs)
    325         generate_kwargs["min_length"] += prefix_length
    327 # BS x SL
--> 328 generated_sequence = self.model.generate(input_ids=input_ids, attention_mask=attention_mask, **generate_kwargs)
    329 out_b = generated_sequence.shape[0]
    330 if self.framework == "pt":

File /opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)
    112 @functools.wraps(func)
    113 def decorate_context(*args, **kwargs):
    114     with ctx_factory():
--> 115         return func(*args, **kwargs)

File ~/.local/lib/python3.10/site-packages/transformers/generation/utils.py:1592, in GenerationMixin.generate(self, inputs, generation_config, logits_processor, stopping_criteria, prefix_allowed_tokens_fn, synced_gpus, assistant_model, streamer, negative_prompt_ids, negative_prompt_attention_mask, **kwargs)
   1584     input_ids, model_kwargs = self._expand_inputs_for_generation(
   1585         input_ids=input_ids,
   1586         expand_size=generation_config.num_return_sequences,
   1587         is_encoder_decoder=self.config.is_encoder_decoder,
   1588         **model_kwargs,
   1589     )
   1591     # 13. run sample
-> 1592     return self.sample(
   1593         input_ids,
   1594         logits_processor=prepared_logits_processor,
   1595         logits_warper=logits_warper,
   1596         stopping_criteria=prepared_stopping_criteria,
   1597         pad_token_id=generation_config.pad_token_id,
   1598         eos_token_id=generation_config.eos_token_id,
   1599         output_scores=generation_config.output_scores,
   1600         output_logits=generation_config.output_logits,
   1601         return_dict_in_generate=generation_config.return_dict_in_generate,
   1602         synced_gpus=synced_gpus,
   1603         streamer=streamer,
   1604         **model_kwargs,
   1605     )
   1607 elif generation_mode == GenerationMode.BEAM_SEARCH:
   1608     # 11. prepare beam search scorer
   1609     beam_scorer = BeamSearchScorer(
   1610         batch_size=batch_size,
   1611         num_beams=generation_config.num_beams,
   (...)
   1616         max_length=generation_config.max_length,
   1617     )

File ~/.local/lib/python3.10/site-packages/transformers/generation/utils.py:2696, in GenerationMixin.sample(self, input_ids, logits_processor, stopping_criteria, logits_warper, max_length, pad_token_id, eos_token_id, output_attentions, output_hidden_states, output_scores, output_logits, return_dict_in_generate, synced_gpus, streamer, **model_kwargs)
   2693 model_inputs = self.prepare_inputs_for_generation(input_ids, **model_kwargs)
   2695 # forward pass to get next token
-> 2696 outputs = self(
   2697     **model_inputs,
   2698     return_dict=True,
   2699     output_attentions=output_attentions,
   2700     output_hidden_states=output_hidden_states,
   2701 )
   2703 if synced_gpus and this_peer_finished:
   2704     continue  # don't waste resources running the code we don't need

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1511, in Module._wrapped_call_impl(self, *args, **kwargs)
   1509     return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]
   1510 else:
-> 1511     return self._call_impl(*args, **kwargs)

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, **kwargs)
   1515 # If we don't have any hooks, we want to skip the rest of the logic in
   1516 # this function, and just call forward.
   1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
   1518         or _global_backward_pre_hooks or _global_backward_hooks
   1519         or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520     return forward_call(*args, **kwargs)
   1522 try:
   1523     result = None

File ~/.local/lib/python3.10/site-packages/accelerate/hooks.py:166, in add_hook_to_module.<locals>.new_forward(module, *args, **kwargs)
    164         output = module._old_forward(*args, **kwargs)
    165 else:
--> 166     output = module._old_forward(*args, **kwargs)
    167 return module._hf_hook.post_forward(module, output)

File ~/.local/lib/python3.10/site-packages/transformers/models/mixtral/modeling_mixtral.py:1360, in MixtralForCausalLM.forward(self, input_ids, attention_mask, position_ids, past_key_values, inputs_embeds, labels, use_cache, output_attentions, output_hidden_states, output_router_logits, return_dict)
   1357 return_dict = return_dict if return_dict is not None else self.config.use_return_dict
   1359 # decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
-> 1360 outputs = self.model(
   1361     input_ids=input_ids,
   1362     attention_mask=attention_mask,
   1363     position_ids=position_ids,
   1364     past_key_values=past_key_values,
   1365     inputs_embeds=inputs_embeds,
   1366     use_cache=use_cache,
   1367     output_attentions=output_attentions,
   1368     output_hidden_states=output_hidden_states,
   1369     output_router_logits=output_router_logits,
   1370     return_dict=return_dict,
   1371 )
   1373 hidden_states = outputs[0]
   1374 logits = self.lm_head(hidden_states)

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1511, in Module._wrapped_call_impl(self, *args, **kwargs)
   1509     return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]
   1510 else:
-> 1511     return self._call_impl(*args, **kwargs)

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, **kwargs)
   1515 # If we don't have any hooks, we want to skip the rest of the logic in
   1516 # this function, and just call forward.
   1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
   1518         or _global_backward_pre_hooks or _global_backward_hooks
   1519         or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520     return forward_call(*args, **kwargs)
   1522 try:
   1523     result = None

File /opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)
    112 @functools.wraps(func)
    113 def decorate_context(*args, **kwargs):
    114     with ctx_factory():
--> 115         return func(*args, **kwargs)

File /opt/conda/lib/python3.10/site-packages/awq/modules/fused/model.py:58, in MixtralModel.forward(self, input_ids, attn_bias, attention_mask, is_causal, *args, **kwargs)
     52 for layer in self.blocks:
     53     h, mask = fused_utils.prepare_correct_devices(
     54         layer,
     55         h,
     56         mask,
     57     )
---> 58     h, _, past_key_value = layer(
     59         h, None, attention_mask=mask, is_causal=is_causal
     60     )
     62 h = self.norm(h)
     64 return MoeModelOutputWithPast(
     65     last_hidden_state=h,
     66     past_key_values=past_key_value,
   (...)
     69     router_logits=(),
     70 )

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1511, in Module._wrapped_call_impl(self, *args, **kwargs)
   1509     return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]
   1510 else:
-> 1511     return self._call_impl(*args, **kwargs)

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, **kwargs)
   1515 # If we don't have any hooks, we want to skip the rest of the logic in
   1516 # this function, and just call forward.
   1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
   1518         or _global_backward_pre_hooks or _global_backward_hooks
   1519         or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520     return forward_call(*args, **kwargs)
   1522 try:
   1523     result = None

File /opt/conda/lib/python3.10/site-packages/awq/modules/fused/block.py:50, in MixtralBlock.forward(self, hidden_states, past_key_value, attn_bias, attention_mask, is_causal)
     41 def forward(
     42     self,
     43     hidden_states,
   (...)
     47     is_causal=None,
     48 ):
     49     norm_out = self.norm_1(hidden_states)
---> 50     attn_output, _, past_key_value = self.attn.forward(
     51         hidden_states=norm_out,
     52         past_key_value=past_key_value,
     53         attention_mask=attention_mask,
     54     )
     56     h = hidden_states.to(attn_output.device) + attn_output
     57     out = self.moe.forward(self.norm_2(h))

File /opt/conda/lib/python3.10/site-packages/awq/modules/fused/attn.py:221, in QuantAttentionFused.forward(self, hidden_states, attention_mask, *args, **kwargs)
    214 values_store = xv.transpose(2, 1)
    215 keys_store = (
    216     xk.reshape((bsz, seqlen) + self.attention_shapes["xk_reshape"])
    217     .permute(0, 2, 3, 1, 4)
    218     .contiguous()
    219 )
--> 221 self.cache.update_kv(values_store, keys_store, bsz, self.start_pos, seqlen)
    223 # Only necessary to retrieve from cache when we are not processing context
    224 if seqlen == 1:

File /opt/conda/lib/python3.10/site-packages/awq/modules/fused/cache.py:36, in WindowedCache.update_kv(self, values_store, keys_store, batch_size, start_pos, seqlen)
     32 def update_kv(self, values_store, keys_store, batch_size, start_pos, seqlen):
     33     """
     34     Updates the values in the key-value store.
     35     """
---> 36     self.v[:batch_size, :, start_pos : start_pos + seqlen, :] = values_store
     37     self.k[:batch_size, :, :, start_pos : start_pos + seqlen, :] = keys_store

RuntimeError: The expanded size of the tensor (2048) must match the existing size (2768) at non-singleton dimension 2.  Target sizes: [1, 8, 2048, 128].  Tensor sizes: [8, 2768, 128]

Yes. And it works with a smaller prompt
streamer = TextStreamer(core_tokenizer, skip_prompt=True, skip_special_tokens=True)

prompt = "You're standing on the surface of the Earth. "\
        "You walk one mile south, one mile west and one mile north. "\
        "You end up exactly where you started. Where are you?"

# Convert prompt to tokens
prompt_template = "[INST] {prompt} [/INST]"

tokens = core_tokenizer(
    prompt_template.format(prompt=prompt),
    return_tensors='pt'
).input_ids.cuda()

# Generate output
generation_output = core_model.generate(
    tokens,
    streamer=streamer,
    max_new_tokens=512
)

and using the HF pipeline that I was using as well with any prompt thats less than 2048 tokens. Anything over that context and same error as above. I thought the context window is more that 4k in Mixtral Instruct? I mean we are using context lengths of 3k with the AWQ instruct but I think the layers are not fused with 0.1.8

You need to set the sequence length, it defaults to 2048 tokens instead of maximum context.
See more here:
https://casper-hansen.github.io/AutoAWQ/reference/#awq.models.auto.AutoAWQForCausalLM.from_quantized

That was it. Thanks a lot @casper-hansen


Incorrect error when calling protected method

Update: edited original code because the example was incorrect.
class Thing
  protected def hi
    puts "hi from Thing"
  end
end

class SomeThing < Thing
  def initialize(@friend : Thing)
  end

  def hi_friend
    @friend.hi
  end
end

class GoodThing < Thing
  protected def hi
    puts "hi from Good Thing"
  end
end

SomeThing.new(Thing.new).hi_friend # => protected method 'hi' called for GoodThing

This should work, because @friend.hi is invoked from SomeThing and @friend has the general type Thing, so it's OK if GoodThing overrides this.

Hmm... No, this needs more thought. In Ruby we get the same error.
We could maybe use the rule "inherit from the same type, unless that type turns out to be Reference", but I'm not sure.

Indeed, in Ruby you get the similar error - there is a slight nuance to it - you can call SomeThing.new(Thing.new).hi_friend and get "hi from Thing", but you will get the error if you call SomeThing.new(GoodThing.new).hi_friend.
So in my view, Crystal is protecting us at compile-time from this mistake because we can't prove that the Thing is not a GoodThing, on which it would not be legal for SomeThing to call hi. In the same way, you are not allowed in many languages to override a method and then make it less visible. (as the protected GoodThing#hi does). So I don't think the behaviour needs to be changed! This can continue to be a compile-time error.
If there is anything to be done about this, I would say this:
In the original code, it was slightly confusing to see protected method 'hi' called for GoodThing when a GoodThing is not involved at all in the line the error occurs. It only made sense when I reduced the example to the minimum.
Would it be better if the compiler told you that GoodThing is overriding hi and reducing its visibility?


Updated problem-6-sum-square-difference.md

Changed wrong implementation of sumOfSquareNumbers and simplified arithmetic sum to have sum of natural numbers
Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #XXXXX

This issue has not been marked as ready for contributions yet


KNX Communication - uncalled UDP response

Have you ever experienced this issue ?
#https://github.com/arendst/Sonoff-Tasmota/issues/5053
I've got the same behaviour not only with Tasmota but also with the esp-knx-ip/sonoff example

I am seeing the same behavior.
The ESP just always answers with an UDP 0  (zero) to the <IP_ADDRESS>  IP address.    Very strange...
I never seen this before and I have seen a lot of KNX routers like Gira (all variants), MDT,..and more.
Even when this esp-knx-ip Library is only loaded and Nothing is configured..  the ESP just starts to 'answer'  all Multicast calls with the UDP 0 message.

Please, try latest arduino core from arduino. The STAGE version that will became soon the 2.6.0 has solved several bugs. I use it and I couldn't reproduce your issue.


Drop numpy version requirement

Drop numpy requirement to numpy>=1.18.5 to avoid compatibility warning with tensorflow.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Ryan Turner seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Fix relative paths in PublishCodeCoverageResultsV1

Currently, relative paths do not work in PublishCodeCoverageResultsV1 due to the task skipping any file name matching when wildcards are not present. findMatch should be called regardless of if the path contains wildcards so that relative paths can still be found.
See: #8300

Testing:

Tested updated task on local deployment using the tfs-cli tool and confirmed that the updated task works with relative paths as well as full paths


Convert everything to be an optional type

There have been issues I guess with new accounts and weird values being returned by Stripe so it's safe to say that everything should just be an optional except for the absolute guarantee of non-optional values, aka stuff that has a concrete type and a returned value

[x] Balance

[x] Test's

[x] Charges

[x] Test's

[x] Connect

[x] Test's

[x] Coupons

[x] Test's

[x] Customers

[x] Test's

[x] Disputes

[x] Test's

[x] Ephemeral Keys (This one I don't think needs to be done since it does have concrete values from my understanding)
[x] Invoices

[x] Test's

[x] Orders

[x] Test's

[x] Other

[x] Test's

[x] Payouts

[x] Test's

[x] Plans

[x] Test's

[x] Products

[x] Test's

[x] Refunds

[x] Test's

[x] SKU's

[x] Test's

[x] Shipping

[x] Test's

[x] Sources

[x] Test's

[x] Subscriptions

[x] Test's

[x] Tokens

[x] Test's

If anyone has any input on this, feel free to comment.

@Andrewangeta I got this all done. Take a look at it and if it looks good to you, lets merge it in, and then you can create anew branch for #66 based on this.


Cannot add images or icons

Hello!
I just wanted to address a major bug, which is where we can't place icons or pictures.
The error message says that it is trying to find it in node_modules, but it should find it in the current directory.
Can you fix this issue?
Thanks.

Sorry about that!
It turns out that in the code, I accidentally used path.dirname(__dirname)!
I'll try and fix it in v1.1.5.

Don't worry, this was fixed!


carousel issue

I don't know if my issue is correct one, but if you check example here http://<IP_ADDRESS>/blog/carousel.html
You will see that slides rotate to the right continuously one after the other.
And when they rotates to the left there is no continuous carousel. Active slide dissappear completely and then left slide moving.
It is not beautiful. Is it possible to fix it?

As mentioned in https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker , please direct personal support requests to StackOverflow, IRC, or Slack instead of this bug tracker. Thanks!


keylime: initialize supplementary groups when dropping privileges

On some distributions the keylime user's primary group may not have
permission to access /dev/tpmrm0 devices. For example, on Fedora,
/dev/tpmrm0 is owned root:tss, but keylime runs keylime:keylime,
with 'tss' as a supplementary group.
We need to load supplementary groups when dropping privileges,
otherwise we'll be unable to access the TPM device.
Resolves: #1038
Signed-off-by: Daniel P. Berrangé<EMAIL_ADDRESS>

Thanks for finding and fixing this


Add set crosstool command

Set the correct toolchain for the current engine.
UBT use only LINUX_MULTIARCH_ROOT environment to find the cross tool, but if there are multiple tools, it maybe pick the wrong one.
Set this variable in Build.bat to the correct version.

Installed cross tool list:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Unreal Linux Toolchain v20_clang-13.0.1-centos7


Initial use case for consent workflow

Is this related to the discussion on UMA-like use cases I started on the discussion forums following this coming up in the meeting in the last two weeks?

I made a PR on this PR https://github.com/solid/authorization-panel/pull/232
IT is quite a big change - even though we discussed it in the meeting - so I just wanted to check that that's fine first.