Squidpy comparative statistics

We’re looking to use squidpy to generate comparative spatial statistics across multiple samples.
I see we can supply the sample key by library_key in squidpy.gr.spatial_neighbors so that the spatial graph is generated for each sample independently, but how does one then use squidpy.gr.nhood_enrichment, sq.gr.interaction_matrix, sq.gr.centrality_scores functions to generate ‘per sample’ statistics to compare between samples.
the adata.uns output from the ```.gr.` functions returns arrays - how does one access the column/row names for these arrays?
thanks!

hi @jamesMo84

but how does one then use squidpy.gr.nhood_enrichment, sq.gr.interaction_matrix, sq.gr.centrality_scores functions to generate ‘per sample’ statistics to compare between samples.

to do this, unfortunately you'd have to iterate over each sample and compute the statistics separately, and then find a method to aggregate/compare
some of these ideas were discussed here: https://github.com/scverse/squidpy/issues/483
I'm still not super sure how to expose the comparison/aggregations functions to perform cross-samples comparisons.


Console Sizing Issues

I'm trying to figure out if I'm crazy, or if there is a bug within bracket lib. I creates an 80x50 simple console and populated it with a floor and some mountain ranges (just using 'n' char), but the console seems extremely small.

i wanted the window to be around 960x720 for better readability, but if I increase the console size, it only changes how many pixels are drawn.
This is 120x90 console.

Im on a m1 mac and these are my specs.

Did some digging and started playing around with with_tile_diomension and with_demension to achieve what I wanted. I noticed something very interesting between the deployed code and your git branch. With this setup im using terminal8x8 but with tilesize of 12.

On the git branch there is pixel tearing:

but on the 0.8 version from crates.io, there is no tearing:

Digging backwards in the commits, the problem starts whenever Scalar2 was introduced https://github.com/amethyst/bracket-lib/commit/4b475077ccf3bd67d196dfed94d4d719118934a2

I'm wondering if your initialization is actually what you want to do?  I don't see tearing when I use:
    let context = BTermBuilder::new()
        .with_font("terminal8x8.png", 8, 8)
        .with_fancy_console(80, 50, "terminal8x8.png")
        .with_tile_dimensions(12, 12)
        .build()?;

With that said, if you want a 12x12 - I'd recommend grabbing a font of that size. There are some great ones here: https://dwarffortresswiki.org/Tileset_repository#12.C3.9712

Interesting. I believe it mainly happens with the horizontal bar.  I updated the example to just draw a bar across the screen. That being said, if I use a 12x12 font, the tearing seems to not happen. I should also note using the 8x8 font, and then forcing the tile_size to (16,16) doesn't cause tearing either. So I guess its the 1.5x difference for the 8x8 font which causes some weird scaling issues

That makes sense. Sorry for the lack of replies, I set aside time this week

and the whole family is out sick. :-(
I'm now trying to clear up a big chunk of next week for bracket-lib.

On Tue, Sep 27, 2022 at 11:47 AM Jacob LeCoq @.***>
wrote:

Digging backwards in the commits, the problem starts whenever Scalar2 was
introduced 4b47507
https://github.com/amethyst/bracket-lib/commit/4b475077ccf3bd67d196dfed94d4d719118934a2
—
Reply to this email directly, view it on GitHub
https://github.com/amethyst/bracket-lib/issues/296#issuecomment-1259779778,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADRU436Q3BBRNBT4YXJZTBTWAMQJJANCNFSM6AAAAAAQWILDEQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


API to remove stored session cookies & auth tokens

API: https://github.com/couchbaselabs/couchbase-lite-api/issues/156
iOS: https://github.com/couchbase/couchbase-lite-ios/issues/1302

From the discussion last week, the clear credentials method will be at  the database.
https://github.com/couchbase/couchbase-lite-ios/issues/1345


proposal for generic parser interface

Currently, the library supports CSV and TSV data, while external spreadsheet services (Google Sheets and Excel) deliver JSON data. In order to parse the JSON data several TransformStreams are used to decode the raw bytes to text, transform the JSON formats to CSV, and encode the text back to raw bytes. Finally, the transformed data are passed to the parser, which handles the data using the same CSV/TSV parser logic. This is obviously no sophisticated approach and could be improved.
Proposal
All logic that is related to parsing a specific format could be abstracted in a generic Parser interface. I think this would affect four functions that have no relation at the moment: parse, splitLine, splitLines, and maybe parseLine.
interface Parser {
    parse(chunks: ArrayBufferLike[], start: Position, end: Position): string[];
    parseLine(line: string[], types: DataType[]): unknown[];
    splitLine(line: string, delimiter: string): string[];
    splitLines(chunk: string, lines: string[], remainder = ''): string;
}

This would allow defining different parsers for different data sources: CsvParser implements Parser, JsonParser implements Parser, etc.
Additionally, we could expose the Parser interface, so users could define their own parser for tabular data with a custom format, e.g. parsing a table from a Markdown file. A possible usage could be:
import { Parser } from "@lukaswagner/csv-parser";

class MyCustomParser implements Parser {
   // implementations
}

// ...

await parser.open("[custom-file]", { parser: myCustomParser });

The custom parser passed could be an instance or a class. If the parser has no state, the methods could also be defined as static. But I'm open for opinions which API would be best.
Considerations
While this abstraction would enable using this library in more use cases, it would have more responsibilities than the name "CSV parser" suggests. It might be worth thinking about splitting the library into multiple packages, e.g. as main library data-parser and csv-parser, json-parser, etc. that could be integrated like plugins. Since we're already using a monorepo, introducing more packages should not be a big deal. A bigger problem would be the csv-parser library that currently contains the actual library and would become a plugin - so communicating that switching the library would be required. But maybe you have other thoughts/better ideas how to handle this case.

Yes, that's probably the best way forward.
Regarding the package: How about a base parser, a specialized plugin and a package wrapping both for easier usage?

base-parser
plugin

csv-plugin
json-plugin

parser

data-parser -> bundles base-parser and all plugins
csv-parser -> bundles base-parser and csv-plugin
json-parser -> bundles base-parser and json-plugin

While this would increase the number of packages, one would keep the option to just include a single package.

In general I agree with your proposed package structure. I think as well that we should provide all packages for maximum flexibility and convenience.
But how would the following use case be handled: As a user I want to parse CSV, JSON, and my custom data format in my application. Should I install the packages base-parser, csv-plugin, and json-plugin and write my own custom-plugin. Or should I install the data-parser package and I am able to inject my own custom-plugin? So the actual question is: Should it be possible to extend data-parser or all *-parser libs with a custom parser plugin, or should this be only possible for the base-parser?
Additionally, the complexity of the monorepo would increase. So maybe we should think about introducing more/better monorepo tooling, e.g. for better changelog management and publishing. I think np works for single packages only, so a different tool might be nicer.
Furthermore, we should reconsider how/where to publish these packages. Should all of them get published under the "@lukaswagner" namespace? We could introduce a NPM organization that owns all of these packages (NPM organizations with public packages only are free). In that case we might also want to use a custom GitHub organization with the same name (I believe, this would be free as well).

Sorry for the late reply, I thought I already replied to this.
IMO every parser should be able to be extended by a plugin. I cant really think of a downside to this. The specialized parsers could be simple wrappers that subclass the base parser and register the plugin:
class JsonParser extends BaseParser {
    public constructor(options: Partial<LoaderOptions>) {
        super(options);
        this.registerPlugin(require('json-plugin'));
    }
}

This way, both approaches are supported: Starting with the base parser and adding all required plugins, or using a pre-configured parser and adding what's missing for your use case.
Regarding the monorepo structure: Yeah, I believe you're right. With the current setup, the increased number of packages would become quite annoying to handle.
Yes, these packages should be published under their own namespace. We should choose a name which is still available both as a package and namespace. This way, the full parser could be made available as a non-namespaced package. I'm not sure if we need to create a separate GitHub organization, though.

Another question then: How would you realize automatic format detection? Given the case: I have a parser with multiple loader plugins (e.g. CSV and JSON). Would the parser try to load the data with every plugin and choose the successful one or should the user pass an identifier for the plugin they want to use?
To give some pointers for useful monorepo tools: For general monorepo management Nx or Turborepo are probably the best choice. For versioning and changelogs the tool changesets could be nice. I have no practical experience with these packages yet, but I would choose them for my next monorepo project.

Interesting question, hadn't thought about this thoroughly yet.
There should always be the option for the user to request a plugin when adding a data source. The least intrusive way of adding such an interface seems to be allowing _options.dataSources to store DataSources alongside a plugin choice:
type ExtendedDataSource = DataSource | { plugin: string; dataSource: DataSource };

This would allow keeping the simple interface, but also providing the option to choose a plugin.
For now, I wouldn't invest too much time into a elaborate format detection, as this is prone to be outdated when different plugins are added. Regardless, some thoughts on options:

filename/URL regex check: The most simple option would be each plugin providing a regex (or array of regexes) for supported sources. This works for file uploads and URLs.

/\.(c|t)sv$/ for CSV/TSV (or even /\..sv$/ or /\.txt$/, but these could lead to false positives)
/\.json$/, /docs\.google\.com/ and /onedrive\.live\.com/ for JSON

content-based check: Much more complicated. file-type seems to be a helpful lib that supports passing only the start of the file, but it doesn't support csv nor json.

A decision on the used plugin should be made before parsing begins. Parsing a data source with multiple plugins and choosing afterwards defeats the focus on performance IMO.

Regarding tooling: From a quick look, Nx seems to be the more mature of these projects, in addition to claiming to have more features. So I'd probably prefer this.
On changesets: Not sure if this is necessary. But I said the same about monorepo managing tools earlier... so I guess we could try it.


more actions for deployment of docs

Push docs present in master/main branch here:
https://c2sm.github.io/spack-c2sm/latest/
Push docs for a tag (i.e 99.99) here:
https://c2sm.github.io/spack-c2sm/99.99
The action only works if the tag is created through the GitHub webpage as a release:
https://github.com/C2SM/spack-c2sm/releases
I anyway use to create tag through this interface.

The action only works if the tag is created through the GitHub webpage as a release that's even better 👍


longitude and latitude values from MySQL lost 4 digitals of precision when indexing into ES

I'm not sure whether this is my mistake or the river plugin intends to do this.
I have a self-defined geo_point field named coordinate and I'm importing the values from MySQL as coordinate.lon and coordinate.lat. They look like

coordinate.lon
coordinate.lat

112.849227
-20.263292

162.461695
-15.382983

However, when they are indexed into ES, all the values has been rounded like

coordinate.lon
coordinate.lat

112.84
-20.26

162.46
-15.38

I've tried to index values with longer decimal into ES by sending http requests manually, it succeed to store them. Is there any way to keep more accurate value from MySQL using this river plugin?

Yes, you can adjust with scale and rounding parameter.

Thanks @jprante
You really solved our problem!


Quick fix doesn't show add import option when it should

Quick fix doesn't show add import option when there is an import option. Intelisense shows the auto-import. This happens in a simple React, Webpack, Javascript app.

Version: 1.40.0-insider (user setup)
Commit: 3f6ed25939b8ef157a7a41e0dc43b517898d4005
Date: 2019-10-15T05:26:38.861Z
Electron: 6.0.12
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18990
Steps to Reproduce:

Create simple react app (create-react-app)
Create a class
Use that class in another file without importing with intelisense
Try to use quick fix to import it

Does this issue occur when all extensions are disabled?: Yes

Try creating a simple jsconfig.json at the root of your project:
{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es2016",
        "jsx": "preserve"
    },
    "exclude": [
        "node_modules",
        "**/node_modules/*"
    ]
}


