Allow differentiation of arrays and objects for proper empty-object serialization

This issue is related to #6, in which a global switch is suggested in order to force empty objects to "always be arrays" or "always be objects".
I would argue that while that will solve some specific issues, it will not resolve the more general one, which is differentiating between empty arrays and empty objects in general. Consider the following string:
local json_str = '{"items":[],"properties":{}}'

Ideally cjson should be able to decode that string to a lua object, that when encoded back to json returns the same string.
assert(cjson.encode(cjson.decode(json_str))

This means that cjson needs a way to "mark" tables that are arrays. This could be used by the decoder itself, but would be useful if exposed, so people could give cjson "hints" about what must be an array, even when empty.
I'm writing a possible Lua implementation here. In my case I'm using metatables, but maybe someone with more C knowledge can think of other ideas.
function cjson.mark_as_array = function(t)
  local mt = getmetatable(t) or {}
  mt.__is_cjson_array = true
  return setmetatable(t, mt)
end

function cjson.is_marked_as_array(t)
  local mt = getmetatable(t)
  return mt and mt.__is_cjson_array
end

cjson.encode should mark all arrays it finds using the cjson.mark_as_array.
On the other hand, when cjson.decode encountered an empty table, it should use cjson.is_marked_as_array to decide whether to return "{}" or "[]". Notice that this would only apply to empty tables. A lua table like {1,2, a = "foo"} should be encoded as an object, even when marked as an array.
I would gladly provide a pull request for this, but I don't do C. Please consider this a feature request.

I'd love to see a workaround for this as well.

+1, this makes the library hard to use. I am surprised that it can handle sparse arrays but not empty ones? Or am I missing something?
@kikito's solution seems to be a good one. Would you consider a PR on it if someone has the time and knowledge to implement it?

@kikito Since it's been a while, may I ask if you have found any solution to this problem?

I also just ran into this problem. I like @kikito 's idea for implementation, I'll see if I can implement this.

The project seems dormant so I would consider that before jumping on it...

Well, I'm actively using it, so maybe I'll have to take it over?

Here is my implementation:
https://github.com/brimworks/lua-cjson/commit/3499130c852a993e4afc741aa2aa902959775b30

@brimworks looks good! I would suggest adding some tests on the test folder

Yay nice! Good job @brimworks! I hope this will be available.

After using this a bit, I've come to the conclusion that it is better to use the Lua 5.3 idiom of using the __name field of the metatable. This change is two fold:

Always lookup "null" in the registry and use that for representing null rather than a NULL lightuserdata. This has the advantage of allowing consumers of cjson to customize their implementation of null (for example, by default __tostring is overloaded). And any code can "mark" a table as "null" by simply setting the __name="null" field of their metatable.
Always lookup "array" in the registry and use that as the metatable for any generated arrays. This similarly has the advantage of allowing consumers of cjson to customize the "array" metatable with any other overloads... and when checking if something is an array, the __name="array" field of the metatable just needs to be set.

https://github.com/brimworks/lua-cjson/commit/95110717a823c2030fcdb7f9c375a11e322097b3
If other libraries (like lyaml) use a similar implementation, then "null" and "array" can be more universal across libraries rather than the previous __is_cjson_array which is very specific to this library.
If this is interesting to others I can issue a pull request. Just let me know.
Thanks,
-Brian

Yes, Lua CJSON should use a metatable to record array vs object to make encoding deterministic. It would also allow code to check whether a table decoded from JSON is an array or object.
It appears each library uses a different method via a metatable. Eg, dkjson uses __jsontype == "object" or "array". It's not clear to me which option would be best, but one of them needs to be chosen.

...so your open to my idea of having a "number" metatable (since your last comment seemed to concern array vs object).

FWIW, I'd suggest using __name field of metatable to determine "object" vs "array" vs "null" vs "number". This aligns with Lua 5.3 luaL_newmetatable(L, name) method which records the name in the __name field of the metatable:
http://www.lua.org/manual/5.3/manual.html#luaL_newmetatable
This is the methodology I've used in my fork of CJSON.
Thanks,
-Brian

Any activity here? I'm coming from Redis, which has cjson builtin to its lua scripting package, so I do not have the option of simply using a fork.
This issue is especially problematic in a Redis context, because data may be subsequently accessed by a language which treats {} and [] differently, resulting in decoding errors.

Using redis too, have the same problem. Is there any schedule for resolving this issue?

@mpx do plan to follow up on this? If you would prefer to no longer maintain the lua-cjson code, I can take over ownership.
Thanks,
-Brian

LÖVR is exposing lua-cjson now and would love to see this implemented.

You might want to check out the OpenResty fork which implements this and a bunch of other fixes/improvements:
https://github.com/openresty/lua-cjson

@kikito, this untested version doesn't touch object's metatable, implemented via weak cache:
local array_marks = setmetatable({ }, { __mode = 'k' }) -- { [weak t] = true }

function cjson.mark_as_array = function(t)
  array_marks[t] = true
end

function cjson.is_marked_as_array(t)
  return array_marks[t]
end

-- or even simpler

cjson.is_array = setmetatable({ }, { __mode = 'k' }) -- { [weak t] = true }
cjson.is_array[t] = true
print(cjson.is_array[t]) -- true

C variant:
static int array_marks_key; // value is not used, just unique address

static void
get_array_marks(lua_State *L)
{
  // = registry[array_marks_key]
  lua_pushlightuserdata(L, &array_marks_key);
  lua_gettable(L, LUA_REGISTRYINDEX);

  if (lua_isnil(L, -1)) {
    lua_pop(L, 1);

    // arrays = setmetatable({ }, { __mode = 'k' })
    lua_createtable(L, 0, 0); // arrays
    lua_createtable(L, 0, 1); // mt
    lua_pushstring(L, "k");
    lua_setfield(L, -2, "__mode");
    lua_setmetatable(L, -2);

    // registry[array_marks_key] = arrays
    lua_pushlightuserdata(L, &array_marks_key);
    lua_pushvalue(L, -2);
    lua_settable(L, LUA_REGISTRYINDEX);
  }

  return; // array_marks at the top
}

static int
mark_as_array(lua_State *L)
{
  // array_marks[t] = true
  get_array_marks(L);
  lua_pushvalue(L, 1); // t
  lua_pushboolean(L, 1); // true
  lua_settable(L, -3);

  return 0;
}

static int
is_marked_as_array(lua_State *L)
{
  // x = array_marks[t]
  get_array_marks(L);
  lua_pushvalue(L, 1); // t
  lua_gettable(L, -2);

  return 1; // x
}

Usage:
t = { { }, { } }
cjson.mark_as_array(t[2]) -- or cjson.is_array[t[2]] = true

print(cjson.encode(t)) -- expecting [ { }, [ ] ]

I'm into C, but not into pull requests :(


[4.0 Beta 4] - Game Controller D-Pad Not Working On HTML5 Builds Windows/Linux Browsers?

Godot version
v4.0.beta4.official [e6751549c]
System information
Windows 10/11 64Bit Edge/Firefox/Chrome/Opera / Linux Mint 21 Cinnamon 64Bit Firefox/Chrome
Issue description
Hi,
Using Godot 4.0 Beta 4 on Windows 11 Pro 64Bit v22H2.
We build our game for HTML5 and tested on all Windows/Linux Internet browsers.
Game controller d-pad are not working on our HTML5 built game?
Only game controller buttons are working?
(game controllers work 100% on PC desktop version of our game)
Hope you can fix this soon!
Jesse
Steps to reproduce
Run our HTML5 version below:
https://www.newgrounds.com/projects/games/1946017/preview
(game controller d-pad does not work, only buttons do)
Minimal reproduction project
Please look at our game controller code on GitHub below:
LOOK BELOW
(perhaps we are doing something wrong?)

Hi,
Been working on above all day.
Game controller d-pad is not working on Godot 4 beta 4 HTML5 builds.
We did manage to get left analog stick working on HTML5 so the game is playable.
Hope you can fix the above soon!
You can run our HTML5 version below:
https://www.newgrounds.com/projects/games/1946017/preview
(game controller d-pad does not work, but left analog stick & buttons do work)
Jesse
PS: You can view our game controller source on GitHub below:
https://github.com/BetaMaxHero/GDScript_Godot_4_T-Story/blob/main/InputCore.gd#L236


A JSONValidator Error with Specific Example

Hi there,
I am a software engineering student at CMU. My team currently takes software verification and testing course and conducts spec testing and structural testing strategies on your project. We focus on the JSONValidator and we found an error regarding it. For example, if the input is {"a":"b" "c":"d"} in the form of String, it will be recognized as a valid JSON object. We have written over 150 tests regrading this class and only found this unexpected behavior when JSON is an object and there is no "," between two key-value pairs.
If needed, we are happy to integrate our tests with your original tests to make it more robust!
Thanks,

    // fastjsonVersion = "1.2.73"
    @Test
    public void test() {
        String content = "{\"a\":\"b\" \"c\":\"d\"}";
        JSONValidator jsonValidator = JSONValidator.from(content);
        boolean isValid = jsonValidator.validate();
        System.out.println(isValid); // isValid = false
    }

Can you give an example and indicate the version of fastjson?


Master to Main

As per a discussion in the EBP slack, I have opened a PR #3, that moves this to main. The default branch/branch protection has been updated.
I will let @chrisjsewell merge that in after review of the (minor) changes.

All merged in on all dependent repos I believe. Closing this.


Pack source in jitpack

Source code should be distributed alongside the compiled project for easier error tracking.

Fully updated CI for nightly versions.


I can't discard DSU after I discard from system notification

I discard DSU using DSU notification,then I open DSU Sideloader,found out that image didn't got wiped.
My phone now think that I have installed DSU,discard button is not working,even in Sideloader and gsi_tool command
Shell respond : ServiceManager W 05-20 21:21:14 22668 22668 Waited one second for gsiservice (is service started? are binder threads started and available?)

Well...everything back to normal after I uninstall it from magisk.
Is this a bug or my problem?

What Magisk version you're using? can you check if this behavior happen with Magisk 26.1?
Anyway, if module containing custom gsid cause this behavior, the one without it should not have this issue.

What Magisk version you're using? can you check if this behavior happen with Magisk 26.1?
Anyway, if module containing custom gsid cause this behavior, the one without it should not have this issue.

I'm using Magisk Delta 25210 rn.
HuskyDG said that update to 26 is coming. And sorry,I can't switch version (or branch) due to functions compatibility issue between Original and Delta (MagiskHide).I will try the one without custom gsid on 25210 first.


Test ts conversion add snapshot delay

List of fixed issues (if they exist):
Converted javascript tests to typescript. Added 1 sec delay before snapshots.

@cdrake , there was a screenshot comparison failure here: https://github.com/niivue/niivue/actions/runs/7795564460/job/21258713607#step:6:79
Could you investigate? Also, can you make sure the tests exit (fail) if there is a single failed test?


Link fix: add http:// for objc.io in "open-sourcing-energy"

@orta fun mini tweak
www.objc.io is missing its http://
Doesn't like https:// either, so not that
And there ends my Friday :)

