Add Hover Options

This adds some options to the hover effects. See the official docs here: https://developer.apple.com/documentation/uikit/uipointereffect/hover_preferredtintmode_prefersshadow_prefersscaledcontent.
Happy to make any modifications to get this merged in. Thanks for this nice little library

@MrLoh thank you that's amazing! I'm merging & tagging it as a new release, thank you 👍🏻


feat(node:os): polyfill node:os module

🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[x] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
Adds a polyfill for the node:os module.
Curious for feedback on EOL and devNull. I don't see an "unimplemented" pattern in place for handling string constants exported by modules other than specifying a dummy value. LMK if y'all think there's a better value to use for either of these.
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

@jculvey @IgorMinar i've added implementation too. Constants is little bit long (but treehsakable and when minified small). Wdyt?

@jculvey if you are happy with this PR please go ahead and merge

@jculvey if you are happy with this PR please go ahead and merge

Yup LGTM. Thanks again @pi0 for fixing this up!


Error 404 when reaching app - Lost saved experiments

Hello,
I cannot open saved experiments which were accessible through this link, as I get a 404 error.
In that way, I lost various experiments I had worked on, and thus a lot of prompt engineering work.
Is this issue temporary? Is there a way to retrieve the latest logs of my experiments?
Thank you very much!

Hey @droussis, thanks for using the experiments platform. We deprecated prompt experiments in October and finally removed the code for hosting them a couple weeks ago to focus on fine-tuning.
If you’d like us to send you the prompt variants you were using in our latest database snapshot, email<EMAIL_ADDRESS>Thanks again, and sorry for the inconvenience.


Documented list of DefaultPlugins is out-of-date.

How can Bevy's documentation be improved?
The list of default plugins at DefaultPlugins docs appears to be out of date. In particular, it does not list:

ImagePlugin with feature bevy_render
CorePipelinePlugin with feature bevy_core_pipeline
AnimationPlugin with feature bevy_animation

as can be seen from the source code (I might have missed one or two).

so... is the correct fix to remove the (not so) manually updated list, or to update it until the next time it's out of date?

What about adding a plugin_group! macro that automatically generates the struct and documentation? The docs seem very basic and easy enough to generate in a macro.

The current out-of-dateness has been fixed, but I don't like having to manually rely on updating this. Leaving this open in hopes of an automated solution.


[Announcement] Esprima port to C#

I ported Esprima to C#, targeting .NET Standard, it's available here: https://github.com/sebastienros/esprima-dotnet and it's called Esprima .NET.
Feel free to open any issues regarding licensing, synergies with Esprima, improvements, possible usages.

This is excellent news! So @sebastienros if you are willing to donate and upstream the C# implementation, let's have it also hosted here and become the official part of the project. What do you think?

I all good by me. But my code is far from the quality level of what I saw here ;)
Let me know all the things you want me to do, and also the minimum requirements like CI, coverage, docs, ...


--abort option should call std::abort()

Until such time that --break works with gdb, this will make it easier to debug failing tests in gdb.

--break now works under gdb and I'd prefer abort to keep bailing out in orderly fashion.


vendor: bump aws-cdk-lib from 2.142.1 to 2.158.0

Thanks @berenddeboer!
Updated to CDK 2.161.1 in 2.44.0.
Had to update a couple other deps along the way.


GH-62; commitSync() By Default

Fixes #62
Resolves #72
See the discussion on GH-62 commitAsync() is not currenly reliable.
Use commitSync() by default; add syncCommits property to the containers
(default true).
Also allow a user-injected commit callback (GH-72)

Not sure in the problem on the Travis. A couple rebuild locally even on Windows are good.
Although the test report isn't consolatory:
org.springframework.kafka.annotation.EnableKafkaIntegrationTests 	        13.000s
org.springframework.kafka.core.KafkaTemplateTests 	                         0.359s
org.springframework.kafka.listener.ConcurrentMessageListenerContainerTests 	38.578s

So, the Travis may be just a victim of timing issue.
I don't say that we should consider them as long-running because that looks like just Kafka rebalancing pause.
So, merging as is.
Will see in the future!


Optimize Agriculture using Artificial Intelligence

[Abstract]
Agriculture plays a significant role in the growth and development
of the economy of any nation. But the emergences of crop-related
diseases affect the productivity [1]. This has not only an impact on
the economy itself, but also influences the security of food supply.
Conventional methods of pest control are mostly controversial and
no longer tolerable for the environment. To cope with these issues
and to implement effective strategies to prevent the propagation of
diseases, crop disease diagnosis with artificial methods is required.
Commonly used techniques are k-Means clustering, Convolutional
Neural Network CNN, and image processing tasks. In this paper, a
combination of Convolutional Neural Network and autoencoder is
explained, which is referred as Convolutional Encoder Network, to
identify crop disease using crop leaf images.
Keywords
Artificial Intelligence, Machine Learning, Deep Learning, Crop
disease detection, Convolutional Encoder Network, PlantVillage
Link to PDF: short_paper_walser.pdf

Optimize Agriculture using Artificial Intelligence_Review.pdf
short_paper_walser_review.pdf

Review_Optimize Agriculture using Artificial Intelligence_Mehta.pdf

Peer Review Report_02_walser.pdf


Use Bit-Vector for Initialized Flags

Right now each entry has an AtomicBool, which can waste a lot of memory depending on the alignment of T.

I agree that would be nice, although it'd require  although it would require using unstable APIs to make it efficient. You'd have to leverage the existing pointer to prefix the entry array with a bit-vector of sufficient length, and there's really no easy way to make this work on stable.
Additionally, I'm not sure how this would affect cache locality, since each entry's flag is no longer right next to it, and larger buckets could exceed the size to fit an entry's flag and its value in cache.

You'd have to leverage the existing pointer to prefix the entry array with a bit-vector of sufficient length, and there's really no easy way to make this work on stable.

You can do with using alloc directly with a custom layout.

Additionally, I'm not sure how this would affect cache locality, since each entry's flag is no longer right next to it, and larger buckets could exceed the size to fit an entry's flag and its value in cache.

It's true that the flag and value would no longer be in the same cache line. One thing we could do to improve this is to have a true marker length that's lazily updated based on updates to the bitvector, such that everything up to the marker length is initialized. This would reduce contention for readers.

Also, if you're using this crate, you should know that it's not memory-efficient. You sacrifice memory efficiency and the ability to keep everything in one place with concurrency.

Using a bitvec can cut the memory overhead almost in half in many cases, so I think it's worth doing.

Oh huh, I guess I never realised that even though Allocator isn't stable, alloc is, so, never mind. You definitely could do this with a custom layout, although you'd unfortunately have to represent said layout using a struct like:
#[repr(C)]
struct Entry<T, const N: usize> {
    active: BitArr![N, in AtomicU8],
    data: T,
}

since I don't think we can really guarantee that an unsized slice of data would always be at the end.


Greenkeeper/all/puppeteer 1.14.0

Pull Request Test Coverage Report for Build 1767

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 93.869%

Totals

Change from base Build 1766:
0.0%

Covered Lines:
1623

Relevant Lines:
1729

💛  - Coveralls


salad.com/___ web app

@dsarfati If I change the basename to /app and the port to 3001 for my environment variables, I get directed to http://localhost:3001/app/profile-error instead of just seeing the working app but based from /app
I am not sure if any of your routing changes have affected this flow, for this was to test how the app would working on the salad.com domain.

@dsarfati If I change the basename to /app and the port to 3001 for my environment variables, I get directed to http://localhost:3001/app/profile-error instead of just seeing the working app but based from /app
I am not sure if any of your routing changes have affected this flow, for this was to test how the app would working on the salad.com domain.

We won't set the basename to /app anymore. It will remain its default (i.e. /).

A reviewer left a comment:

it looks like we're going to have to update every /settings/summary with /account/summary
Browser metadata
Open Deploy Preview · Mark as Resolved

I don't see this path in the garden component. I don't know why that is happening.

 do we want Logout to be in its own column like this?

I really dont like it like this, but I liked it even less at the bottom of the other row. I think we will take this as an item to update in the future with a custom UI component.

@dsarfati Just ran your updated branch, and was directed to /profile-error on starting the app. I am not in an authenticated state, do you see this happening on your end?

A reviewer left a comment:

it looks like we're going to have to update every /settings/summary with /account/summary
Browser metadata
Open Deploy Preview · Mark as Resolved

I don't see this path in the garden component. I don't know why that is happening.

 do we want Logout to be in its own column like this?

I really dont like it like this, but I liked it even less at the bottom of the other row. I think we will take this as an item to update in the future with a custom UI component.

looks like the 404 is resolved now. thanks for taking a look at that.
addressing the logout stuff in a later update sounds good. i just wanted to make sure it was something we were thinking about.


Status of the Papal States, United Baltic Provinces and Scandinavia

I'm absolutely baffled on why the Papal States and the United Baltic Provinces are still on this mod. I guess that they're either remnants from the converter or from DH. I think Scandinavia should be kept in this mod just in case if a Nordic Union is ever added into this mod.

Will close this referencing the waiting issue Nordic Council #801


Feature/177 create applicant dashboard

@chris-lawton What is up with the conflicts?

@todd-dembrey - fixed


Add OCSP_resp_get0_signer()

Instead of making the caller search through the associated certificates manually, expose a wrapper around our internal API to look up the actual signing certificate.
Checklist

[x] documentation is added or updated
[x] tests are added or updated

I think that this is reasonable to include in 1.1.0, as it's arguable making up for something that was lost when we made things opaque.  It doesn't meet my criteria for 'second review from same company' so I won't formally approve it. :)

Rebased, and updated libcrypto.num to match the 1.1.0 target. (This is too late for 1.1.0g, of course.)