-w flag doesn't register file changes inside virtual box

Using nodeJS v0.10.37 and forever 0.15.1. Running forever start -w app.js completely ignores any changes I make to app.js. I've tried specifying relative path, absolute path, using --watchDirectory=, --watch true, etc. etc.
The only way I could get the file to register was by specifying forever --watch true start app.js, on my macbook itself (rather than the virtualbox I was using). That registered the file changes correctly, allowing me to continue work. However, nothing seems to work on the virtualbox (Ubuntu 14.04).

I'm observing the same issue when running forever on a docker container with Ubuntu 14.04
node version: 0.12.7
forever version: 0.15.1
It works fine on my mac.

Initially I thought the problem could be caused by the fact my app was running inside a docker container.
However, I was able to reproduce by simply creating a virtual box centos VM and doing a NFS share with my mac.
If I modify the files through my mac forever doesn't restart the process, if I modify the files inside the VM forever restarts the process.
Could this issue be related to the fact that forever is not receiving any file change events from the mac since they are not being bubbled up to the VM?
Anybody have tried a different hypervisor, maybe vm-ware fusion or parallels?
@indexzero since chokidar is the lib watching the file system for changes, should this ticket be moved to their issue tracker?

 It can be simply solved by polling. And forever-monitor supports polling. But unfortunately for now forever depends on the old version of forever-monitor without polling support. So it can be solved by migrating forever to forever-monitor 1.7.0 or by using pm2 which is also supports polling.

Closing this due to it being answered a long time ago.


fix: show arrayField error message in non-edit mode

Issue #, if available:
Description of changes:
Have errors on ArrayFields show up even when not in editing mode.
Integ test included.
Additional change - refine validation behavior for Autocompletes - refresh validation onSelect.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #900 (911e5bc) into main (e6ebec3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #900   +/-   ##
=======================================
  Coverage   93.03%   93.04%
=======================================
  Files         117      117
  Lines        5028     5030    +2
  Branches     1480     1478    -2
=======================================
+ Hits         4678     4680    +2
  Misses        329      329
  Partials       21       21

Impacted Files
Coverage Δ

...-react/lib/forms/form-renderer-helper/all-props.ts
100.00% <100.00%> (ø)

.../forms/form-renderer-helper/event-handler-props.ts
98.91% <100.00%> (+0.02%)
:arrow_up:

...b/forms/form-renderer-helper/render-array-field.ts
100.00% <100.00%> (ø)

...s/codegen-ui-react/lib/react-component-renderer.ts
100.00% <100.00%> (ø)

...-ui-react/lib/utils/forms/array-field-component.ts
100.00% <100.00%> (ø)

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 e6ebec3...911e5bc. Read the comment docs.


[Release] Bumped ibm_mq version to 1.0.0

Codecov Report

Merging #2708 into master will decrease coverage by 9.24%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master   #2708      +/-   ##
=========================================
- Coverage   84.64%   75.4%   -9.25%
=========================================
  Files         652      10     -642
  Lines       37405     248   -37157
  Branches     4494      16    -4478
=========================================
- Hits        31662     187   -31475
+ Misses       4418      56    -4362
+ Partials     1325       5    -1320


feat: 🎸 (sonic.go): Add none implement for !amd64 arch

✅ Closes: #301

@AsterDY  Would you mind taking a look? Thanks!


Allow editor width to be adjusted

Making the following change to limiter makes the editing experience much nicer. It would be cool to allow this to be toggled, fixed vs dynamic width
.containment, .limiter {
position: relative;
/* width: 90%; */
margin: 0 100px;
}

Could you please post screenshots of this proposed change as running on laptops, tablets, and phones.

I think the current setting of max-width: 1000px is an improvement, and I think having a button to toggle between fixed and fully fluid width would add unnecessary UI. Metadata editor is also more expansive as of #933.


Switch to current sphinxcontrib-bibtex

What changes does this PR introduce?
Change version requirement for sphinxcontrib-bibtex from '<2' to '>=2'.
What is the current behaviour?
conda install --file=doc/requirements.txt fails in some situations.
What is the new behaviour
conda install works.
Does this PR introduce a breaking change?
The docs will no longer build with sphinxcontrib-bibtex < 2.0.0 as the configuration options have changed.
Other information:

sphinxcontrb-bibtex version 2.1.0 or higher is required to avoid running the html build twice.
current sphinxcontrib-bibtex (version 2.3.0) does not support citations in figure or table captions, so the 3 currently in the manual were removed.

Suggested addition to tag-index
o doc:

require sphinxcontrib-bibtex 2.0.0 or higher

@jahn, works for me (too). I suggest to add something like this recipe for creating an environment to the manual, because it avoids compromising existing python installations.
cd MITgcm
conda create --name mitgcm_build_the_docs --channel conda-forge --file doc/requirements.txt
conda activate mitgcm_build_the_docs
[...] # do the work
conda deactivate

with a little explanation. What do you think?

Good idea.  I've included this in place of suggesting miniforge and have updated the text.  Feel free to improve it!

Looks good. I think this "minimal" explanation should be good enough (We don't really want to give full conda install instructions, do we?).

I think that's what we agreed on a while ago.  The linked Anaconda page has a "Get Started" button right there (2 actually!).

We could include links to miniconda and miniforge so as to not steer people too much toward a full Anaconda install...

We could include links to miniconda and miniforge so as to not steer people too much toward a full Anaconda install...

Makes good sense to me. Maybe we could say something like If you dont already have conda installed, then we might recommend miniconda (you should not need full conda) ...

I'm not having luck with the new recipe; references are broken, chapter 13 empty, despite following the steps and my mac showing the virtual environment active.

I'm not having luck with the new recipe; references are broken, chapter 13 empty, despite following the steps and my mac showing the virtual environment active.

@jrscott you seem to be the perfect guinea-pig for this type of stuff. Where does it go wrong? I am having no issues at all (with the recipe for creating a separate environment mitgcm_build_the_docs). I remove my existing environment, then do
cd MITgcm
conda create --name mitgcm_build_the_docs --channel conda-forge --file doc/requirements.txt
conda activate mitgcm_build_the_docs

by cut an paste, clean the _build directory and make html. This is what I get:
doc (doc-bibtex-version)> make clean
Removing everything under '_build'...
(mitgcm_build_the_docs) bkli04m001::doc (doc-bibtex-version)> make html
Running Sphinx v4.0.2
making output directory... done
checking for /Users/mlosch/MITgcm/MITgcm/doc/manual_references.bib in bibtex cache... not found
parsing bibtex file /Users/mlosch/MITgcm/MITgcm/doc/manual_references.bib... parsed 211 entries
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 85 source files that are out of date
updating environment: [new config] 85 added, 0 changed, 0 removed
reading sources... [100%] utilities/utilities
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] utilities/utilities
generating indices... genindex py-modindex done
highlighting module code... [100%] MITgcmutils.ptracers
writing additional pages... search done
copying images... [100%] software_arch/figs/size_h.png
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build/html.
(mitgcm_build_the_docs) bkli04m001::doc (doc-bibtex-version)>

all everything looks good, including the references. Same for "make latexpdf".

I interpreted this

We could include links to miniconda and miniforge so as to not steer people too much toward a full Anaconda install...

Makes good sense to me. Maybe we could say something like If you dont already have conda installed, then we might recommend miniconda (you should not need full conda) ...

as adding a reference to miniconda or miniforge, but not add this alternative option. Once miniconda/miniforge is installed, using the environment method appears to me to be the safest method anyway (and it doesn't matter if you are a python user or not, since it is really only cut and paste). I'll add the links to the first description and @jrscott can decide if we keep the second option.


Single Container View: truncate ID

Truncation Id inside of NewSingle() doesn't work.
It even doesn't have any effect.
Instead truncate the ID inside of NewMeta() call

looks good; thanks @stokito !


Don't call filter() unnecessarily

Supplier declarations don't have any depends dependencies in content, so the call to filter here doesn't achieve anything.

Filter also runs questions through Jinja/markdown now, so in order to avoid any errors if the questions change we try to call it everywhere now. This line might be something @pcraig3 and I added when we were working on the content-loader templating.

Ah right, OK.  This was prompted by finding a bunch of tests in the buyer frontend (service presenters) that called filter({}) on service listings and then ended up testing nothing because all service questions have a depends on lot... and so all get removed by an empty filter.

@TheDoubleK yeah, that sounds like our fault when we were adding .filter calls everywhere. Did the tests get fixed?

Yep the test fixes are merged already.  I just went back afterwards to remove any other apparently unnecessary ones from code (there were only two uses of a filter({}) - one here and one in the buyer frontend).


No "Element is missing end tag" error when using hybrid mode

Description
In the <template> section of .vue files, I don't get "Element is missing end tag" errors by the LSP if I use volar in hybrid mode. They are displayed if hybrid mode is disabled.
Other errors like wrong variable names are displayed in both configurations.
More Info
Volar version: 2.0.17
Editor: Neovim with Volar integration via  lspconfig
Faulty configuration (hybrid mode enabled)
local lspconfig = require('lspconfig')
lspconfig.tsserver.setup({
    init_options = {
        plugins = {
            {
                name = '@vue/typescript-plugin',
                location = '<location>',
                languages = { 'vue' }
            },
        },
    },
    filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
})
lspconfig.volar.setup({})

This results in:

Working configuration (hybrid mode disabled)
local lspconfig = require('lspconfig')
lspconfig.tsserver.setup({
    init_options = {
        plugins = {
            {
                name = '@vue/typescript-plugin',
                location = '<location>',
                languages = { 'vue' }
            },
        },
    },
})
lspconfig.volar.setup({
    init_options = {
        vue = {
            hybridMode = false,
        },
    },
})

This results in:

I cannot reproduce this with same config.

are you running same volar and ts plugin under same version?

I have the same config as OP, but I don't get "Element is missing end tag" with either Hybrid mode on or off.

hybrid mode should not matter at all as it's purely provided by vue-language-server, e.g. I can get that error even without javascript support (hybrid mode on, tsserver disabled)

Could you check the lspinfo and lsplog to see if there has any error/warnings?

Could you check the lspinfo and lsplog to see if there has any error/warnings?

I don't see any errors or warnings there.

To isolate the issue, I've created the following minimal Neovim configuration that I can reproduce the issue with:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  { "neovim/nvim-lspconfig", lazy = false },
})