Nice one! Thanks @morqon :+1:


Introduce higher-level JVM plugin APIs

See Higher level APIs for the Java ecosystem.pdf

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test RFM

OK, I've already cancelled the old build and triggered a new ReadyForMerge build for you.

@bot-gradle test RFM

OK, I've already cancelled the old build and triggered a new ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this

OK, I've already cancelled the old build and triggered a new ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

Tried some more: https://github.com/gradle/gradle/tree/jjohannes/high-level-jvm-api-dogfood
Ran into trouble with adding specific artifacts which used "builtBy" before. Not sure what the best solution is. Maybe this here should work?
https://github.com/gradle/gradle/commit/6991bc9094ffe0b4e2b51c815b1dff0273000d05#diff-a78d7d06d072e6be0e780abdad6661a6R133
Or the task should indeed be extended to declare the artifacts (the repository in that case) as output....

This is the latest version of all of the dogfooding. I think should cover all we can do in our own build with the new APIs right now: https://github.com/gradle/gradle/commit/199bb4b494ee2f5c8d16f27c3bdf81cf7de09291
Open questions:

More explicit creation, and description, of buckets?

https://github.com/gradle/gradle/commit/199bb4b494ee2f5c8d16f27c3bdf81cf7de09291#diff-c6c8180c4d6d05a618bb71a9a61de006R135
https://github.com/gradle/gradle/commit/199bb4b494ee2f5c8d16f27c3bdf81cf7de09291#diff-f199f0dcd4f4e401e832b152d85b55d9R71
https://github.com/gradle/gradle/commit/199bb4b494ee2f5c8d16f27c3bdf81cf7de09291#diff-e789d5ac9603c1d2b63c7700b10f258cR47

Description for resolvable configurations and outgoing elements?

https://github.com/gradle/gradle/commit/199bb4b494ee2f5c8d16f27c3bdf81cf7de09291#diff-f199f0dcd4f4e401e832b152d85b55d9R83

Application for test sets is very limited, but we want to expand that in the future. So it is ok for now (?):

https://github.com/gradle/gradle/commit/199bb4b494ee2f5c8d16f27c3bdf81cf7de09291#diff-e789d5ac9603c1d2b63c7700b10f258cR112-R114

@bot-gradle test RFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this

OK, I've already cancelled the old build and triggered a new ReadyForMerge build for you.

@bot-gradle test this

OK, I've already cancelled the old build and triggered a new ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@jjohannes I think this PR is in a pretty good shape now, if you have no objection I'll merge it once CI passes so that we can dogfood.


UDPLib

Do you know the UDPLib?

No, never heard of it. Just downloaded it. Seems to be quite basic and rather unmaintained. Don't think that this is interesting for us, or do you think differently?

The only thing what I consider useful this the absence of the package manager. Thus if you know that you need to send/receive n doubles this specialized implemenentation probably is easier.


Protected Var Request - page 5114 "Contact Profile Answers" - Cont

Please can you make Cont variable a protected var on page 5114 "Contact Profile Answers" so that we can access it from a PageExtension
    protected var
    Cont: Record Contact;

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


Staking Delegations

I dont see my active delegations on my oasis wallet

Should be fine now, network was down due to Damask Upgrade.


Use .inetnb instead of .ipynb file extension for .net notebooks

Is your feature request related to a problem? Please describe.
It would be helpful to have an extension clearly indicating what a file is, that does not look like a python notebook.
Describe the solution you'd like
I'd like .NET Interactive to use a different but similar file extension to indicate it being a notebook but also .NET - best suited would be inetnb as notebooks support multiple .NET languages, otherwise it would be e.g. icsnb for a C# notebook.
inetnb is distinct enough as it points to net, but also similar enough as it keeps the interactive-{language}-notebook format.
Describe alternatives you've considered
Of course .dib works well enough as a distinct file extension, but it isn't as descriptive as inetnb.

inetnb is a nice extension, which makes me think it's something similar to jupyter.
However I don't know anything about the dib extension, and even most of the results in google think it's an image related file.

.NET Interactive is a Jupyter kernel, and .ipynb is the standard Jupyter file format, so the .ipynb extension allows notebooks created using .NET Interactive to use many great tools and integrations from the Jupyter ecosystem.

I mean, ipynb is only "the standard jupyter file format" because python was the first language used in interactive notebooks, hence the py in the middle. Unless I understand that incorrectly and the py stands for juPYter? Seems more likely to stand for python I think.

Jupyter is a mashup of Julia, Python, and R, and all languages have well-supported Jupyter kernels that use this same file format. There are many others as well.
https://github.com/ml-tooling/best-of-jupyter#jupyter-kernels


Post Processing sandcastle issue

Run http://localhost:8080/Apps/Sandcastle/index.html?src=Post Processing.html&label=All

There is an odd flash full screen flash when you enable each of the effects the first time.
I got a random crash the first time I enabled black and white about undefined v in a UniformSample or something similar (not sure of the exact details, I couldn't reproduce)

This was fixed in https://github.com/CesiumGS/cesium/pull/9649


tls db added

@martonsereg

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1343/

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1344/

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1351/


collatz-conjecture: add to track

New exercise! x-common directory.

Reviewer Resources:
Track Policies

This is listed as the 19th exercise; I need to update starter implementations for this and difference-of-squares.


SCREW.cwl not found

Hi there,
I am trying to run the cwl workflow using cwltool but the readme file seems outdated.
Can you please advise on how to run the preprocessing step using "preprocess.cwl"?
Thanks.

Hi @FarahZKhan ,
The CWL workflow is still a work in progress at the moment, hence the main SCREW.cwl not being available yet. Please check out the dev branch for the most current versions of workflow and script files. The preprocess.cwl can be run with our test data via:
cwltool cwl/preprocess.cwl --toConvert test_data/GSM1589192_K562.1_2.txt.chr19 --format farlik2013
I hope that helps.

Hi @yxblee,
Yes this did work :) Thanks for you help.


When adding new track go to it in the track list for easier immediate type adjustment

Looks like the main issue is that when you add a new track it selects it and assigns it an ID before it exists in the tracklist.  It doesn't know to refresh the selected track in the track list once it is created.  Looking into the best way to cause it to update without adding too much complexity.

Want to add to this an issue that @AlmightyYakob  found with regards to new tracks.  A new track doesn't create an event in the eventChartData array when the type is undefined meaning that it can't be gone to using the "Go to First Frame" until it is a type assigned.
I have a small fix that will make 'undefined' a temporary type when a user creates a new item.  This will also help fix the issue of immediately going to the new item for type adjustment.


It's not a big deal, but I think I'd better to report.
Version of Vim
9.1.150
Environment
macOS 13.6.1
Logs and stack traces
No response

not sure why you closed it, maybe it's a real problem.
// and @dpelle maybe related to https://github.com/vim/vim/issues/13955

Sorry, I mistakenly thought no one was interested in this little question and I'll open it now.

closing as duplicate of #15608


VS2017.2 can't load language server plugins from the project directory

TypeScript Version:  2.3.1
Visual Studio Version: 2017.2
tsconfig.json:
{
    "compilerOptions": {
        ...
        "plugins": [
            { "name": "tslint-language-service" }
        ],
        ...
    }
}