merged to master.
There were enough issues backporting the test to 1.1.0 that I'll make a separate pull request.
(The build.info conflicts were simple enough, but we don't have TEST_ptr() and friends.)


[Question] Get list of all filled and ReadOnly volume ids

Hi,
I have so many filled volumes that I want to get a list of them from weed,
Is there any way for me to get a list of all filled volume ids and ReadOnly volume ids?

In weed shell, volume.list should work for you.


process.env.REACT_APP_*  :: CRA or community convention?

I have over a year experience w/ react but I still prefer to start projects using the CRA script (w/ a TS flavoring). I'm now gaining experience w/ deployment and have learned about the REACT_APP_* environment variables settings. I've hacked my way through changing the environment variable settings to work the way I want like so... (sharing for community knowledge)
const REACT_APP = /^REACT_APP_/i;

function getClientEnvironment(publicUrl) {
  let PM2_ENV = {}
  if(process.env.NODE_ENV==='production'){
    // stuff env config from pm2 //TODO update pm2 and change to env_production
    const os = require('os')
    const PM2_FILE_URL = os.homedir()+'/.pm2/ecosystem.config.js'
    const PM2_CONFIGS = require(PM2_FILE_URL).apps
    PM2_ENV = PM2_CONFIGS.find(a => a.name==='express-server').env
  }
  const raw = Object.keys(process.env)
     .filter(key => REACT_APP.test(key))
    .reduce(
      (env, key) => {
        env[key] = process.env[key];
        return env;
      },
      {
        // Useful for determining whether we’re running in production mode.
        // Most importantly, it switches React into the correct mode.
        NODE_ENV: process.env.NODE_ENV || 'development',
        // Useful for resolving the correct path to static assets in `public`.
        // For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
        // This should only be used as an escape hatch. Normally you would put
        // images into the `src` and `import` them in code to get their paths.
        PUBLIC_URL: publicUrl,
      }
    );

  raw = {...PM2_ENV, ...raw}

  // Stringify all values so we can feed into Webpack DefinePlugin
  const stringified = {
    'process.env': Object.keys(raw).reduce((env, key) => {
      env[key] = JSON.stringify(raw[key]);
      return env;
    }, {}),
  };

  return { raw, stringified };
}

Now I'm left wondering whether or not to keep the REACT_APP_ process.env filter that comes with the package. Does anyone know the reasoning for it? Is it just a nice convention for newbs or is it a community convention that I should retain for working w/ 3rd party libs?
Thanks!

Please see my reply in https://github.com/facebookincubator/create-react-app/issues/2865#issuecomment-325703406.
The convention is explicit to make it obvious what will be public. Any variable you use in client-side code will actually be shipped as part of your JS bundle.
You don’t want a rogue npm dependency to log your process.env.DB_CREDENTIALS or something like this. This is why we only provide what has been explicitly marked for use within the client-side app.

Thank you for your reply @gaearon . I'm going to follow your advice and prepend the env variables in my PM2 file with REACT_APP_* as well.
Incase the community wants it, the change to the above code would be
  if(process.env.NODE_ENV==='production'){
    // this stays the same
  }

process.env = {...process.env, ...PM2_ENV}

// and the line below is deleted
- raw = {...PM2_ENV, ...raw}


After resize tabs can be completely closed?!

Hello, I use the plugin with: responsiveTabs({collapsible: "tabs"});
So I only want tabs and no accordion. After resizing the browser it is always possible to completely close all tabs by clicking on the active tabs navigation item. No content anymore for the user, only navigation is visible.
Is there any chance to disable that?

Hi there,
If I understand correctly you would like to programmatically close all the tabs, right? You could loop the number of tabs and close them with the deactivate method: https://github.com/jellekralt/Responsive-Tabs#deactivate-1

No that's not the point. The issue is that after resizing the browser, it is possible to close the tabs so that no content is visible. This is confusing for the visitor. I want to disable that, so that there is always content visible. I think its a bug, because this issue only appears after resizing.

Ok, so what your are saying is that you don't want the tabs to be closable? The tabs close because you configured it with {collapsible: "tabs"}. This option enables the closing of a tab. However, this should work even before resizing. In which browser does this only happen after resizing?

Sorry! My fault. I have to use responsiveTabs({collapsible: false}); Now it's working like i am expecting it. Thangs a lot!

No worries, good to hear it works now!


Incorrect Import Path Extensions in Generated TS Files

Description:
The generated files, when used in a CommonJS environment, have incorrect import path extensions (.js). This is causing module resolution failures.
Steps to Reproduce:

Prepare the proto and utilize buf to generate the code using the following config:

version: v1
plugins:
  - plugin: es
    out: gen
    opt: target=ts
  - plugin: connect-es
    out: gen
    opt: target=ts

Set up a CommonJS environment.
Use the specified libraries to generate the required files.
Observe the incorrect import path extensions in the generated files.

Expected Behavior:
Generated files should have the correct import path extensions suitable for a CommonJS environment.
Screenshots:

Environment:

Library/Framework Versions:

@connectrpc/connect-web: 1.1.2
@bufbuild/protobuf: 1.3.3
Frontend framework<EMAIL_ADDRESS>

Node.js Version: 20.8.0

Additional Context:
Upon reviewing the sample code provided in the connectrpc's GitHub repository, I noticed that the same issue with incorrect import path extensions is also present there.

I may have overlooked it, but this matter might have already been discussed. If it's redundant, please ignore.
https://github.com/bufbuild/protobuf-es/issues/587

@sugar-cat7, I have the same issue, and I fixed it by setting the import_extension option.
  - plugin: connect-es
    out: src
    opt: target=ts,import_extension=none

@sugar-cat7, you can use resolve.extensionAlias in webpack, or the plugin option import_extension=none.
We have an example here, and documentation here.
It's unfortunate that webpack does not support .js extensions in TypeScript code out of the box. If you compile the code with the TypeScript compiler and run it with Node.js, you'll find that it actually compiles and runs without issues.
Which parts of the documentation did you use to get started? Hopefully we can improve it.

Thank you for providing the solution! I was able to resolve the issue by following your suggested methods. :)
I stumbled upon this issue while following the documentation provided here: Local Code Generation.

We have added this paragraph to the page:

If your bundler does not handle the .js extension in the import from "./eliza_pb.js" correctly, you can configure it following our examples here, or you can add the plugin option import_extension=none to remove the extension.

Thanks for helping to improve the docs!

I just ran into this issue, and managed to resolve it by changing my buf.gen.yaml to the following:
version: v1
plugins:
  # This will invoke protoc-gen-es
  - plugin: es
    out: clarifai-connect-grpc/gen
    opt:
      - target=ts
      - import_extension=none
  # This will invoke protoc-gen-connect-es
  - plugin: connect-es
    out: clarifai-connect-grpc/gen
    opt:
      - target=ts
      - import_extension=none

It's unfortunate that webpack does not support .js extensions in TypeScript code out of the box. If you compile the code with the TypeScript compiler and run it with Node.js, you'll find that it actually compiles and runs without issues.

Why would it be the bundler's job to change which file extension it matches? As I understand it, most bundler will let you leave off the extension, in which case it will go through a list of various extensions like js, ts, jsx, tsx, mjs, etc, in which case, the generated module greet_pb.ts would have been found eventually, and it would have worked. The problem was that the code that was generated was all .ts files, but the generated code had imports to greet_pb.js so if you specify the extension, most bundlers won't try to second guess what you wanted, and instead try to give you exactly what you requested.
In my opinion, import_extension should be set to none by default, since if I'm not mistaken, all bundlers and even node will support this behavior, and even newer runtimes like Deno which try to create stricter behavior will often include compatibility for node conventions (though I haven't tested any of this). Shy of this, I think the buf.gen.yaml file on that page should include it because then it will actually work regardless of the extension.
In my next.js (which uses webpack), when I use the sample buf.gen.yaml with just target=ts, here's the directory and code that I see:

Trying to build this app fails, because it's looking for a non-existent .js file. When I add the import_extension=none option and regenerate the code, I get the following output:

This version builds correctly in my next.js app, and I imagine most bundlers out there also include this "fallback" of selecting from a variety of extensions if no extension is specified.
Apologies if I'm misunderstanding the issue, but to me it seems pretty clear that the code generator is incorrectly adding a .js extension when it's outputting ts code, because I don't have any .js files anyway, how could that ever work (other than re-mapping the js extension back to ts as your workaround section suggests).

even node will support this behavior

Unfortunately, that is not the case, @alexandros-megas. From the TypeScript handbook:

In Node.js, module specifiers in import statements and dynamic import() calls are not allowed to omit file extensions or /index.js suffixes

Node.js is following the ECMAScript spec, TypeScript and browsers too, but bundlers have not caught up. Here's an issue filed against next.js. Webpack added the option extensionAlias to mitigate.
When we initially wrote the code generator about two years ago, we expected bundlers to update much more quickly. Unfortunately, they haven't yet. We'll consider to change the default behavior to generate no import extension in the next major version, if the situation has not improved.


.Lastmod does not honor front matter override

Using .Lastmod in template, and getting only the git lastmod.  lastmod property in front matter is ignored.
post front matter:
---
title: Range Damage
author: Stets Newcomb
lastmod: "2017-03-03T14:15:59-06:00"
---

template:
{{ define "main" }}

			{{ range .Pages }}

					{{ .Lastmod.Format "Jan" }}
					{{ .Lastmod.Format "02" }}

{{ .Title }}

					<address>{{ .Params.author }}</address>
					{{ .Content | truncate 90 }}

			{{ end }}

{{ end }}

Month and day are "DEC" and "13" -- the day I did git checkin.  If I haven't checked it in yet, its 01-01-0001T00:00:00-00:00

Please use https://discourse.gohugo.io/ for questions/troubleshooting. Also see  Hugo Documentation.

I came today to that issue. This has been indeed discussed on discourse but the conclusion is that the documentation and the behavior are not consistent.
To have a proper behavior which matches the documentation, there is indeed a workaround, which consists of changing the config by:
frontmatter:
  date:
  - date
  - publishDate
  - lastmod
  expiryDate:
  - expiryDate
  lastmod:
  - lastmod
  - :git
  - date
  - publishDate
  publishDate:
  - publishDate
  - date

Would it be possible to reopen this issue and either fix the documentation or change the default order?

If you wish to discuss changing the defaults (unlikely), please revive the forum discussion.
If you wish to modify the documentation, please submit an issue here, referencing the forum discussion where it was concluded "that the documentation and the behavior are not consistent."
Thanks.


Setting: Dungeon Rewards in Any Dungeon (End of Dungeon)

