Feature request: different sql dialects

Hey, thanks for the codebase.
I'm making use of it for a project where I need to convert dbml into databricks sql create table statements.
Do you want pydbml to produce arbitrary sql dialects?
If so I could make a contribution. Loosely thinking I could turn .sql into a dictionary and store different sql dialects that can be accessed via key like "ansi" or "databricks".
From what I can tell Databricks is severely lacking erd tooling. Plus being able to generate arbitrary sql dialect create table statements makes model management super portable via dbml and pydbml
Anyway, let me know and I can push this upstream

Actually better to pass a sql_dialect argument when instantiating PyDBML. It can default to ansi or whatever you currently have

Hi!
Thanks for the suggestion. To be honest, I started this project a long time ago, and since then realized that many things could've been implemented better. .sql is one of them. My problem with it being a part of each model class is that it doesn't really belong there, SQL generation should be a separate workflow, this will be better for maintanability and will unlock the custom dialects support.
Since you mentioned it, maybe it's time to rewrite this part of the project. I'd suggest to approach it this way:
We remove .sql from every class, and create a Renderer class for each dialect, that will accept any DBML model-object (Table, Index, etc) and return an SQL string.
Something like this:

class PostgresqlRenderer:
    def render(model: SQLObject) -> str:
        ...

class DatabricksRenderer:
    def render(model: SQLObject) -> str:
        ...

My only concern is that I probably won't be able to maintain any extra dialects apart from the default one due to very little free time I have right now.
But since a detached renderer approach is so flexible, the custom renderers don't have to be part of the PyDBML package. You can release the BricksRenderer as a separate library, and anyone who needs it will just need to install it.
What do you think?

Yes that is a better approach. Very flexible. And yes I agree you don't want to bite off more than you can chew. It's best to keep pydbml super lightweight and I was actually starting to think along these lines after I mentioned it.
Let me know how I can help. But happy to create a separate package for Databricks if you make these changes

Alright, let's do that! I will create the base renderer and update the rest of the code to use it. Then I will add a section on the main description page with the renderers catalogue, where yours will be the first one : }
I'll hope to start this week

Nice, nice. I'm hoping to have lots of free time on it next week. Cheers

@big-c-note it took a bit more time and effort than I anticipated 😅

I'll be addressing the other raised github issues in the upcoming few days, and then will make a release. You are welcome to look at the new renderer classes in the PR in the mean time

This is awesome! I have gotten busy with another project, but I'll work on this as soon as I get a breather. Thank you so much

New renderer classes are released in 1.1.0 🥳

You rock!!

Thanks 😄
While the docs on the renderers are in the making, here's a quick intro:
The idea is that you subclass a BaseRenderer class like this:
from pydbml.renderer.base import BaseRenderer

class MySQLRenderer(BaseRenderer):
    model_renderers = {}

(see default renderer as an example)
And then you define the renderer functions for each model. The function should have one argument - the model you need to render, and it should return a rendered sql string for that model. Use the renderer_for decorator of your class (it's inherited from the base) on the renderer function. This will add this function to the model_renderers mapping and that's how your renderer class will determine which function to use for which type of model:

@MySQLRenderer.renderer_for(Column)
def render_column(model: Column) -> str:
    # do the rendering and
    # return the string

(see default renderer for the column model).
And that's basically it. Finally, to use your renderer class instead of the default one, you just supply it as an argument to the database:
mydb = Database(sql_renderer=MySQLRenderer)

Awesome. I'll keep an eye out for docs as well. Huge thanks to you again.
This is really going to be cool for our project. It'll take me a minute to circle back, but this may play a big role in our model management software.
Cheers

@Vanderhoof
Would you accept something like #44 ? To pass sql_renderer through the parser? My intention would be to use parsed: Database = PyDBML(path_to_dbml, sql_render=DatabricksRenderer) and be able to receive the sql via parsed.sql attribute.
I am still working on my changes locally to ensure they work for my use case, but wanted to run this by you to see if you would support this usecase. Happy to make any changes to tests or however you want to organize the code

@big-c-note sorry, my github notifications are messed up. I missed your comment, although did approve your PR. I totally agree, this was the intended use, I just forgot to add it to the parser!

Hello,
First of all, thanks for creating/maintaining this package!
I currently work with postgresql and running into weird syntax issues when parsing it via this package but not with the main cli from dbml. Seems like the main one auto-detects the dialect and maybe I'm missing something but I must of assumed this one was doing the same. I get around my need by using the main library which is in nodejs but I wrote some python tests to help me validate through my CT pipeline. I upgrade to the most recent (1.1.1) and got even more weird errors so kept my current one at 1.0.11 for now but may have to stop using it and rely on the cli if I can't resolve as the tests would become stale. Anyways, if you all can point me to the right attribute as I did not see a renderer for postgresql and it seems from above we have to make one ourselves during implementation. Feels like the kind of feature this package should have but I understand lack of time to maintain so just wondering what you all suggest.
Thanks again

@ar-to Hi!
Just to confirm, you are experiencing syntax when trying to execute in PostgreSQL the code generated by PyDBML? Because PyDBML does not support SQL -> DBML conversion, only the other way around


unusual login behaviour with nginx access lists

Describe the bug:
Hey there :)
I use ml-workspace login via the nginx access list.
Everytime I use one of the tools on the top right it requests a nginx login.
I can cancel the login and the tools work just fine.
This happens on Safari, but not on Google Chrome
Expected behaviour:
no login should be required after the first one
or
successful login should be required to the use tools
Steps to reproduce the issue:

open safari
login to ml-workspace via nginx access list.
open any tool (for example vnc).

Technical details:

Workspace version: 0.13.2
Docker version: 20.10.12
Host Machine OS: Ubuntu Server on Intel Nuc
Machine used to access: MacBook Pro M1 with MacOS Monterey
Browser (Chrome/Firefox/Safari): Safari

anti-stale comment


Open Workspace Floating Button

Issue Type: Bug
After latest update (1.32.0-insider) 1c50a8756 you have a floating "Open Workspace" button bottom right (see screenshot)