Expected behavior:
Visual Studio should be able to find plugins in $(ProjectDir)\node_modules
Actual behavior:
Visual Studio only looks for plugins in TypeScript SDK's installation directory and in C:\Windows\system32
tsserver.log
Info 455  Loading tslint-language-service from C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.3\tsserver.js/../../.. (resolved to C:/Program Files (x86)/Microsoft SDKs/node_modules)
Info 456  Failed to load module: {}
Info 457  Loading tslint-language-service from  (resolved to C:/Windows/system32/node_modules)
Info 458  Failed to load module: {}
Info 459  Couldn't find tslint-language-service anywhere in paths: C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.3\tsserver.js/../../..,

That is something we are working on right now. should be enabled in the next VS release.

Would this same bug also affect Visual Studio Code, or is this specific to Visual Studio?
I'm seeing something similar trying to follow the instructions here for "Testing Locally", and in the language-service logs I'm seeing:
Info 10   [22:34:18.702] Config file name: c:/Users/User/Documents/Projects/test-proj/tsconfig.json
Info 11   [22:34:18.778] Loading demo-plugin from c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js/../../.. (resolved to c:/Program Files (x86)/Microsoft VS Code/resources/app/extensions/node_modules/node_modules)
Info 12   [22:34:18.802] Failed to load module 'demo-plugin': Error: Could not resolve JS module 'demo-plugin' starting at 'c:/Program Files (x86)/Microsoft VS Code/resources/app/extensions/node_modules/node_modules'. Looked in: <elided>

I don't have the TypeScript SDK installed. I'm using Visual Studio Code 1.16.0.

Just downloaded Visual Studio 2017 15.5 and this seems to be working!
TSLint Language Service works very nicely, with fixers and everything in VS2017!
Our Angular Language Service (@angular/langauge-service) seems to only check TS Files (not HTML templates) and also seems to not update properly after fixing errors, but I can probably follow up with the Angular team on these ones.


"implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer." in for-of with strictNullChecks and noImplicitAny

TypeScript Version:  2.9.0-dev.20180409

Search Terms: referenced directly or indirectly in its own initializer
Code
Note: strictNullChecks and noImplicitAny need to be on. As far as I can tell, all the lines are necessary to reproduce the error:
declare const elements: Element[] | undefined
declare const elMap: Map<Element, Element[][]>
if (elements) {
    for (const elements2 /* ERROR*/ of elMap.get(elements[0])!) {
        if (elements !== elements2) {}
    }
}

Expected behavior:
No error. elements2 should be typed as Element[]
Actual behavior:
'elements2' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. This is especially jarring because explicitly typing the variable of a for-loop is not allowed!
Playground Link: playground
Related Issues:
https://github.com/Microsoft/TypeScript/issues/12101 same error in same location which has been fixed.  The more specific circumstances here still cause it though.

Duplcate of #19955


C++: Downgrade cpp/incomplete-parity-check from high to medium precision [CPP-236]

As reported in CPP-236, this query has false positives on signed integers that cannot be negative. It could possibly be improved with a local range analysis, but the query would most likely still have so many false positives that we would have to lower its precision.
Under our current policy, this change will make the query hidden by default on LGTM.

I agree this query, while informative in principle, has a lot of weak results in practice.  This is typical of the results I found:
for (int i = 0; i < dist; i++)
{
	...

	if (i % 2 == 1) // i is positive here
	{
		...
	}
}

Merging...


Want bair code

This is related to the former question "Want moving_mnist code"(#1) by ManWingloeng.
Could you please offer us bair.py as well?
We would like to test using RobotPush dataset.
This code is from data_utils.py,
from data.moving_mnist import MovingMNIST
from data.bair import RobotPush
from data.kth128 import KTH

You can find the dataloader and data preprocessing code for BAIR in the following link
https://github.com/edenton/svg/tree/master/data
Note that the architectures used for BAIR is different from the one used for Moving MNIST.

Thank you very much for sharing the bair code.
I just want to confirm, when you say the architecture is different, you mean the dataset (and not the algorithm)?

Thank you very much for sharing the bair code.
I just want to confirm, when you say the architecture is different, you mean the dataset (and not the algorithm)?

No. For BAIR, the task is stochastic video generation instead of video prediction. So the model architecture is a combination of SVG and CrevNet which was not reported in the paper. The pipeline looks like below.

Thank you for the response.
We are currently running into a problem when using bair dataset.
We get an error when trying to train using --channels=3.
This is the steps we took.
① Using download_bair.sh from the link you sent us, we got the tar file and decompressed it.
② Using convert_bair.py, we extracted the images from tfrecords.
③After changing some arguments on model_mnist.py (--dataset and --data_root), we ran model_mnist.py
④ We got images like the ones below (in black and white)
⑤ If we change the number of channels to 3 (--channels=3), we get this error.
Traceback (most recent call last):
File "model_mnist.py", line 264, in
mse = train(input,epoch)
File "model_mnist.py", line 232, in train
h = encoder(x[i - 1], True)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/mnt/VideoPrediction/CrevNet-Traffic4cast/layers_3d.py", line 124, in forward
out = block.forward(out)
File "/mnt/VideoPrediction/CrevNet-Traffic4cast/layers_3d.py", line 51, in forward
Fx2 = self.bottleneck_block(x2)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward
input = module(input)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 448, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [3, 6, 3, 3, 3], expected input[16, 0, 3, 32, 32] to have 6 channels, but got 0 channels instead
How can we solve this?
Thank you very much for helping us.

@rastaman7 , I get same problem with you, when i set channel to 3. Do you resolve this problem？Thanks.

@rrxi , No, we haven't been able to figure this out yet...


Memoize serializers

I came across an issue where toggling state in an _app.jsx component through context would make the <PortableText> component completely re-mount.
Presumably this was caused by the serializers being rebuilt on each render, making the blocks inside of <PortableText> remount.
Memoizing the serializers has fixed this.

Could you share a reproduction of this issue (or a test)? Since @sanity/block-content-to-react is not a “pure component”, React winds up re-rendering the rest of the tree even if you memoize the serializers object.
I suspect you are defining your serializers in a way that the values change identity on each render. This would cause React to have to unmount the previous versions and render the new ones each time. If this is the case, it's usually easy enough to solve by defining your serializers outside of your component definition. E.g.:
const serializers = {
  // ...
}

const Component = ({ content }) => <PortableText content={content} serializers={serializers} />

If you can't do this, it may be sufficient to wrap your component in React.memo, prompting React to treat it as pure and skip re-rendering it as long as the props have not changed (again, identity, so you may need to use useMemo on the content or any other object props that are being built on each render). E.g.:
export const Component = ({ content }) => (
  <PortableText content={content} serializers={serializers} />
)

export const PureComponnet = React.memo(Component)


Missing Uninstalling Documentation

The project is currently missing uninstalling documentation.

yeah, that is true. The project inherits the uninstallation protocol of stack and cabal:
Delete the executables, and then you may or may not purge the store directories of both tools.

@fendor I was able to remove things and thanks for the information.  Thus, this issue can be closed.


Fix/a2 1295 case notes maxlength 1000

Describe your changes
Case Notes textarea max length changed from 300 to 1000
Issue ticket number and link
A2-1295 WEB/API - Amend maxLength attribute to 1000 where they are set to 300 characters
Type of change 🧩

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
[ ] Other (please explain in the description section above)

We're keeping it at 300. Closing PR.


_gen_msg_values does not check for lists

The function def _gen_msg_values(msg, prefix=""): does not check if the message is a list of messages before using ..get_fields_and_field_types().items() and thus crashes.
Code from repository:
https://github.com/wentasah/rosbag2csv/blob/15b731a7fcc4906f503ad380ff280ad9a70339f1/rosbag2csv.py#L46-L47
Example:
Custom message type IMUDataArray and IMUData is used.
IMUDataArray consists of a timestamp and a list of IMUData messages.
Structure:
IMUDataArray
- timestamp
- IMUData
-- imu_1
--- orientation
--- acceleration
--- magnetometer
-- imu_2
--- orientation
--- acceleration
--- magnetometer
-- imu_...
...

Debugger before crash:

Logs:
[...]
  File "ros2bag_to_csv.py", line 111, in <module>
    dump_bag(sys.argv[1])
  File "ros2bag_to_csv.py", line 92, in dump_bag
    fields = [field for field, val in _gen_msg_values(msg)
  File "ros2bag_to_csv.py", line 92, in <listcomp>
    fields = [field for field, val in _gen_msg_values(msg)
  File "ros2bag_to_csv.py", line 59, in _gen_msg_values
    for key, val in _gen_msg_values(getattr(msg, field),
  File "ros2bag_to_csv.py", line 54, in _gen_msg_values
    for field, type in msg.get_fields_and_field_types().items():
AttributeError: 'list' object has no attribute 'get_fields_and_field_types'

Hi and thanks for reporting the problems.
Can you test whether the current version works for you? If not, can you send some problematic bag?

Can confirm, that its now parsed properly and generates the expected .csv file. Thanks a lot!


[bug] macOS Fullscreen Menubar not appearing

Describe the bug
When running a Tauri application in fullscreen on macOS, the top menu bar does not appear when moving the mouse to the top of the screen. In any application I'd expect it to "pull down" the menubar from the top of the screen.
Reproduction

Create any app with Tauri
Run in fullscreen mode on macOS
Try to get the menubar to appear by moving the mouse to the very top of the screen (keep dragging up and "beyond" the screen for good measure)

Expected behavior
The menubar should appear
Platform and versions
Operating System - Mac OS, version 12.1.0 X64

Node.js environment
  Node.js - 16.13.0
  @tauri-apps/cli - 1.0.0-beta.10
  @tauri-apps/api - 1.0.0-beta.8

Global packages
  npm - 8.1.0
  pnpm - Not installed
  yarn - 1.22.17

Rust environment
  rustc - 1.57.0
  cargo - 1.57.0

App directory structure
/test
/node_modules
/public
/src-tauri
/.git
/src

App
  tauri.rs - 1.0.0-beta.8
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - ../public/
  devPath - INVALID DIR
  framework - Vue.js (Vue CLI)
  bundler - Webpack

Stack trace
No response
Additional context
This may be an issue with Tao instead of Tauri. I imagine there is some sort of gesture recogniser that is running and intercepting any mouse movements at the top of the screen. I don't think that macOS requires any custom implementation to handle this behaviour in an application, but can always do some research on the side.

Fixed in Tao's next branch. Use Tauri from git if you want that fix.


Add switch to use non-interactively.

Something like 'yum -y install' where -y is accepting defaults.

This script relies on the user's input for a couple of prompts:

Initial "is this good?" check before starting (asks for y or n)
Root password prompt of the new machine (as prompted by passwd; part of nixos, not this script)
Final prompt to reboot immediately (asks for y or n)

1 and 3 are easy to do non-interactively, but 2 is not. Are you only looking to quiet 1 and 3, or all of them?

Didn't think about 2.  Hmm.. An environment variable for that would be cool.  However, with the passwd being part of NixOS the only way to seed it would be to pipe an echo of the $PASS into the call to NixOS... And that probably wouldn't work either.  Can you link to the script source for the NixOS side.  Is this the call on the nixos-in-place side?
https://github.com/jeaye/nixos-in-place/blob/master/stage1#L48
Thanks!

https://github.com/jeaye/nixos-in-place/blob/master/stage2#L82 That's the line which installs NixOS; as part of nixos-install, the user is presented with the password prompt.

I see.  Yeah.  This probably won't work then. Thanks anyway.  Feel free to close this ticket.
I think this is where passwd is called by nixos-install:
https://github.com/NixOS/nixpkgs/blob/a4f5dc8bbf5435dd7bfb1bb6c36c28c6ce775dd3/nixos/modules/installer/tools/nixos-install.sh#L260

Thanks for looking into it and reporting back.


Add LOGO Token

besides the problem listed as label shows, you should also provide a valid website in the json.


feat(barcode-scanning): zoom functionality

Pull request checklist
Please check if your PR fulfills the following requirements:

[ ] The changes have been tested successfully.
[ ] A changeset has been created (npm run changeset).
[ ] I have read and followed the pull request guidelines.

Close #72

npm i<EMAIL_ADDRESS>

Wonderfull, thanks Robin 💪


Optimize python client package and release process

Description
This pr is optimizing the python client package and release process.
To package a python client, we can simply run ./release.sh to get a whl.

coverage: 47.745% (-0.02%) from 47.762% when pulling 94e4951c3aa03d4cf864927379eeb4db317ecd31 on refactor_python_package into b1ac40b42b989398ee9218ef897386e8221370ed on master.


Unexpected end of stream.

package com;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
public class TestJedis {
public static void main(String[] args) {
	GenericObjectPoolConfig config = new JedisPoolConfig();
	JedisPool pool = new JedisPool(config, "<IP_ADDRESS>");
	try (Jedis jedis = pool.getResource()) {
		jedis.set("test", "aaa");
		System.out.println(jedis.get("test"));
	}
	pool.close();
}

}
i get exception :
Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:198)
at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
at redis.clients.jedis.Protocol.process(Protocol.java:132)
at redis.clients.jedis.Protocol.read(Protocol.java:196)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:288)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:187)
at redis.clients.jedis.Jedis.set(Jedis.java:66)
at com.TestJedis.main(TestJedis.java:15)
redis version : 3.0.2
jedis version : 2.7.2
jedis.conf :
Redis configuration file example
daemonize yes
pidfile /var/run/redis.pid
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 60
loglevel notice
logfile /Applications/service/redis-3.0.2/log/redis_6379.log
databases 16
################################ SNAPSHOTTING  ################################
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename redis_6379.rdb
dir /Applications/service/redis-3.0.2/db
################################# REPLICATION #################################
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
################################### LIMITS ####################################
maxmemory 128mb
maxmemory-policy volatile-lru
############################## APPEND ONLY MODE ###############################
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
################################ LUA SCRIPTING  ###############################
lua-time-limit 5000
################################ REDIS CLUSTER  ###############################
slowlog-log-slower-than 10000
slowlog-max-len 128
################################ LATENCY MONITOR ##############################
latency-monitor-threshold 0
############################# EVENT NOTIFICATION ##############################
notify-keyspace-events ""
############################### ADVANCED CONFIG ###############################
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes

i have the same exception

I was also getting the same issue when I was using embedded redis. This thread has useful information.

Same here, using JedisSentinelPool and Jedis 2.8.1
19:47:24 [SEVERE] redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
19:47:24 [SEVERE] 	at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:198)
19:47:24 [SEVERE] 	at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
19:47:24 [SEVERE] 	at redis.clients.jedis.Protocol.process(Protocol.java:141)
19:47:24 [SEVERE] 	at redis.clients.jedis.Protocol.read(Protocol.java:205)
19:47:24 [SEVERE] 	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297)
19:47:24 [SEVERE] 	at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:233)
19:47:24 [SEVERE] 	at redis.clients.jedis.Jedis.hgetAll(Jedis.java:796)
19:47:24 [SEVERE] 	at myapp