This is just a blanket title, it doesn't have to be done this way. I know you talked about a macro setting that would decide what's considered a dungeon and then whether or not the ToT should still give you a free reward under such a setting or if the ToT giving you a free reward is a toggleable setting on its own in tandem with this (or you said something like that).
Either way, whatever is decided, I don't think the discussion is actually going to happen on the discord lol. No one is talking about it in the suggestions thread for it so I'd say, Nax, you can take design liberties. If you were to ask me on it, I would say from a design standpoint someone picking End of Dungeon probably expects the setting to function similarly to the Blue Warps setting, just adding in the extra dungeons that don't have blue warps. Thus, I would say it should probably still give you a free reward once turning adult in ToT. In this way it means you do one less dungeon every seed (also because Ikana Castle, in songs on songs, cannot work with this setting as I go into below).
But that's my opinion and it's only to avoid confusion/GUI clutter for a setting that I don't expect a lot of people will use? Anyway, with that out of the way, here's how the setting should be set up otherwise:
-All the main dungeons have their rewards on the blue warps again.
-GTG has its dungeon reward slot on the center chest in the maze
-Bottom of the Well has its dungeon reward slot on the Lens of Truth chest (so killing Deadhand spawns the chest that has the reward in it)
-Ice Cavern's final chest has the dungeon reward
-Beneath the Well has its dungeon reward on the Mirror Shield chest
-Swamp Spider House has its dungeon reward on the 30 token reward; if the user has this junked then a reward cannot be placed on it of course.
-Ocean Spider House has its dungeon reward on the 30 token reward
-Secret Shrine has its dungeon reward on the final chest
-Ikana Castle has its dungeon reward on Igos ONLY IN SONGSANITY, in songs on songs it would have to be on the Ikana pillar? If that's possible to do... Ikana Castle is difficult, honestly. It would make the most sense ON Igos but... that conflicts with songs on songs unless the dungeon reward overrides songs on songs somehow for that one check. Not sure what to do, it may just be unable to place a reward there I guess (which is why ToT being on by default would make the most sense here).
-Pirate's Fortress is specifically only the Interior and specifically the Hookshot chest. It is ostensibly the last chest and has the highest requirements out of all the chests to get (bow/deku + magic, goron + zora, or hookshot + zora). So it'd make the most sense.
And I believe that's everything? Ghunzor had the idea about uninverted Stone Tower Temple having the possibility of having a reward on the Light Arrow chest but I'm not sure that's a good idea when it already can have a reward in ISTT on the blue warp? Not even sure if designating those 2 in this setting as "separate" for the rewards is even possible since the STT region includes both uninverted and inverted... so the pedestal or the sign in Clock Town wouldn't tell you which STT has the reward then...
Anyway. Long-winded. Rambley. Just putting this up for now either way.

I am going to deem this as not necessary anymore as Coins can serve this purpose just fine and maybe somewhere down the line when Plando is expanded more maybe you will be able to do this in some way via plando instead.


How to use BertTokenizer?

what is the best way to use the BertTokenizer? its not a public file so I'm not sure whats the best way to use it

You are right, @jonathan-goodrx. In general, tokenizers are expected to be used using the AutoTokenizer.from(pretrained:) method, but BertTokenizer does not yet follow that pattern (some of the pieces are hardcoded instead of relying on BertPreTokenizer and BertNormalizer configuration components).
For now, I've opened https://github.com/huggingface/swift-transformers/pull/73 to make the class public to unlock your use. Once it's merged, you'd use it like this test shows: https://github.com/huggingface/swift-transformers/blob/3bd02269b7797ade67c15679a575cd5c6f203ce6/Tests/TokenizersTests/BertTokenizerTests.swift#L36. You need to supply the vocabulary mapping.
Would that be helpful for your use case?
In parallel, I'll work in an implementation that follows the same pattern as the other tokenizers in the repo, so it can be used with the AutoTokenizer.from methods.

that works for me, thank you

@pcuenca could you bump the library when you get a chance 🙏

@jonathan-goodrx Done!


Add better description

I was struggling with following basics steps that you can create account but not login with it. Please emphasize that IdentityExperienceFramework  and ProxyIdentityExperienceFramework needs to be created under AAD blade and not under B2C blade. That resolved my issue.
Thanks

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

ID: bee63035-00ee-f7fd-97a1-69dae5f808ef
Version Independent ID: a3447928-73cc-0290-6d46-b89234757e3b
Content: Tutorial - Create user flows and custom policies - Azure Active Directory B2C
Content Source: articles/active-directory-b2c/tutorial-create-user-flows.md
Service: active-directory
Sub-service: b2c
GitHub Login: @msmimart
Microsoft Alias: mimart

Both the IdentityExperienceFramework and ProxyIdentityExperienceFramework apps can be registered under the Azure AD B2C blade. So, I'm not quite sure I understand what you say: needs to be created under AAD blade and not under B2C blade. That resolved my issue.

When I register under Azure AD B2C blade it is not working for me, when I do that under Azure AD it is working.

@koncarevicradovan Thank you for your feedback . We will investigate and update the thread.

@koncarevicradovan When you say "it is not working", what is the error you get?
When you used Azure AD B2C blade, did you configure the delegated permissions to add IdentityExperienceFramework to ProxyIdentityExperienceFramework application? If delegated permissions are not configured, users can signup but fail to sign-in. All the steps are same whether you use App registrations under Azure AD B2C or Azure AD blade.

@amanmcse not working means users can signup but fail to sign-in. Yes, I did that

@koncarevicradovan Could you please share the error message from sign-in events when the sign-in failed?

@amanmcse Sure

@koncarevicradovan I meant the error message logged under Azure AD > Sign-in logs under Monitoring section.

Please share the correlation id along with the error message as well.

@amanmcse Is that log in main directory or in b2c directory?

@koncarevicradovan In the B2C directory.

I don't see any failed request there or error message

@koncarevicradovan please send an email at AzCommunity[at]Microsoft[dot]com with subject Attn:Amanpreet and we will connect offline to investigate into it.


Python Debugger - using python in interactive mode via PYTHONINSPECT

Issue Type: Bug
It looks like the VS Code does not correctly handle the PYTHONINSPECT  environment variable (equivalent of doing python.exe -i)
testing.py
a = 2
launch.json
    {
        "name": "vtest",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal",
        "env": {
            "PYTHONINSPECT": "equivalent of python.exe -i"
        },
        "cwd": "${workspaceRoot}",
    }

Using that debugger to debug testing.py, you'll see that the interactive mode launches.  If you type 1+1 in that REPL you get 2 back.  But if you type 'a' to get 2, you get a stdin error like below:

Extension version: 2019.4.11987
VS Code version: Code 1.33.1 (51b0b28134d51361cf996d2f0a1c698247aeabd8, 2019-04-11T08:27:14.102Z)
OS version: Windows_NT x64 10.0.17763

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 2904)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: enabledsurface_synchronization: enabled_onvideo_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
15.90GB (7.06GB free)

Process Argv

Screen Reader
no

VM
0%

Thanks but we're closing as this, as it's not something we plan on supporting.
Please use the debugger to view/analyze the variables in the current session.


specify port other than 80?

I haven't had a chance to look through the code, and I know very little about nodejs, is there a config.json option for the port that i can hit /api on? both 443 and 80 are in use by apache.

Yes. Pass --port into the args, or in the config, or as an env variable as ADDICT_PORT. I'll update the docs.

I re-ran the npm install line
npm i addict-api -g
/usr/bin/addict -> /usr/lib/node_modules/addict-api/bin/index.js
/usr/bin/addict-cli -> /usr/lib/node_modules/addict-api/bin/index.js

<EMAIL_ADDRESS>updated 1 package in 2.929s

port is not an option, addict --url redacted --user redacted@redacted --pass superredacted --port 895
Invalid option: 'port'. Showing Help:

Okay. It looks like I hadn't pushed my latest fixes. I have also adjusted the npm package from addict-api to just addict (was working with npm to get that name freed up).
So try again now with addict, latest version is 1.0.5.

<EMAIL_ADDRESS>added 125 packages in 8.291s

addict --url redacted --user redacted@redacted --pass superredacted --port 895
Invalid option: 'port'. Showing Help:

Err, I just tried it on a totally fresh setup and it was fine:
addict --user<EMAIL_ADDRESS>--pass xxx --url ldaps://xxx --port 3100
Try npm uninstall -g addict
then
npm install -g addict

i had both addict and addict-cli in /usr/local/bin, after uninstalling them with npm uninstall i was still able to run addict from cli.
I removed both addict and addict-cli from /usr/local/bin, npm install -g addict does not put either back...

That's really odd--do you have a fresh image you can try from, maybe a docker repo?
It might be some permissions problem in /usr/local/bin after deleting? It's more of an npm question.

I uninstalled node and npm, ran apt-get clean, reinstalled node, re-ran npm i -g addict, I see that it changed directories, it's at /usr/bin/ now.
It rebuilt the link and it runs fine now. except for #8

Good!


update new cli.py to access positive or negative ion mode database

With the new version, we can't 'cheat' and have two different folders. So, we now need to have a new version of the database code which will require users to specify up front as to whether they are querying positive or negative ion mode data.

Also, as part of this, add 'positive' or 'negative' to the parameters exported in the header of the CSV result file.

Krista, to test this you will need to delete your database and allow the code to re-create it. The easiest way to do this is from PgadminIII, but it's a little complicated to explain in a github message.

This works fine and I can add data into two piles: one for pos and one for neg.


Fix unsafe isWebP check

Potential buffer overflow by reading bytes without checking for the buffer length first.
This would cause otherwise this runtime exception:
#0	0x00007fff6dfb1380 in _swift_runtime_on_report ()
#1	0x00007fff6e02b243 in _swift_stdlib_reportFatalErrorInFile ()
#2	0x00007fff6dcf21dd in closure #1 in closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) ()
#3	0x00007fff6dcf1cf7 in closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) ()
#4	0x00007fff6dcf19c3 in closure #1 in _assertionFailure(_:_:file:line:flags:) ()
#5	0x00007fff6dcf15d5 in _assertionFailure(_:_:file:line:flags:) ()
#6	0x00007fff6dcf18b0 in _fatalErrorMessage(_:_:file:line:flags:) ()
#7	0x00007fff6defa9ab in UnsafeMutableRawBufferPointer.subscript.getter ()
#8	0x00007fff6defa921 in UnsafeRawBufferPointer.subscript.getter ()
#9	0x0000000111b610a3 in closure #1 in Data.isWebP.getter at /Users/marius/Development/WebPKit/WebPKit/Decoding/Utilities/Data+WebPDecoding.swift:39
#10	0x0000000111b61393 in thunk for @callee_guaranteed (@unowned UnsafeRawBufferPointer) -> (@unowned Bool, @error @owned Error) ()
#11	0x0000000111b613f4 in partial apply for thunk for @callee_guaranteed (@unowned UnsafeRawBufferPointer) -> (@unowned Bool, @error @owned Error) ()
#12	0x00007fff6e14ec35 in Data.withUnsafeBytes<A>(_:) ()
#13	0x0000000111b60fdb in Data.isWebP.getter at /Users/marius/Development/WebPKit/WebPKit/Decoding/Utilities/Data+WebPDecoding.swift:35