This is after opening a folder, and you can't click on it or remove it.
VS Code version: Code - Insiders 1.32.0-insider (1c50a87561055485d93a3961160902308497f1e3, 2019-02-08T06:16:17.233Z)
OS version: Windows_NT x64 10.0.18329

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2592)

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)
63.79GB (49.47GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (28)

Extension
Author (truncated)
Version

ignoregit
And
1.0.1

emojisense
bie
0.4.1

path-intellisense
chr
1.4.2

bracket-pair-colorizer
Coe
1.0.61

typescript-angular-plugin
cyr
1.2.0

dart-code
Dar
2.22.3

githistory
don
0.4.6

jquerysnippets
don
0.0.1

gitlens
eam
9.5.0

EditorConfig
Edi
0.12.8

tslint
eg2
1.0.42

vscode-npm-script
eg2
0.3.5

prettier-vscode
esb
1.8.1

bootstrap-4-cdn-snippet
eve
1.1.5

json2ts
Gre
0.0.6

rest-client
hum
0.21.1

dotenv
mik
1.0.1

vscode-autoprefixer
mrm
2.2.0

csharp
ms-
1.17.1

vscode-versionlens
pfl
0.22.0

material-icon-theme
PKi
3.6.2

comment-ts
sal
0.9.11

code-settings-sync
Sha
3.2.4

gitflow
vec
1.2.1

vscode-wakatime
Wak
1.2.5

vscode-import-cost
wix
2.12.0

JasmineSnippets
xab
1.0.1

html-css-class-completion
Zig
1.18.0

(1 theme extensions excluded)

Just to note it sits on "top" of the integrated terminal

Just wanted to say that this is not Windows specific, am running latest macOS and see exactly the same thing. IMHO it's not terminal related, just sitting close to it in the editor.
What's really annoying is that even after opening developer tools and removing this from the DOM, switching the editor will make it show up again 😠
Could someone issue a quick fix please? If not, for situations like this - since I'm only running insider and not "regular" version, is there a way to temporarily downgrade (maybe we should add a facility for this)?

@Tyriar seems we can confirm it's not an integrated terminal issue.

@Eventyret  This is really, really weird: the buttons have just disappeared from my editor, yet I don't recall doing anything for this to happen (definitely have not restared VS Code, nor have I reloaded the workspace). 🤔

Another voice to the choir here, I'm using macOS and I'm seeing this button in both the insiders and exploration latest updates.

@ddotlic same here it disappeared after a while. but still should not be displayed there.

This should be fixed with 92eedf890c66994783e785b00321189d70e55228

Thanks @Ash258  @aeschli 👍 Presume we can close this then

Confirmed fixed in latest insiders build. Exploration build still awaiting fix.

It doesn't seem to be fixed.

dup of #68231, insiders has the fix, I merged and retriggered exploraration


Set auto_parse_qs_csv to False, instead True #842

@nZac No problems, I'll looking for new tickets!

We have a couple of tests setting auto_parse_qs_csv to False. I was thinking to myself if we could morph one of them, or add a new test, to check that the behaviour is corresponding to the new default even without setting it explicitly?

@vytas7 added one more test.


Switch from Travis to Github Actions

Trello: https://trello.com/c/cnNEUjhz/2126-epic-migrate-travis-ci-usages-to-github-actions
Because Travis is now excessively slow.
Based on the starter Ruby workflow (https://github.com/actions/starter-workflows/blob/master/ci/ruby.yml)

I don't know. It seems happy enough without, so I hope it's fine as-is? :shrug:


Fix build by removing String.h include

This include is missing and not needed when building to ESP32 using platformio. Needs testing on other platforms.

Thanks !


Custom made trading layouts, pages and code

Hello everyone.
Incase you are looking for a new design, trading layout, pages or features.
Hit me up at<EMAIL_ADDRESS>Cheap projects thats ready for sale,
Advanced chart system & trading https://gyazo.com/f0751a43e8a4c0d675823521c2c2eda7
Advanced chart system & trading  2nd https://gyazo.com/697e405dad42eb9264dd342cffcfe6af
Main-page, https://gyazo.com/caa61a550807dfed53586fcf1a0d3d48
Sign-in page, https://gyazo.com/079ab81e0447a83536068dbaded3000d
sign-up page, https://gyazo.com/b391edc930bf6cf98690c65daaf00cc2
Live price display, https://gyazo.com/caa61a550807dfed53586fcf1a0d3d48 (at the end)
Comparison feature, on request
Wallet redesign, on request

75% off until 2019-07-14 (Use Layout75 at order)

i am interested to buy, contact me -<EMAIL_ADDRESS>


Create obspm.txt

We are a french governemental research institute : http://www.obspm.fr/?lang=en
Founded in 1667, the Observatoire de Paris is the largest national research center for astronomy. 30 % of all French astronomers are working in it five laboratories and its institute. Situated on the Paris, Meudon and Nançay campuses, they are all "Unités Mixtes de Recherche (UMR)" associated with the CNRS and, in many cases, with the major scientific universities in the Paris area. The work of the Observatoire is also carried out in two major scientific services. The Observatoire de Paris is an academic centre (Grand établissement) under the aegis of the Ministère de l’Enseignement supérieur et de la Recherche

Hi, there is any issue with my request? Do you need more information?
Best regards,
Arnaud

@nono031 there have been very few contributors around here recently to accept pull requests. It's probably best to wait until they view it in time.

@ReidWeb Thanks, so I'm waiting patiently :)

@nono031 you may way want to reopen it then :)

In fact, I opened a new one in JetBrains/swot
https://github.com/JetBrains/swot/pull/1373
So, I leave this one closed


feat: create FirstRun directory if missing

creates the folder for the firstRun file if it does not exist https://github.com/gitify-app/gitify/issues/679

Thanks @jtzero


Engine degridation

Look into adding engine degradation.  Does this require updates?

Completed June 14,2017
64df6059995c8a8a1ae1ebea1be948062621e088


ingress: sort all shared ingresses during model generation

Currently, when building the model for shared Ingress, all Ingresses in the cluster are listed and processed. The order of the Ingresses can differ and potentially influence the generated CiliumEnvoyConfig. This can lead to unnecessary reconciles. (Even though the internal translation already handles a stable CiliumEnvoyConfig generation where possible.)
In addition to the existing stable translation logic, this commit sorts all shared Ingresses by their namespace and name before processing. This way a consistent translation is more likely to be guaranteed.
Related to: https://github.com/cilium/cilium/pull/31493

/test


Run cargo check on udfs

Add an API endpoint that accepts the contents of the UDFs editor and
sends it to the controller, and in turn to the compiler service, which
runs 'cargo check'. Pass any errors back to the API and show them in the
console. Also show the query validation errors in the Errors tab for
consistency.
Note that the UDFs are put into a new 'udfs' crate in the build
directory for the purpose of cargo check, and written again the
'pipeline' crate for the actual pipeline. A future commit will change
the pipeline to use the udfs crate.

Query error:

UDF error:

I've fixed the scroll issue and made it switch to the Errors tab when appropriate. I also moved the Alert into the tab -


config: Remove unused err return on config parser.

This is rebased on #349.
This removes the unused error return from the newConfigParser function and updates the callers accordingly.

Good but needs rebase.

Rebased.


[DPG][pipeline] integration to swagger pipeline to trigger SDK generate for DPG

test configuration: https://github.com/Azure/azure-rest-api-specs/tree/dw/llc-readme/specification/purview/data-plane

test env: https://github.com/openapi-env-test/azure-rest-api-specs/pull/3047
env config: https://github.com/openapi-env-test/azure-rest-api-specs/blob/main/specificationRepositoryConfiguration.json
env branch: https://github.com/openapi-env-test/azure-sdk-for-python/tree/dpg-readme

integration to production env:
code: https://github.com/Azure/azure-sdk-for-python/pull/24355


Use native display-fill-column-indicator on Emacs 27 and above

This replaces the fill-column-indicator a.k.a fci-mode with the native display-fill-column-indicator-mode. The old mode is still used when emacs-version is below 27 (i.e., the new native mode is not available).
The new mode look and fill replicates the old one with the following modifications:

It's now possible to define how the dashes should be displayed via exordium-fci-use-dashes value and fine tune it with exordium-fci-dashes-alist. Old settings are still supported.
The temporary buffer for org source code blocks is not inhibiting the new indicator. While that behaviour is there for the last 5 years (introduced by @steve-downey in: fe8be638679f5edfc2cc3e834b02e071e4d78219), it lacks motivation and  I think that lack of indicator there is quite surprising. Especially when the exordium-fci-use-dashes is set to :prog. I'm happy to add it if there's a strong demand, but would probably guard it with yet one more configuration variable.

I've also tried to convert the old mode to be configured under use-pacakage, but hasn't achieved much success in a reasonable time. If the new mode is accepted then we may want to think how much backward compatibility we need and how much we want to invest in that. Read: likely a separate PR for that work 🤔.
For the colours I copied what I found in existing configuration (with the exception of solarized theme that I've handpicked the value).
I validated the new configuration and the old configuration (by setting the minimum version to "28") by restarting emacs with the following settings in my prefs.el followed by visiting buffers for prog-mode and non prog-mode and flipping the indicator a few times in each mode (C-|)

(setq exordium-fci-mode :always)

(setq exordium-fci-use-dashes nil)
(setq exordium-fci-use-dashes t)

(setq exordium-fci-mode :ondemand)

(setq exordium-fci-use-dashes nil)
(setq exordium-fci-use-dashes :two)

(setq exordium-fci-mode :prog)

(setq exordium-fci-use-dashes nil)
(setq exordium-fci-use-dashes :three)

Do you have a screenshot? Curious to see how it look now

Yeah - I don’t use FCI in org buffers either. I do like them in prog buffers though. That’s why I use :prog for the value. This one here was removing the FCI from a temporary buffers that you can get from the source code blocks in org via C-c ‘.
Sent from my iPhone

On 29 Mar 2020, at 21:05, Philippe Grenet<EMAIL_ADDRESS>wrote:

@philippe-grenet commented on this pull request.
In modules/init-org.el:

@@ -5,9 +5,12 @@
:commands (org-mode)
:mode (("\.org\'" . org-mode))
:init

(add-hook 'org-src-mode-hook

       (lambda ()

         (turn-off-fci-mode)))

(use-package fill-column-indicator
:if (version< emacs-version "27")
:config
(add-hook 'org-src-mode-hook
This is kind of my preference (to turn off fci for org buffers). I wonder if we should not remove that and let people like me put that into their taps instead?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

FCI does not play nice with editing source blocks in org-mode, or with
exporting fontified blocks that might have fci otherwise.
On Sun, Mar 29, 2020 at 5:24 PM Przemysław Kryger<EMAIL_ADDRESS>wrote:

Yeah - I don’t use FCI in org buffers either. I do like them in prog
buffers though. That’s why I use :prog for the value. This one here was
removing the FCI from a temporary buffers that you can get from the source
code blocks in org via C-c ‘.
Sent from my iPhone

On 29 Mar 2020, at 21:05, Philippe Grenet<EMAIL_ADDRESS>wrote:

@philippe-grenet commented on this pull request.
In modules/init-org.el:

@@ -5,9 +5,12 @@
:commands (org-mode)
:mode (("\.org\'" . org-mode))
:init

(add-hook 'org-src-mode-hook
(lambda ()
(turn-off-fci-mode)))

(use-package fill-column-indicator
:if (version< emacs-version "27")
:config
(add-hook 'org-src-mode-hook
This is kind of my preference (to turn off fci for org buffers). I
wonder if we should not remove that and let people like me put that into
their taps instead?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/emacs-exordium/exordium/pull/149#issuecomment-605703907,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVNZ5RQWENF4FNIS5QXXALRJ637DANCNFSM4LWA62XA
.

Tangle and export to different format have been problems in the past with fci and org, just editing seemed fine.

I'll set up and test this this afternoon.

I'm not seeing anything breaking in my doc workflow, so good to go.


Fixes the hyperlinks for enumerators inside classes in the editor help.

As the title says, fixes a bug where clicking on an enumerator in the editor help would go to the top of the document containing the enumerator rather than the enumerator itself.

Cherry-picked for 3.0.7.


Can't get to work with Tailwind

Love to see this new Nuxt module as well as the TailwindCSS version of PrimeVue! I have been using PrimeVue as a Nuxt plugin as well as Tailwind so far, with this setup:
// plugins/primevue.ts
import PrimeVue from "primevue/config";
import Tailwind from "primevue/passthrough/tailwind";
import Button from "primevue/button";

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(PrimeVue, {
    unstyled: true,
    pt: Tailwind,
  });
  nuxtApp.vueApp.component("Button", Button);
});

Unfortunately, I can't get it work with the new module. I have something like this in nuxt.config.js:
// nuxt.config.js
import { defineNuxtConfig } from "nuxt/config";
import Tailwind from "primevue/passthrough/tailwind";

export default defineNuxtConfig({
  modules: [
    "@nuxtjs/tailwindcss",
    "nuxt-primevue",
  ],

  build: {
    transpile: ["primevue"],
  },

  primevue: {
    options: {
      ripple: true,
      unstyled: true,
      pt: Tailwind,
    },
  },
});

Both Tailwind and PrimeVue seem to work independently, but the stylings are not applied. I have also tried applied "MyDesignSystem" as per https://primevue.org/tailwind/, which also doesn't seem to work. Any ideas for how to fix this?

Hi,
Which PrimeVue version are you using?

Thanks a lot for the report! I'll work on it and get back to you.

Same for me with this config:
import { usePassThrough } from 'primevue/passthrough'
import Tailwind from 'primevue/passthrough/tailwind'

const primeVueTailwindOverrides = {
  datatable: {
    column: {
      bodyCell: ...
    }
  }
  ...
}
const passThroughStyles = usePassThrough(Tailwind, primeVueTailwindOverrides)

export default defineNuxtConfig({
  primevue: {
    options: { pt: passThroughStyles, unstyled: true },
  },
  ...
})

Except some styles seem to randomly work.
Is this the correct way to add overrides to the Tailwind styles when using the module, btw? It's not mentioned in the docs.

Same issue with me, props from import Tailwind from 'primevue/passthrough/tailwind' not pass properly.

Same here, I'd be happy to sponsor a coffee once this is fixed ☕
My config is practically identical to the one @bipsen posted.

Which PrimeVue version are you using?

I am using the following versions:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

Hi all,
I researched this issue in detail. The main reason for these issues is that there are non-serializable (exp; function) definitions in pt presets. Details; https://nuxt.com/docs/guide/going-further/runtime-config#serialization
When you examine the Tailwind preset, you will see that function definitions are used to specify conditional situations. Therefore, when we pass this preset to the PrimeVue object in the nuxt module, these definitions are serialized directly as '{}'.
For example, when you use the following config, it works fine.
// nuxt.config.js
primevue: {
   options: {
        pt: {
              button: {
                     root: 'MY_BUTTON_CLASS' // (serializable)
              }
        }
   }
}

But, the following config doesn't work;
// nuxt.config.js
primevue: {
   options: {
        pt: {
              button: {
                     root: () => 'MY_BUTTON_CLASS' // OR `root: function() { return { class: 'MY_BUTTON_CLASS' } }` etc. (non-serializable)
              }
        }
   }
}

Finally, I think there are 2 ways to solve this issue.

Users can register PrimeVue with pt option manually. Exp;

// nuxt.config.js

primevue: {
   usePrimeVue: false,
   // options -> this key is unnecessary.
   ...
}

// custom plugin or main.js etc.
import PrimeVue from 'primevue/config';

...
vueApp.use(PrimeVue, { pt: Tailwind || <CUSTOM_PRESET>, unstyled: true, ... });

We can add a special structure to module for 'pt' option. Exp;

// nuxt.config.js

primevue: {
   options: {
        pt: {
              as: 'Tailwind',
              from: 'primevue/passthrough/tailwind',
              set: 'Tailwind'
        }
   }
}

Transform in nuxt-primevue;
import <pt.as> from <pt.from>;

vueApp.use(PrimeVue, { ...options, pt: <pt.set> })

WDYT?

Either way, this would still force you to keep your custom styles in the Nuxt config file, right? Because currently, you have to restart the dev server for any style change (unless I'm missing something), which is not sustainable. With the implementation before this module, i.e. with a custom Nuxt plugin, only the page is reloaded (which is still a pain compared to HMR).

HMR is entirely related to Nuxt's configurations(github.com/nuxt/nuxt/issues/18964). As far as I know, you can establish an HMR structure in Nuxt using Vite's infrastructure. The details can be found in the Vite documentation. https://vitejs.dev/guide/api-hmr.html#hmr-api
Regarding the main topic, if you follow a similar path to the solution I initially suggested (think of it as if you were not using the Nuxt-PrimeVue module), all configurations are within your control. You can adjust PrimeVue options according to your needs. You can even perform overrides using the 'UsePassThrough' feature.
My second suggestion is to have a preset ready. With this prepared preset, the nuxt-primevue module creates a plugin internally and imports it. Then, it adds its value to the options section when registering for PrimeVue.

I mean that you can't get HMR (or auto page reload) to work for changes to nuxt.config.ts, so if you keep the Tailwind style overrides there it will require a server restart if you change anything. And as far as I can tell, that's what you need to do with this module currently, unless you add usePrimeVue: false and add a file to /plugins yourself (in which case you can get auto page reload, not sure about HMR). And pardon me if I'm ignorant but it's not clear to me from the documentation what this actually entails:

Whether to install the PrimeVue plugin, defaults to true. Disable this option if you prefer to configure PrimeVue manually e.g. with a Nuxt plugin.

i.e. what does this module do if I'm creating a Nuxt plugin manually anyway? (which is what I was already doing before this existed). I'm confused 🙂
Also, I saw in this discussion that usePassThrough is not recommended anymore.

i.e. what does this module do if I'm creating a Nuxt plugin manually anyway? (which is what I was already doing before this existed). I'm confused 🙂
So let's start with the question of what the module is needed for.

Users wanted to register all components with a single config instead of registering all components/directives one by one.

modules: ['nuxt-primevue']

instead of

vueApp.component('Button', Button);
vueApp.component('DataTable', DataTable);
vueApp.component('InputText', InputText);
etc.

As you know, we recently added unstyled mode to PrimeVue. While implementing this mode, we made some adjustments in the core to keep the css as a string and add it to the document in cases where it is not an unstyled mode. So how does this work? When you set PrimeVue to 'unstyled: false', the css of your components kept as strings are added to the document using useStyle (This is the process of creating

Personally I would not want to keep raw PT config in nuxt config, we'll discuss this for sure at earliest.

I had success now, I followed @mertsincan first proposal:
Added: plugins/tailprime.ts
import PrimeVue from "primevue/config";
import Tailwind from "primevue/passthrough/tailwind";

export default defineNuxtPlugin((app) => {
  app.vueApp.use(PrimeVue, { unstyled: true, pt: Tailwind });
});

And the following nuxtconfig.ts
// https://nuxt.com/docs/api/configuration/nuxt-config
/** @type {import('nuxt').Config} */
export default defineNuxtConfig({
  devtools: { enabled: true },
  css: ["primeicons/primeicons.css"],

  postcss: {
    plugins: {
      tailwindcss: {},
      autoprefixer: {},
    },
  },
  modules: ["nuxt-primevue", "@nuxtjs/tailwindcss"],
  primevue: {
    usePrimeVue: false,
  },
});

So there's no raw PT config; however, it would be just a tiny tad nicer if I wouldn't need the plugins/tailprime.ts-Plugin.
But for now, at least all services, components and directives are registered globally without manual intervention, so that is already a big plus for me :)

@mertsincan Thank you very much for the detailed explanation. That, along with the implementation example from @micheee makes it clear what the benefit of the module is compared to a 100% custom plugin implementation. So I guess now the question becomes, how can the same DX be achieved, without the need for usePrimeVue: false and manually creating/configuring a plugin? 🙂 And @micheee, I assume your setup still doesn't provide HMR, right? So, that's another question 😄
Anyways, I'm super happy that there's finally an official Nuxt module and I'm very excited about the new tailwind.primevue.org
Thanks for the great work 🙌

And @micheee, I assume your setup still doesn't provide HMR, right? So, that's another question 😄

I'm not 100% sure if everything is working, but for me, it's working quite well so far:

I can add PrimeVue-components and change <script> without having to reload manually 👍

Thanks a lot, @micheee @deepfriedmind ;) In addition, when you set usePrimeVue: false, there is no need for the options key. You can use other keys(components, directives and composables in the module) without problems.
@cagataycivici, I totally agree with you. But we should not forget that there is no rule that we cannot use pt in a module. We cannot use pt structures containing non-serializable definitions. This is also a situation related to Nuxt. If they do a study on this in the future, we can immediately integrate the improvements into the nuxt-primevue module. Details; https://github.com/primefaces/primevue-nuxt-module/issues/6#issuecomment-1772954754

Good morning,
i run into the same problem with my primevue-nuxt module. Only solution i found was NOT to include pt in the module configuration, but configure it in app.vue:
const primevue = usePrimeVue();
primevue.config.pt = Tailwind

After some tests with this module i would do it the same way. Easy to switch themes like in the demo from @cagataycivici .
So i see no big problem with this topic.
Greetings,
Tom

Hi,
Thanks a lot for your feedback, @sfxcode ;) We are always open to alternative solutions. Frankly, I have a few ideas, I plan to discuss them with the team and share them with you.

I installed the Nuxt module today and I'm also having styling issues with Tailwind. I have a custom PrimeVue theme and I'm using Tailwind mostly for the utility classes, so I'm not using pass-through, but Tailwind's styling are taking precedence over PrimeVue's theme. I tried changing the layers order but it didn't work:
@layer primevue, tailwind-base, tailwind-utilities;

@layer tailwind-base {
  @tailwind base;
}

@layer tailwind-utilities {
  @tailwind components;
  @tailwind utilities;
}

Hi all,
I'm working on new module options. I will complete it asap and share it with you.

Hi all,
I added the importPT option to use pt presets and the layerOrder option to solve Tailwind order issues;
https://github.com/primefaces/primevue-nuxt-module/issues/10
https://github.com/primefaces/primevue-nuxt-module/issues/11
Usage with usePassThrough(But, please see https://github.com/primefaces/primevue-nuxt-module/issues/6#issuecomment-1773339167)
// nuxt.config.js
import path from 'path';
...

primevue: {
  importPT: { as: 'CustomTailwind', from: path.resolve(__dirname, './assets/presets/custom.js')}
  ...
}

// assets/presets/custom.js
import { usePassThrough } from 'primevue/passthrough';
import Tailwind from 'primevue/passthrough/tailwind';

const CustomTailwind = usePassThrough(Tailwind, {
    button: {
        root: 'my-button'
    }
}, { mergeProps: true });

export default CustomTailwind;

Hi @mertsincan
Can you help me check whether this setting not works, which tailwind override the primevue all style?
https://stackblitz.com/edit/nuxt-starter-owueub?file=nuxt.config.ts
thanks very much

Hi @alterhu2020,
The new version has not been released yet. I plan to release it with the PrimeVue version tomorrow.
Best Regards,

Hi all,
PrimeVue v3.38.1 and Nuxt-PrimeVue v0.1.0 released 🚀

Nuxt-PrimeVue + Tailwind starter updated; https://github.com/primefaces/primevue-examples/tree/main/nuxt-styled-tailwind
New module doc; https://primevue.org/nuxt/

importPT: { as: 'CustomTailwind', from: path.resolve(__dirname, './assets/presets/custom.js')}

This tripped me up for a bit so it should probably be mentioned in the docs that you need to add this file as a "content file" in your Tailwind config as well, e.g.:
content: [
  './node_modules/primevue/**/*.{vue,js,ts,jsx,tsx}',
  './assets/presets/custom.js',
]

Otherwise, all the Tailwind classes used only in that file will be purged and won't work.
Oh, and to reiterate, this method allows for auto reload on save, but not HMR, as far as I can tell.

Hi,
I was looking forward to importPT, but it doesn't seem to work for me out of some reason ... After couple of tries, I did test also on (unstyled) Nuxt-PrimeVue + Tailwind starter  and I do struggle with same error also there (full console output at the bottom).
ERROR  Failed to resolve import "C:Dev    emp-primevue-examplepresetslara" from "virtual:nuxt:C:\Dev\temp-primevue-example\.nuxt\primevue-plugin.mjs". Does the file exist?
I must be doing something wrong, but I'm unable to figure it out... Is that starter project supposed to be working with latest nuxt+nust-primevue+tailwind? (the "styled" version works for me)
Node version v21.3.0 (tried also v18<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Thanks!
C:\Dev\temp-primevue-example>npm run dev

> dev
> nuxt dev

Nuxt 3.8.0 with Nitro 2.7.0                                                                                19:18:47
                                                                                19:18:47
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

i Using Tailwind CSS from ~/assets/css/tailwind.css                                          nuxt:tailwindcss 19:18:48
  ➜ DevTools: press Shift + Alt + D in the browser (v1.0.0)                                                   19:18:49

i Tailwind Viewer: http:/localhost:3000/_tailwind/                                           nuxt:tailwindcss 19:18:49

[19:18:50]  ERROR  Failed to resolve import "C:Dev    emp-primevue-examplepresetslara" from "virtual:nuxt:C:\Dev\temp-primevue-example\.nuxt\primevue-plugin.mjs". Does the file exist?

i Vite client warmed up in 3193ms                                                                             19:18:53
√ Nitro built in 650 ms                                                                                nitro 19:18:53

Hi,
Interesting! It works fine for me;

There may be a problem with the path. Please check importPT: { ..., from: path.resolve(__dirname, './presets/lara/') },

Oh, sorry, I forgot to include nuxt.config.ts of my project, there I have:
(basically taken from primevue samples)
import { resolve } from 'path'
...
export default defineNuxtConfig({
...
primevue: {
        options: { unstyled: true, ripple: true },
        cssLayerOrder: 'tailwind-base, primevue, tailwind-utilities',
        importPT: { as: 'Lara', from: resolve(__dirname, './assets/primevue-themes/lara/') },
        components: {
             exclude: ['Editor', 'Chart'],
        },
    },

And the second test - using the unstyled starter, I'm using that as-is, so:
import * as path from 'path';

export default defineNuxtConfig({
    modules: ['@nuxtjs/tailwindcss', "nuxt-primevue"],
    primevue: {
        options: { unstyled: true },
        cssLayerOrder: "tailwind-base, primevue, tailwind-utilities",
        importPT: { as: 'Lara', from: path.resolve(__dirname, './presets/lara/') },
...

I tried bunch of different 'from' attributes:
from: './presets/lara/'
from: '~/presets/lara/'
from: '/presets/lara/'
from: 'presets/lara/'
Unfortunately, with no luck :( It looks like "something" might be broken in my npm packages then?

Hmm. interesting. Could you please try it after deleting package-lock.json, node_modules and .nuxt, then npm install.
Do you confirm that you are using our sample project and have not changed anything?

Do you confirm that you are using our sample project and have not changed anything?

I do confirm.
I start with project nuxt-unstyled-tailwind and do only npm install and npm run dev.
Here's a short video: https://drive.google.com/file/d/11YOag26dAuunrf9V7ml3sagLP9MHblVr/view?pli=1
As far as I can tell, I do not have nuxt/vue/primevue/tailwind installed globally:
c:\>npm list -g --depth=0
C:\Program Files\nodejs -> .\
+--<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>

I have the same problem. I'm working on windows 11. Isn't the problem only in windows?

I checked your error again. [19:18:50]  ERROR  Failed to resolve import "C:Dev    emp-primevue-examplepresetslara
The path is not correct. (examplepresetslara) I think this issue is related to 'path' package with Windows. Could you please try;
path.resolve(__dirname, './/presets//lara//')
path.resolve(__dirname, '.\\presets\\lara\\')

Hi,
Thanks for the feedback, here's what I tried (changing forward slash to backslash):

I have used nuxt-unstyled-tailwind sample project (same as before)
Changed nuxt.config.ts, using backslashes, like this;

Result is basically the same as before:

ERROR  Failed to resolve import "C:Dev                                                                       12:45:51
uxt-unstyled-tailwindpresetslara" from "virtual:nuxt:C:\Dev\nuxt-unstyled-tailwind\.nuxt\primevue-plugin.mjs". Does the file exist?

See a screenshot from the 'cmd' console:

I had the exact same issue as you @zelarg and changing the importPT to this on windows worked for me.
importPT: { as: "Lara", from: "~/presets/lara" },

@craigjamesdobson Perfect, thanks! That fixed the problem on Windows for me.

Yes, you should avoid cjs dependencies like __dirname link

importPT: { as: 'Lara', from: '@/presets/lara/' },

thank u bro @craigjamesdobson  you saved my project!

@craigjamesdobson another one who has to thank you 🥂

I followed the instructions on https://tailwind.primevue.org/nuxt/ on Windows 11 and was unable to make it work until I found the solution in the last comments of this issue.
@mertsincan Maybe it is worth to update the documentation and examples to get rid of path.resolve and use ~/presets/lara instead? As far as I understand Nuxt resolves the path by itself. Please correct me if I'm wrong.
I.e.:
importPT: { as: 'Lara', from: '~/primevue/presets/lara' },

Tested on Windows 11. Didn't test on Linux/Mac yet, but probably it will work as the path resolving is working correctly in other imports.


fix: negative sentiment for descriptive neutral language

I'm highly supportive of freeCodeCamp and would like to make a meaningful contribution to removing terms that can convey negative sentiment that has potential for being racially charged.

You all are amazing! I so much appreciate all of the feedback and clarity you've provided in this pull request. I hope that my contributions to other projects are as well received.

Hi Justin,
Thanks for taking the time for this PR, I think this is almost ready (pending my last review comment).
I would like to acknowledge that anything that stops us as human beings to think about these trying times we live in and do something about it is important. The act of making this changes are critical, like this PR.
So, thank you for doing this. We 100% support your efforts and are proud of it.
That said, I would like to set some expectations which are unrelated to the sentiment of this PR.
We will need some time to actually merge this PR, because "the code" itself needs a through QA cycle. We are modifying a number of random files in the codebase which do not have any "logical" relation to each other as is in this PR. It is kind of implied that we need to test all impacted parts of the codebase. As you would understand this would not be the case normally when a fix were made in context of a bug or a feature.
We will treat this PR special and will request your patience while we get around to merging this. Hope that's understandable.
Thanks.

Absolutely understood. Please take the time you need to do the right validation.
Projects like this that educate the next generation of engineers are super important.

I think that this was a very good idea! I would have helped with the reviewing but it seems like people beat me to it. The last thing I would is for someone to get offended.

However, when we're actually referring to parts of the Mongo site I think avoiding their language would just cause confusion. Any thoughts?

I agree. Unless the documentation on mongodb site is updated, it would create some confusion.

@raisedadead So what are the next steps regarding this PR (besides having @DigiTec fixed the outstanding merge conflicts)?

So what are the next steps regarding this PR

Testing the impact area based on all the files that have been changed.

@raisedadead I am fine with the changes to the curriculum files. When resolving the merge conflicts, just make sure for the following file, that the repl.it link and text are kept as well as the intended change of changing "a whitelist" to "an allowed list".
curriculum/challenges/english/09-information-security/information-security-with-helmetjs/set-a-content-security-policy-with-helmet.contentsecuritypolicy.english.md


Fix ex5 but less broken this time

This converts the hacky parser-land fix into a somewhat less hacky but still pretty hacky adapter-land fix. At least the adapter is a fairly homogenous state of "hacky but works i guess" in the first place so hey it's not out of place!


RFE: allow to set commands for events in config file

I would like to set the commands in the configfile that should be executed on specific events like 'before_save'? IT is not possible AFAIK, is it? What do you think?

Thanks for reporting. We'll take care ASAP. Started uni some weeks ago and I'm still getting used to everything. Sorry 😞

I'm not sure whether or not this is a good idea. Currently, File Manager saves it's configuration to a .db file. If we were going to do put the event commands on the config file, the configuration would be too much split around many files. What do you think? What is your use case?

I understand your point ... well consider this situation:
you have a terraform configuration automatically setting up a complete cloud VPS with a caddy webserver and the hugo plugin. So good so far... to keep track of the users changes during the lifetime of the node you would like to save the changes via git. but to setup the commands you need to manually set it in the config. therefore it would be good to have a possibility to set those commands in the configfile.
wouldn't it be possible to parse the commands during start and save them in the db during parsetime? what do you think of it?

Hello! Will be available on v2.0! I'm closing this to remove the clutter in the meanwhile. For more info, check #574 and #575!


Toolchain not downloading Java18 for specific vendor

We currently have a build with a toolchain using Java 17. We decided we want to move to Java 18. However this failed. Initially I figured this is due to using the api.adoptopenjdk.net and I switched to api.adoptium.net, however the result is the same.
The URL that is always being used is https://api.adoptium.net/v3/binary/latest/18/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk even when explicitly setting the vendor to ADOPTIUM. When manually entering the URL https://api.adoptium.net/v3/binary/latest/18/ga/windows/x64/jdk/hotspot/normal/adoptium a proper JDK for Java 18 is downloaded. It looks like that the Vendor property is totally ignored for downloading a JDK.
Expected Behavior
Downloading the proper JDK based on the provided vendor.
Current Behavior
Not downloading the JDK based on the Vendor specified, it will always download the AdoptOpenJdk one.
Context
We are trying to move our build (locally and on the server) to Java 18, currently this is impossible as no Java 18 is being downloaded. I can locally do a manual install of Java18 I cannot do this on our server.
When supplying a Vendor the proper URL should be used to download the JDK requested and not always the AdoptOpenJdk one.
Steps to Reproduce
Create a java project with a toolchain for java 18, try to build and it will fail.
Your Environment
Windows 10, Intellij IDEA (but the command line fails likewise).
Gradle 7.4.2 through the Gradle Wrapper
The issue with not using the vendor should have been fixed with https://github.com/gradle/gradle/issues/17148 (but apparently not for other vendors).
Probably related: https://github.com/gradle/gradle/issues/20344
See also: https://discuss.gradle.org/t/java-toolchain-for-java-18-on-windows-failing/42641

Will be fixed by https://github.com/gradle/gradle/pull/20403, just like https://github.com/gradle/gradle/issues/20344.

@mdeinum Did you find a temporary workaround?

@mdeinum Did you find a temporary workaround?

No I didn't. The only workaround is to download and manually install into one of the known locations. However that doesn't really sit well with an integration server.
I also doubt it will actually be fixed by what is proposed, as it just simply seems to download the wrong vendor JDK all together (it seems to ignore the vendor and always download the adoptopenjdk one.


Fix lint task

Reason for change
The lint task doesn’t fail if at least 1 passes. This was a (failed) attempt to speed up that task, but parallelizing doesn’t work.
Testing

Tests should pass.
Checklist

[ ] CHANGELOG: The Unreleased section of CHANGELOG was updated
[ ] Prop changes: docs were updated
[ ] Prop changes: E2E tests were updated, testing from the highest level possible
[ ] Platform testing: If this change should be tested against a platform, has it been?

Oh would you look at that the lint task failed


Export subtitles as a file

Hi! Great work! 👏
Is it possible to export subtitles to a TXT file so I can fix some word that are not correct?

A really great job!
I also think it is useful to have a special file for subtitles available, both to modify them and to personalize their vision.

Fixed in #6


Single runs

Reference Issues/PRs
#29
What does this implement/fix? Explain your changes.
Any other comments?

Codecov Report
Attention: Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.09%. Comparing base (d5ed809) to head (eee28d9).

Files with missing lines
Patch %
Lines

opr/primer.py
82.36%
2 Missing and 1 partial :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #33      +/-   ##
==========================================
+ Coverage   84.62%   85.09%   +0.47%
==========================================
  Files           5        5
  Lines         156      181      +25
  Branches       16       21       +5
==========================================
+ Hits          132      154      +22
- Misses         15       17       +2
- Partials        9       10       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Restore the splash timeout feature

GearVRf-DCO-1.0-Signed-off-by: Rahul Rudradevan
<EMAIL_ADDRESS>

Looks good and works as expected. Will merge after lunch if there are no further comments.


Unable to specify an exact title ID

Sometimes searching just doesn't get you what you want -- an example I've encountered is trying to rename the 3 episodes of https://www.imdb.com/title/tt1655078/ within a directory. The directory itself renames just fine, but I've not been able to get renames of the files themselves to work, and the title names are so short I've not been able to find an actual search that matches.
To work around this, I had the idea of just finding the titles online and renaming the individual files with the title IDs. But there's currently no way to actually get imdb-rename to use the search string as a title ID. My suggestion is to either use a special argument for it, or to make query smart enough that a lone string in the tt format matches the title and applies the rename using it.
I'm not sure how this would work for multiple titles; I'd be willing to contribute a patch but would like some guidance on how to implement the feature.

This works for me in a directory containing S01E01.mkv, S01E02.mkv and S01E03.mkv:
imdb-rename -q 'into the universe with stephen hawking' S01E0*.mkv

Maybe I'm just misunderstanding your use case. Unfortunately, I don't really have time to do much else. If there's a small patch you can come up with, then I might be able to merge that. Otherwise, I can't promise anything any time soon.


Duplicate shared nodes

Hi,
I would like to know pygeometric provides any method to solve the following problem:
I have the following graph:
x = torch.tensor([[200], [100], [300]], dtype=torch.float)
edge_index = torch.tensor([[0, 0, 1, 1, 1, 2, 2],
[0, 1, 1, 0, 2, 2, 1]], dtype=torch.long)
As you can see there are 3 different neighrborhoods and each node belongs to more than one neighborhood. I would like to obtain a graph stucture where each node that belongs to more than one neighrborhood is duplicated. Instead of sharing the same node create a different node for each neighborhood.
Is it possible to do this in pygeometric?
Thanks,

Sorry :( I think that my explanation was a bit confusing. For me each node has its own neighborhood. In the previous case the neighborhood of node 0 it will be composed for: node 0 and 1. The neighborhood of node 1 will be composed for: node 0, node 1 and node 2. Finally the neighborhood of node 2 will be composed node 2 and node 1. As you can see node 1 is repeated in three different neighborhoods. I would like to duplicate the feature of this node as many times as neighborhoods have.

Ok, you can count the amounts a node occurs in a neighborhood, e.g.:
row, col = edge_index
count = torch.bincount(col)

which would result in [2, 3, 2] in your case. You can than proceed to duplicate your node features via
torch.repeat_interleave(x, count, dim=0)


update 0.3.0 changelog

Goals of PR
Core changes:
update 0.3.0 changelog
Notes:

nothing

Related Issues:

nothing

ok


OptionsSelector - delay input focus on android only

cc: @sketchydroide requesting your review! 🙇♂
Details

We added shouldDelayFocus to OptionsSelector in Search page. But it caused this issue again -  #6069 (regression)
This PR makes OptionsSelector to always use shouldDelayFocus for Android.
Other platforms didn't need a delay (as evident by the videos attached)
Fixed Issues

$ https://github.com/Expensify/App/issues/9827
Tests

Test # 1

Sign into New Dot with any account
Press ⌘K to open the search view and immediately start typing
Verify that all of the text you type is captured

Test # 2

Open app
Press search from the header
Verify that the keyboard opens on iOS, Android, and mobile web.

[ ] Verify that no errors appear in the JS console

PR Review Checklist

Contributor (PR Author) Checklist

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

[x] I added steps for local testing in the Tests section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

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

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

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

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

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

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

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

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

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

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

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

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

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

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

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

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

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

QA Steps

Test # 1

Sign into New Dot with any account
Press ⌘K to open the search view and immediately start typing
Verify that all of the text you type is captured

Test # 2

Open app
Press search from the header
Verify that the keyboard opens on iOS, Android, and mobile web.

[ ] Verify that no errors appear in the JS console

Screenshots

Web

https://user-images.githubusercontent.com/29673073/182305366-2ec958a1-1f48-461f-852f-ecc6aaa929ef.mov
Mobile Web

https://user-images.githubusercontent.com/29673073/182305461-d1c65198-6768-4daf-bb5a-8b1abe85909a.mp4
https://user-images.githubusercontent.com/29673073/182306680-abaa7d1d-a595-4b63-b5fb-17886eb4e161.mov
Desktop

https://user-images.githubusercontent.com/29673073/182304240-0a47b34e-94c0-40a0-840a-0a068fcbbe13.mov
iOS

https://user-images.githubusercontent.com/29673073/182303826-6f7a30d7-586f-432f-bf0f-20b1d3665da3.mov
Android

https://user-images.githubusercontent.com/29673073/182318750-f92b6731-1ede-4d96-9a78-ddbe41b3bae9.mp4

Will merge once conflicts are addressed @rushatgabhane

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


Figure interactivity

Added (i.e.: now compatible with new KeyHandler_mpl()):
tf._plot.plot_shotoverview()
tf.data.Data.plot_svd()
Also deleted old KeyHandler
TODO : tf.data.Data.plot() for spectral data

Codecov Report

Merging #43 into devel will increase coverage by 2.12%.
The diff coverage is 95.44%.

@@            Coverage Diff             @@
##            devel      #43      +/-   ##
==========================================
+ Coverage   55.94%   58.06%   +2.12%
==========================================
  Files          60       60
  Lines       14162    14177      +15
==========================================
+ Hits         7923     8232     +309
+ Misses       6239     5945     -294

Impacted Files
Coverage Δ

tofu/utils.py
57.98% <ø> (+8.26%)
:arrow_up:

tofu/version.py
100% <ø> (ø)
:arrow_up:

tofu/geom/_plot.py
67.74% <100%> (ø)
:arrow_up:

tofu/data/_comp.py
35.22% <100%> (+5.68%)
:arrow_up:

tofu/_plot.py
91.8% <100%> (-0.05%)
:arrow_down:

tofu/tests/tests02_data/tests03_core.py
98.81% <100%> (ø)
:arrow_up:

tofu/data/_core.py
62.6% <75%> (+0.36%)
:arrow_up:

tofu/data/_plot.py
92.5% <95.45%> (+0.9%)
:arrow_up:

Continue to review full report at Codecov.

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


OSOE-638: Feature to edit shell settings from the admin in Lombiq.Hosting.Tenants

OSOE-638
Fixes #66

@wAsnk
Some info here https://github.com/Lombiq/Hosting-Tenants/issues/66#issuecomment-1736239207
I looked at your controller before your last commit, it looks good, normally it should work.
Are you sure that you provide kvps and with different values than those that may already be configured in another config source like the main appsettings.json? If for a given key the same value is already configured, it will not be persisted in the tenant specific config source.

Thanks for checking!
Yeah I'm sure.
This is what happens in SaveSettingsAsync, I'm trying to set the following in my Test tenant (I added both lines to test if the tenant name does anything):
"Lombiq_Hosting_Tenants_EmailQuotaManagement:EmailQuotaPerMonth": "42",
"Test:Lombiq_Hosting_Tenants_EmailQuotaManagement:EmailQuotaPerMonth": "24"

SaveSettingsAsync settings parameter contains the changes

tenantSettings configSettings contains these keys if JObject.FromObject used, so only those can be set by the logic.

Then only those are saved that doesn't have a children, so it is not possible to save such keys:

I can save key/values such a "TestKey": "TestValue", but these are too simple.

So basically for this:
[Route("/shellSettingsTest")]
    public async Task<IActionResult> Test()
    {
        if (!_shellHost.TryGetSettings("Default", out var shellSettings))
        {
            return NotFound();
        }

        shellSettings["SimpleKey"] = "SimpleValue";
        shellSettings["Not:So:Simple:Key"] = "NotSoSimpleValue";
        shellSettings["Default:Not:So:Simple:Key"] = "TenantSpecificNotSoSimpleValue";

        await _shellHost.UpdateShellSettingsAsync(shellSettings);

        if (!_shellHost.TryGetSettings("Default", out var shellSettingsNew))
        {
            return NotFound();
        }

        var result = $"{shellSettingsNew["SimpleKey"]}, {shellSettingsNew["Not:So:Simple:Key"]}, {shellSettingsNew["Default:Not:So:Simple:Key"]}";
        return Json(result);
    }

You get this result:

Okay I understand, I thought it was not saving simple values too.
Yes we use !s.GetChildren().Any() for simplicity, would be a little more complex to check if a config already exists with the same value in a previous configuration source, and maybe also to only have to manage simple config strings in the tenant specific source, tenant appsettings.json by default.
Maybe we are missing an extension point to be able to override this part, maybe worth to suggest a PR.
And then yes, we only pass a Dictionary<string, string> to the _tenantConfigSources.
await _tenantConfigSources.SaveAsync(
    settings.Name, tenantConfig.ToObject<Dictionary<string, string>>());

In the meantime a workaround would be to save the more complex values as json strings, but in that case we would not be able to check if the same underlying value exists in a previous source, hmm but maybe this checking could be done at the editor level.

With my current solution I only save key-values if they are not already present in any configuration before, so it works this way.
My only concern is what @Piedone said that we are displaying values that might be sensitive, but to be honest if you have this permission you should be able to see these values anyway. Maybe I can put a blur on top of the editor with a click to show button.
What do you think @Piedone ?

If you can access this screen then you're an admin in Orchard, but that doesn't mean that you should be able to see secrets coming from the infrastructure; that's a different access level. Hiding these on the client side, i.e. in a way that people can still get to them if they want to, is not a suitable solution. These shouldn't be sent to the client at all.

We can show it to users with a new custom permission.

I really don't see a utility in that, since it adds more config requirements and opens up accidental disclosure. Please don't display anything, then, but a comment with instructions on how to use the feature, how to add config values.

What settings do we don't want to show exactly? Because only settings under "OrchardCore" section are displayed and tenant configuration.
If we don't display anything how do we know what's configured already for the tenant? Then you can only check blob storage or the file system for the tenant settings.
But let me know if that's okay for you that we don't display anything we just display an input field with a prefilled example/hint.

We should only display the configuration that users configured via the module, nothing else.

If we don't save that to a new place other than the shellsettings I'm afraid we can't do that because we can't distinguish between settings saved from there or anywhere else.

Then it seems we'll need to do that. Can't you otherwise mark a configuration key (like a comment)?

I wouldn't complicate it with another provider or place to save it, because it depends where the key/value is saved depending on what feature is currently on, e.g. if blob storage is on it should be saved there e.g. So I will save a dummy key/value pair and the correct key/value pair as well, then I can filter by that.

Look into what JT has written.
Ok


Fix flaw in documentation

It seems like there are some errors in the documentation about datum and file relationships. The numbers in the text does not seem to correspond to the numbers in the images. As is now can be seen here:
https://docs.pachyderm.com/latest/concepts/pipeline-concepts/datum/relationship-between-datums/

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Great catch Daniel! Thank you for taking this extra time to fix those typos!
Would you mind signing our Contributor License Agreement? Like many open-source projects, it is a prerequisite to any first merge.
Again, we appreciate your time! Feel free to use our Slack for any questions you might while trying out Pachyderm. We are here to help.

Thanks, should be signed now.

Cool, thanks for telling me!


nuxt's PAGES to routes mechanism doesn't support patterns like this.

Here's my scenario.
I have a view to review the "summary" of all "projects", which consists of several charts and tables and stuff like that,
and I need a page to review the summary of one project specified by its "id",
both pages has exactly same layouts and structure
so I need to map projects/summary and projects/:id/summary to a single page comp.
How do I arrange my PAGES dir to make that happen?
P.S. I don't think projects/summary/:id will be a good solution because I believe a projectId should only follow "projects", not a name of any other resource models, e.g. "summary".

For info, I expressed a very similar problem few days ago on #1875.

First solution: not sure if it suitable for you, but you can use this url for all projects:
projects/all/summary
then it will be the same summary.vue file for both cases
Other solution: you can create separate component for summary view components/summary.vue and include it in both pages
P.S. I use the first solution for my project

@KonstantinVlasov You mean you have a projects/_id/summary.vue and it can accept 'all' as id? Nice solution there, but I want to hear from authors if there's some more 'strict' solutions. :)

@SevenOutman, "other solution" it's hint from authors :)

Hi @SevenOutman,
@KonstantinVlasov gave you the best solution in my opinion.
projects/_id/summary.vue will create this route path projects/:id?/summary.
With this solution /projects/summary and /projects/ID/summary will go to the same page.

@alexchopin @KonstantinVlasov Your suggestions help. Thanks.


syntaxError:Unexpected keyword 'import'      Import the react-native in the existing project.   ios

tip syntaxError:Unexpected keyword 'import'
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class SimpleApp extends Component {
render() {
return (

Welcome to React Native!

To get started, edit index.ios.js

Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu

);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('SimpleApp', () => SimpleApp);
but user
'use strict';
var React = require('react-native');
var {
Text,
View
} = React;
var styles = React.StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'red'
}
});
class SimpleApp extends React.Component {
render() {
return (

This is a simple application.

)
}
}
React.AppRegistry.registerComponent('SimpleApp', () => SimpleApp);
is ok ,
how to do

Please ask in Stackoverflow, you should use Github issues for feature requests / bug reports etc., not questions about your own debugging. It looks like your packager is not transpiling import into what it needs to be, but no one will be able to debug with this much information anyways.

Closing this issue - I think hey99xx's diagnosis is accurate here.


wave: add query to the DocumentNode for logging

This query parameter will be used to log it into DataDog

/approve thanks for addressing this! 🙏 ❤


it carrys over

okay so this is a awesome plugin and i love it but here is my problem. I am using multiverse and i only want the stats to show up in kitpvp. i also have a hub and surival. i have per world plugins and i have it set to only work on kit also throught the config itself its to be disabled in all words but kit. when u log in its fine and its not there if u go to survival its not there. the problem is if u go into kit it shows up like its supposed to but if you /hub it stays there, if u go to any other world after the one its enabled in it wont go away. i need it to go away after i leave kit! idk if u can fix that or if there is a way but please help!

So, /hub teleports you to the hub world?

That is correct

Multiverse you can set up different worlds and run them all on the same server

Do you have compatibilityMode activate?

what do you mean sorry im a first time server owner XD lol tell me what u need me to do or if u need config files or anything u need

Yes, please post the config. That would helpful.

okay i will if it is at all possible would u like to log onto my minecraft server so i can show you? its a premium server

I'm not on my PC, I'm on my phone.

Could you please post your config of ScoreboardStats and the server address, so I could test it then?


Not working! Android Nougat + VLC

Hi!
It's not working, when i switch off the screen the stream is paused.
I copy the video link from Youtube to your app, then it opens VLC with that stream.
Then i close the screen and the stream is paused.

To put a video in background on VLC you have to touch the 3 dots to open menu and then the rectangle with a line in diagonal indicating no screen.
Maybe I should indicate it in the description, I don't know.

You are right, found it under the three dots menu.

by the way I think you can set default behavior to the behavior you want in the setting


Training with flash-attention causing loss to differ

Hi, since flash attention can reduce time cost and device memory usage significantly, we'd like to use it in our model training.
However, we've encountered a loss difference with baseline when training:

we use it in inference, it works just fine
the same code in training infects our model's performance.

Note: our model is a diffusion model with slight difference and trained with fp32. To fit flash-attention, we change the related part in CrossAttention to fp16 and then change the result back to fp32.
We train with 8 gpus and ddp, inference only use 1 gpu.
Environments Info:

python 3.7.11
pytorch 1.11+cu113
lash-attn 0.2.2
A100 80G

partial code
        qb, qn, qd = q.shape
        kb, kn, kd = k.shape
        vb, vn, vd = v.shape
        using_flash = False
        if((qd // h) <= 128 and (kd // h) <= 128 and (vd // h) <= 128): using_flash = True
        if(opt_helper.using_flash and using_flash):
            # print('using flash')
            opt_helper.flash_cnt += 1
            q = q.reshape(qb * qn, h, qd//h).to(dtype=torch.float16)
            k = k.reshape(kb * kn, h, kd//h).to(dtype=torch.float16)
            v = v.reshape(vb * vn, h, vd//h).to(dtype=torch.float16)
            max_seqlen_q = qn
            max_seqlen_k = kn
            cu_seqlens_q = torch.arange(
                0,
                (qb + 1) * qn,
                step=qn,
                dtype=torch.int32,
                device=q.device,
            )
            cu_seqlens_k = torch.arange(
                0,
                (kb + 1) * kn,
                step=kn,
                dtype=torch.int32,
                device=k.device,
            )
            output = flash_attn_unpadded_func(
                q, k, v,
                cu_seqlens_q, cu_seqlens_k, max_seqlen_q, max_seqlen_k,
                dropout_p = 0.,
                softmax_scale = self.scale,
            )
            out = output.reshape(qb, qn, qd).float()

In pytorch AMP, softmax using fp32, we kind of wonder would this be an issue? our query num(qn, kn) might be large(e.g. 4096)

FlashAttention should give the same output as standard attention, up to some numerical tolerance (we have tests for this). Internally softmax is done in fp32 as well (matrix multiply Q @ K^T and attn @ V are done in fp16/bf16).
The comparison we usually make is:
(FlashAttention in fp16/bf16 - standard attention in fp32) vs (standard attention in fp16/bf16 - standard attention in fp32).
In all of our use cases the errors between the two are around the same.
For your case:

Can you print out these two numerical differences to compare?
Can you try running standard attention (softmax(Q @ K^T) @ V) in fp16 to see if that affects your model quality. If that's the case, that means that the model is simply sensitive to numerical differences and you'd want to run attention in fp32 anyway (so just use standard attention in that case).
For the use cases we've seen (training language models & vision transformers), swapping out standard attention in fp16/bf16 with FlashAttention in fp16/bf16 does not change the model quality.

@tridao thanks you work, for diffusion model generate image pixel, maybe sensitive to numerical differences. we test inference model, and result only 1e-2 can align between FlashAttention in fp16- standard attention in fp16, and generates poor image quality. any suggestion ？ Retrain can solve the problem ? but it too expensive。

What are the numerical errors
(FlashAttention in fp16 - standard attention in fp32) vs (standard attention in fp16 - standard attention in fp32)?
Are those numerical errors for the whole model or just one attention layer?

@tridao thanks for your reply, we test FlashAttention in fp16 vs standard attention in fp16,  numerical errors just one attention layer.

@ranjiewwen What are the numerical errors
(FlashAttention in fp16 - standard attention in fp32) vs (standard attention in fp16 - standard attention in fp32)?

@tridao (FlashAttention in fp16 - standard attention in fp16) > 1e-3

@ranjiewwen what's (FlashAttention in fp16 - standard attention in fp32)?
and (standard attention in fp16 - standard attention in fp32)?
The reference output should be standard attention in fp32.

@tridao i know, but when we only use flashattention for inference, the train model use pytorch fp16,  so we compare the train layer use pytorch fp16 - inference layer use flashattention fp16, the result diff > 1e-3.

Can you get (standard attention in fp16 - standard attention in fp32) anyway?
If this difference is > 1e-3, does that imply that running inference with standard attention in fp32 would also produce unacceptable results? If your application is that sensitive (running inference with higher precision produces unacceptable results) then you should not change anything between training and inference.
Depending on the magnitude of the values, a difference of 1e-3 is expected for fp16 precision. For example, doing any simple arithmetic on fp16 values already produces numerical error of 5e-4 or 1e-3:
In [1]: import torch

In [2]: a = torch.randn(100, dtype=torch.float16, device='cuda')

In [3]: (a + 0.3 - 0.3 - a).abs().max()
Out[3]: tensor(0.0010, device='cuda:0', dtype=torch.float16)

ok, thanks.

Hi @tridao,
I ran the code of Philipp Schmid (HF) to finetune Llama 2 7B with and without Flash Attention 2.
The loss is higher WITH Flash Attention 2.
Do you have any idea why?

Loss should be around the same. If there's a difference, you should print out the output of standard attention and FlashAttention, and check that they are close numerically. That should tell you if you're using it correctly.

Thanks @tridao for your answer. Here the training code I use (full code at run_qlora.py).
This is the classic HF trainer code with the use_flash_attention_2=True/False argument with the latest official libraries versions.
My use case: I finetune the Llama 2 7B model on custom dataset on 2 GPUs RTX 3090 (24GB RAM). I use chunck of 4096 tokens (I need that because of the content size of my prompts).

with "use_flash_attention_2=False": my training batch size is 1 (gradient_accumulations_steps = 2)
with "use_flash_attention_2=True": my training batch size is 5 (gradient_accumulations_steps = 1)

What do you think? With this complementary information, is there a reason to get a higher loss with use_flash_attention_2=True?
def training_function(script_args, training_args):

    # load dataset
    dataset_train = load_from_disk(script_args.path_to_dataset_train)
    dataset_eval = load_from_disk(script_args.path_to_dataset_eval)

    # load model from the hub with a bnb config
    bnb_config = BitsAndBytesConfig(
        load_in_4bit=True,
        bnb_4bit_use_double_quant=True,
        bnb_4bit_quant_type="nf4",
        bnb_4bit_compute_dtype=torch.bfloat16,
    )

    model = AutoModelForCausalLM.from_pretrained(
        script_args.model_id,
        use_cache=False if training_args.gradient_checkpointing else True,  # this is needed for gradient checkpointing
        device_map="auto",
        use_flash_attention_2=script_args.use_flash_attn,
        quantization_config=bnb_config,
    )

    # create peft config
    model = create_peft_model(
        model, gradient_checkpointing=training_args.gradient_checkpointing, bf16=training_args.bf16
    )

    # Create Trainer instance
    trainer = Trainer(
        model=model,
        args=training_args,
        train_dataset=dataset_train,
        eval_dataset=dataset_eval,
        data_collator=default_data_collator,  # no special collator needed since we stacked the dataset
    )

    # Start training
    trainer.train()

Did you print out the output of standard attention and FlashAttention, and check that they are close numerically?

Did you print out the output of standard attention and FlashAttention, and check that they are close numerically?

Until now, no. Can you give me a code for doing that? Thank you.

I can't help with that, sorry. You'd need to edit the model file (e.g. modeling_llama.py on HF if you're training llama).

The model file for training is here run_qlora.py.
When I ask you some code to do what you asked for (ie, "print out the output of standard attention and FlashAttention"), it's because I'm not sure of what your are asking for. What means "output of standard attention and FlashAttention"?

something like:
output_reference = attention(query.float(), key.float(), value.float())
output_baseline =  attention(query, key, value)
output_flash = flash_attention(query, key, value)
print((output_baseline - output_reference).abs().max())
print((output_flash - output_reference).abs().max())

Thanks @tridao but I don't see how to implement this pseudocode.
In fact, I just tested another idea: instead of using a Context Window of 4096 (Llama 2), I divided it by 2 until 2048.
My first results are as follows:
use_flash_attention_2=False

first evaluation

train loss = 0.7167
eval loss = 0.5650

second evaluation

train loss = 0.4035
eval loss = 0.3455

use_flash_attention_2=True

first evaluation

train loss = 0.7144
eval loss = 0.5628

second evaluation

train loss = 0.4017
eval loss = 0.3452

This time, the losses are similar (the "use_flash_attention_2=True" ones are even smaller).
Do you think the Context Window might be the "problem" of my case?

Sorry I can't help debug your training. If results are correct at 2k I don't see a reason it wouldn't be correct at 4k.
If you want to debug, you should go to the modeling file, e.g. make a copy of modeling_llama.py from huggingface, and put breakpoint / print statements there.


question：how can I use spice-html5 to access ovirt vms？

This project does not use ovirt solution.


"dial tcp: i/o timeout" issues with FastDP and Kubernetes Services.

What you expected to happen?
When a pod comes up it's able to hit any internal service consistently, kubernetes.default.svc for this issue.
What happened?
Getting
error: couldn't get deployment devicebroker-12: Get https://<IP_ADDRESS>:443/api/v1/namespaces/v14-rapyuta-core/replicationcontrollers/devicebroker-12: dial tcp <IP_ADDRESS>:443: i/o timeout
How to reproduce it?
Happens with openshift deployer pods that bring up a new pods when a deployment is rolled, little sporadic but can be easily reproduced.
Anything else we need to know?
Looks like it was an issue in Openshift SDN and was fixed by changing a flow.
https://github.com/openshift/origin/issues/5796
The fix (?) https://github.com/openshift/openshift-sdn/pull/236/files
Since weave also uses ovs, could it be related?
Network policies are enabled for some name spaces in the cluster.
Versions:
Openshift 3.9 running on Microsoft Azure.
Openshift version
oc v3.9.0+ba7faec-1
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO
Uname
Linux oc-master-0 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Weave
/home/weave # ./weave --local status
    Version: 2.5.1 (up to date; next check at 2019/02/28 18:27:07)

    Service: router
   Protocol: weave 1..2
       Name: 52:cd:da:04:c9:04(oc-master-0)
 Encryption: disabled

PeerDiscovery: enabled
Targets: 9
Connections: 18 (17 established, 1 failed)
Peers: 18 (with 306 established connections)
TrustedSubnets: none
    Service: ipam
     Status: ready
      Range: <IP_ADDRESS>/16

DefaultSubnet: <IP_ADDRESS>/16
Docker
Client:
Version:         1.13.1
API version:     1.26
Package version: docker-1.13.1-88.git07f3374.el7.centos.x86_64
Go version:      go1.9.4
Git commit:      07f3374/1.13.1
Built:           Fri Dec  7 16:13:51 2018
OS/Arch:         linux/amd64
Server:
Version:         1.13.1
API version:     1.26 (minimum version 1.12)
Package version: docker-1.13.1-88.git07f3374.el7.centos.x86_64
Go version:      go1.9.4
Git commit:      07f3374/1.13.1
Built:           Fri Dec  7 16:13:51 2018
OS/Arch:         linux/amd64
Experimental:    false
Logs:
Was not able to determine anything relevant in them. (There's the dead peer issue causing some connections to fail)
Network:
Routes
default via <IP_ADDRESS> dev eth0 proto dhcp metric 100
<IP_ADDRESS>/16 dev eth0 proto kernel scope link src <IP_ADDRESS> metric 100
<IP_ADDRESS>/16 dev weave proto kernel scope link src <IP_ADDRESS>
<IP_ADDRESS> via <IP_ADDRESS> dev eth0 proto dhcp metric 100
<IP_ADDRESS> via <IP_ADDRESS> dev eth0 proto dhcp metric 100
<IP_ADDRESS>/16 dev docker0 proto kernel scope link src <IP_ADDRESS>
Addrs
1: lo    inet <IP_ADDRESS>/8 scope host lo\       valid_lft forever preferred_lft forever
2: eth0    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global noprefixroute eth0\       valid_lft forever preferred_lft forever
8: docker0    inet <IP_ADDRESS>/16 scope global docker0\       valid_lft forever preferred_lft forever
11: weave    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global weave\       valid_lft forever preferred_lft forever

Was able to isolate logs better, getting
WARN: 2019/02/28 16:09:51.536184 Vetoed installation of hairpin flow FlowSpec{keys: [InPortFlowKey{vport: 1} EthernetFlowKey{src: 12:cc:f5:35:61:28, dst: 66:2f:0f:7c:15:6d}], actions: [OutputAction{vport: 1}]}
WARN: 2019/02/28 16:09:52.536743 Vetoed installation of hairpin flow FlowSpec{keys: [EthernetFlowKey{src: 12:cc:f5:35:61:28, dst: 66:2f:0f:7c:15:6d} InPortFlowKey{vport: 1}], actions: [OutputAction{vport: 1}]}
WARN: 2019/02/28 16:09:54.540654 Vetoed installation of hairpin flow FlowSpec{keys: [EthernetFlowKey{src: 12:cc:f5:35:61:28, dst: 66:2f:0f:7c:15:6d} InPortFlowKey{vport: 1}], actions: [OutputAction{vport: 1}]}
WARN: 2019/02/28 16:09:58.548697 Vetoed installation of hairpin flow FlowSpec{keys: [EthernetFlowKey{src: 12:cc:f5:35:61:28, dst: 66:2f:0f:7c:15:6d} InPortFlowKey{vport: 1}], actions: [OutputAction{vport: 1}]}
WARN: 2019/02/28 16:10:06.570492 Vetoed installation of hairpin flow FlowSpec{keys: [EthernetFlowKey{src: 12:cc:f5:35:61:28, dst: 66:2f:0f:7c:15:6d} InPortFlowKey{vport: 1}], actions: [OutputAction{vport: 1}]}
WARN: 2019/02/28 16:10:08.568584 Vetoed installation of hairpin flow FlowSpec{keys: [EthernetFlowKey{src: 12:cc:f5:35:61:28, dst: 66:2f:0f:7c:15:6d} InPortFlowKey{vport: 1}], actions: [OutputAction{vport: 1}]}
IN

Looks like it was an issue in Openshift SDN

OpenShift and Weave Net are implemented in completely different ways; there is no reason to suppose that a similar symptom in one would be related to another.

Vetoed installation of hairpin flow

This can happen in harmful and non-harmful cases - see #2808
From the Weave logs, this is a sign of something definitely wrong:
INFO: 2019/03/01 05:30:40.299239 overlay_switch ->[12:e6:b4:29:a8:6e(ocg2vfett)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.299244 overlay_switch ->[32:2b:7e:8b:3d:ed(ocg2bupgd)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.299474 overlay_switch ->[c6:29:85:f4:63:a9(ocbuild-g2smppi)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.302852 overlay_switch ->[42:77:f6:7f:39:1c(ocg2ogfsz)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.307102 overlay_switch ->[be:e2:0b:28:c4:be(oc-infra-1)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.310343 overlay_switch ->[12:cc:f5:35:61:28(ocg2xpkdi)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.314442 overlay_switch ->[7e:ec:c5:cd:ee:bc(oc-infra-0)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.317610 overlay_switch ->[76:e3:6d:b1:9b:0a(ocbuild-g2ijddl)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.317910 overlay_switch ->[42:81:a1:34:2e:da(oc-master-1)] sleeve timed out waiting for UDP heartbeat
INFO: 2019/03/01 05:30:40.318902 overlay_switch ->[b2:2e:c7:e3:fe:80(oc-node-2)] sleeve timed out waiting for UDP heartbeat

this means that several heartbeats were missed.  Yet those nodes continue to appear in later log messages.
These connections seem to be working better: (including some overlap with the above set)
INFO: 2019/03/01 05:29:40.351383 sleeve ->[<IP_ADDRESS>:6783|82:b8:f1:6f:61:e6(ocg2kgxea)]: Effective MTU verified at 1438
INFO: 2019/03/01 05:29:40.353232 sleeve ->[<IP_ADDRESS>:6783|92:ba:d1:8d:5f:b4(ocg2bbyqo)]: Effective MTU verified at 1438
INFO: 2019/03/01 05:29:40.800847 sleeve ->[<IP_ADDRESS>:6783|96:d2:39:f2:ee:dd(oc-infra-2)]: Effective MTU verified at 1438
INFO: 2019/03/01 05:29:40.807056 sleeve ->[<IP_ADDRESS>:6783|1a:a4:db:93:9b:fb(oc-master-2)]: Effective MTU verified at 1438
INFO: 2019/03/01 05:29:40.811124 sleeve ->[<IP_ADDRESS>:6783|3a:0e:f0:a3:94:35(ocg2cshhl)]: Effective MTU verified at 1438
INFO: 2019/03/01 05:29:40.812061 sleeve ->[<IP_ADDRESS>:6783|52:cd:da:04:c9:04(oc-master-0)]: Effective MTU verified at 1438
INFO: 2019/03/01 05:30:40.819752 sleeve ->[<IP_ADDRESS>:6783|be:e2:0b:28:c4:be(oc-infra-1)]: Effective MTU verified at 1438

Is there any correlation between pods that work and don't work, and those two sets of nodes above?
I understand from Slack your symptoms are intermittent, so it would be useful to know any correlation between when the problem hit and the time in the logs.


v1.0.0 fails with "Error: spawn UNKNOWN" on windows, previously did work with v0.2.3

I just upgraded karma-phantomjs-launcher and from phantomjs to phantomjs-prebuilt and now I get the following error when running on windows. It works fine on my Mac, so only windows is broken.
The previous version 0.2.3 worked fine on windows.
25 02 2016 18:26:23.808:ERROR [launcher]: { [Error: spawn UNKNOWN] code: 'UNKNOW
N', errno: 'UNKNOWN', syscall: 'spawn' }
Error: spawn UNKNOWN
    at exports._errnoException (util.js:870:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at exports.spawn (child_process.js:362:9)
    at Object._execCommand (c:\MinGW\working\reactjs-101\node_modules\karma\lib\launchers\process.js:63:21)
    at Object._start (c:\MinGW\working\reactjs-101\node_modules\karma-phantomjs-launcher\index.js:76:10)
    at Object.<anonymous> (c:\MinGW\working\reactjs-101\node_modules\karma\lib\launchers\process.js:14:10)
    at emitOne (events.js:82:20)
    at Object.emit (events.js:169:7)
    at Object.start (c:\MinGW\working\reactjs-101\node_modules\karma\lib\launchers\base.js:42:10)
    at c:\MinGW\working\reactjs-101\node_modules\karma\lib\launcher.js:94:17
    at next (c:\MinGW\working\reactjs-101\node_modules\karma\node_modules\batch\index.js:118:7)
    at Batch.end (c:\MinGW\working\reactjs-101\node_modules\karma\node_modules\batch\index.js:154:5)
    at launch (c:\MinGW\working\reactjs-101\node_modules\karma\lib\launcher.js:111:11)
    at invoke (c:\MinGW\working\reactjs-101\node_modules\karma\node_modules\di\lib\injector.js:75:15)
    at Server.<anonymous> (c:\MinGW\working\reactjs-101\node_modules\karma\lib\server.js:171:24)
    at Server.g (events.js:260:16)

Thanks for the report. Does running phantomjs prebuilt on its own work?

It looks like it is a phantomjs-prebuilt problem since the tests cause the same error, so I have logged the issue https://github.com/Medium/phantomjs/issues/478


Setting of deploy

Should we save the norm1 layer for deploy? or just get the output from fc5.

Here is an example of deployment.
https://github.com/happynear/AMSoftmax/blob/master/prototxt/face_deploy_mirror_normalize.prototxt
I apply the mirror face trick and normalization inside the network. These two operations are implemented using CUDA, so the speed is faster than doing them outside on CPU.

thx

Hi, i  trained AMsoftmax with webface which including 10572 subjects, get the accuracy 99.27% when the deploy file without norm1 layer in LFW, and  get the accuracy 60% with norm1 layer. but In your example of deploy add the norm layer and some tricks, am i missed something in valid process? or some wrong with my valid code?(not your code)

It's weird. The normalize layer just does what it should do: normalization, which you would also do during testing. Maybe you need to check your codes...

https://github.com/happynear/FaceVerification/blob/master/test_lfw.m Is this your test code?

sorry to bother you again, Have you released your test code in LFW? thx kindly!

We use the same network architecture as SphereFace. You may use SphereFace's experimental settings.


Table 302 - Finance Charge Memo Header - Return value of procedure GetNoSeriesCode

Hello,
In procedure GetNoSeriesCode(): Code[20] the return value of the IsHandled that is manipulated in event OnBeforeGetNoSeriesCode(Rec, SalesSetup, NoSeriesCode, IsHandled); should return something like exit(NoSeriesCode); as in table 38 in the same procedure  GetNoSeriesCode.
How it is now:
procedure GetNoSeriesCode(): Code[20]
var
    NoSeriesCode: Code[20];
    IsHandled: Boolean;
begin
    SalesSetup.Get();
    IsHandled := false;
    OnBeforeGetNoSeriesCode(Rec, SalesSetup, NoSeriesCode, IsHandled);
    if IsHandled then
        exit;

    NoSeriesCode := SalesSetup."Fin. Chrg. Memo Nos.";

    OnAfterGetNoSeriesCode(Rec, SalesSetup, NoSeriesCode);
    exit(NoSeriesMgt.GetNoSeriesWithCheck(NoSeriesCode, SelectNoSeriesAllowed, "No. Series"));
end;

How it should be:
 procedure GetNoSeriesCode(): Code[20]
var
    NoSeriesCode: Code[20];
    IsHandled: Boolean;
begin
    SalesSetup.Get();
    IsHandled := false;
    OnBeforeGetNoSeriesCode(Rec, SalesSetup, NoSeriesCode, IsHandled);
    if IsHandled then
        exit(NoSeriesCode);

    NoSeriesCode := SalesSetup."Fin. Chrg. Memo Nos.";

    OnAfterGetNoSeriesCode(Rec, SalesSetup, NoSeriesCode);
    exit(NoSeriesMgt.GetNoSeriesWithCheck(NoSeriesCode, SelectNoSeriesAllowed, "No. Series"));
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


chapters: validation_overview.adoc: Fix typo

Fixes a minor spelling mistake in a Validation overview chapter.

Thanks for fixing!


Add a Getting Started section to the README.

Thanks back atcha! This project is rad!

ah thank you! That means a lot


Integrate piskel for pixel editing

Hi, I integrated piskel into a similar engine to this one - gdevelop a while ago and recognize that I can do the same for gb-studio without that much effort.
If there any interest in adding piskel as the default pixel editor in gb-studio?
If so I can create a pull request :)
piskel:
https://gdevelop-app.com/make-8bit-pixelart-games/
Would you like to have piskel bundled with gb-studio?

Maybe this could be done via add-ons or extensions? It would be awesome to allow for the ability to extend GB Studio with pixel or audio editors

I am not sure how to write extensions for this. Can extensions affect the UI of the IDE? If so, can you show me an example of that?
One thing I can do is automatically load the gameboy palette and set the background color and size on new sprites

Would love this!

just to be clear, my suggestion here is to bundle piskel with gb studio


Node target

Currently it looks like this loader only creates templates compiled for the browser. Because of this it is difficult to build isomorphic bundles (one for the browser and one for the server) using Marko and webpack.
It would be nice if this was configurable through the webpack options for the loader, or better yet it could automatically pickup on the webpack target for node and node-async.
I think this works fine if you manually specify the target: "server" option though.

Closing this since it was possible through options :).