^- Fixed, timeout (redis config) was improperly setup.

why? and i also have this problem, and I dont know why

@AaronFeng2014 do you have an example to reproduce your issue?

@AaronFeng2014 this issue is way too old, please open a new one specifying as much info as possible to reproduce the issue.

@marcosnils maybe, ihave too many data in redis?

I have meet the same problem,can anyone help?

Try this
@Bean
public JedisPool jedisPool() {
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(threadPoolSize);
poolConfig.setTestOnBorrow(true);
poolConfig.setTestOnReturn(true);
return new JedisPool(poolConfig, host, port, timeout);
}

I have meet the same problem ,who can help me?

Is this problem due to the incorrect settings for timeout?

Iam also still facing this problem while doing:
try (Jedis jedis = jedisPool.getResource())
{
    do
        {
            ScanResult<Entry<String, String>> scan = jedis.hscan(regionKey, cursor, new ScanParams().count(50000));

My redis-server timeout is set to 120 and the TCP keepalive is set to 60 (However my linux kernel settings for TCP socket opts are different).
The data I receive is about 450K Hash values - thats why I set the scan params is set to 50K count.
I cannot really reproduce this issue. But it is happening from time to time from different clients (which are not having the exception at the same time).

The problem might be that the jedisPool or in general the connection is too long open and idle. My solution was to open a new connection each time the code is called (which was in my case only once every ten minutes).

You can use RedisStandaloneConfiguration to configure JedisConnectionFactory with Spring Data Redis 2.x.

the cause is that server setting up timeout nonzero, it means after one period connection is disposed or closed. So client takes the connection from pool, but after that time it is invalid!
Solution is:
Set timeout on server to 0
or
Do not keep pool on client -> GenericObjectPoolConfig.setMaxIdle(0)
So each time to connect server, client take a new connection.


datastore: parametrize and increase cache size

tried to sync node and noticed that it spends a lot of time looping over activeset in eligibility validation. i will open an issue to optimize that code path, but for now we need to increase number of activations stored in cache.
related: https://github.com/spacemeshos/go-spacemesh/issues/4883

thanks, i removed both constants, and using ATXSize for vrf nonce too


diffoscope: 125 -> 126

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/diffoscope/versions.
meta.description for diffoscope is: '"Perform in-depth comparison of files, archives, and directories"'.
meta.homepage for diffoscope is: '"https://wiki.debian.org/ReproducibleBuilds"

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 126 with grep in /nix/store/wk83ddlck9y9nvf1xhxjnlpyd1q18h7b-diffoscope-126

directory tree listing: https://gist.github.com/d4c1c0cf53bfa65b18027ac9cfdbb0b1

du listing: https://gist.github.com/9a767fe8d4aea3dcc10852fbccdabdf2

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

3 total rebuild path(s)
1 package rebuild(s)
1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
0 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
diffoscope

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/wk83ddlck9y9nvf1xhxjnlpyd1q18h7b-diffoscope-126 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A diffoscope https://github.com/r-ryantm/nixpkgs/archive/a2255300db9064c76926c2b92c6bea2f398714f2.tar.gz

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

cc @dezgeg for testing.

Changelog:

  [ Chris Lamb ]
  * Track and report on missing Python modules.
    (Closes: reproducible-builds/diffoscope#72)
  * Drop some unnecessary control flow.
  * Drop explicit inheriting from 'object' class; unnecessary in Python 3.
  * Bump Standards-Version to 4.4.1.

  [ Mattia Rizzolo ]
  * Exit with 2 instead of 1 in case of no disk space.

 -- Chris Lamb <email address hidden>  Mon, 14 Oct 2019 12:29:47 -0700


How is it that the Prototypical Nets get high accuracy without training?

If I go into the prototypical nets example and turn off training by using torch.no_grad befoe the tqdm loop and then commenting out the model.zero_grad, loss.backward, and optimizer.step, I get accuracy in the high 70s.
How is this happening? I would expect that accuracy would be 20%. I changed the model by removing BatchNorm and ReLU and it gets high 60s in this case. I thought it could be something to do with the convolutional prior, but then I changed that to just a Linear function and it got accuracy in the high 60s as well.
Is it a bug in the implementation?

Even a randomly initialised network will propagate some structure from the input data to the output layer. Thus, if the classification task is not to hard, samples from the same class will still lie close enough in the space in which prototypes are calculated.
Which data set are you using? For Omniglot your results seem reasonable.

This is omniglot, and yes, sorrry, should have updated this post that it's actually reasonable.


update CMD for Dockerfile

@sj26 It looks like my build and others are failing because of an older version of Ruby, which selenium-webdriver says it doesn't support any longer. Any chance we could remove it?

Does the current docker image not work for you?
$ docker run sj26/mailcatcher
Starting MailCatcher
==> smtp://<IP_ADDRESS>:1025
==> http://<IP_ADDRESS>:1080

Also, gem install mailcatcher should not be installing selenium, that's a dev-only dependency:
$ docker build .
Sending build context to Docker daemon 25.11 MB
Step 1/7 : FROM ruby:2.4
 ---> 68de654ed5ee
Step 2/7 : MAINTAINER Samuel Cochran<EMAIL_ADDRESS> ---> Running in 00b0da31dc31
 ---> 01fd9d897cea
Removing intermediate container 00b0da31dc31
Step 3/7 : RUN gem install mailcatcher
 ---> Running in 1802f2c92402
Building native extensions.  This could take a while...
Successfully installed eventmachine-<IP_ADDRESS>
Successfully installed mime-types-data-3.2016.0521
Successfully installed mime-types-3.1
Successfully installed mail-2.6.6
Successfully installed rack-1.6.8
Successfully installed tilt-2.0.7
Successfully installed rack-protection-1.5.3
Successfully installed sinatra-1.4.8
Building native extensions.  This could take a while...
Successfully installed sqlite3-1.3.13
Successfully installed daemons-1.2.4
Building native extensions.  This could take a while...
Successfully installed thin-1.5.1
Successfully installed skinny-0.2.4
Successfully installed mailcatcher-0.6.5
13 gems installed
 ---> f92d6cc5c1bb
Removing intermediate container 1802f2c92402
Step 4/7 : EXPOSE 1025
 ---> Running in 387c9799668a
 ---> 1ca36241b522
Removing intermediate container 387c9799668a
Step 5/7 : EXPOSE 1080
 ---> Running in 52c8fd07114f
 ---> f82f2eb6c4eb
Removing intermediate container 52c8fd07114f
Step 6/7 : ENTRYPOINT mailcatcher -f
 ---> Running in 1d03aa53d9f2
 ---> cd73300aeed0
Removing intermediate container 1d03aa53d9f2
Step 7/7 : CMD --ip <IP_ADDRESS>
 ---> Running in 17f5300e0244
 ---> c2a48b773a44
Removing intermediate container 17f5300e0244
Successfully built c2a48b773a44

Note that the split between CMD and ENTRYPOINT is designed so that you can docker run mailcatcher and it works fine, or you can override the arguments for more control like docker run mailcatcher --ip <IP_ADDRESS>. Again, this seems to be working fine for me locally:
$ docker run mailcatcher --ip <IP_ADDRESS>
Starting MailCatcher
==> smtp://<IP_ADDRESS>:1025
==> http://<IP_ADDRESS>:1080

@sj26 I pulled the repo and did a docker build -t rorpage/mailcatcher . and then tried to run that. It acted like it didn't want to start.
The selenium dependency is loading during the Travis CI build, and it looks like my PR and others before it have been failing because selenium-webdriver 3.4.3 requires Ruby >= 2.0.
I am 100% okay with abandoning this PR if you feel it's unwarranted. I just needed to make these changes to make it work locally. Thanks for your feedback!

I'm curious why it's not working for you, but afaik this is all working as intended, so I'll close this. Sounds like you've got a solve for you problem: using a forked Dockerfile. Thanks. :-)


Update samples for messaging API

Purpose

...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Test the code

What to Check
Verify that the following are valid

...

Other Information

@hthatukuru can you take a look and see if this is good to go? Thanks for the help!


Refactor serialization/deserialization

Refactor the serialization and deserialization of packets. In an ideal world, we should use serde to handle all types of serial/deserialization operations if possible.

I have been looking at this extensively, and there's a number of reasons why we may want to avoid using serde for this:

Serde's deserializer trait requires a lot of boilerplate for types that we don't need to support
Properties have non-sequential property identifiers. This means that we cannot use #[derive(Deserialize, Serialize)] on them, as the enum position is encoded as opposed to the property ID.
Manual implementation of deserialize and serialize for properties is not possible without restructuring the Property, as we need to deserialize multiple values (the property and the value), but the serde traits consume deserializer when deserializing a single value.

After an implementation in #101, it was found that many of the drawbacks can be worked around through custom implementation of a deserializer. There is a small amount of manual impl Deserialize and impl Serialize required for the properties and packets themselves, but the rest of the types may be derived at will.


Adding redis 'KEYS' operator.

This change makes developer avoid using of _cache private method for retrieving redis keys using patterns.

@frowzyispenguin Thanks for this patch :+1: However, the current thread is to keep Redis backend simple and compatible with other builtin backends. You can use the django-redis package if you need Redis-specific features.
You can start a discussion on the django-developers mailing list if you don't agree.


final

@vernondmonte congrats on finishing the codelab! Looks like you opened this PR by accident, I'm going to close it


Update ja.json

Hey, @Aesc3625, you changed other language files as part of your PR, but that would cause conflicts in others' PRs. Please don't do this. My #331 already addresses this key name change in a better way.
Last time someone did that, my PR was not accepted at all, and I had to do a manual merge to fix the conflict properly.

Thank you for the update!


build: add missing include lists

rootDir doesn't imply include, so output files were being incorrectly included as inputs.  Besides being less efficient, this made it necessary to clean before each TypeScript build.

thanks for this @amcasey ! I had addressed this in another unrelated in progress PR for monaco, but this is an even better way to fix it. it'll be so nice to not have to clean between builds, thanks!

@acao I didn't want to mess with it, but you might also consider updating your build script: https://github.com/graphql/graphiql/blob/master/package.json#L24.

yep, thats what i was referring to in my last comment


[Task]

Description
Due alibaba dubbo is no longer officially maintained and is not compatible with Java17.
We decide remove Alibaba Dubbo Support in Apache ShenYu. See Vote https://lists.apache.org/thread/7v13h4ohnw2nd2d6f2vrm1s6jyymjmrf
Task List

Remove Alibaba Dubbo Support
Test

ok, has assigned to you.
Please remove the Alibaba Dubbo in shenyu gateway, integrated test, e2e test, shenyu client, shenyu examples and more.

should alibaba-dubbo and spring-cloud-alibaba-dubbo both be removed ?

yes. we keep the apache dubbo.

should alibaba-dubbo and spring-cloud-alibaba-dubbo both be removed ?

yes. we keep the apache dubbo.

ok 👌，  Understood


raspberrypi0-2w-64: Add device type

Change-type: patch
Signed-off-by: Alexandru Costache<EMAIL_ADDRESS>

Hi @nghiant2710 , as usual, we'll need base images for this device type


validating positively for a missing timezone

Came by this in a discussion, we opened a bug report. Probably a isse.
Description of the Issue and Steps to Reproduce:

Validating a ISO 8601 formatted date without timezone declaration in non-strict mode always results as true even when the timezone is missing. Validating in strict mode is not an alternative because then the entire date must be mapped, which can't be done in case the exact formatting of the remainder of the date isn't known at programming time.

import { module, test } from '../qunit';
import moment from '../../moment';

module('bugreport');

test('validating positively for a missing timezone', function (assert) {
    var validated = moment("2097-07-16T19:20:30.45", 'Z').isValid();
    assert.notOk(validated, 'We expect a date without a expressively mentioned timezone as invalid');
});

Please include the values of all variables used.
Environment:

unit test suite

Examples: Chrome 49 on OSX, Internet Explorer 10 on Windows 7, Node.JS 4.4.4 on Ubuntu 16.0.4
Both the browser and the OS are important to us, particularly if you have an unsual environment like an IOT application.
Other information that may be helpful:

The time zone setting of the machine the code is running on
The time and date at which the code was run
Other libraries in use (TypeScript, Immutable.js, etc)

If you are reporting an issue, please run the following code in the environment you are using and include the output:
console.log( (new Date()).toString())
console.log((new Date()).toLocaleString())
console.log( (new Date()).getTimezoneOffset())

Thu Nov 24 2016 11:03:09 GMT+0100 (CET)
2016-11-24 11:03:09
-60

node.js / moment - latest development master
Ensure your issue is isolated to moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.

What I think you are saying here is that you believe that an ISO8601 date must always include an offset. That is not the case. Per the standard, you can omit the offset, in which case the timestamp is interpreted as local time.
It is worth noting that an offset is not a time zone - I live in the America/Los_Angeles time zone, which sometimes has an offset of -8:00 and sometimes -7:00.
If you wanted to specifically validate the existence of an offset, then the following code would do the trick:
moment("2097-07-16T19:20:30.45", 'YYYY-MM-DDTHH:mm:ss.SSZ', true).isValid();
false

Thanks for answering. We had a lengthy discussion and I will pass on the info


Add Hydrus Network

Please also add shortcuts for server.exe.
Move extract_dir out of architectureblock.
Add architecture block in autoupdate.
No need to use cleanVersion.
I'm not sure if it's a good idea to persist the whole db directory. There is a sqlite3.exe in it.

hydrus-network.json
{
    "version": "373",
    "description": "A personal booru-style media tagger",
    "homepage": "https://hydrusnetwork.github.io/hydrus/",
    "license": "WTFPL",
    "architecture": {
        "64bit": {
            "url": "https://github.com/hydrusnetwork/hydrus/releases/download/v373/Hydrus.Network.373.-.Windows.-.Extract.only.zip",
            "hash": "5dd7b27159e366a846f293ccadaf48f6a8b5b05ad963e49cbacf8f373751b40a"
        }
    },
    "extract_dir": "Hydrus Network",
    "post_install": "Get-ChildItem \"$persist_dir\\db\" -File | Copy-Item -Destination \"$dir\\db\" -Force",
    "uninstaller": {
        "script": "Get-ChildItem \"$dir\\db\\*\" -Include 'client*', 'server*' -File | Copy-Item -Destination \"$persist_dir\\db\" -Force"
    },
    "bin": [
        [
            "client.exe",
            "hydrusclient"
        ],
        [
            "server.exe",
            "hydrusserver"
        ]
    ],
    "shortcuts": [
        [
            "client.exe",
            "hydrus client"
        ],
        [
            "server.exe",
            "hydrus server"
        ]
    ],
    "persist": [
        "db\\client_files",
        "db\\server_files"
    ],
    "checkver": {
        "github": "https://github.com/hydrusnetwork/hydrus"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/hydrusnetwork/hydrus/releases/download/v$version/Hydrus.Network.$version.-.Windows.-.Extract.only.zip"
            }
        }
    }
}