Haha! Thanks so much Marius! 😁
(Well played on the unit test naming. 😝)


Initialization of aggregate handlers

I have observed issue with aggregate handlers.  It seems that only one instance of the handler is created when the aggregate function is used multiple times. The initialize message is not send, resulting in wrong results when the handler is used more than once. The behavior can be easily replicated using the example in the sqlite3/database.rb at the def_aggregate_hander by calling the function several times, i.e.:
db.create_aggregate_handler( LengthsAggregateHandler )
puts db.get_first_value( "select lengths(name) from A" )
puts db.get_first_value( "select lengths(name) from A" )
Also usage of the function for various columns does not provide correct results, e.g., db.query('select lengths(name), lengths(name2) from A')
It seems that the problem has been introduced in version 1.3 as the version 1.2.5 works correctly.
btw. the name message ( def self.name; 'lengths'; end ) is missing in the example presented in the sources.

Attached is a simple script. It is obvious that two same values should be printed.
For sqlite3-ruby (1.2.5) the output is:
./aggregate.rb
3
3
While for the sqlite3-ruby (1.3.3) the output is:
./aggregate.rb
3
6
On Mon, 21 Nov 2011 14:22:12 -0800
Aaron Patterson<EMAIL_ADDRESS>wrote:

Can you post a complete test case for us?

Reply to this email directly or view it on GitHub:
https://github.com/luislavena/sqlite3-ruby/issues/44#issuecomment-2822202

--
Jan Faigl<EMAIL_ADDRESS>


APPLICATION ERROR #505

APPLICATION ERROR #505
I am using MantisBT Core 2.5.1
When I attached the image in Description and submit the issue at that getting below error
Uploaded file could not be moved to the file storage directory. Directory either does not exist or not writable to webserver.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Changes done in config_inc.php
$g_custom_headers = array(
"Content-Security-Policy: " .
"frame-src http://gist-it.appshot.com/ 'self'; " .
"img-src https://img.shields.io/ https://secure.gravatar.com/ 'self' blob: data:; " .
"default-src 'self' *; " .
"frame-ancestors 'self'; " .
"font-src 'self'; " .
"style-src 'self' 'unsafe-inline' *; " .
"script-src https://cdnjs.cloudflare.com/ http://gist-it.appspot.com/ 'self' 'unsafe-inline'"
);
Changes Done in bug_api.php
function bug_get_attachments( $p_bug_id ) {

	$p_bug_id = (int)$p_bug_id;

	global $g_cache_bug_attachments;
	if( isset( $g_cache_bug_attachments[$p_bug_id] ) ) {
		return $g_cache_bug_attachments[$p_bug_id];
	}

    if (function_exists('veditor_bug_get_attachments')) {
        return veditor_bug_get_attachments($p_bug_id);
    }

	db_param_push();
	$t_query = 'SELECT id, title, diskfile, filename, filesize, file_type, date_added, user_id
		                FROM {bug_file}
		                WHERE bug_id=' . db_param() . '
		                ORDER BY date_added';
	$t_db_result = db_query( $t_query, array( $p_bug_id ) );

	$t_result = array();

	while( $t_row = db_fetch_array( $t_db_result ) ) {
		$t_result[] = $t_row;
	}

	return $t_result;
}

on edit the issue  getting below error
APPLICATION ERROR #401

Database query failed. Error received from database was #1054: Unknown column 'bugnote_id' in 'field list' for the query: SELECT id, title, diskfile, filename, filesize, file_type, date_added, user_id, bugnote_id
FROM mantis_bug_file_table
WHERE bug_id=? AND title <> 'Pasted by TinyMCE' ORDER BY date_added.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Field bugnote_id was added in version 2.23.0 . Please upgrade to the latest version.
Second possibility is saving images directly in notes  fields. Please remove patch from bug_api.php
Unfortunately this way increases database size.
Third solution is modify VEditor.php and remove bugnote_id from field list in SQL query.
(function veditor_bug_get_attachments, line 524)
I'm not sure version 2.5.1 has global $g_cache_bug_attachments code.
Please insert only code between #VEditor marks.
Please check if this project has set valid path for attachments.


More docs update

Codecov Report

Merging #1545 (4be6406) into main (f34702f) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 4be6406 differs from pull request most recent head 1bc3c30. Consider uploading reports for the commit 1bc3c30 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main    #1545   +/-   ##
=======================================
  Coverage   85.97%   85.97%
=======================================
  Files          83       83
  Lines        9236     9236
  Branches      516      516
=======================================
  Hits         7941     7941
  Misses       1295     1295

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Add more statistics to Tooltester

Description
This PR adds two additional metrics to tooltester for CWL workflows. WDL workflow metrics are still in progress (see discussion in comments).
Currently, the two additional metrics being gathered by tooltester are:

CpuUtilized
MemoryUtilized

However, I can add any of the metrics available here by simply adding a line to my code here.
Currently, all metrics are being uploaded to QA (under the additionalProperties field) under the same name that is used by AWS, with either _MAX or _AVERAGE being appended to the end, I could change this if desired.
The Approach for CWL workflows
Everytime a CWL workflow is run, an ECS task is created for it. The task name will look something like this,
toil-9a730e67-fb32-4559-b623-e9dd2d71542d:1

As far I has been able to determine the last part of the ECS task name is an UUID. From AGC, I haven't been able to determine a way to get the ECS task for a job. However, to get around this, I have been querying AWS before I run the workflow, asking AWS for a list of all ECS tasks. Then once I have got the workflow to run, I have been querying AWS again for a list of all ECS tasks and determining which task is new, and assuming that this is the task for the workflow that was just created.
The issue with this approach, is that if another ECS task is created at the same time tooltester is running, tooltester may incorrectly assume that that ECS task is the one associated with the workflow.
I think this issue could be mostly avoided by setting an AWS account with extremely limited access such that it only sees ECS tasks associated with tooltester.
I can also add a quick check to ensure that the ECS task contains the word toil.
Then once the workflow has finished running, I have been waiting 15 minutes to give time for all the metrics associated with the ECS task to become available (it generally takes about 10-12 minutes). Then I have been querying AWS Cloudwatch for the statistics associated with the task.
Regrettably, to query CloudWatch effectively, two things are required, the clusterName and the TaskDefinitionFamily. The TaskDefinitionFamily is what I was referring to above. However, the clusterName is still required. I haven't been able to find a way to find it reliably with the APIs, however, it is associated with each AGC context and doesn't change.
So, I have added two required parameters to CLI, for the user to specify the cluster names used to run the WDL and CWL workflows.
To determine the cluster name for each context you do the following on the AWS web console:

Go to the "Batch" section of the AWS Console
Go to the "Compute Environment" menu of the Batch section of the AWS console.
Find the Batch Compute Environment associated with your context. If you click on each computer environment and look under tags, you will see the name you chose for the context when you set it up (See image in comments for an example). As an example, the batch compute environment for one of my contexts is BatchTaskBatchComputeEnv-0FxjUpJuXVowThgf.
Go to the "ECS" section of the AWS console
Go to the "Clusters" menu
Find the ECS cluster that starts with your Batch Computer Environment that you identified before. For example, in my case, the ECS cluster is called, BatchTaskBatchComputeEnv-0FxjUpJuXVowThgf_Batch_2d94d28c-ccaa-3dd5-865c-faad50e542eb.

This is what you will specify when you run the tooltester here. Note: You will have to do this for both the CWL and WDL contexts.
Thankfully, as long as the context doesn't change, nor will the ECS cluster.
Approach for WDL workflows
I have implemented a very similar approach for WDL workflows. The only issue is that an ECS task is not always generated for a WDL workflows. If this occurs, then after 2 and a half minutes the tooltester will assume that no ECS task is being created and move on. If this occurs, then no metrics that utilize cloudwatch will be collected.
Also, the other problem with WDL workflows, is that they do not create a separate ECS for each run of a workflow. If an ECS task already exists for a workflow (say from a run a few days ago), then it will use that one. This makes it difficult to identify what ECS task was created during a run. So, at the end of every tooltester run, every WDL ECS task is de-registered. Which forces AGC to create a new ECS task for each run.
Issue:
SEAB-5065

Example of the tags associated with a Batch Compute Environment created with AGC.

As far I has been able to determine the last part of the ECS task name is an UUID. From AGC, I haven't been able to determine a way to get the ECS task for a job

Did you try looking at the output ofdockstore workflow wes logs? You probably tried it, and I have no idea if it actually does have the info, but I wanted to ask just to be sure.

Did you try looking at the output ofdockstore workflow wes logs? You probably tried it, and I have no idea if it actually does have the info, but I wanted to ask just to be sure.

Yes, I did check that, for CWL it looks something like this,
Current version : 1.13.1
You have the most recent stable release.
If you wish to upgrade to the latest unstable version, please use the following command:
   dockstore --upgrade-unstable
{
  "run_id" : "run-01ff249a3c714578bcf26e5bcc1ca9bd",
  "request" : {
    "workflow_params" : {
      "script_file" : {
        "class" : "File",
        "path" : "s3://flynn-test-bucket/make-data.js"
      },
      "script_arguments" : [ "A", "B", "C", "D", "E", "F", "G", "cats", "pigs", "dogs", "space weasles", "snacks" ]
    },
    "workflow_type" : "CWL",
    "workflow_type_version" : "v1.0",
    "tags" : {
      "Client" : "Dockstore"
    },
    "workflow_engine_parameters" : { },
    "workflow_url" : "nontrivial/nontrivial.cwl"
  },
  "state" : "RUNNING",
  "run_log" : {
    "name" : null,
    "cmd" : [ "toil-cwl-runner --batchSystem=aws_batch --awsBatchQueue=arn:aws:batch:us-east-1:635220370222:job-queue/BatchTaskBatchJobQueue15-FzEgq5Aj6HEpMouE --awsBatchRegion=us-east-1 --disableCaching --destBucket=s3://agc-635220370222-us-east-1/project/TooltesterSetup/userid/fhembroff2HHmYU/context/cwlContext2/toil-execution/output/run-01ff249a3c714578bcf26e5bcc1ca9bd --clean=always --jobStore=aws:us-east-1:toil-95b4be98-8a4d-4370-8d74-6516d7c71d88 /opt/work/workflows/run-01ff249a3c714578bcf26e5bcc1ca9bd/execution/nontrivial/nontrivial.cwl /opt/work/workflows/run-01ff249a3c714578bcf26e5bcc1ca9bd/execution/wes_inputs.json" ],
    "start_time" : "2023-03-28T20:58:59.956060",
    "end_time" : null,
    "stdout" : "../../../../toil/wes/v1/logs/run-01ff249a3c714578bcf26e5bcc1ca9bd/stdout",
    "stderr" : "../../../../toil/wes/v1/logs/run-01ff249a3c714578bcf26e5bcc1ca9bd/stderr",
    "exit_code" : null
  },
  "task_logs" : [ ],
  "outputs" : { }
}