local lspconfig = require("lspconfig")
lspconfig.tsserver.setup({
  init_options = {
    plugins = {
      {
        name = "@vue/typescript-plugin",
        location = "/home/b-erhart/.local/share/npm/lib/node_modules/@vue/typescript-plugin",
        languages = {"javascript", "typescript", "vue"},
      },
    },
  },
  filetypes = {
    "javascript",
    "typescript",
    "vue",
  },
})
lspconfig.volar.setup({})

To use this config, move your neovim config and data folders to a different location (on Linux these are ~/.config/nvim and ~/.local/share/nvim respectively). Then create a new init.lua and paste the config above. Make sure to adjust the TS plugin location.
Maybe you can reproduce the issue with this configuration (+ Volar and TS plugin version 2.0.17) @RayGuo-ergou?

I probably know where's the issue is. I am running nightly neovim:
vim -v
NVIM v0.10.0-dev-3135+g7acf39dda
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

It might be new vue-language-server uses lsp event 0.9.5 does not support yet.
Can you guys try with nightly neovim and see if the problem solved? ( download binary problem the quickest way)

Maybe you can reproduce the issue with this configuration (+ Volar and TS plugin version 2.0.17) @RayGuo-ergou?

Lazy to do things here and there to make this config working, but I tried with nvim.kickstater ( should be minimal enough) and still cannot reproduce this.

My best guess as mentioned above is neovim version

Can confirm, using the nightly version of Neovim solves the issue.

Thank you very much for your support @RayGuo-ergou :)

when I use map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move Down" }) to move the html block, it happens frequently


deprecation of genericLSTM

I have seen that in the last version genericLSTM has been "softly" deprecated. Could you please explain me the reason why this choice has been made?

I've run a lot of benchmarks that have shown that (1) peephole optimizations don't help (and usually hurt), and (2) any other choice of non-linearity other than the default one performs considerably worse.
I'll publish that as an Arxiv tech report soon.

Is the arxiv link of your tech report available now?

I got publication clearance, but it's not quite out yet. I'll try to push it in the next few days.

Thank you!  Have you ever try to push a GPU version of LSTM since the community seems to have more interests in the RNN field?

I'm planning on GPU support via Eigen;  however, that will still be a few months before the necessary dependencies are out.

@BestSonny, here it is:
Benchmarking of LSTM Networks
Thomas M. Breuel
http://arxiv.org/abs/1508.02774

Thank you！

@tmbdev , mshadow may be a strong alternative to Eigen. Both cxxnet and mxnet are built upon it.

Thanks. Looks like Eigen and mshadow have similar goals. Is there any performance data comparing the two?

@tmbdev , mshadow has very detailed tutorials and other documentations including multi-GPU support while Eigen documents almost nothing related to GPU on its official website.
More importantly, mshadow exploits the powerful NVIDIA cuDNN library. It's impossible for Eigen to catch up mshadow in performance on GPUs.


Docs: decide on meta information for the documentation page

Followup to #1412.
Several pieces of metadata for the API docs page have good enough placeholders but we should decide on the proper things to use. This includes but is not limited to:

Window title (ie, the text that appears in the browser title / tab bar for the page)
Page title (ie, the first line of text on the page)
The logo to use
The proper "homepage" URL to refer back to the Automate project with.

Some of this is contained in the metadata static file:
https://github.com/chef/automate/blob/master/components/automate-chef-io/data/docs/api-static/00-meta.swagger.json
The window title is defined in the html file that loads redoc:
https://github.com/chef/automate/blob/master/components/automate-chef-io/layouts/_default/data-api.html

for window title, i think Chef Automate API Documentation would be cool
for the logo, it would be cool to do a modified version of the Chef Automate logo with the additional text of API Documentation similar to what is done on our release dashboards, or what was done for the beta version of automate 2

oh also..

the logo desperately needs some white space around it
and ive got feelings about interacting with the logo sending them to a totally different website, the general ux pattern is for it to send you to the landing page which i think should be /docs/api/

https://github.com/chef/automate/pull/2246/files updates the window title and page title, but nothing else.
can someone from ux create the logo with the "API Documentation" part added?

Wanted to note that the current logo works in Chrome but not in Firefox.
Chrome:

Firefox:

@susanev I don't know if getting the current logo to work is worth the effort if we're looking to replace it, but I wanted to point out that there might be some issue with file formats going on with redoc and logos.