Alright, I have fixed the persistence. According to the hydrus network site, when the db does a backup, it saves client.db, client.caches.db, client.mappings.db, client.master.db, and client_files.
Apparently all settings, user files, etc. are stored in these, so everything else should be fine outside of it.

Anything else need to be done to this? Been using for about a week now, seems to be working well.

How often is sqlite executable updated?

It was last updated july 11. about ~5 months ago


Update covid_results_metadata with FK to item_lineage

User Story
As a receiver I want to ensure that all summary reporting of covid data is accurate and complete so that I can more easily and rapidly see metrics and reports.
Description/Use Case
Right now there is a loose connection between results metadata and the report that it came from. The underlying structure is sufficient to ensure that the connection is there and usable for summary reporting but could be made stronger to ensure stability, data quality, and performance. Making this change will give a database-level assurance that there will never be an unlinked covid metadata record and we are guaranteed to always know exactly which report generated the metadata.
Risks/Impacts/Considerations

Need to verify that the item indexes are correct to backfill all existing foreign keys
performance impact while updating every row in covid_results_metadata
risk of missing an underlying database function that will need to be updated to use the new foreign key
risk of missing metabase queries that will need to be updated to use the new foreign key

Dev Notes:

Check all code for use of item_index column of covid_results_metadata
check all database functions
check all metabase queries