I was very much hoping that --jobStore=aws:us-east-1:toil-95b4be98-8a4d-4370-8d74-6516d7c71d88 would give me what I needed. But regrettably, that is not the task definition family. It is actually (for this example),
toil-0af9ed6e-53e1-4131-b5fc-fb1bac9653f4

I assume stdout had nothing either?

Yes that is correct

The AGC logs also do not give any useful information in regards to task definition family names. This is the output of one of the logs:
Tue, 28 Mar 2023 17:02:38 -0400 [toil] INFO:werkzeug:<IP_ADDRESS> - - [28/Mar/2023 21:02:38] "GET /engine/v1/status HTTP/1.1" 200 -
Tue, 28 Mar 2023 17:02:39 -0400 [celery] [2023-03-28 21:02:39,279: INFO/ForkPoolWorker-3] Workflow run completed with state: 'COMPLETE'.
Tue, 28 Mar 2023 17:02:39 -0400 [celery] [2023-03-28 21:02:39,279: INFO/ForkPoolWorker-3] Fetching output files.
Tue, 28 Mar 2023 17:02:39 -0400 [celery] [2023-03-28 21:02:39,280: INFO/ForkPoolWorker-3] Task run_wes[run-6b8fbd963eb14ba2bc64880dcb5c43d1] succeeded in<PHONE_NUMBER>790811s: 'COMPLETE'
Tue, 28 Mar 2023 17:02:39 -0400 [celery] [2023-03-28 21:02:39,351: INFO/ForkPoolWorker-3] Processing workflow_url: 'manyjobs/manyjobs.cwl'...
Tue, 28 Mar 2023 17:02:39 -0400 [celery] [2023-03-28 21:02:39,352: INFO/ForkPoolWorker-3] Using workflow from relative URL.

Tue, 28 Mar 2023 17:02:47 -0400 [celery] [2023-03-28 21:02:47,885: INFO/ForkPoolWorker-4] Fetching output files.
Tue, 28 Mar 2023 17:02:47 -0400 [celery] [2023-03-28 21:02:47,886: INFO/ForkPoolWorker-4] Task run_wes[run-01ff249a3c714578bcf26e5bcc1ca9bd] succeeded in<PHONE_NUMBER>8681458s: 'COMPLETE'
Tue, 28 Mar 2023 17:02:48 -0400 [toil] INFO:werkzeug:<IP_ADDRESS> - - [28/Mar/2023 21:02:48] "GET /engine/v1/status HTTP/1.1" 200 -

I will create a new PR with a README file for this feature to assist the reviewers and future users after this PR is merged.

This would be very helpful; we're going to have to refer to the PR for details.

However, to get around this, I have been querying AWS before I run the workflow, asking AWS for a list of all ECS tasks. Then once I have got the workflow to run, I have been querying AWS again for a list of all ECS tasks and determining which task is new, and assuming that this is the task for the workflow that was just created.

Could make multitasking tricky, but since we're only at around 30 minutes, I think we can run with this at least for some sample data

I have added a README.md and have fully implemented the use of WDL workflows (subject to note in README.md).

The results from each run can be found here
s3://qa-dockstore-metrics-data-readreplica/workflow/


update time also on zero

 Time-Selection: Reset button not enabled when changing seconds from 0 to 1


Directory for peers

In home directory create folder subutai-peers
each folder for each peer

Fixed.

fixed on prod


[Network] T2 network 21.0.1

https://github.com/Azure/sdk-release-request/issues/3094
https://dev.azure.com/azure-sdk/internal/_build?definitionId=1016
BuildTargetingString
azure-mgmt-network
Skip.CreateApiReview
true

/check-enforcer override


UserProfile.BatchUpdate.API is not working anymore

Category

[ ] Question
[ ] Typo
[X ] Bug
[ ] Additional article idea

I am using the UserProfile.BatchUpdate.API for like 2 years without any problem. I have accidentally noticed that the API is not working anymore. It is not important, if i trigger the sync job with one user or multiple in the JSON file or if i try to sync multiple attributes or one attribute, i am just getting an internal error like this one:
Job ID: 07bb3ef9-60a2-46d0-a467-396b9428abf5
Job State: Error
Error State: InternalError
Logged errors: Failed to import the custom properties due to an unexpected error.

I can't get it to work either. I get an "InvalidDataFile" error every time. It also does not create the log file in the SP doc library so I can't even see if there is a more specific error.

Hi, @canturan , @diver7
Do you mind sharing the json file you are using to bulk import the user properties so we can have a check whether there is anything wrong with this input file?
Thanks
Lei

Hi, @canturan , @diver7
Do you mind sharing the json file you are using to bulk import the user properties so we can have a check whether there is anything wrong with this input file?
Thanks
Lei

You can find a copy of the JSON here:
JSON_Sync - Copy.txt

Thanks, canturan. the format of the json file looks good. we will investigate whether the import fails due to some other reason.

Hi, @canturan
Have you ever changed the JSON file name before or after you uploaded this file to the document library of  SPO?

I am always uploading the JSON as a .txt file to the document library as JSON_Sync.txt.


Plugins: duplicate provider entries in help

I've written a series of LFE plugins for rebar3 -- the compiler plugin is written Erlang, but all the others are written in LFE and require the LFE compiler plugin. Each plugin therefore has a provider hook entry in its rebar.config.
I have another project which includes all the plugins together (ltool). When I run help for ltool, I get this:
$ rebar3 help lfe
===> Skipping lfe (from {git,"git://github.com/rvirding/lfe.git",
                                    {tag,"v0.10.0"}}) as an app of the same name has already been fetched
===> Skipping lfe (from {git,"git://github.com/rvirding/lfe.git",
                                    {tag,"v0.10.0"}}) as an app of the same name has already been fetched

lfe <task>:
  compile        The LFE rebar3 compiler plugin
  compile        The LFE rebar3 compiler plugin
  compile        The LFE rebar3 compiler plugin
  compile        The LFE rebar3 compiler plugin
  compile        The LFE rebar3 compiler plugin
  repl           The LFE rebar3 LFE REPL plugin.
  version        The LFE rebar3 version plugin.

I suspect that the multiple compiles are showing up because of the multiple provider hook declarations (but that may be incorrect ...). I've tried removing the provider hook from each plugins' rebar.config, but then the plugin doesn't get compiled and isn't recognized (though the compile lfe task entries are reduced to just one).
Is this a bug?
If not, what is the proper way to setup plugins so this doesn't occur?

Yea, this is a bug. I just duplicated it.
Looks like we add plugin providers every time they are encountered and don't dedup or skip already created providers :)

Good to know :-) I'll tweak the bug title to be a bit more general ...

Should be fixed.

I never followed up on this: thanks!
I've been running the latest rebar3 and this problem's definitely fixed :-)


Date.fromString is NOT a pure function, result depends on local env

The result below depends on your local time zone.
"2017-07-25T20:31:23.647Z"
    |> Date.fromString
    |> Result.map (Date.hour >> toString >> (++) "The hour is: ")
    |> Result.withDefault ""

What I see is:
The hour is: 22

Run this: https://runelm.io/c/2su
Functions in Elm are supposed to be pure, this one is not, because it calls new Date(…) which produces a date with a time zone of the local environment (system).
P.S.
Just to be clear: this is not about the ambiguous input. The Z stands for UTC (ISO8601).

I can see the #816 does not address this particular issue.

Added to #816, thank you!


Distributed and Bucketing Performance Improvements

🐛 Bug
This is a lengthy issue/post detailing my observations with our distributed and bucketing performance. Some of these are actionable items and some are just observations to be aware of.
FSDP ZeRO2 (Bucketing=None)

AllGather operations during the forward pass are launched before the computation begins. This is because the Thunder trace schedules the AllGather all before the computation and also calls the wait operators before any compute begins.
The long line of operations in stream22 are all AG kernels. This is bad for performance because -

There is no overlap with forward pass compute

FSDP ZeRO2 (Bucketing=Block)

Suffers the same problem as no bucketing with all AllGather operations being launched before computation.
Launches Concat CatArrayBatchedCopy_contig kernels for each AllGather operation which would prevent overlap with compute even if the AG launch schedule was interleaved.
Launches a lot of direct_copy_kernel kernels as well when using larger bucketing. This would also prevent any overlap with compute and degrade performance. My understanding is that this might be because we concat the parameters, copy them into a buffer before communication.

Is there a better way of allocating these buffers only in the first iteration and using portion of these buffers for the computation instead of concat+copy every iteration?
For example, below is the execution timeline for TorchInductor

FSDP ZeRO3 (Bucketing=None)

When using ZeRO3, the schedule is as expected with the AG kernels and compute kernels being interleaved. However, due to launch overheads and small message sizes without bucketing, there are many gaps where the compute is not being overlapped with communication.
There is probably room for improvement in the launch overheads (maybe the schedule even?) to improve performance but there is no fundamental bug here. This is just an observation.
FSDP ZeRO3 (Bucketing=Block)

Suffers the same issue as ZeRO 2 Block bucketing with many direct_copy_kernel kernels being launched with AG that adds overhead to the compute stream.
[See screenshot below] Another issue here is that the backward pass has most of the AllGather kernels being launched well before any ReduceScatter kernels launches. While I haven't seen any major performance degradation because of this as most communication is still hidden by compute, there are some exposed communication because of this. There also may be performance issues due to the excessive communication being pushed to the end of the iteration. Additionally, delaying RS could be responsible for worse memory usage and in turn affect performance.