I got curious about the logo thing again and poked at it a bit, apparently using svgs in firefox is a known issue (https://github.com/Redocly/redoc/issues/1048) but I did not understand the proposed solution.

are you seeing the firefox thing locally? i was gonna try and fix it but then realized that the logo is showing for me locally. so i think i just happened to fix this when i fixed the white space around the logo in #3422

yall think we can close this? or do we still want to do some more things for this?


Forward on admin lobby refresh

"Admin left lobby" warning is working if the admin fully closes the browser. On refresh, the participants get no warning but are forwarded to index only.

possibly connected to https://developers.google.com/web/updates/2017/03/dialogs-policy
"If alert() is called from a background tab, the call returns immediately"
Since it's also not that nice I'll replace it with like the ones shown on page load


"Error copying" on Windows Creator Update

I'm trying to run uwpdumper and receiving the attached error. This is on a system running Windows 10 version 1703, with a fresh copy of Halo 5 Forge downloaded and installed.
No matter what I do, I always get the same error. I have tried taking ownership of the WindowsApps folder (which I can now browse, but not modify). The permissions on the AppData\Local\Packages folder seems fine, UWPDumper is able to create a few files (see second attachment) but it always bombs out at exactly the same place. I tried commenting out the return statement (return EXIT_FAILURE) to see if it'd continue dumping files regardless, but it just creates a whole lot of empty folders and nothing else gets decrypted.
Is UWPDumper still working these days? Or did Microsoft patch things so it wouldn't work? Oddly enough, I have a friend who successfully ran the tool in the past 24 hours and he had no problems whatsoever. I've tried reformatting this system twice now and re-installing H5F both times, and I've even tried compiling UWPDumper from source (using MSVS2017). I always get the same error.

Nevermind, it seems like the patch mentioned in this issue fixed it:
https://github.com/Wunkolo/UWPDumper/issues/2
Oddly enough, the version in the develop branch doesn't work- it just errors out on everything, and creates a bunch of 0kb files in the process. For whatever reason, Bennett's patch worked fine though.

I'm currently having this issue on Windows 10 version 1709 (Build 16288.1), I tried the patch mentioned but then I get
Remote thread wait timeout: Unable to find target thread
Same result when using the dev build with or without the patch.

I got that issue with a debug build + the patch
However, a release build + the patch + running as admin works perfectly (just dumped Cuphead)


feat: Allow Enum for SelectBone-values and implement Users status as Enum

Often I've something like:
class MySkel(Skeleton):
    status = SelectBone(
        descr="Status",
        values={
            "active": "Active",
            "disabled": "Disabled",
            "pending": "Pending",
        },
    )

Than I do something:
skel = MySkel()
if skel["status"] == "pending":
    # do some magic
    ...
    skel["status"] = "active"

But this is very vulnerable for typos and bad for refactoring.
Therefore I implemented the support of an Enum for SelectBone values.
As the first usage I implement the User status as Enum.

Hey @sveneberth thank you for this PR. But I think your code is not backwards compatibility when i have old code like this
cuser = current.user.get()
if cuser["status"] == 10: # This will fail
	print("ok")
if cuser["status"] > 10: # This will crash
	print("ok")

But I think your code is not backwards compatibility when i have old code like this

Hmm. Indeed, this is not 100% downward-compliant. However, the question is how many projects really access the status or if the amount of customization would be justifiable.
Let's best talk about it in the ViUR-meeting.
Otherwise we can reduce this PR for the time being only to the optional Enum functionality and replace this in the UserSkel at a later release with other breaking changes.

But I think your code is not backwards compatibility when i have old code like this

Hmm. Indeed, this is not 100% backwards compatible. However, the question is how many projects really access the status or if the amount of customization would be justifiable.

This problem is solvable!
You can define the Status enum this way, to resolve @ArneGudermann's annotated problem:
class Status(enum.Enum):
    WAITING_FOR_EMAIL_VERIFICATION = 1  # Waiting for email verification
    WAITING_FOR_ADMIN_VERIFICATION = 2  # Waiting for verification through admin
    DISABLED = 5  # Account disabled
    ACTIVE = 10  # Active

    def __eq__(self, other):
        return self.value == other

    def __ne__(self, other):
        return self.value != other

    def __lt__(self, other):
        return self.value < other

    def __gt__(self, other):
        return self.value > other

    def __le__(self, other):
        return self.value <= other

    def __ge__(self, other):
        return self.value >= other

The much smarter solution would be to provide a CompareableEnum-class in the SelectBone module, implementing this functionality, and let Status inherit from this one. This allows to use the feature if wanted, and generalizes it as far as possible.

This problem is solvable!

Yeah, of course it is :smiley:
Sooner or later this should be adjusted anyway. Just like assignments like user_skel["status"] = 10.
I don't really care. But I don't think that every change to components should be backwards compatible if it doesn't belong to the standard API area. It all just bloats the code unnecessarily.

Sooner or later this should be adjusted anyway. Just like assignments like user_skel["status"] = 10. I don't really care. But I don't think that every change to components should be backwards compatible if it doesn't belong to the standard API area. It all just bloats the code unnecessarily.

Hello rage-mode-sven!
Why not simply apply my proposal? I don't think that 19 lines of code (including empty lines) bloat something when it is fully backward-compatible. In viur-core 3.x we should be backward-compatible as much as possible. This is important for projects acceptance and fun, also in very, very tiny communities. Any maybe, the possibility to compare for lower might be useful, so why not offer it?
Please just add my proposal from above to your PR and it can be merged, as it is a nice extension. Thanx.

Hello rage-mode-sven!
Why not simply apply my proposal? I don't think that 19 lines of code (including empty lines) bloat something when it is fully backward-compatible. In viur-core 3.x we should be backward-compatible as much as possible. This is important for projects acceptance and fun, also in very, very tiny communities. Even, maybe, the possibility to compare for lower status values might be useful, so why not offer it using the proposed CompareableEnum-class to inherit from?
Please just add my proposal from above to your PR and it can be merged, as it is a nice extension. Thanx.

All right sir maintainer @phorward. As commanded I have made the changes.


Chalk: panicked at 'not implemented'

use std::thread::spawn;
fn it_works() {
    let x = spawn(|x| {});
}

The thread closure doesn't take any arguments, so this is code that doesn't type check, however rust-analyzer/chalk shouldn't panic in this case.
thread '<unnamed>' panicked at 'not implemented', /home/cynecx/dev/chalk/chalk-solve/src/clauses.rs:60:40
stack backtrace:
   0: std::panicking::begin_panic
   1: chalk_solve::clauses::push_auto_trait_impls
   2: chalk_solve::clauses::builder::ClauseBuilder<I>::push_binders
   3: chalk_solve::clauses::program_clauses_for_goal
   4: chalk_recursive::recursive::Solver<I>::solve_new_subgoal
   5: <chalk_recursive::recursive::Solver<I> as chalk_recursive::solve::SolveDatabase<I>>::solve_goal
   6: <chalk_recursive::recursive::RecursiveSolver<I> as chalk_solve::solve::Solver<I>>::solve_limited
   7: hir_ty::traits::trait_solve_query
   8: salsa::runtime::Runtime::execute_query_implementation
   9: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  10: salsa::derived::slot::Slot<Q,MP>::read
  11: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::try_fetch
  12: <DB as hir_ty::db::HirDatabase>::trait_solve::__shim
  13: <DB as hir_ty::db::HirDatabase>::trait_solve
  14: hir_ty::infer::InferenceContext::resolve_ty_as_possible
  15: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
  16: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
  17: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::check_call_arguments
  18: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
  19: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
  20: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
  21: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
  22: hir_ty::infer::infer_query
  23: salsa::runtime::Runtime::execute_query_implementation
  24: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  25: salsa::derived::slot::Slot<Q,MP>::read
  26: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::try_fetch
  27: <DB as hir_ty::db::HirDatabase>::infer_query::__shim
  28: hir_ty::db::infer_wait
  29: hir_ty::diagnostics::validate_body
  30: hir::code_model::Module::diagnostics
  31: ide::diagnostics::diagnostics
  32: std::panicking::try
  33: ide::Analysis::diagnostics
  34: rust_analyzer::handlers::publish_diagnostics
  35: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  36: <alloc::vec::Vec<T> as alloc::vec::SpecFromIter<T,I>>::from_iter
  37: <F as threadpool::FnBox>::call_box

rust-analyzer: e5f252ade72fee4776396122dc91a17ddc185a66
@flodiebold?

Weirdly I can't seem to get this to panic in a test.

@kjeremy I am also using rust nightly and I can reproduce this quite deterministically (I am just pasting that snipped in an empty vscode text editor with rust-analyzer being enabled).

To clarify: I can reproduce this in vscode. but when I put it in as a #[test] it doesn't panic.

I can also reproduce this in a #[test] (also in vscode):

Screen recording

Right. I should have specified... I was expecting this to panic:
    #[test]
    fn blah() {
        check_diagnostics(
            r#"
            use std::thread::spawn;
            fn it_works() {
                let x = spawn(|x| {});
            }
            "#,
        );
    }

Anyway this is definitely a valid issue.

Tests in rust-analyzer don't load the sysroot by default to make them faster.

A more standalone reproduction code:
pub fn spawn<F, T>(f: F) -> !
where
    F: FnOnce() -> T,
    F: Send + 'static,
    T: Send + 'static,
{
    todo!()
}

fn test() {
    let x = spawn(|x| {});
}

cc #6120

cc https://github.com/rust-lang/chalk/issues/621
fix: https://github.com/rust-lang/chalk/pull/622

Now that the fix in Chalk has been merged, you can git apply this patch in order to get rust-analyzer to be usable again: https://gist.github.com/Ameobea/ed01812726b2a20f818194da4d1134dc
Hooray, I can write code again


CKEditor malfunctions with shortcodes following Markdown < symbol

Resource link's Studio UI breaks when they follow the < symbol.
Expected Behavior
CKEditor shows shortcode resource link UI for added links.
Current Behavior
CKEditor either does not show resource link UI or shows a HTML code equivalent of the shortcode. For example,

Steps to Reproduce

Create a page.
In markdown add <.
Add a resource link via "Add Link" UI after the symbol.
Click save.
Open the saved page. Notice the broken (or completely disappeared) shortcode.

Examples
< -add link-

0 <= N <= 1000

-add link-

Possible Solution
We probably need to update the CKEditor plugin that parses shortcodes into CKEditor UI components.
Additional Details
Discovered in https://github.com/mitodl/hq/issues/3825

@ChristopherChudzicki any quick takes on this?

I don't have any immediate insight regarding the root cause. Some thoughts:
Workarounds: The author could use mathjax for an immediate workaround. (Or possibly use inline code, 1 < 2, if it's appropriate in the context of the course. Inline code seems to work OK.)
Shortcodes aside, something weird is going on with <. See video below. I initially enter <, but end up getting \\\\\< after a few saves. This is without any shortcodes.
https://github.com/mitodl/ocw-studio/assets/9010790/bc8876ce-e891-4953-87e8-245df0747f52

I don't have any immediate insight regarding the root cause. Some thoughts:
Workarounds: The author could use mathjax for an immediate workaround. (Or possibly use inline code, 1 < 2, if it's appropriate in the context of the course. Inline code seems to work OK.)
Shortcodes aside, something weird is going on with <. See video below. I initially enter <, but end up getting \\\\\< after a few saves. This is without any shortcodes.
less_than_great.mov

For some reason your example (without shortcodes) only works if we don't have any embedded images (also videos, I think) in the bottom.
If you have plain editor (without any added links), and an embedded picture in bottom, then your example won't work.
It will always work without the picture.

One thing with embedded picture is, if they're in the end, they always add an extra newline in the bottom.
But if we have it in top, then the text breaks up.

But as long as we have in bottom (even if we have on top), then it does not break up.
And normally, if you try to have extra newlines in the end, when you save it, CKEditor removes all those lines, and uses only the lines where we have text, and that's also when the lines start appearing.


[OPTIMIZER] Fix layout error after backward remat

Fixes pytorch/pytorch#130101
In the linked issue getConvertBackwardSlice is returning a slice that requires two different layouts for the same operation, which isn't supported. There is a guard that checks layouts.find(currentValue) and bails out when this doesn't match, however this check came after the visited check so we would skip the queue item before we ever got to the check.
To fix this I change the visited check to only apply if the current (value, encoding) pair has been enqueued previously and apply this uniformly to everywhere we want to update a layout.
The reproducer is admittedly long, but I was able to reduce it down to the exact slice that was triggering the failure.

The reproducer indeed seems too long

I tried crafting a simpler repro by hand, but it's quite hard to get a simple example that's also suitably complex to not get simplified away in the preceding steps of the remove-layout-converions pass.  If you have any suggestions I would be open to trying them.

What I tried previously is randomly picking up operations to remove from the original PR. Starting with the most suspicious ones. I agree it takes time, so I won't oppose it if the reproducer cannot be truncated in the end.


quickstart/matrices: 2D constrained/bound array of reals/doubles

I tried to adapt the 2D case removed from #6. Unfortunately, as simple as it seems, the content is not correct: https://github.com/umarcor/ghdl-cosim/runs/591101172?check_suite_focus=true#step:4:12
0: 00.500000 00.600000 00.700000 00.800000 00.900000
1: 01.500000 01.600000 01.700000 01.800000 01.900000
tb.vhd:30:7:@0ms:(report note): 0: 5.0e-1
tb.vhd:30:7:@0ms:(report note): 1: 6.0e-1
tb.vhd:30:7:@0ms:(report note): 2: 1.5
tb.vhd:30:7:@0ms:(report note): 3: 1.6
tb.vhd:30:7:@0ms:(report note): 4: 1.7
tb.vhd:30:7:@0ms:(report note): 5: 1.8
tb.vhd:30:7:@0ms:(report note): 6: 1.9
tb.vhd:30:7:@0ms:(report note): 7: 0.0
tb.vhd:30:7:@0ms:(report note): 8: 0.0
tb.vhd:30:7:@0ms:(report note): 9: 0.0

GHDL should print 0.5, 0.6, 0.7, 0.8, 0.9, 1.5, 1.6, 1.7, 1.8, 1.9.

More fun under the sun. I'll have a looksie too! :)

Doubles are 64bit. Cast as int64_t?

double* getMatPointer(){
  return (double*)matrix;
}

sort of did it for me

I added an assertion to check sizeof(double). Just in case, I used double* instead of uintptr_t. I still get the same result: https://github.com/umarcor/ghdl-cosim/pull/10/checks?check_run_id=591129643#step:4:11

Ok. Actually working fix.
for ( i=0 ; i<size[0] ; i++ ) {
    printf("%d: ", i);
    for ( j=0 ; j<size[1] ; j++ ) {

Ouch. Thanks a lot!  I will try to document this transposition details carefully. I keeping hitting the same stone again and again...

That's a familiar problem this side too XD no worries.
In particular I had it come up when dablling with the original ghdl.h and getting matrices across. Will be nice to make a neatly printing Matrix example. Maybe this will have to just that. Really print it nicely in both C and VHDL. Will fiddle around here too

@RocketRoss, I think this is ready. As you'll see, I added an subexample to combine/extend/improve an existing VUnit example with VHPIDIRECT. Would you mind having a look?

VUnit example with VHPIDIRECT. Would you mind having a look?

Looking....looking... looking like this will take me a moment to understand. Let me install VUnit too!
The sub example will be moved to somewhere else? Or just nicely documented?

Looking....looking... looking like this will take me a moment to understand. Let me install VUnit too!

Sure, you can use the same docker image that is used in CI (ghdl/vunit:llvm), and the same execution command!

The sub example will be moved to somewhere else? Or just nicely documented?

It is already (nicely) documented as a subsection of the "main" example. Well... nice enough. It can be improved. If you checkout the branch, you can run ./doc/make.sh (needs docker) in order to have the docs built locally.

It is already (nicely) documented as a subsection

Oh sorry I had not seem, I did not mean to say that it was not nicely documented.

have the docs built locally

I am just running make html with sphinx installed.

use the same docker image

I am behind on the docker revolution, and prefer a DIY/From-scratch/Barebones/First-principles approach, so I'll look into just stealing the commands from the script! (: May take me longer, but I will get back to you on this!

Oh sorry I had not seen, I did not mean to say that it was not nicely documented.

No problem. Just a friendly pun 😆

I am just running make html with sphinx installed.

Same result.

I am behind on the docker revolution, and I prefer a DIY/From-scratch/Barebones/First-principles approach (😊), so I'll look into just stealing the commands from the script! (: May take me longer, but I will get back to you on this!

Then, installing VUnit is a matter of pip install vunit_hdl. Alternatively, you can clone the repo (recursively) and set PYTHONPATH. The (sub)example is executed as a regular VUnit script: python run.py -v. If you want to launch GtkWave, add -g.

Ok, took me a moment to find the printout of vunit's info() calls...
Before the ghdl simulation my printout seems a little bugged: the main() printout of the matrix comes out as:
0: 00.000000 00.000000
1: 00.000000 00.000000
2: 00.000000 00.000000
3: 00.000000 00.000000
4: 00.000000 00.000000

Don't know what that is about.

@RocketRoss thanks for the careful read!

(even though this kickstarted my vunit knowledge, it was a bit of a dive into the deepend)

Indeed... it's not just "a VUnit example"; it uses some intermediate resources such as the verification components or the integer_array package. However, I believe it fills the purpose of kickstarting user's interest.
Yesterday, I updated the docs after your (legit) concerns, but I fall asleep before pushing... I've now addressed your last review, and I added a couple of images that will hopefully make it much easier to understand.


grails3 override username

Hello,
I would like to override grails.mail.username and grails.mail.password in the file application-development.yml.
In application.yml :
grails:
mail:
username: user
password: pass
In application-development.yml :
grails:
mail:
username: new-user
password: new-pass
I expect, in a development mode, to get new-user and new-pass as values but I only get empty strings.
Can someone explain me why ?
Thanks
Noémie

I have opened the same issue in grails3 issues.
https://github.com/grails3-plugins/mail/issues/21

create a groovy script file named as application.groovy and here is the config :
grails {
mail {
host = "smtp.gmail.com"
port = 465
username =<EMAIL_ADDRESS>password = "password"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"465",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
}
}

if you want the config only on the development then
environments{
development{
            //your config here
    }

}

your last comment have to be in application.groovy ? Because I'd like to get it in another file (application-development.groovy). It is this mechanism that does not work. Do you if it is possible ?

yes its on application.groovy .Write all  your configs inside  development if you choose for development environment.You don't have to make a separate config file for development.

Thanks for your answer. I understand that I can not separate development configuration in a file. I have to put it in the main file. The reason why I want a separate file is because I don't want to commit my development login and pass.

I close this post ; I have put my development configuration in the application.yml as you mentionned above. It is too bad that this plugin does not support the process of application-{env}.yml files. Never mind :)
Thanks for your help !

Hi, just to let know other people in the same trouble, here is the solution we finally found :
In the application.yml, we had :
environments:
development:
locations: ['file:./application-development.yml']
Like this, we are able to put specific development configuration in a remote file that is not commited on our repository.
Hope it will help someone.
Noémie.


where(null, {a: 1, b: 2}) returns true

I'd expect where with null passed as first argument to return false but it returns true.
Is it only me who'd expect this?
Would it be an idea to write a line in the docs (http://ramdajs.com/docs/#where) about what to expect if you pass null as the first argument?
where(null, {a: 1, b: 2}) // returns true

interesting question. It raises some other questions in my mind:

why should this work at all? I would expect it to blow up
why would someone pass a null spec?

The fact that it works at all is not by design, it is an artifact of our keys implementation which returns an empty array when Object(obj) !== obj. This seems reasonable to me. This means that where(null, test) is the same as where({}, test), i.e. true.
I guess what I'm wondering is question 2 above: why would someone do this? Do you have an example of needing to pass null in to where for the spec object?

I was a little surprised to find that it didn't blow up, and had to see the keys implementation to understand it.  But given that it doesn't blow up, this seems the sensible answer.  One way to think about it is that this should be similar to testing with an empty object.  And if that doesn't seem to naturally return true to your mind, think about this example:
var data = [
  {name: 'a', a: 1, b: 1, c: 1},
  {name: 'b', a: 1, b: 1, c: 2},
  {name: 'c', a: 1, b: 2, c: 1},
  {name: 'd', a: 1, b: 2, c: 2},
  {name: 'e', a: 2, b: 1, c: 1},
  {name: 'f', a: 2, b: 1, c: 2},
  {name: 'g', a: 2, b: 2, c: 1},
  {name: 'h', a: 2, b: 2, c: 2}
];

R.filter(R.where({a: 1, b: 1, c: 1}), data); //=> a
R.filter(R.where({a: 1, b: 1}), data); //=> a, b
R.filter(R.where({a: 1}), data); //=> a, b, c, d
R.filter(R.where({}), data); //=> a, b, c, d, e, f, g,h

(See it at http://bit.ly/1HMnPzr.)
This is similar to the mathematical notion of vacous truth, in which all members of a set are said to automatically hold any particular property if that set is empty.
Does this make sense?

I tried the empty object also and the fact that where {}, {a: 1, b: 2, c: 3} returns true is completely what I expected.
I stumbled upon this when I was combining where with find to get the element a user have selected from a list of possible alternatives. Dumbed down example:
render: ->
  selectedObject = find where(@state.selectedObject), possibleAlternatives
  Button selectedObject?.name or 'Please select an object'

(Note that that possibleAlternatives is an array of objects with many keys and @state.selectedObject is an object with less keys).
So, at first render when the user had not selected an object, @state.selectedObject would be null and I'd want the Button to show "Please select and object" but since where null, ... returns true, find where(null), [...] always returns the first item in [...].

I'm not looking to close this right away, but my first inclination is that this will end up as WONTFIX.  The current behavior, even if it came about by happenstance, still seems to me the correct behavior.  The properties of the spec object passed to where represent predicates, and where is simply the conjunction of testing those predicates.
I'm not sure I have a clear enough idea about how your code works to suggest an alternative formulation, but I believe you need to test on whether @state.selectedObject is null rather than on the result of find.  Forgive the JS, I don't know CoffeeScript well:
var render = R.ifElse(R.isNil,
                      R.always('Please select an object'),
                      R.useWith(R.find, R.where, R.identity));

might work.

i also think the current behavior is (accidentally?) correct. I'm closing this issue, but feel free to reopen if you want to fight for it.


Insertion of a chunk of Java code erroneously shown as deletion and re-addition of the whole method

I have modified a Java file by inserting a one-line import at the top, and a chunk of code inside a method. Difftastic shows the whole body of the method being deleted and re-added with the change, and also shows the parameter lists of following methods being deleted and re-added unchanged.
One point of note is that the inserted chunk contains record definitions, which are a relatively new Java feature (Java 14, 17th March 2020). Even if this blows up parsing of the method, i'm surprised it affects the parameter lists of other methods.
The file before: JSONUtilsTest.baseline.java.txt
The file after: JSONUtilsTest.changed.java.txt
Diff according to difft (contains escape codes for colour, use less -R or similar to view): difft.txt
Diff according to diff -u (GNU diffutils 3.6): diffu.txt

Difftastic 0.42.0
rustc 1.67.0 (fc594f156 2023-01-24)
Ubuntu 18.04.6 LTS

Thanks, I've filed this upstream: https://github.com/tree-sitter/tree-sitter-java/issues/136
Handling parse errors gracefully is a really difficult problem. Maybe difftastic should just fall back to textual diffs if there are any parse errors.

I've merged the latest upstream parser, and the test case now does the right thing.


Runtime Enumerate View Node with ArangoSearch too slow

My Environment

ArangoDB Version:        3.11.2
Deployment Mode:       Single Server
Deployment Strategy:   Manual Start
Operating System:        Windows 10
Total RAM in your machine:       16Gb
Disks in use:      SSD

Component, Query & Data
Affected feature: AQL query using web interface
AQL query (if applicable):
FOR i IN search_NLIS
    SEARCH i.Layer == 'hosotiepnhan'
    LIMIT 2000000,1000000
    RETURN i._id

AQL explain and/or profile (if applicable):
Query String (96 chars, cacheable: false):
 for i in search_NLIS
     search i.Layer == 'hosotiepnhan'
     limit 2000000,1000000
     return i._id

Execution plan:
 Id   NodeType            Calls     Items   Filtered   Runtime [s]   Comment
  1   SingletonNode           1         1          0       0.00001   * ROOT
  2   EnumerateViewNode    1000   3000000          0       8.62119     - FOR i IN search_NLIS SEARCH (i.`Layer` == "hosotiepnhan")   /* view query */
  3   LimitNode            1000   1000000          0       0.02120       - LIMIT 2000000, 1000000
  4   ReturnNode           1000   1000000          0       0.00614       - RETURN i

Indexes used:
 none

Optimization rules applied:
 Id   RuleName
  1   handle-arangosearch-views

Query Statistics:
 Writes Exec   Writes Ign   Scan Full   Scan Index   Cache Hits/Misses   Filtered   Peak Mem [b]   Exec Time [s]
           0            0           0      3000000               0 / 0          0        2457600         8.76033

Query Profile:
 Query Stage               Duration [s]
 initializing                   0.00001
 parsing                        0.00010
 optimizing ast                 0.00001
 loading collections            0.00001
 instantiating plan             0.00003
 optimizing plan                0.00011
 instantiating executors        0.00005
 executing                      8.76002
 finalizing                     0.00003

Dataset:
my view size is 52.948.842 documents
Problem:
I see EnumerateViewNode with limit 1.000.000 documents takes 8.62119s . It's too slow. If i query full data with <IP_ADDRESS> documents it takes 69.83329s. Let me optimize runtime for EnumerateViewNode . Thanks all.
Query String (111 chars, cacheable: false):
 FOR i IN search_NLIS
     SEARCH i.Layer == 'hosotiepnhan'
     RETURN i._id

Execution plan:
 Id   NodeType            Calls     Items   Filtered   Runtime [s]   Comment
  1   SingletonNode           1         1          0       0.00000   * ROOT
  2   EnumerateViewNode    5099   5098231          0      69.83329     - FOR i IN search_NLIS SEARCH (i.`Layer` == "hosotiepnhan")   /* view query */
  3   ReturnNode           5099   5098231          0       0.04436       - RETURN i

Indexes used:
 none

Optimization rules applied:
 Id   RuleName
  1   handle-arangosearch-views

Query Statistics:
 Writes Exec   Writes Ign   Scan Full   Scan Index   Cache Hits/Misses   Filtered   Peak Mem [b]   Exec Time [s]
           0            0           0      5098231               0 / 0          0        2818048        70.66804

Query Profile:
 Query Stage               Duration [s]
 initializing                   0.00000
 parsing                        0.00006
 optimizing ast                 0.00000
 loading collections            0.00001
 instantiating plan             0.00002
 optimizing plan                0.00009
 instantiating executors        0.00003
 executing                     70.66808
 finalizing                     0.00002

Let me optimize runtime for EnumerateViewNode

You can open PR.
Also will be nice to see perf data, otherwise difficult to say precisely, but I believe most slowest part (the bottleneck) is materialize from rocksdb
It was improved in devel (3.12) with MultiGet, but I don't think you will see big difference especially on windows
You also can try to make _id stored value, unfortunately compression isn't implemented for iresearch columnstore2, so you will probably bounded by disk throughout


[Redesign] Address high contrast related accessibility issues

#470375
#470376
#470379
And made SVGs better on IE and Edge high contrast.
Note the base branch as this PR depends on PR https://github.com/NuGet/NuGetGallery/pull/4472.

Merged with c51665237be0738f0e40503d2aff29dd932be29a.


Custom Field - Client Area Section

This issue is for collecting all required things on Client area of Custom Field Value Collection
@vinpahilwani , @sureshsirvi
Please make sure you provide / validate all things here for final creation of Module

major objectives

Client can check custom field data
Client can provide different value if whishes, on fields on by one, click on custom field and change value
Client provided data is saved on temporary data, staff needs to approve in order to accept as custom field data
Client can provide note in common, and need to click next to go to next area

I feel in my view , when client is changing field value , we can give note field (optional)
this gives clear understanding to client that why field value is different, and at time of approval from staff this gives clear idea why client has changed value
providing common note will not solve problem as it is not fitting in flow,
Client will change value on by one and click next, common note is not giving clear consent that why it is here, what client need to write in here.
@vinpahilwani , @sureshsirvi both dont require note, so not creating db for this

functionalities

Client can change data of custom field
Client provided data is store temporarily , staff need to approve
Staff need clear view what needs approval, not auto approval is done
staff will get which client has changed value, and can see both current and client provided data
Changing / Editing Custom Field setting will trigger loss of data provided by Client

---------- Discussion brief ----
Date - 31-Jan-23
Topic - Client Area and Custom File / Other sections
We made a flow for a Client who comes to client area by choice, or / and by any possible other channel ie. by email invite, sms, or direct login
Whenever client comes to client area, they should directly land to dashboard,
On dashboard there will be 3 gadget on Work required from Client

Project count gadget - Count of Project where Custom Field Pending, Custom File pending from Client
ie. 3 / 5 Project Requires Attention, the design should take attention of Client on Dashboard that
3 project requires data from client / 5 total project ongoing

Company Count Gadget - Count of companies that requires Custom field / files from clients

Contact Information Gadget - Client required to custom field / file from client
The idea behind this is, he/she (Client) needs to do something, easycloudbooks is asking for a some data from them to complete work on Project / company / contact, this should also give intention to client that, client area also giving other information regularly and encourage client to check work directly on client are without their CA / professional reminding

We have came to conclusion that 3 different gadget should be there for different information for different kind of information what leads to different section of client area

Project page redesign -

remove Stage section from Page, All ongoing project should be here on list page without stage filter, complete , review , finished on finished project page.
Attention required icon should be there on project list, for each project , that should encourage client to click

Clicking on Gadget on Dashboard
Project required count will redirect Project Page, no filter should be applied, attention icon should encourage client to click project

Project Details comes in popover (as comes in staff),
Changes -

1st Tab would be "Activity" tab, with 2 split design
a. Due Dates in 1st section
b. Activity Log - Upcoming module- currently blank - with message "Activity Section Coming Soon"
Custom Field Tab
Custom File Tab
Fees Tab
Output Field
Output File

Output Field / File section will give details only if Payment condition fulfills for Client, OR else will give Message "Documents not available until Payment done"
Fees Tab will show Total Outstanding amount, and Ledger link to open ledger on new browser tab

2nd Tab - Custom Field on Project Page of Client area

Description is needed inline on every Custom Field if present, Description limit is 200 character, input from Custom Field Setting area in Staff area
This will surely increase Custom Field size
Mockup for this will be attached soon

3rd Tab - Custom File on Project Page of Client area

Description is needed inline on every Custom File if present, Description limit is 200 character, input from Custom File Setting area in Staff area
This will surely increase Custom File design size
Mockup for this will be attached soon
This show Field with "input" type only

4th Tab- Fees tab
this tab contains Total Fees outstanding today
also Ledger and Payment Link button will be here to redirect

Payment Requirement for Output Documents

Take new input on Company Contract section "Credit Amount"
this amount of Total outstanding amount will be allowed for client to take output documents from client area.
if Total outstanding is more than "Credit Amount" than Output document module will show Message for Payment

Payment Requirement - other inputs
Payment Working pattern are different for different Clients who use ECB

Project  to Project Payment
Schedule Billing
3.Combine billing - Recurring Services + Per Project billing for some none recurring project

"Output Document" giving possibilities

Give document only if Total Payment is clear
Give Document if particular project payment is done, some outsourcing project or previous project
Hold document for project for which payment is not done

Only giving option bases of Total Billing will create problem for Project to Project , or previous project documents, OR other strategies like Give documents for 5 projects , and Hold Document for 3 Project for which Payment is not clear
Initiated by @mitulpanch
Verified by @sureshsirvi , @vinpahilwani
@sureshsirvi , @vinpahilwani both want option for Total Outstanding only,
Their Points are

Practice of Project to Project billing is not applicable to CA Practice
All professionals want billing first, dont want to give documents for previous project for which payment was clear, as current outstanding is high.
When previous project was completed with Payment, then CAs must have provided documents for that projects , today only think about Current Outstanding

Final Conclusion -
Just want Total Outstanding on Companies,
If someone want payment first then Current Outstanding should be 0 (Zero) for that company, assuming CA always bill current outstanding will be greater than 0, so Client first need to Pay then only output document will be available to download
Above all conditions assumes CA have manually / automatically created invoice for Project ,so ecb can process outstanding amount for Company

Project Timer -
Project Status change timeline is required to show to Client,
this includes Project Start Date, When project is completing, Whether Project is Overdue
This is based on Turn Around time calculation of Service
Mockup coming soon

Mockup -
https://www.berrycast.com/conversations/dd90b276-4f35-5ae9-aa4b-da3633d27ca2

Client Data Validation-
Data changes / files provided by Clients are saved to temporary storage
When files gets approved the file saved to main files
When fields get approved value get copied to main data
When files get rejected they directly Delete, non recoverable
When fields get rejected they delete data, non recoverable

Staff Area - Field Approval Module
single single field approval is not required
Multiple field approval required in single company
Flow -

Staff will get attention icon on list / individual field
on click Approval Module will open for company
where staff can select multiple fields , and approve OR reject selected field values
List contains , Current Value, Client provided Value, and hover for description
Multiple company list for changes is not possible

Changes on MockUp =>
https://www.berrycast.com/conversations/dd90b276-4f35-5ae9-aa4b-da3633d27ca2
Project List =>

Remove Due Date, Project Manager from list
Work Pending => "Action Required", move column to last
Remove Filter
Show only Action Required Project when clicked from Dashboard

Project Details =>

Remove Unique Id
Year => "Period" change text
Project Member => show only 1 project manager with phone number , name
Project time line on top not required
Custom Field Tab => Details Required (Change Text)
Custom File Tab => Files Required (change text)
Output Field => Summary Report (change Text)
Output File => Download Files (change text)

Activity Tab =>

Remove Due Dates
instead create time line of Project

given by @vinpahilwani
verified by @mitulpanch

Company Page =>

Custom Field Tab => "Details" (change Text)
Custom File Tab => "Files" (change text)
Position Tab => Non editable
Balance => New Column

Contact Page =>

Page Name => "Profile" on Menu & title
Custom Field Tab => "Details" (change Text)
Custom File Tab => "Files" (change text)
Position Tab => Non editable

Contract Page =>

Direct on Menu => without submenu
Recurring Service => show selected Services only
Scheduled Billing => "Fees Contract" (change Text), on click open printable version on new browser tab
Per-Project Billing => Not Required
Filter => Not Required
Import Button => Not Required
Everything else none editable

Approved by @vinpahilwani
Verified by @mitulpanch


fixing latest vulnerabilities and fixing npm ci build issue.

Fixing latest vulnerabilities and fixing "npm ci" build issues
🗣 Description
Fixed latest vulnerabilities and fixed "npm ci" build issue impacting developers upon build, due to missing peer dependencies.
Details:

removed legacy peer deps from npmrc to be in synch with the way that npm packages are installed in docker images; use "npm ci" in docker files to avoid installing newer versions of packages than we had intended.
made npm to update to latest version ignoring minor versions.
removed npx forced resolutions since we are using override.
updated some packages to newest stable and secure versions without vulnerabilities.

💭 Motivation and context
General security patching and addressing build consistency
🧪 Testing
Built from scratch and checked functionality of the frontend with no errors, and ran tests.
✅ Pre-approval checklist

[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All relevant type-of-change labels have been added.
[x] I have read the CONTRIBUTING document.
[x] These code changes follow cisagov code standards.
[x] All new and existing tests pass.

@epicfaace, can you please approve?


Update README.md

Add required import of Ecto.Query in the first snippet, and update the version of this package in the installation instructions to 1.0.

Coverage remained the same at 86.207% when pulling f74834ba029c31a41f6ea808c13a1472c75922e5 on thojanssens:patch-1 into cc85ef1014e5d09a0f659b55442d960b1225925e on smeevil:master.


Support additional local protobuf definitions

The protobuf definitions in our Schema Registry contain some references to the Google common protos which are not in the registry, but rather shipped locally with our applications.
It would be helpful if this library allowed loading additional proto definitions to be used when decoding with ProtoDecoder.
It may be possible to do this by hand with protofish and the raw proto decoder,  but it would be helpful if this were baked in.

I know those were added to the Confluent Schema registry, some time after I last changed some things. I think this would indeed be a nice addition.
Tobe sure I understand the problem correctly:
Current behavior: when there is a reference to a Google common proto some error is given. (Something like can't resolve reference).
Wanted behavior: Google common proto definitions are included in the crate, and used when there are references to it.

Hey 👋, thanks for the quick reply. Some more details I should have included when I submitted the initial request. Here are some debug logs when decoding a protobuf message against our schema registry:
[2022-08-05T22:01:41Z DEBUG reqwest::connect] starting new connection: https://myacct.confluent.cloud/
[2022-08-05T22:01:41Z DEBUG reqwest::async_impl::client] response '200 OK' for https://myacct.confluent.cloud/schemas/ids/100023?deleted=true
[2022-08-05T22:01:41Z DEBUG reqwest::async_impl::client] response '404 Not Found' for https://myacct.confluent.cloud/subjects/google/protobuf/timestamp.proto/versions/1
thread 'main' panicked at 'Error getting value: Error: Could not get id from response had no other cause, it's retriable: false, it's cached: false', src/main.rs:44:23

you can see it loaded the initial schema, but then failed finding the Google common one.

Small update, had some trouble getting my local working again. I did added an additional schema to schema_registry_test_app which should make it easy to add the integration test, and work trough how it's working.

For now I just added the types, it was a bit of hassle since there did not seem to be an easy to use crate. So I ended up updating the lexer used to get the imports, and get those schema's so they can be processed. See https://github.com/gklijs/schema_registry_converter/pull/84 feel free to reopen this issue, or add another for other use cases.

👋 Sorry to take so long to finally get back to this. Thanks for adding that set of protos. I'm running into issues with more expected types. Specifically the google "well known types". More specifically I have protobufs that expect google.protobuf.Timestamp which is documented here: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf and the source for which is here: https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/timestamp.proto
I'm not sure if there is a canonical list of these protos or if it's just the other ones mentioned in those docs and littered through that folder in the source code. If it helps any, it does look like the rust protobuf library has some code-gen to generate modules for all of these: https://github.com/stepancheg/rust-protobuf/blob/f7259280e1b64a8bafd505b688d35f93552d0a38/protobuf-codegen/src/gen/well_known_types.rs#L84

Timestamp is included, but only as part of the common type interval. The import thing is if it's supported in Java, which does seems to be the case.
It's all a bit confusing to me, since the 'common types' from the last link, doesn't actually contain the proto's with com.google.type namespace.
Since being compatible with Java is the main goal, if Timestamp, and related ones, indeed work, this can be considered a bug. Adding them will be easy. Please note that this only 'solves' deserializing. For serialization you might also need the protobuf crate.

Ahh yes - I was a little sleepy when posting that last night :-D I did make a little progress this morning. I was able to decode the protobuf in question by making this patch to schema_registry_converter:
diff --git a/src/proto_common_types.rs b/src/proto_common_types.rs
index 9afbee5..f760925 100644
--- a/src/proto_common_types.rs
+++ b/src/proto_common_types.rs
@@ -32,6 +32,7 @@ enum CommonType {
     Quaternion,
     TimeOfDay,
     Type,
+    Timestamp,
 }

 #[derive(Clone, Debug, PartialEq)]
@@ -79,6 +80,7 @@ fn is_common_import(import: &str) -> Option<CommonType> {
         "google/type/quaternion.proto" => Some(CommonType::Quaternion),
         "google/type/timeofday.proto" => Some(CommonType::TimeOfDay),
         "google/type/type.proto" => Some(CommonType::Type),
+        "google/protobuf/timestamp.proto" => Some(CommonType::Timestamp),
         _ => None,
     }
 }
@@ -103,6 +105,7 @@ fn get_schemas(common_type: CommonType) -> &'static [CommonSchema] {
         CommonType::Quaternion => &[CommonSchema::Quaternion],
         CommonType::TimeOfDay => &[CommonSchema::TimeOfDay],
         CommonType::Type => &[CommonSchema::Type],
+        CommonType::Timestamp => &[CommonSchema::Timestamp],
     }
 }

Seems like we're expecting it in a different namespace...

I need to double-check, but I guess the 'other' ones are supported on the Java side. I'll try to add and release a fix next weekend.


sick_safetyscanners_base: 1.0.3-1 in 'rolling/distribution.yaml' [bloom]

Increasing version of package(s) in repository sick_safetyscanners_base to 1.0.3-1:

upstream repository: https://github.com/SICKAG/sick_safetyscanners_base.git
release repository: https://github.com/SICKAG/sick_safetyscanners_base-release.git
distro file: rolling/distribution.yaml
bloom version: 0.12.0
previous version for package: null

sick_safetyscanners_base
* Adding missing includes for ubuntu24 compiler
* Adding dependencies on specific boost libraries, exporting dep to chrono
* Fix Sync example
* Fix read checksums
* UDPPacketMerger: fixing missing include
* Contributors: Carl Morgan, Denis Taniguchi, Lennart Puck, Marco Bassa, Matthias Schoepfer, Rein Appeldoorn, Soren Holm, 张天宇

Updated to ros2-gbp release repo

Unless I bungled the merge conflict this PR can be merged once CI checks clear.


MSVC Demo upgrade to WinSock2.h

Description
Modify the existing MSVC Demos to use WinSock2.h by setting WIN32_LEAN_AND_MEAN in their build files.
Then in relevant files check if WIN32_LEAN_AND_MEAN is defined, if it is include winsock2.h, if it is not then include winsock.h
Test Steps

Checklist:

[x] I have tested my changes. No regression in existing tests.
[x] I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This work was completed as part of #1135. As such closing this PR.


TestRPC on macOS

Run tests (macos-12, 1.21) this test occasionally fails.
2024-02-11T22:34:59.6600300Z         --- FAIL: TestRPC/websocket/sendrawtransaction (1.88s)
2024-02-11T22:34:59.6601530Z             --- PASS: TestRPC/websocket/sendrawtransaction/invalid_signature (0.01s)
2024-02-11T22:34:59.6602770Z             --- FAIL: TestRPC/websocket/sendrawtransaction/too_big_tx (1.10s)

@AliceInHunterland, attach full failing test logs. Testing job logs will be removed in a while.

5_Run tests.txt

Can be related to #3217.

It's i/o timeout:
2024-02-11T22:34:28.0710150Z === NAME  TestRPC/websocket/sendrawtransaction/too_big_tx
2024-02-11T22:34:28.0711850Z     server_test.go:3472:
2024-02-11T22:34:28.0713410Z         	Error Trace:	/Users/runner/work/neo-go/neo-go/pkg/services/rpcsrv/server_test.go:3472
2024-02-11T22:34:28.0715630Z         	            				/Users/runner/work/neo-go/neo-go/pkg/services/rpcsrv/server_test.go:3335
2024-02-11T22:34:28.0717220Z         	Error:      	Received unexpected error:
2024-02-11T22:34:28.0718320Z         	            	read tcp <IP_ADDRESS>:51001-><IP_ADDRESS>:50442: i/o timeout
2024-02-11T22:34:28.0719220Z         	Test:       	TestRPC/websocket/sendrawtransaction/too_big_tx


[docs]: Invalid link to MIT LICENSE in README.md

While going through the README.md ,i came across this docs typo. The link  to the LICENCE.md file provided in the README.md is not a valid hyperlink. I have attached the screenshot of the same :

##Expected Behaviour
It should take me to the LICENSE.md file
##Actual Behaviour
The page is giving 404 error

Sorry to bother but, @phyleria , i have raised a PR #279 for this issue too. Could you please just have a look at it and merge if you're satisfied ?

Hello Could you please assign me this issue ??

Hello Could you please assign me this issue ??

Hey @JAkrish29 , I don't have permissions to assign issues and also I have already raised a PR for the same. So look for some other issues , there are better ones.


fallback to F32 for 1-dimensional or very small tensors

Currently the fallback data type is set to F16, even when a tensor is 1-dimensional, and even when the original model was in BF16.
Using anything less than f32 for 1-dimensional tensors can cause a big loss of quality, which is why GGML / llama.cpp always use f32 for their 1-dimensional tensors. (The only exception would be if every tensor in the model was originally F16, which I have never seen.)
Additionally this solves the issue of converting BF16 --> F16, which is not lossless.
For example, in the case of FLUX.1-dev, which is natively BF16:

original BF16 safetensors --> FP16 GGUF --> Q8_0 GGUF

is worse than

original BF16 safetensors --> F32 gguf or F32 safetensors --> Q8_0 GGUF

I hope my explanation makes sense and I hope this contribution is useful. Thanks!

I did test this originally, but saw no actual discernible difference between FP16 and FP32 in the case of flux. I thought the FP32 in llama.cpp was mostly just because of what they use for internal data types?
Although you're probably right and this should be the default for future models. Won't requantize just yet since again, I didn't see any real quality loss and it's possible we make other format changes (i.e. metadata).

Also, changing the fallback to FP32 alltogether would result in all conv2d layers being also quantized to FP32, resulting in diffuser/future hybrid models with massive file sizes (I'm testing with 1.5 and it doubles the file size lol)

@city96 I just changed it so that it only falls back to F32 for 1D or very small tensors. Please take a look 👍

Perfect, thank you <3
One tiny nitpick: The FP32 logic should take precedence over the blacklist logic. i.e. keys matched by this that were decided to be FP32 will get put as FP16 by this being under the FP32 logic instead of above it:
        elif any([x in key for x in blacklist]) and ".weight" in key:
            data_qtype = fallback

Ah I see. Let me fix that

Done!

Perfect, thanks. Again, won't reupload just yet, probably will once we get more significant changes like metadata/etc.
On that note, here's some things that might be worth looking into if you feel like checking/testing stuff:

Q8_0 with the old method is closer to whatever native ComfyUI outputs than Q8_0 with FP32 tensors for me. Maybe it's also being cast to FP16 along the way?
Might be worth exploring what keys to add/remove from the blacklist to see if some can be quantized after all
this line for the metadata is most likely wrong

(this is also more of a list for myself so I don't forget lol)

Might be worth exploring what keys to add/remove from the blacklist to see if some can be quantized after all

You could forego the blacklist entirely and rely entirely on heuristics, like so:
n_params = 1    # total number of elements: example: [3,4] -> 12
shape_sum = 1   # product of all dimension sizes: example: [3,4] -> 7
for dim_size in data_shape:
    n_params *= dim_size
    shape_sum += dim_size

if n_dims == 1:
    data_qtype = gguf.GGMLQuantizationType.F32
elif shape_sum >= 1024:
    data_qtype = gguf.GGMLQuantizationType.F32
elif n_params >= 65536:
    data_qtype = gguf.GGMLQuantizationType.F32
else:
    data_qtype = args.qtype

(Not 100% sure on those specific numbers as cutoffs, but they seem reasonable as a starting point)


BREAKING - Remove React addons from react-native-implementation

These modules don't exist in React anymore so this causes new apps to redscreen because the packager cannot resolve those modules.
Test plan
Tested that this and removing NavigationExperimental (it also uses removed React exports) causes UIExplorer to work again.

It's also nice that there's been a warning for many months now, think this shouldn't be too surprising to anyone.


fix typo in InviteTargetEmbeddedApplication

This fixes the name of InviteTargetEmbeddedApplication (previously InviteTargetEmbeddedAppliction)
as well as some minor changes to random mistyped comments.

Thanks for your contribution!


Store state not showing in Input element

The form detailed below contains one Field for a first name and the value of that field's input is initialized to the value of 'initialName' as specified in the initialValues object given to mapStateToProps. Upon loading the component, the store contains the given initial value. However, the input element never displays that value. How does one make the controlled component display the stored value?
Removing the {...input} from the <input> element in renderField does not seem to help as then the input field is non-responsive and the form only dispatches one letter CHANGE actions, overwriting the value in the store with one letter strings. In addition, in this case the ending BLUR action overwrites the stored value with an empty string when the field is deactivated.
Another issue is that the handleSubmit function provided by props should pass the validated form values to the onSubmit function but instead passes the initial value of 'initialName'. Also, when there are errors, the handleSubmit function does not prevent passing control to onSubmit and no error messages are displayed in the rendered form element.
Could someone please explain why and how to fix it?
Thanks!

import React from 'react';
import { connect } from 'react-redux';
import { Field, reduxForm } from 'redux-form';

const renderField = ({ input, label, value, type, meta: { touched, error }, onChange }) => (

    {label}

      <input {...input} value={value} type={type} onChange={onChange} />
      {touched && error && {error}}

);

let SettingsForm = (props) => {

  const onSubmit = (formProps) => {
    alert("Name passed to onSubmit: '"+ formProps.firstName +"'");
    console.log("Form props passed by handleSubmit: ", formProps);
  }

  const { handleSubmit } = props;

  return (
      <form onSubmit={handleSubmit(onSubmit.bind(this))}>

Personal Info

            <Field
              name="firstName"
              component={renderField}
              type="text"
              label="First name"
              onChange={() => {}}
              />

        <button type="submit">Submit</button>
      </form>
  );
}

const validate = (values) => {
  const errors = {};
  console.log("values at validation: ", values);
  if (!values.firstName) {
    errors.firstName = 'Enter your first name';
  }
  console.log("The current set of errors is", errors);
  return errors;
}

const mapStateToProps = (state) => {
  return {
    initialValues: {
      firstName: "initialName",
    },
  };
}

// redux-form decorator
SettingsForm = reduxForm({
  form: 'userSettingsForm',
  validate,
})(SettingsForm);

// Important: connect only after calling reduxForm!!!
export default connect(mapStateToProps)(SettingsForm);

You've overridden the onChange provided by redux-form which will prevent it dispatching the correct actions as you enter text.
Try removing onChange={() => {}} from Field.

Thanks for the comment @JosephEarl !
However, I've purposely overwritten the onChange handler so that the store would not receive so many unnecessary CHANGE actions. The store fields will get updated by the BLUR action in any case. Removing the onChange={() => {}} overwrite nor any other solution that I've tried solves the following problems that still persist:

the initial value of 'initialName' does not show up in the field even though it shows up in the store and the field is controlled by redux-form.
even as the value in the field is manually entered and the corresponding redux-store value userSettingsForm > values > firstName reflects that change correctly, upon submit the redux-form provided function handleSubmit neither performs validation nor passes the actual form input value (again, correctly set in store) to the passed and bound onSubmit function. The value that gets passed to onSubmit is for some inexplicable reason the initial value of the field.

It's also worth mentioning that the official examples don't work either and show the same issues relating to initialized fields not showing their values and those of the submit handler.
Has no one else encountered these issues?

I put your code into a codepen with the onChange removed and it works fine for me - http://codepen.io/anon/pen/bwKzVq.
Have you added the Redux Form reducer?
Here is the same with custom onChange - http://codepen.io/anon/pen/VKdRwP - the field does not update when you type because no change event is dispatched.

Yes, I've added the reducer in the correct combineReducers() call (as shown below) and the redux store's state is even changed correctly under userSettingsForm > values.
import { reducer as formReducers } from 'redux-form';
export const someReducers = combineReducers({
    ...,
    form: formReducers,
});

The fact that the code works on codepen suggests that the issue is related to some incompatibilities between redux-form and the other libraries currently in use in my setup and it seems to be an information flow issue from the store state to the respective fields. Even the onSubmit function is given the initial value of the field in spite of the value having been successfully set in store.
It's difficult to continue investigating this since there are no warnings or error messages that give any indication of what conflict there may be. Therefore I will no longer continue with redux-form at this time. Others may still comment here or close the ticket as they please.

@mmkari I am experiencing the exact same issue for all examples and for your project locally. I have been having the same issues with my project for two days, so I'm a bit relieved to know it's not just me.
Once I have the time I will post the deets about my environment.

PS: I'm going to assume you're not overriding onChange, so i'm going to pretend you didn't set that on Field component.
It doesn't work because you are destructuring your renderField component like like this:
{ input, label, value, type, meta: { touched, error } }

Which is wrong, because value is always empty. The thing is, value is part of input object (input.value, value is not part of your props, you can't access it props.value, it's props.input.value). So you should either remove value from your input like this:
<input {...input} type={type} />

You see, no value={value} because that is going to be inserted by {...input}. That would be a proper way of doing it. But if there's any reason why you need to set value manually on your input, than you should destructure like this:
{ input: { value, ...input }, label, type, meta: { touched, error }, onChange }

You now have input object that holds everything except value, and value variable that holds just value. And now you can do this:
<input {...input} value={value} type={type} />

PS: In my personal experience I had similar issue where state had value, but it was never passed to input. That was beacuse I use immutable and I imported redux-form decorator:
import { reduxForm } from 'redux-form';

Instead of:
import { reduxForm } from 'redux-form/immutable';

Maybe someone would find this useful. I'm going to add custom linting rule to notify me when I use wrong import.

Thanks for the commen @niksajanjic
I had the same problem, but after I changed the redux-form import from
import { reduxForm } from 'redux-form
to
import { reduxForm } from 'redux-form/immutable .
It works!
The introduction about using immutableJS with redux-form is only set in the Immutable JS Example . Maybe it's better to give a warning in console when using immutable js but with wrong reduxForm import.

thanks for the last two comments. I think the example with ImmutableJS should be made more prominent especially considering that react-boilerplate uses immutable data. Took me some googling to get here

Hello,
I had the same issue with the import from 'redux-form and I did the modification as @niksajanjic mentioned and now it works!
Thank you so much!

For those who don't use immutablejs don't forget to pass {...restInput} to your TextInput inside your <Field component={this.renderInput} /> like so:
<TextInput onChangeText={onChange} {...restInput} where your function looks like this
renderInput({ input: { onChange, ...restInput }, meta: { touched, error, warning } })

I think I've seen this documentation issue on other issues as well. Would someone be willing to raise a documentation PR for this issue with immutable? Was this the complete resolution of this present github issue?

@niksajanjic Thank you!!!

I made the same mistake as others. @niksajanjic's answer fixed half of it, but I also wanted to say: don't forget to also replace:
import { Field } from 'redux-form';
with
import { Field } from 'redux-form/immutable';

Closing since is a mistake by most users, but feel free to open a PR with a fix if you're up for it.


"detail": "Stale token for given user."

Hi Team
Thank you for this awesome package. I am trying to use it as my auth backend.
Followed the docs and set it up. for localhost based testing when I register a new user, there is an email confirmation with an url which contains Uid and Token as expected.
I copy the uid (i.e Mw) and the token ( axj4k4-d0bc2acec974be3858a2d12611c7a8e9) and POST it at users/activation end point to get the above error ( "detail": "Stale token for given user.").
I expect that it should successfully activate the account . am I missing something.
Thank you for your time.

Please were you able to find a solution to the error?

This may be due to the fact that the user is activated.
What is the status of the is_active flag?

it is saying stale because the account has already been activated try logging in it. logging in worked for me

Had this problem while building an app with frontend written in React, the problem was due to useEffect firing the verification request twice on development (default behavior)


Add _currentChunkSize field and update the meaning of _chunkSize field

_currentChunkSize is the new field, which means the size of the current chunk.
_chunkSize has its meaning change to the configured chunk size.

@danialfarid Please have a review. I updated the readme file as well. Thanks~


Daniel/lens pos ref

package tested and commented

@danielauu  Please squash the commits if possible

made it!