Acceptance Criteria

covid_results_metadata has a foreign key column to item_lineage
all rows in covid_results_metadata contain a value in the FK column
report_index column no longer exists on covid_results_metadata
report_id column no longer exists on covid_results_metadata
all postgres functions still operate as expected
all metabase queries still operate as expected

Overridden by Mo's metadata proposal; closing.


Add node selector on CR

In order to schedule goremote workloads on the right node a node selector must be put in place to run from that node together with other containers that may be the test targets for the work being done in the operators.

Done adding the NodeSelector to CR and Deployment + adjusting the CR yaml file accordingly.
c3de277570ac18ded86b4fbae3b75f7e7ad0099e


'NoneType' object has no attribute 'value'

I'm create a ipynb file to call the function but when i run _init_inception i keep getting this message when run to
shape = [s.value for s in shape]
I'm using tensorflow 2.0 so I have to use tf.compat.v1 for this one, does it create any difference than the original tensorflow ? Can anyone help me, I don't know how to fix this

This code is a few years outdated. You’re going to have to use an old
version of tensor flow or code it from first principles.
On Sat, Aug 19, 2023 at 7:59 AM vinhvd749 @.***> wrote:

I'm create a ipynb file to call the function but when i run
_init_inception i keep getting this message when run to
shape = [s.value for s in shape]
I'm using tensorflow 2.0 so I have to use tf.compat.v1 for this one, does
it create any difference than the original tensorflow ? Can anyone help me,
I don't know how to fix this
—
Reply to this email directly, view it on GitHub
https://github.com/sbarratt/inception-score-pytorch/issues/16, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AB7LUGJ57DVR7CWFTOXX6MTXWCTCBANCNFSM6AAAAAA3WQ5PIA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Add functions to clear breadcrumbs and bulk set tags and extras in the scope

Q
A

Branch?
2.2 (develop)

Bug fix?
no

New feature?
yes

BC breaks?
no

Deprecations?
no

License
MIT

This closes #797 by implementing the setTags, setExtras and clearBreadcrumbs methods on the Scope class. I also refactored the tests to stop relying on reflection to access the active scope of an hub. I wonder if it makes sense to deprecate all the getters on the scope as the other SDKs do not implement them

@HazAT should we deprecate the getters on the Scope class and discourage their usage?

@ste93cry Yes, we could add @deprecated before we make them protected or something.

Since they are marked as @internal we can remove them immediatly without breaking BC per PHPDoc-definition as they should not be used outside the application or library:

The @internal tag is used to denote that associated Structural Elements are elements internal to this application or library


Model training

Dear Author
Hi dalao, I am a rookie and I found your project on github and was interested in it.
I followed the help instructions you posted on github step by step to configure the environment and then also ran the code for that training, I am training on qm9 dataset.
But I didn't find this epoch related code, I don't know how many times this epoch is, can I modify this epoch by myself? Can I modify this epoch by myself? How do I do it, and do I refer to the help notes you posted?
I really hope to receive your reply, thank you very much!

One more question, in which directory is the output saved after the training is done? In other words where is the output after training?

Hi @ldhkc ,
sorry for the delayed reply! I'm glad you're interested in our models.
For training cG-SchNet, we usually do not rely on a maximum number of epochs. Instead, we use a learning rate scheduler that reduces the learning rate if the validation loss does not improve for X epochs and terminates training as soon as a minimum learning rate Y is achieved. Training is also stopped if the validation loss does not improve for Z consecutive epochs.
The default values are currently X=10, Y=1e-6, and Z=25 and you can set them in the CLI by using task.scheduler_args.min_lr=X, task.scheduler_args.patience=Y, and callbacks.early_stopping.patience=Z, respectively.
If you just want to play around a bit and don't need to train the model until convergence, you can still specify a maximum number of epochs, e.g. 20, for training with trainer.max_epochs=20.
Regarding your second question, by default, the training will use your current working directory and create the following folder: /models/qm9_${globals.name}, where you can set globals.name in the CLI. The checkpoint of the best model is stored at /models/qm9_${globals.name}/best_model at the end of training. You can use it to generate molecules by following our instructions here.
Hope this helps!
Best regards,
Niklas

Hi @ldhkc , sorry for the delayed reply! I'm glad you're interested in our models.
For training cG-SchNet, we usually do not rely on a maximum number of epochs. Instead, we use a learning rate scheduler that reduces the learning rate if the validation loss does not improve for X epochs and terminates training as soon as a minimum learning rate Y is achieved. Training is also stopped if the validation loss does not improve for Z consecutive epochs. The default values are currently X=10, Y=1e-6, and Z=25 and you can set them in the CLI by using task.scheduler_args.patience=X, task.scheduler_args.min_lr=Y, and callbacks.early_stopping.patience=Z, respectively.
If you just want to play around a bit and don't need to train the model until convergence, you can still specify a maximum number of epochs, e.g. 20, for training with trainer.max_epochs=20.
Regarding your second question, by default, the training will use your current working directory and create the following folder: /models/qm9_${globals.name}, where you can set globals.name in the CLI. The checkpoint of the best model is stored at /models/qm9_${globals.name}/best_model at the end of training. You can use it to generate molecules by following our instructions here.
Hope this helps! Best regards, Niklas