I am writing all of this here to have an easy comparison of all the options tried and facilitate discussion. Please let me know if some of these require individual issues to track and I can create those.
cc @carmocca @awaelchli @crcrpar @IvanYashchuk @mruberry @t-vi @tfogal

Thank you, Parth, for this excellent analysis and accompanying screenshots!

AllGather operations during the forward pass are launched before the computation begins.

At some point, our sorting broke and we need to restore the intended functionality, here's the issue for this: https://github.com/Lightning-AI/lightning-thunder/issues/277

Is there a better way of allocating these buffers only in the first iteration and using portion of these buffers for the computation instead of concat+copy every iteration?

Yes, there's a better way, if we used a special interleaving copy it should be possible to do fewer copies and more views. We don't have an issue tracking this, but creating microbenchmarks for bucketing is in our plans.

Update: ZeRO2 AllGather overlap issues were fixed in #383 and the performance is looking much better now.


Callback in dylib's async function is not work.

Background
I'm using Cocoa's <Photos/Photos> in dylib Library, Photos lib has some asynchronous callback methods. In one of my functions, I passed in a callback function and executed that callback function in the asynchronous callback. And then there's the problem. dylib code like this:
- (void)testCallback:(myTestCallback)callback {
  dispatch_async(dispatch_get_global_queue(0, 0), ^{
    [NSThread sleepForTimeInterval:1];
    NSLog(@"callback: %p", callback);
      callback(231);
  });
}

Problem
One scenario is to prompt this:

(node:70242) [DEP0168] DeprecationWarning:  Uncaught N-API callback exception detected,  please run node with option --force-node-api-uncaught-exceptions-policy=true to handle those exceptions properly.

In this case, I checked the instructions on the official website and it was noted that async might get stuck.

So I executed the callback in the main thread. Things like:
- (void)testCallback:(myTestCallback)callback {
  dispatch_async(dispatch_get_global_queue(0, 0), ^{
    [NSThread sleepForTimeInterval:1];

    dispatch_async(dispatch_get_main_queue(), ^{
      NSLog(@"callback: %@", callback);
      callback(231);
    });
  });
}

However, with this change, the callback in my js always fails to execute under macOS. js looks like this:
const myTestCallback = koffi.proto('void myTestCallback(int)')
const testCallback = lib.func('void testCallBack(myTestCallback *)')
testCallback((val) => {
  console.log('val: ' + val)
})

Hope to get answers and help, thank you in advance!

You can try calling that callback inside a c function instead of oc function (e.g. pass it to a global function).
Koffi seems to perform some logic via assembly, which may not work well with oc.
After all, this should be helpful on revealing the problem.

You can try calling that callback inside a c function instead of oc function (e.g. pass it to a global function). Koffi seems to perform some logic via assembly, which may not work well with oc. After all, this should be helpful on revealing the problem.

Background
I'm using Cocoa's <Photos/Photos> in dylib Library, Photos lib has some asynchronous callback methods. In one of my functions, I passed in a callback function and executed that callback function in the asynchronous callback. And then there's the problem. dylib code like this:
- (void)testCallback:(myTestCallback)callback {
  dispatch_async(dispatch_get_global_queue(0, 0), ^{
    [NSThread sleepForTimeInterval:1];
    NSLog(@"callback: %p", callback);
      callback(231);
  });
}

Problem
One scenario is to prompt this:

(node:70242) [DEP0168] DeprecationWarning:  Uncaught N-API callback exception detected,  please run node with option --force-node-api-uncaught-exceptions-policy=true to handle those exceptions properly.

In this case, I checked the instructions on the official website and it was noted that async might get stuck.
So I executed the callback in the main thread. Things like:
- (void)testCallback:(myTestCallback)callback {
  dispatch_async(dispatch_get_global_queue(0, 0), ^{
    [NSThread sleepForTimeInterval:1];

    dispatch_async(dispatch_get_main_queue(), ^{
      NSLog(@"callback: %@", callback);
      callback(231);
    });
  });
}

However, with this change, the callback in my js always fails to execute under macOS. js looks like this:
const myTestCallback = koffi.proto('void myTestCallback(int)')
const testCallback = lib.func('void testCallBack(myTestCallback *)')
testCallback((val) => {
  console.log('val: ' + val)
})

Hope to get answers and help, thank you in advance!

After check your code, I really wonder if global queue exists when starting via NodeJS? I mean, is there an eventloop running when you launch oc via NodeJS?

I'm having a hard time with callbacks too, but really liked @alshdavid example, and i managed to make it kind a work with version 2.9.0
It's clearly a garbage collector issue.
The below works without any issues.
In rust we wait 1 second, so waiting 2 inside the scope of the promise function everything is fine.
But as soon as you remove the await new Promise((resolve, reject) => { setTimeout(resolve, 2000); }); nodejs crashes
    test_add() {
        return new Promise(async (resolve, reject) => {
            console.log("test_add::begin");
            const TransferCallback = koffi.proto('TransferCallback', 'void', ['int']);
            // Sync
            const add = this.lib.func('add', 'void', ['int', 'int', koffi.pointer(TransferCallback)]);
            // Async
            const addAsync = this.lib.func('add_async', 'void', ['int', 'int', koffi.pointer(TransferCallback)]);
            function callback(value) {
                console.log("callback with value", value);
                if(value==4) {
                    resolve();
                }
            }
            const cb = koffi.register(callback, koffi.pointer(TransferCallback));
            console.log("call::add");
            add(1, 2, cb)
            console.log("call::addAsync");
            addAsync(2, 2, cb)
            console.log("test_add::sleep");
            await new Promise((resolve, reject) => { setTimeout(resolve, 2000); }); // wait longer than the async callback ( so more than 1 second )
            console.log("test_add::done");
        });
    }

So going to extremes i try everything to keep everything from getting garbage collected, but it just instantly crashes as soon as it leave the promise function, if we remove the await new Promise((resolve, reject) => { setTimeout(resolve, 2000); });
    ref;
    test_add() {
        return new Promise(async (resolve, reject) => {
            console.log("test_add::begin");
            this.ref = {
                value1: 2,
                value2: 2,
                callback: (value) => {
                    console.log("callback with value", value);
                    if(value==4) {
                        resolve();
                    }
                },
                TransferCallback: null,
                add: null,
                addAsync: null,
                cb: null,
            }
            this.ref.TransferCallback = koffi.proto('TransferCallback', 'void', ['int']);
            this.ref.add = this.lib.func('add', 'void', ['int', 'int', koffi.pointer(this.ref.TransferCallback)]);
            this.ref.addAsync = this.lib.func('add_async', 'void', ['int', 'int', koffi.pointer(this.ref.TransferCallback)]);
            this.ref.cb = koffi.register(this.ref.callback, koffi.pointer(this.ref.TransferCallback));

            console.log("call::add");
            this.ref.add(1, 2, this.ref.cb)
            console.log("call::addAsync");
            this.ref.addAsync(this.ref.value1, this.ref.value2, this.ref.cb)
            console.log("test_add::sleep");
            await new Promise((resolve, reject) => { setTimeout(resolve, 2000); });
            console.log("test_add::done");
        });
    }

So this makes me think this is not a garbage collection issue, but then what is it ?
What is making it crash instantly if you leave the promise before rust has completed it's callback ?

After a bunch of learning on Node's native api, I better understand why async native functions are so challenging.
Native functions run on the main thread and do not support their values being used on other threads. This prevents the ability to make native functions asynchronous. Koffi uses a worker pool to hide this, but the worker threads are themselves blocked while native functions execute - so they are not truly async. There is also overhead associated with Nodejs's cross thread communication.
I devised a solution in Rust though, given Koffi is written in C, I am not sure how this would translate - but hopefully it provides some ideas to the project.
My demo is built on top of napi-rs bindings (not FFI) and leverages Rust's async system, allowing me to use async/await syntax to spawn non blocking async actions.
I wrote a separate custom event loop that is called from the JavaScript event loop - yielding back and forth between the two in a non blocking fashion.
I call my external loop from a ThreadsafeFunction, but I have also achieved this by plugging into libuv directly.
Link to my library
Example usage:
Normal synchronous native function
fn my_js_func(
  env: Env,             // This is the execution context for the current Nodejs function invocation
  callback: JsFunction, // This is a pointer to the JavaScript function passed into the native function
) -> napi::Result<JsUndefined> {
  thread::sleep(1000);               // This will block the main thread
  callback.call_without_args(None)?; // Call the callback
  return env.get_undefined();
}

My custom async extension
use napi_ext::*; // extend "Env" with my custom methods

fn my_js_func(
  env: Env,
  callback: JsFunction,
) -> napi::Result<JsObject> {
  // "spawn_local" is a custom method that spawns an async closure that
  // does not block the main thread and returns a promise back to JavaScript
  return env.spawn_local(async move |env| {
    task::sleep(Duration::from_millis(1000)).await; // Yields back to the JavaScript event loo[
    callback.call_without_args(None)?;              // Calls the callback
    return env.get_undefined()
  })
}

This is a slightly simplified view of this API, but that's how it works in essence.
This is how the custom event loop works: link

I've managed finish my binding via Napi. Below is the core part.
Generally, use the BlockingCall of ThreadSafeFunction in the callback thread to properly block it until the callback does get executed.
My functions ensure to be called in other threads. To make it also compatible with being called in main thread, more checks are needed.
struct CallbackContext
{
    Napi::Function fn;
    Napi::ThreadSafeFunction tsfn;
    const char* name;

    CallbackContext(Napi::Env env, Napi::Function cb, const char* name)
        : fn(cb)
        , tsfn(Napi::ThreadSafeFunction::New(env, fn, name, 0, 1))
        , name(name)
    {
    }

    ~CallbackContext() { tsfn.Release(); }