Ok ok, thank you very much for your reply, I'm just in the trying stage now, some time ago I referred to the help instructions on your github and found the .yaml file and added the max_epochs parameter in it, since I'm in the trying stage, I'm just going to set the value small, then after the training there will be a test, and at the end, it's going to output some test metrics, as well as the best model file. In a follow up, I would consider letting it train itself to a stop and use it for generating molecules and such in conjunction with the follow up help instructions you posted. Lastly, thank you very much for the help I received from your reply!

One more question. Can I leave you a contact? If I have any questions in the subsequent fiddling around I may have to come and ask you for advice, thank you very much.

Sorry, author, there are a lot of questions, that is, I would like to ask this training weights are also saved to that place ah? And is the main function for training the cli.py py file?

Hi author, I want to visualize this generated molecule, but I get an error that it can't be displayed, how can I solve this, I have set the visualization parameter to True.

Hi author, now I have another problem, that is, I first trained only a few epochs, I did the training on the server, then it also generated those files as you said in the generator section, e.g.: the directory containing the files best_model, cli.log, config. yaml etc. Then I refer to what you said about this modeldir being the path to the directory containing the files mentioned above, in other words this model dir is the path to the gm1 directory, and then I modified it according to the code you used to generate the molecule, and then I got an error when I ran it from the command line. Can you show me what the problem is? I also asked chatgpt and tried a lot but still got an error!

Hi @ldhkc ,
the problem is that the config file generate_molecules.yaml is not in your configs path (/root/miniconda3/envs/gschnet/my_gschnet_configs). You should copy all the files from gschnet/src/schnetpack_gschnet/configs to your configs path. This should solve the problem.

Sorry, author, there are a lot of questions, that is, I would like to ask this training weights are also saved to that place ah? And is the main function for training the cli.py py file?

If you mean the weights of the trained model, yes, they are stored in the file best_model.
cli.py contains the loop for molecule generation. For model training, we rely on the routine defined in the schnetpack package (you can find it here).

Hi author, I want to visualize this generated molecule, but I get an error that it can't be displayed, how can I solve this, I have set the visualization parameter to True.
Uploading 2023-11-30 16-51-59 的屏幕截图.png…

Sorry, your screenshot has not been uploaded. Can you provided it or the error-trace? It is hard to guess what the problem is without more information.
Best regards,
Niklas

One more question. Can I leave you a contact? If I have any questions in the subsequent fiddling around I may have to come and ask you for advice, thank you very much.

Hi @ldhkc ,
Please post your questions as issues here. In this way, my answers can also benefit other people who wonder about similar problems.
Best regards
Niklas

One more question. Can I leave you a contact? If I have any questions in the subsequent fiddling around I may have to come and ask you for advice, thank you very much.

Hi @ldhkc ,
Please post your questions as issues here. In this way, my answers can also benefit other people who wonder about similar problems.
Best regards Niklas
Okay, okay. Thank you very much.

Hi author, I want to visualize this generated molecule, but I get an error that it can't be displayed, how can I solve this, I have set the visualization parameter to True.
Uploading 2023-11-30 16-51-59 的屏幕截图.png…

Sorry, your screenshot has not been uploaded. Can you provided it or the error-trace? It is hard to guess what the problem is without more information.
Best regards Niklas
Thank you very much, I've fixed this latter issue

Hi author, now I have another problem, that is, I first trained only a few epochs, I did the training on the server, then it also generated those files as you said in the generator section, e.g.: the directory containing the files best_model, cli.log, config. yaml etc. Then I refer to what you said about this modeldir being the path to the directory containing the files mentioned above, in other words this model dir is the path to the gm1 directory, and then I modified it according to the code you used to generate the molecule, and then I got an error when I ran it from the command line. Can you show me what the problem is? I also asked chatgpt and tried a lot but still got an error!

Hi @ldhkc , the problem is that the config file generate_molecules.yaml is not in your configs path (/root/miniconda3/envs/gschnet/my_gschnet_configs). You should copy all the files from gschnet/src/schnetpack_gschnet/configs to your configs path. This should solve the problem.
Yes, I re-referred to your help file later and managed to solve the problem

As far as I can see, all issues have been resolved. If this is not correct, feel free to re-open the issue!
Best regards
Niklas


adding missing keys

Coverage remained the same at 100.0% when pulling 546fb840ebd1e249d8ddbcb6a28080d0d0767a3e on Gilad-Kutiel-Lib:master into 2f7599d1291a020974dbb1ef92cb4a59d75a7af5 on thiamsantos:master.

Awesome work @gkutiel :tada:
Could you please add these new keys to the readme?

Great!

Done. note, however, that I only updated the keycode.js file, not sure if I needed to generate other as well.

Coverage remained the same at 100.0% when pulling a905dcb452f2717d51c0102f12850a6c27bbe5cd on Gilad-Kutiel-Lib:master into 2f7599d1291a020974dbb1ef92cb4a59d75a7af5 on thiamsantos:master.

Done. note, however, that I only updated the keycode.js file, not sure if I needed to generate other as well.

You done the right thing.
Your changes are already published. Thank you!!!


[Feature][Project] change the owner of project/resource

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
add the feature : change the owner of projects/resources
Use case
i have a situation:
When a person's job changes, the owner of his projects/resources can be transformed to others.
Related issues
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I can contribute it, please assign to me


AttributeError: module 'jax.random' has no attribute 'KeyArray'

I encountered the error while training the UNet.
Training the UNet...
Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 18, in
from diffusers import AutoencoderKL, DDPMScheduler, StableDiffusionPipeline, UNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/init.py", line 27, in
from .pipelines import OnnxRuntimeModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/init.py", line 18, in
from .dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/init.py", line 1, in
from .pipeline_dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py", line 21, in
from ..pipeline_utils import AudioPipelineOutput, DiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py", line 39, in
from ..models.modeling_utils import _LOW_CPU_MEM_USAGE_DEFAULT
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/init.py", line 31, in
from .unet_2d_condition_flax import FlaxUNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/unet_2d_condition_flax.py", line 25, in
from .modeling_flax_utils import FlaxModelMixin
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 45, in
class FlaxModelMixin:
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 192, in FlaxModelMixin
def init_weights(self, rng: jax.random.KeyArray) -> Dict:
File "/usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py", line 54, in getattr
raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.random' has no attribute 'KeyArray'
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=500', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/t', '--pretrained_model_name_or_path=/content/stable-diffusion-custom', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/t/instance_images', '--output_dir=/content/models/t', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/t/captions', '--instance_prompt=', '--seed=805484', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1500']' returned non-zero exit status 1.
Something went wrong

Getting similar error, while loading session.
1.5 Detected
Session found, loading the trained model ...
Traceback (most recent call last):
File "/content/diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py", line 19, in
from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt
File "/usr/local/lib/python3.10/dist-packages/diffusers/init.py", line 27, in
from .pipelines import OnnxRuntimeModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/init.py", line 18, in
from .dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/init.py", line 1, in
from .pipeline_dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py", line 21, in
from ..pipeline_utils import AudioPipelineOutput, DiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py", line 39, in
from ..models.modeling_utils import _LOW_CPU_MEM_USAGE_DEFAULT
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/init.py", line 31, in
from .unet_2d_condition_flax import FlaxUNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/unet_2d_condition_flax.py", line 25, in
from .modeling_flax_utils import FlaxModelMixin
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 45, in
class FlaxModelMixin:
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 192, in FlaxModelMixin
def init_weights(self, rng: jax.random.KeyArray) -> Dict:
File "/usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py", line 54, in getattr
raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.random' has no attribute 'KeyArray'
Conversion error, if the error persists, remove the CKPT file from the current session folder

Same problem, did anyone solve it?

Same problem here, problem with jax

Also seeing the same.  AttributeError: module 'jax.random' has no attribute 'KeyArray'

Same problem here.

Same problem here! :(
Training the UNet...
Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 18, in
from diffusers import AutoencoderKL, DDPMScheduler, StableDiffusionPipeline, UNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/init.py", line 27, in
from .pipelines import OnnxRuntimeModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/init.py", line 18, in
from .dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/init.py", line 1, in
from .pipeline_dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py", line 21, in
from ..pipeline_utils import AudioPipelineOutput, DiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py", line 39, in
from ..models.modeling_utils import _LOW_CPU_MEM_USAGE_DEFAULT
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/init.py", line 31, in
from .unet_2d_condition_flax import FlaxUNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/unet_2d_condition_flax.py", line 25, in
from .modeling_flax_utils import FlaxModelMixin
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 45, in
class FlaxModelMixin:
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 192, in FlaxModelMixin
def init_weights(self, rng: jax.random.KeyArray) -> Dict:
File "/usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py", line 54, in getattr
raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.random' has no attribute 'KeyArray'
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/fkvnd-pro2', '--pretrained_model_name_or_path=/content/stable-diffusion-v2-512', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/fkvnd-pro2/instance_images', '--output_dir=/content/models/fkvnd-pro2', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/fkvnd-pro2/captions', '--instance_prompt=', '--seed=71560', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1500']' returned non-zero exit status 1.
Something went wrong

Ditto

jax.random.KeyArray was removed in JAX v0.4.24. current diffusers only work with JAX v0.4.23 or earlier.
add under requirements:
!pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

Worked like a charm. Thank you

jax.random.KeyArray was removed in JAX v0.4.24. current diffusers only work with JAX v0.4.23 or earlier.
add under requirements:
!pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

Still having issues:
0% 0/5600 [00:00<?, ?it/s]Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 665, in main
for step, batch in enumerate(train_dataloader):
File "/usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py", line 348, in iter
current_batch = next(dataloader_iter)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 631, in next
data = self._next_data()
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 675, in _next_data
data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 356, in getitem
instance_image = Image.open(path)
File "/usr/local/lib/python3.10/dist-packages/PIL/Image.py", line 3283, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file '/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Crelan_1004/instance_images/crelanillu(44).txt'
0% 0/5600 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--external_captions', '--offset_noise', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Crelan_1004', '--pretrained_model_name_or_path=/content/stable-diffusion-v1-5', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Crelan_1004/instance_images', '--output_dir=/content/models/Crelan_1004', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Crelan_1004/captions', '--instance_prompt=', '--seed=64234', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=5600']' returned non-zero exit status 1.
Something went wrong

Can someone please help me with where specifically I need to put this. I am very new to all this, muddled my way through the colab workbook hit the error and came here. Thank you in advance!

Can someone please help me with where specifically I need to put !pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html I am very new to all this, muddled my way through the colab workbook hit the error and came here. Thank you in advance!

You have to click "show code" in the dependencies cell.
Then you just paste it under the "!pip install gradio..."
That made it work for me :)

Can someone please help me with where specifically I need to put !pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html I am very new to all this, muddled my way through the colab workbook hit the error and came here. Thank you in advance!

You have to click "show code" in the dependencies cell. Then you just paste it under the "!pip install gradio..."
That made it work for me :)

Legend thank you will try it now :D

Yeah, just started having this problem. DjNastyMagic fix worked.

I applied fix by DJNastyMagic.
But have now this error:
Training the UNet...
Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 512, in main
vae = AutoencoderKL.from_pretrained(args.pretrained_model_name_or_path, subfolder="vae")
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 558, in from_pretrained
raise ValueError(
ValueError: Cannot load <class 'diffusers.models.autoencoder_kl.AutoencoderKL'> from /content/stable-diffusion-custom because the following keys are missing:
decoder.mid_block.attentions.0.key.bias, encoder.mid_block.attentions.0.value.weight, decoder.mid_block.attentions.0.proj_attn.bias, decoder.mid_block.attentions.0.value.bias, decoder.mid_block.attentions.0.query.bias, decoder.mid_block.attentions.0.query.weight, encoder.mid_block.attentions.0.proj_attn.bias, encoder.mid_block.attentions.0.query.weight, encoder.mid_block.attentions.0.key.weight, encoder.mid_block.attentions.0.value.bias, decoder.mid_block.attentions.0.proj_attn.weight, encoder.mid_block.attentions.0.query.bias, decoder.mid_block.attentions.0.value.weight, encoder.mid_block.attentions.0.proj_attn.weight, encoder.mid_block.attentions.0.key.bias, decoder.mid_block.attentions.0.key.weight.
Please make sure to pass low_cpu_mem_usage=False and device_map=None if you want to randomely initialize those weights or else make sure your checkpoint file is correct.
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Mysession', '--pretrained_model_name_or_path=/content/stable-diffusion-custom', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Mysession/instance_images', '--output_dir=/content/models/Mysession', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Mysession/captions', '--instance_prompt=', '--seed=601321', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1800']' returned non-zero exit status 1.
Something went wrong

ERROR INSTALLING CUDA
aceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 535, in main
import bitsandbytes as bnb
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/init.py", line 6, in
from .autograd._functions import (
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/autograd/_functions.py", line 5, in
import bitsandbytes.functional as F
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/functional.py", line 13, in
from .cextension import COMPILED_WITH_CUDA, lib
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py", line 41, in
lib = CUDALibrary_Singleton.get_instance().lib
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py", line 37, in get_instance
cls._instance.initialize()
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py", line 27, in initialize
raise Exception('CUDA SETUP: Setup Failed!')
Exception: CUDA SETUP: Setup Failed!
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/bEBA', '--pretrained_model_name_or_path=/content/stable-diffusion-v1-5', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/bEBA/instance_images', '--output_dir=/content/models/bEBA', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/bEBA/captions', '--instance_prompt=', '--seed=247601', '--resolution=768', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1500']' returned non-zero exit status 1.
Something went wrong

jax.random.KeyArray was removed in JAX v0.4.24. current diffusers only work with JAX v0.4.23 or earlier.
add under requirements:

Please help me I did this and now I have this error message :
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flax 0.8.5 requires jax>=0.4.27, but you have jax 0.4.23 which is incompatible.
numpyro 0.15.3 requires jax>=0.4.25, but you have jax 0.4.23 which is incompatible.
numpyro 0.15.3 requires jaxlib>=0.4.25, but you have jaxlib 0.4.23+cuda12.cudnn89 which is incompatible.
optax 0.2.3 requires jax>=0.4.27, but you have jax 0.4.23 which is incompatible.
optax 0.2.3 requires jaxlib>=0.4.27, but you have jaxlib 0.4.23+cuda12.cudnn89 which is incompatible.
orbax-checkpoint 0.6.4 requires jax>=0.4.26, but you have jax 0.4.23 which is incompatible.
I don't know what to do


Session-level consistency across multiple SDK clients/across different processes

Describe the bug
We have a Single-region account with Session consistency that is utilized by multiple v3 SDK clients (across multiple processes).
All SDK clients live inside APIs hosted in Azure K8s.
After executing a large number of write operations using an SDK client (client X), some of the other SDK clients (clients Y,Z,...) do not fetch the items included in some of the write operations of client (X).

A stored procedure is used to generate & execute the query
Have tried querying with clients (Y,Z,...) predating client (X), as well as clients (Y,Z,...) instantiated after client (X).
Some clients (e.g. only client Y) will keep on omitting the items written by client (X)
Querying from Cosmos portal includes items written by client (X) in the result set
CosmosClient is setup with the configuration below:

CosmosClientOptions connectionPolicy = new()
{
    ConnectionMode = ConnectionMode.Direct,
};
return new CosmosClient(<endpoint>, <key>, connectionPolicy);

This is more of a question rather than a bug report:
-Is there any guarantee/threshold/estimation of how long it may take for different sessions to "converge"(produce the same result set for the same query)?
-Is there any way to update session info on SDK clients apart from using session tokens (e.g. recycling an SDK client)?
Expected behavior
Clients Y,Z,... should produce consistent result sets for the same query after a certain amount of time.
Actual behavior
Clients Y,Z,... produce inconsistent result sets for the same query several hours after the write operations.
Environment summary
Azure CosmosDB account region: South Central US
SDK Version:  3.29.0
SDK host: Docker container/Azure K8S
OS Version (e.g. Windows, Linux, MacOSX): Debian GNU/Linux 11 (bullseye)

Based on the public documentation: https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels#session-consistency

... This guarantee assumes a single “writer” session or sharing the session token ...

If the client didn't initiate a write to a physical partition, the client doesn't contain a session token in its cache and reads to that physical partition behave as reads with Eventual Consistency...

What you are describing is that the writer of the initial operation is not passing the SessionToken to the other clients, thus, you are really using Eventual Consistency.
There are no guarantees in that consistency of when there will be convergence.

@ealsur Thanks for the explanation & for providing the link to documentation.


Implement SuperProperty.

Closes #1147.

Just the basics for now, no early error and such.

Lgtm

:+1:

You must check that super is directly followed by ((in parseLeftHandSideExpressionAllowCall), . or [. super access can only happen in a function and super call can only happen in a constructor of a class that has extends clause.

This is great thanks!

@ikarienator Updated to account for your review. This however doesn't address the extends clause (deliberate for now, to get something in quickly first).


Update the riak_kv_backend behavior to use -callback specs

This updates the riak_kv_backend behavior to use -callback directives instead of the old-style behaviour_info system. I've also improved some related type specifications in a few places.


Are the Postgres initdb default arguments corret?

createDatabase, initScript, and initialDatbases all rely on the unparameterized execution of psql to initialize databases and run initialization scripts. But running psql unperameterized uses the default role name postgres to connect to the server for initialization. Yet devenv's  default when initializing the database is to use the username of the user running the process to create its initial roles and databases.
So, e.g. if foobar is running devenv up with a postgres service defined, the role foobar and database foobar are created by default, and no postgres role is created. So when createDatabase, initScript, and initialDatabases attempt to initialize the postgres service according to the devenv configuration, and they use the default postgres role when connecting, it results in connection failure and an incomplete initialization.
Am I missing something? It seems like https://github.com/cachix/devenv/blob/f5d594f79022f4468fae9d04418cb607890a9347/src/modules/services/postgres.nix#L87 should prefix cfg.initdbArgs with -U postgres to ensure that the postgres role required by the initialization scripts exists. Of course, that change would mean that no role exists named after the running user.
See https://wiki.postgresql.org/wiki/First_steps for details on initdb's default behavior.
It seems like a lot of this could be remedied by an initialRole settings, which defaults to the current user for backward compatibility, which is used in all the init scripts instead of relying on unparameterized executio of psql.

I'll leave this here for posterity. Since devenv is --impure, there was a PGUSER polluting my environment.