    template <typename Result>
    Result Call(
        std::function<Napi::Value(Napi::Env, Napi::Function)> caller,
        std::function<Result(Napi::Value)> parser)
    {
        std::promise<Result> promise;
        std::future<Result> future = promise.get_future();
        tsfn.BlockingCall([&caller, &parser, &promise](Napi::Env env, Napi::Function fn) {
            Napi::Value result = caller(env, fn);
            if (result.IsPromise()) {
                Napi::Object resultObject = result.As<Napi::Object>();
                resultObject.Get("then").As<Napi::Function>().Call(
                    resultObject,
                    {
                        Napi::Function::New(
                            env,
                            [&promise, &parser](const Napi::CallbackInfo& info) {
                                if constexpr (std::is_same_v<Result, void>) {
                                    parser(info[0]);
                                    promise.set_value();
                                }
                                else {
                                    promise.set_value(parser(info[0]));
                                }
                                return info.Env().Undefined();
                            }),
                        Napi::Function::New(
                            env,
                            [&promise, &parser](const Napi::CallbackInfo& info) {
                                if constexpr (std::is_same_v<Result, void>) {
                                    parser(info[0]);
                                    promise.set_value();
                                }
                                else {
                                    promise.set_value(parser(info[0]));
                                }
                                info.Env().Undefined();
                            }),
                    });
            }
            else {
                if constexpr (std::is_same_v<Result, void>) {
                    parser(result);
                    promise.set_value();
                }
                else {
                    promise.set_value(parser(result));
                }
            }
        });
        return future.get();
    }
};

inline void TrivialCallback(MaaStringView msg, MaaStringView details, MaaCallbackTransparentArg arg)
{
    auto ctx = reinterpret_cast<CallbackContext*>(arg);
    ctx->Call<void>(
        [=](auto env, auto fn) {
            return fn.Call({ Napi::String::New(env, msg), Napi::String::New(env, details) });
        },
        [](auto res) { std::ignore = res; });
}

Napi::Value resource_create(const Napi::CallbackInfo& info)
{
    CheckCount(info, 1);
    MaaResourceCallback cb = nullptr;
    CallbackContext* ctx = nullptr;
    MaaResourceHandle handle = nullptr;

    if (!info[0].IsNull()) {
        auto callback = CheckAsFunction(info[0]);

        cb = TrivialCallback;
        ctx = new CallbackContext { info.Env(), callback, "TrivialCallback" };
    }

    handle = MaaResourceCreate(cb, ctx);

    if (handle) {
        return Napi::External<ResourceInfo>::New(
            info.Env(),
            new ResourceInfo { handle, ctx },
            &DeleteFinalizer<ResourceInfo*>);
    }
    else {
        delete ctx;
        return info.Env().Null();
    }
}

same issue:
Uncaught N-API callback exception detected
const storageLib = koffi.load('./storage_kit.dylib')

const callback_t = koffi.proto('void JsCallback(char*)')

storageLib.AsyncCall = storageLib.func('AsyncCall', 'void', ['str', 'str', koffi.pointer(callback_t)])

const cb = (resp) => {
  console.log(resp)
}

storageLib.AsyncCall(act, dataJsonStr, (respValue) => {
  try {
    const obj = JSON.parse(respValue)
    cb(obj)
  } catch (error) {
    cb({})
  }
})


Function's context's logger does not log to the log-topic

Describe the bug
When using the context's logger, log messages are not produced on the function's log topic.
Relevant docs: https://pulsar.apache.org/docs/en/functions-debug/#use-log-topic
To Reproduce
Steps to reproduce the behavior:

Create a Pulsar Function which logs a message using the context's logger (see LoggingFunction.java example below)
Deploy said function using pulsar-admin specifying a log-topic in the create command
Trigger the function / produce a message on one of its input topics
Log messages appear in the function's log file only

Expected behavior
Expected to see the log message produced on the function's log topic in addition to being printed to the log file.
Screenshots
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LoggingFunction implements Function<String, Void> {
    @Override
    public void apply(String input, Context context) {
        Logger LOG = context.getLogger();
        Logger LOG2 = LoggerFactory.getLogger(this.getClass);
        LOG.info("This message appears in log file only")
        LOG2.info("This message appears in log file AND log topic")
    }
}

$ bin/pulsar-admin functions create \
  --log-topic persistent://public/default/logging-function-logs \
  # Other function configs

Desktop (please complete the following information):

OS: iOS

Additional context
Pulsar 2.6.0 running in standalone mode (not in a docker container)

@jianyun8023 will handle this issue.

Thanks @freeznet for helping with this issue

Thanks @freeznet for helping with this issue


Added French translation of the plugin

Hello,
I would like to propose a French translation of the WordPress plugin.
How can I do this?
Thanks for your feedback
Best regards

Hi @elodiew
Thanks for reaching out and adding your feature request to add French translation to the plugin.
You can add the translation to the plugin using the below links:
French (Belgium): https://translate.wordpress.org/projects/wp-plugins/plausible-analytics/stable/fr-be/default/
French (Canada): https://translate.wordpress.org/projects/wp-plugins/plausible-analytics/stable/fr-ca/default/
Once the translation has reached 100% for a specific language, it would be easy to translate the language of the plugin to French.
Let me know if you have any further questions.
Thanks!

Hi !
Great,
I just added the translation under azurwebdesign.
I also sent the .po & .mo files in French.
Hope this helps you ...
Other choices, is there a way to translate the analytics data in the WP back office?
Example for:
UNIQUE VISITORS
TOTAL PAGES VIEWED
ETC ...

I'm French so sorry for my bad English :)
Thanks for your feedback

that's not possible at this time unfortunately @elodiew. Plausible is English only at the moment. please subscribe to this thread so you can follow our progress on making Plausible multilingual: https://github.com/plausible/analytics/discussions/354


Apparent bug in const checking logic

To reproduce this issue, check out Ibex, e.g. version b295f07b (although this shouldn't be version-sensitive) and then run the synthesis flow. The instructions in syn/README.md should work.
The synthesis flow works by running sv2v and then running Yosys on the output. With the current head of the Yosys master branch, you get the following error message:
out/generated/ibex_cs_registers.v:544: ERROR: Non-constant function call in constant expression.

The relevant code looks like this:
mstatus_d = {
   ... // some other elements in the concatenation
   sv2v_cast_2(sv2v_cast_2(csr_wdata_int[ibex_pkg_CSR_MSTATUS_MPP_BIT_HIGH:ibex_pkg_CSR_MSTATUS_MPP_BIT_LOW])),
   ... // some other elements in the concatenation
};

Here, sv2v_cast_2 is defined as follows:
	function automatic [1:0] sv2v_cast_2;
		input reg [1:0] inp;
		sv2v_cast_2 = inp;
	endfunction

Bisecting Yosys builds points to commit 2085d9a.
If you manually hack the generated code to replace the argument to the inner sv2v_cast_2 with a constant like 8'b0 OR (more confusingly) remove one layer of sv2v_cast_2 calls, the error message goes away.
@zachjs (since this was your change, and you probably also understand the output from sv2v better than me!)

Short version: The bug has to do with faulty logic checking for recursive functions. I have a fix locally, but the fix depends on my earlier PR #2529.
has_const_only_constructs attempts to check for recursive calls to encourage constant evaluation. There is logic from an earlier change of mine that attempts constant evaluation of any arguments to a function call where constant evaluation is recommended. I originally corrected the recursive function detection, but I noticed further issues while adding test coverage.
My proposal is to attempt to use constant function evaluation on any function with all-const arguments. In cases where constant evaluation is truly required, it can fail as before. In other cases, it can fall back on the non-const function elaboration. This requires some changes to short circuit the failure cases of eval_const_function, but otherwise this simplifies the frontend, in my opinion.

Short version: The bug has to do with faulty logic checking for recursive functions. I have a fix locally, but the fix depends on my earlier PR #2529.
has_const_only_constructs attempts to check for recursive calls to encourage constant evaluation. There is logic from an earlier change of mine that attempts constant evaluation of any arguments to a function call where constant evaluation is recommended. I originally corrected the recursive function detection, but I noticed further issues while adding test coverage.
My proposal is to attempt to use constant function evaluation on any function with all-const arguments. In cases where constant evaluation is truly required, it can fail as before. In other cases, it can fall back on the non-const function elaboration. This requires some changes to short circuit the failure cases of eval_const_function, but otherwise this simplifies the frontend, in my opinion.

@zachjs
Could you please update once you have the proper fix for this, so that I can build Yosys again with new release and try running synthesis for Ibex

@zachjs
Could you please update once you have the proper fix for this, so that I can build Yosys again with new release and try running synthesis for Ibex

@rahulraveendran15-coder My branch https://github.com/zachjs/yosys/tree/repeat-call contains both the (recently updated) changes in #2529 as well as my above suggested fix.

@rahulraveendran15-coder My branch https://github.com/zachjs/yosys/tree/repeat-call contains both the (recently updated) changes in #2529 as well as my above suggested fix.

@zachjs
Its not working the same error is getting displayed, I tried below commands could you please tell me if I am wrong.
git clone https://github.com/zachjs/yosys.git
cd yosys
mkdir build
cd build
make -f ../Makefile

@zachjs
Its not working the same error is getting displayed, I tried below commands could you please tell me if I am wrong.
git clone https://github.com/zachjs/yosys.git
cd yosys
mkdir build
cd build
make -f ../Makefile

@zachjs
Thanks, it is working with the branch.
When this fix will be merged to yosys main git repo, so that it will be available to everyone

@zachjs
Thanks, it is working with the branch.
When this fix will be merged to yosys main git repo, so that it will be available to everyone

@rahulraveendran15-coder I'm not sure when these changes will be merged. It's possible that concerns will be raised once it is reviewed. While my preference would be to get these fixes merged, we could consider temporarily rolling back part of the recursive functions change in the near term.

@rahulraveendran15-coder I'm not sure when these changes will be merged. It's possible that concerns will be raised once it is reviewed. While my preference would be to get these fixes merged, we could consider temporarily rolling back part of the recursive functions change in the near term.


Update StdLib - Add AppArguments() function

AppArguments function returns the effective arguments passed to the Ring script. This is more practical than sysargv when we just need the effective arguments specified by the user to the Ring script and not the exe name and script name. Moreover, depending if the Ring script is compiled or not, sysargv doesn't have the same format with regards to the position of the effective arguments.

Nice function, Thanks for adding it
I remember writing GetParameters() function is RingPM source code to work around this problem
URL: https://github.com/ring-lang/ring/blob/master/tools/ringpm/core/getpara.ring
Keep up the GREAT WORK


Prevent combineCandidate assert failure: fixes issue#1250

I'll let you check Vibe.d (and squash ;) )


CAMPBELL - General advices for the plot

To provide differentiation in color and legend of the harmonics is desirable.
The legend of "Forward", "Mixed" and "Backward" modes should not have any color.
The red squares (intersections) should have a legend.
An argument to change units (rpm,  Hz), in all 3 axis (log dec or damping factor, Rotor speed and DNF's) is desirable.
The previous color map (from red to blue) was better for the visualization.

To provide differentiation in color and legend of the harmonics is desirable.

Ok. Each harmonic will be ploted with a different color and will be displayed on the legend.

The legend of "Forward", "Mixed" and "Backward" modes should not have any color.

I agree with you, however, bokeh does not offer an attribute in Legend to change the glyph color displayed at the board. The glyphs colors match the renderers. There are several options to change the legend colors after setting a render, but for text, background, border line, etc. Maybe, I find a way using bokeh's javascript.

The red squares (intersections) should have a legend.

Sure, you are rigth, I'm adding it.

An argument to change units (rpm, Hz), in all 3 axis (log dec or damping factor, Rotor speed and DNF's) is desirable.

Yes, this is something we need to apply to every other method we have. We'll working on it.

The previous color map (from red to blue) was better for the visualization.

Bokeh does not offer a continuous palette (256 colors) of Red-to-Blue. Bokeh as a ColorBrewer palette called RdBu, but it has only 11 colors. Actually, I still can implement a 256 RdBu (as matplotlib has) using colorcet library, but it needs to be installed and imported.
The Figure below is an example using Bokeh's RdBu[11].

The previous color map (from red to blue) was better for the visualization.

Bokeh does not offer a continuous palette (256 colors) of Red-to-Blue. Bokeh as a ColorBrewer palette called RdBu, but it has only 11 colors. Actually, I still can implement a 256 RdBu (as matplotlib has) using colorcet library, but it needs to be installed and imported.

It is possible to create a bokeh colormap from a matplotlib one as shown in this SO answer.
from bokeh.colors import RGB
from matplotlib import cm

m_coolwarm_rgb = (255 * cm.coolwarm(range(256))).astype('int')
coolwarm_palette = [RGB(*tuple(rgb)).to_hex() for rgb in m_coolwarm_rgb]

It is possible to create a bokeh colormap from a matplotlib one as shown in this SO answer.

Thanks, @raphaeltimbo! it worked just fine.

I found an way to display the glyphs with other color at the legend

PR #334 closes this issue. It can be re-opened later if something is missing.
The issue about setting units will evaluated later.


module 'torch.nn' has no attribute 'RMSNorm'

Environment: NVIDIA H20 96G
System: linux
cuda: nvcc -v 12.3
Installed qwen-vl-utils and git+https://github.com/huggingface/transformers as requested.
and the dependencies in requirements_web_demo.
The torch version is 2.3.1. Running web_demo_mm reports the following error logs
(Qwen2-VL) root@ee84c7c15b61:~/xinglin-data/Qwen2-VL# pip install git+https://github.com/huggingface/transformers accelerate
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting git+https://github.com/huggingface/transformers
Cloning https://github.com/huggingface/transformers to /tmp/pip-req-build-z4ahrge6
Running command git clone --filter=blob:none --quiet https://github.com/huggingface/transformers /tmp/pip-req-build-z4ahrge6
Resolved https://github.com/huggingface/transformers to commit c409cd81777fb27aadc043ed3d8339dbc020fb3b
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: accelerate in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (0.33.0)
Requirement already satisfied: filelock in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (3.15.4)
Requirement already satisfied: huggingface-hub<1.0,>=0.23.2 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (0.24.6)
Requirement already satisfied: numpy>=1.17 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (1.26.4)
Requirement already satisfied: packaging>=20.0 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (24.1)
Requirement already satisfied: pyyaml>=5.1 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (6.0.2)
Requirement already satisfied: regex!=2019.12.17 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (2024.7.24)
Requirement already satisfied: requests in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (2.32.3)
Requirement already satisfied: tokenizers<0.20,>=0.19 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (0.19.1)
Requirement already satisfied: safetensors>=0.4.1 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (0.4.4)
Requirement already satisfied: tqdm>=4.27 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from transformers==4.45.0.dev0) (4.66.5)
Requirement already satisfied: psutil in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from accelerate) (6.0.0)
Requirement already satisfied: torch>=1.10.0 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from accelerate) (2.3.1)
Requirement already satisfied: fsspec>=2023.5.0 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from huggingface-hub<1.0,>=0.23.2->transformers==4.45.0.dev0) (2024.6.1)
Requirement already satisfied: typing-extensions>=<IP_ADDRESS> in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from huggingface-hub<1.0,>=0.23.2->transformers==4.45.0.dev0) (4.12.2)
Requirement already satisfied: sympy in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (1.13.2)
Requirement already satisfied: networkx in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (3.3)
Requirement already satisfied: jinja2 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (3.1.4)
Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (12.1.105)
Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (12.1.105)
Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (12.1.105)
Requirement already satisfied: nvidia-cudnn-cu12==<IP_ADDRESS> in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (<IP_ADDRESS>)
Collecting nvidia-cublas-cu12==<IP_ADDRESS> (from torch>=1.10.0->accelerate)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/37/6d/121efd7382d5b0284239f4ab1fc1590d86d34ed4a4a2fdb13b30ca8e5740/nvidia_cublas_cu12-<IP_ADDRESS>-py3-none-manylinux1_x86_64.whl (410.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 410.6/410.6 MB 15.9 MB/s eta 0:00:00
Requirement already satisfied: nvidia-cufft-cu12==<IP_ADDRESS> in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (<IP_ADDRESS>)
Requirement already satisfied: nvidia-curand-cu12==<IP_ADDRESS> in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (<IP_ADDRESS>)
Requirement already satisfied: nvidia-cusolver-cu12==<IP_ADDRESS> in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (<IP_ADDRESS>)
Requirement already satisfied: nvidia-cusparse-cu12==<IP_ADDRESS> in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (<IP_ADDRESS>)
Requirement already satisfied: nvidia-nccl-cu12==2.20.5 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (2.20.5)
Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (12.1.105)
Requirement already satisfied: triton==2.3.1 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from torch>=1.10.0->accelerate) (2.3.1)
Requirement already satisfied: nvidia-nvjitlink-cu12 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from nvidia-cusolver-cu12==<IP_ADDRESS>->torch>=1.10.0->accelerate) (12.6.68)
Requirement already satisfied: charset-normalizer<4,>=2 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from requests->transformers==4.45.0.dev0) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from requests->transformers==4.45.0.dev0) (3.8)
Requirement already satisfied: urllib3<3,>=1.21.1 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from requests->transformers==4.45.0.dev0) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from requests->transformers==4.45.0.dev0) (2024.8.30)
Requirement already satisfied: MarkupSafe>=2.0 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from jinja2->torch>=1.10.0->accelerate) (2.1.5)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /miniconda/envs/Qwen2-VL/lib/python3.10/site-packages (from sympy->torch>=1.10.0->accelerate) (1.3.0)
Installing collected packages: nvidia-cublas-cu12
Attempting uninstall: nvidia-cublas-cu12
Found existing installation: nvidia-cublas-cu12 <IP_ADDRESS>
Uninstalling nvidia-cublas-cu12-<IP_ADDRESS>:
Successfully uninstalled nvidia-cublas-cu12-<IP_ADDRESS>
Successfully installed nvidia-cublas-cu12-<IP_ADDRESS>
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
(Qwen2-VL) root@ee84c7c15b61:~/xinglin-data/Qwen2-VL# python web_demo_mm.py
Traceback (most recent call last):
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1659, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/miniconda/envs/Qwen2-VL/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/generation/utils.py", line 51, in
from ..pytorch_utils import isin_mps_friendly
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/pytorch_utils.py", line 27, in
ALL_LAYERNORM_LAYERS = [nn.LayerNorm, nn.RMSNorm]
AttributeError: module 'torch.nn' has no attribute 'RMSNorm'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1659, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/miniconda/envs/Qwen2-VL/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/models/qwen2_vl/modeling_qwen2_vl.py", line 41, in
from ...modeling_utils import PreTrainedModel
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/modeling_utils.py", line 46, in
from .generation import GenerationConfig, GenerationMixin
File "", line 1075, in _handle_fromlist
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1649, in getattr
module = self._get_module(self._class_to_module[name])
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1661, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.generation.utils because of the following error (look up to see its traceback):
module 'torch.nn' has no attribute 'RMSNorm'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/xinglin-data/Qwen2-VL/web_demo_mm.py", line 14, in
from transformers import AutoProcessor, Qwen2VLForConditionalGeneration, TextIteratorStreamer
File "", line 1075, in _handle_fromlist
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1650, in getattr
value = getattr(module, name)
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1649, in getattr
module = self._get_module(self._class_to_module[name])
File "/miniconda/envs/Qwen2-VL/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1661, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.qwen2_vl.modeling_qwen2_vl because of the following error (look up to see its traceback):
Failed to import transformers.generation.utils because of the following error (look up to see its traceback):
module 'torch.nn' has no attribute 'RMSNorm'
(Qwen2-VL) root@ee84c7c15b61:~/xinglin-data/Qwen2-VL#

pip install torch==2.4, cause from torch=2.3

It seems to be a Transformers bug for torch<2.4 which was discussed on the issue. And you can try pip install torch==2.4.

Reinstalled torch 2.4.0 Problem solved, thanks! @jinze1994 @aigonna @maiqingqiang

Reinstalled torch 2.4.0 Problem solved, thanks! @jinze1994 @aigonna @maiqingqiang

latest autoawq requires torch==2.3.1, not sure if I should update pytorch...

请问操作手机怎么设置query呢？


[Feature Request]: Update status Icon to align with Carbon's latest guidelines

The problem
In C4P, the StatusIcon needs an update to include more status indicators from Carbon guidelines.
I did notice that the kind props don't match with the type on carbon's website. Would be a good idea to deprecate the older names and include new names so when designers refer to them developers can have a 1:1 matching in names.

The solution
Below I will list out potential changes:

Add the warning kind (shows up as an exclamation mark). This is not currently in the library

Change fatal=> misuse

Change critical => failure

Change major-warning and minor-warning to the new icons that has better contrast

Major warning

Minor warning

Add warning alt

Add normal alt

Add incomplete and not started

Design link
https://carbondesignsystem.com/patterns/status-indicator-pattern/
Links to other materials
C4P Status indicator: https://carbon-for-ibm-products.netlify.app/?path=/docs/ibm-products-patterns-status-icons-statusicon--docs
Owner/main maintainer(s)
Don't know
Second/backup maintainer(s)
No response
Product/offering
No response
Business priority
Medium Priority = upcoming release but is not pressing
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate issues

Moving this back to Later due to work that @thyhmdo is doing on https://github.com/carbon-design-system/carbon/issues/16978