[Question]: How to set max output tokens with llama_index, Ollama and Mixtral ?

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
How to set max output tokens with llama_index, Ollama and Mixtral ? I tried this but it doesn't work. Someone can help ?
import pandas as pd
import os
from llama_index.llms.ollama import Ollama
from transformers import AutoTokenizer
from llama_index.core import Settings
Configure the settings for the LLM
Settings.llm = Ollama(model="mixtral:8x7b-instruct-v0.1-q5_K_M", max_tokens=5)
Initialize the Ollama model with the modified settings
llm = Settings.llm

@antoinelemor looks like that setting isn't currently exposed. Does ollama provide config for that value?

@logan-markewich the num_predict seems to allow for that

@antoinelemor but it's not actually telling the LLM to output more or less, it's just creating room for that amount of tokens

@logan-markewich ok. Is there any solutions to that?

Not sure, I think someone just needs to make a PR to allow configuring that (if ollamas api has a config for that)


subfolder support for game dumps

Title says it all. Rather than dumping a game to sd:/wudump why not have wudump create a subfolder such as sd:/wudump/gamename [gameid]
This way, it won't be necessary to unplug the sd, plug into computer, copy files to pc, delete files on sd, reinsert sd card, launch wudump again and then dump next game, if you were dumping multiple games.
Instead wudump should just change the output filename or put it in a subfolder such as
Super Smash Bros for Wii U [AXFE01]
so it won't overwrite the game dump the next time wudump is launched. Also, thanks for creating this great and very usefully homebrew.

go check out the new version.


Don't build if used any of not supported API

The Blazor FAQs says:

Yes, the .NET runtime used for Blazor supports .NET Standard 2.0. APIs that aren't supported in the browser throw Not Supported exceptions.

There are any list with unsopported APIs of the .NET Standard? Can a MSBuild task used to interrumpt the build and mark as error if any of this APIs are used instead of detect the error in execution time when the exception is thrown?

We don't have the precise list yet of the .NET Standard APIs that will work in Blazor. A lot of APIs already work today. Some APIs will work, but haven't been implemented yet. Others will never work because of the constraints of running in the browser. I can imagine us shipping an analyzer that provides a build time experience for detecting usage of APIs that won't work.


Preload EK app content for EOS customized images

There are some customized images the would need the app content preloaded, so that the user can access it offline.
Content: https://github.com/endlessm/endless-key-content-private/issues/103
AC:

User should be able to access the content either online/offline
User should be able to get the corresponding package based on the locale setting

Tested an es preload image: https://images.endlessos.org/builds/12693/
There are findings:

It would take ~2 mins to run the download process
If the app is started offline, the download progress bar will sit at 1%. It will not continue after re-connect to an internet.
The Library only show the preloaded channels (ie. 8 channels for the current Spanish starter pack)

I think this is going to be fairly straightforward, at least for the case where we've properly preloaded the expected data. For content nodes, I believe that Kolibri will find that everything is present and the scheduled tasks will become no-ops.
The issue is channel database imports. Since channel databases are versioned, Kolibri always tries to download them to see if there's a new version available. However, the collections packs already contain the desired version of the databases. We can check that we already have that version of the database available and skip creating a task for it.
Skipping content task creation would be harder since we'd have to duplicate all the Kolibri code that determines what content files are needed. It's all pretty hairy as it has to descend the content tree in the channel and apply some heuristics to decide what nodes to include and which files from those nodes are needed. I'm hoping we don't need that.
Now, if the preload is missing data that the pack expects, then I don't know how to handle that nicely. We'd need to decide what to do in the case that initial download tasks are failing because of missing network access. Currently it just loops forever trying to restart the tasks over and over. I'm going to consider that handling out of scope for this task.

It's actually news to me that we're scheduling tasks here in the first place. Looking at 53-ek-content-preload, my understanding is the image builder leaves us with a fully populated database and all those content nodes marked available, right? So, why is the explore plugging trying to download stuff at all? I could have sworn it didn't do that before, but maybe I just did a bad job testing things with https://github.com/endlessm/endless-key-content-private/issues/97 :b Sorry for my confusion around this. I had assumed it was working a certain way.
Anyway, um, I kind of feel like the explore plugin should not land on the welcome screen if there is content available in the database. That is, if we're creating that whole download state thing for the first time (somewhere inside https://github.com/endlessm/kolibri-explore-plugin/blob/16954ef941cacaf308bd5a4f4c071f53bea6bff9/kolibri_explore_plugin/collectionviews.py#L641-L655), check if there is any content available, and if there is, exit early with "yep, all's good [everything_is_fine.gif]".
Separately, I think it would be nice to consider a separate general-purpose "bulk import from kolibri/content/bulk-import" plugin here, which should be easier to test (and to point upstream eventually). I described that in https://github.com/endlessm/endless-key-content-private/issues/102. The bit we would need for the image builder to EOS route is the "code that runs when Kolibri starts up" in this document: https://docs.google.com/document/d/15Yc0Tc4oB9hAO-nFCJ_gNDIuAvsBLKsE5UVhzarNWtc/edit?skip_itp2_check=true&pli=1.
One nice thing with that approach is it gives us a way (outside of generating a db.sqlite3 file) for the image builder itself to signal to Kolibri that it has some content to start with, so we aren't doing any guessing and we also know exactly what content pack the user is supposed to be seeing.

Anyway, um, I kind of feel like the explore plugin should not direct the user to the welcome screen if there is content available in the database. That is, if we're creating that whole download state thing for the first time (somewhere inside kolibri_explore_plugin/collectionviews.py), check if there is any content available, and if there is, exit early with "yep, all's good [everything_is_fine.gif]".

That's the way it did work until #863, but that's too simplistic. We need to apply tags during initial setup and the image builder can't do that since the pack selection needs to be delayed to runtime. If we just checked if there was content when the tags hadn't been applied, then the discovery page would be empty.
You could maybe optimize to skip to the tagging if any content exists, but you still need to validate that all the necessary nodes are available or the tagging might fail. So, I think it is appropriate that the downloader is run to ensure that you have all the necessary content. We just have to make it smarter to not actually perform any downloads unless really needed.

Okay, in a separate thread (https://github.com/endlessm/kolibri-explore-plugin/issues/898) I'm going to try my hand at the bulk-import stuff that's in my head :) I'm not 100% sure if it'll work out in time so it shouldn't block what you're working on (and those issues you have in mind are 100% worth solving either way). But I'm hoping it'll give us a way to kind of circumvent what we're running into here.

I'm going to make a release so we can consume this in the flatpak and test it out.

This is available to test in 7.11.0 and in the latest flatpak.

@dbnicholson is there a preloaded image available for the test?

Yeah, https://images.endlessos.org/builds/12861/.

I tested the image (eosimpact-eos5.0-amd64-amd64.231027-160050.es_GT.img) today, the issue is still there as:

"unable to connect" message is show (I guess it needs a translation too?)
Click retry button, it will continue with the download process, but it will sit at 1% over 5 mins
restart the app, it will still stop at 1%.

I will re-open this issue

In the diagnostics:
nov 01 14:37:26 endless endless-key-daemon[3228]: INFO     2023-11-01 14:37:26,886 Enqueuing task {'task': 'kolibri.core.content.tasks.remotechannelimport', 'params': {'channel_id': '359e048230974c8f80db1a95dc80d544', 'channel_name': 'EiE Familias'}} at<PHONE_NUMBER>.886678

Hmm, why is it trying to fetch that channel? Shouldn't it already be in the image? Also:
nov 01 14:37:26 endless endless-key-daemon[3228]: INFO     2023-11-01 14:37:26,887 Attempting connections to variations of the URL: https://kolibri-content.endlessos.org

Uh, that should only be used in the image builder. At runtime studio.learningequality.org should be used. Something must be wrong in the image builder code.

"unable to connect" message is show (I guess it needs a translation too?)

This message comes from Kolibri and I think it's a side effect of triggering a channel metadata download without the content server being available. If we need to translate it, it would have to happen upstream.

Oh, wow. If you have any Kolibri option environment variables set when the homedir is first created, they get persisted in the options.ini file. That's... unexpected. I guess the image builder hook should kolibri configure setup first before setting KOLIBRI_CENTRAL_CONTENT_BASE_URL.

Oh, wow. If you have any Kolibri option environment variables set when the homedir is first created, they get persisted in the options.ini file. That's... unexpected. I guess the image builder hook should kolibri configure setup first before setting KOLIBRI_CENTRAL_CONTENT_BASE_URL.

That sounds like a reasonable solution. Alternatively, it should be fine to delete options.ini at the same time we run kolibri manage deprovision. I don't think we need anything other than defaults in there, and Kolibri will happily make a new one whenever it starts.
Although, indeed, I never noticed that it persists environment variables there. Out of curiousity (and hoping that it would be an easy fix), I checked and it's the same behaviour with Kolibri 0.15.

I tried to debug this directly in kolibri-explore-plugin by mocking a Kolibri homedir with the channels imported the way the image builder does it, but I couldn't reproduce it. I'm flashing the massive 120 GB test image to a USB drive and will try on the real thing.

Ooops... I just realized that https://github.com/endlessm/endless-image-config/pull/1158 has the 3 packs to download as spanish, extras and spanish-extras-preload. That middle one should be spanish-extras. No wonder it was trying to download a channel.
I tried to flash the massive image to a USB drive I had lying around, but it was too small. So today I was going to build a custom image locally and immediately noticed the list of packs was wrong. I'm going to continue with the local build so I can debug it live.

Ooops... I just realized that endlessm/endless-image-config#1158 has the 3 packs to download as spanish, extras and spanish-extras-preload. That middle one should be spanish-extras. No wonder it was trying to download a channel.

No, that's wrong as it's supposed to be the English extras pack.

Argh. The image build has the Endless Key flatpak with kolibri-explore-plugin 7.10.0. The fixes from #899 are in 7.11.0. I think after I merged https://github.com/flathub/org.endlessos.Key/pull/20 I must not have waited enough time for it to be published on flathub.
This build has some of the image builder changes. Even though there's one more useful change to the flatpak I'd like to have, I'm going to download that image and test it.

QA fail. With the updated image, the channel metadata tasks were being skipped. However, my previous assumption that the content tasks would become essentially no-ops was faulty. In the test suite, a couple Kolibri methods were being mocked, and that hid the fact that Kolibri probes the remote server in this scenario even if it already has all the content objects. So, all tasks really need to be skipped.

I hope https://github.com/endlessm/kolibri-explore-plugin/pull/900 fixes this issue. I've triggered a release of kolibri-explore-plugin, then will get that into the flatpak, then to rebuild the test image.

I'm leaving this open until we get actual verification.

@vanessa-chang can you try the image at https://images.endlessos.org/builds/13181/?

Sure. The download is a bit slow here for me. I will try to update the result soon as I can.

@vanessa-chang was having trouble downloading the image, so I ran the test myself. It works! I turned off the network in my VM and started Endless Key. The downloader progress bar jumps immediately to 90% where it runs the (ridiculously slow) tag application. Then it worked as normal with a populated overview and full library.
I think we can go ahead merging and backporting all the things. I'm going to close this kolibri-explore-plugin specific issue and carry on in https://github.com/endlessm/endless-key-content-private/issues/103.

Thanks @dbnicholson for helping the testing.  I finally finished the download! I saw the same thing as it ran fast to 90 % and took around 15 seconds to complete the loading. Then everything works well without the internet.


[GMOD] Problems with addon "LFS Planes"

Without Jolt: Planes fly as expected
With Jolt: After some time, Planes will start to spin around X-axis, making them uncontrolable.
https://user-images.githubusercontent.com/72987745/188310779-4d66bb7f-3ca0-403d-8a5c-16cb00e1a396.mp4

Same with simfphys

#50


change from np.float to float

Motivation
from warning:

/home/runner/work/nwb-conversion-tools/nwb-conversion-tools/nwb_conversion_tools/utils/spike_interface.py:368: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
chan_data = np.float(chan_data)

@bendichter Thanks!


Will this reenable firewall rules/routing when puppet is run

I have the issue where firewalld is being restarted by puppet and the podman rules vanish, does this module get around that somehow (such as redeploying the container), or is that a known limitation?

The module does not address this issue.  There is an open issue for this on the podman project - see:
https://github.com/containers/podman/issues/5431
At this point there does not appear to be a good solution to the underlying problem.  Possible work-arounds might be re-deploying containers after a firewall change, or limiting use of podman to systems where firewalld rules will be stable, but I don't care for either approach.  If/when the upstream issue is addressed I can make any necessary changes to the module.

sounds good, thank you.

FYI, I had to re-work this module to get rootless containers working properly.  In doing so I discovered that rootless containers are unable to create their own firewall rules.  This means that while you can publish container ports from a rootless container, the host firewall must be managed separately to allow the inbound connections to published port(s).  I'm wondering if this will avoid the issue with firewall rules from podman getting clobbered?


Codegen - return interfaces instead of private structs

Is there a reason codegen returns private structs over exported or interfaces? If these methods could return an interface and or in some instances a generic interface, like the one below, it could open up some cool opportunities.
// prisma-client-go
// GENERATED FILE

// generic transaction interface
type Tx[T any] interface {
	ExtractQuery() builder.Query
	IsTx()
	Result() T
}

// example of a model returning the Tx interface
func (r activityCreateOne) Tx() Tx[*ActivityModel] {
	v := NewactivityUniqueTxResult()
	v.query = r.query
	v.query.TxResult = make(chan []byte, 1)
	return v
}

By returning an interface specifically on Tx() we can create our own wrapping interface that enables "query builder" methods.
// developers own wrapper interface
type Executor[T any] interface {
	ExtractQuery() builder.Query
	Exec(ctx context.Context) (T, error)
	Tx() prisma.Tx[T]
}

// query builders functions
func buildActivityQuery(db *db.DB, input Input) Executor[*prisma.ActivityModel] {
	return db.Activity.CreateOne(
		prisma.Activity.Title.Set(input.title),
		prisma.Activity.Description.Set(input.description),
		prisma.Activity.StartDate.Set(input.startDate),
		prisma.Activity.Location.Set(input.location),
	)
}

func buildGroupQuery(db *db.DB, input string) Executor[*prisma.GroupModel] {
	return db.Group.CreateOne(
		prisma.Group.Name.Set(input),
	)
}

// example helper functions that either executes the query
func CreateActivity(ctx context.Context, db *db.DB, input Input) (*prisma.ActivityModel, error) {
	act := buildActivityQuery(db, input)
	return act.Exec(ctx)
}

// or create a transaction
func CreateActivityTx(ctx context.Context, db *db.DB, input Input) (prisma.Tx[*prisma.ActivityModel], error) {
	act := buildActivityQuery(db, input)
	return act.Tx(), nil
}

func DoSomethingTheNeedsTransactions(ctx context.Context, db *db.DB, input Input) (*prisma.ActivityModel, error) {
	act, _ := CreateActivityTx(ctx, db, input)
	group := buildGroupQuery(db, "some name").Tx()
	if err := db.Prisma.Transaction(act, group).Exec(ctx); err != nil {
		return nil, err
	}
	return act.Result(), nil
}

// these same query builders can then be used in a mocks expectation
mock.Activity.Expect(
	BuildActivityQuery(client, Input{}),
).Returns(expected)

That's an interesting suggestion. Do you actually have the need in your app to use this?
The reason most of the methods are private is that most users don't need it, and I wanted to really think about the naming and so forth before making these public.
I prepared one small PR to make the transaction results public and it also renames the transaction interface to a better name: https://github.com/steebchen/prisma-client-go/pull/1180.
When I have some more spare time, I might take another look and work on a bigger PR to make this more unified, maybe with generics where it works or makes sense. Thanks for the suggestion and the example code, that's really helpful!


Fix link to Youtube's example OKRs

First Pull request!!!! 💃  Thank you!!!

Cheers! We're discussing OKRs in our 30-strong company, one of our managers mentioned your awesome list for discussion, hence the pull request. ;)


could not find commit hash for HEAD

I try to running:
npx degit pohunchn/vite-ts-quick web
gives me:
! could not fetch remote https://github.com/pohunchn/vite-ts-quick ! could not find commit hash for HEAD
I checked  system enivroment path and update git latest.
It's not used.

you can try use npx degit pohunchn/vite-ts-quick my-project or npx degit pohunchn/vite-ts-quick#main my-project. also, I think you need check your network when you got could not find commit hash for HEAD or  could not download.


Slice has duration of "Did not end."

Some of my omnitrace proto files "did not end" according to Perfetto. For my work, I am trying to find the end time for certain kernels and when they do not end, it leads to a -1 run time. I heard this is a known issue, but I was told to formally submit this bug (and my other 2) so that they can be properly tracked.
I have attached a screenshot of the behavior. In it you should see the "samples [omnitrace]" slice continue and become white at the end/right and also near the bottom left you can see that the "Duration" says "Did not end."
Thank you.

Likely fixed by buffer flushing fix in #317

Please re-open if https://github.com/AMDResearch/omnitrace/pull/317 does not fix this issue in the upcoming release

Unfortunately, it seems this bug is still in Omnitrace. When I try to load LLaMa2's perfetto file, all of the kernels do not end.

Also I can't seem to reopen this issue. Usually the re-open button is on the bottom and I do not see it.

How big is the perfetto file? Could you be hitting the data limit? Bc it’s strange the samples stop showing up. Samples are not inserted into perfetto until finalization but GPU kernels are so it would be strange (but maybe not impossible) for samples to cause the data limit to be hit and cause perfetto to drop the rest of the records.

Wait, do the GPU kernels not end or do the samples not end? Bc if it’s just the samples, then that really seems like a data limit issue

If the size of the perfetto buffer is the issue, you can either increase it (I think the default is maybe 2 GB) or you can disable Perfetto annotations (which will reduce the data size sent to Perfetto, sometimes very significantly)

To answer the questions:

The Perfetto file is ~900 MB so it does not open in the UI and I have to open it in the Desktop version.

The GPU kernels also do not end. The top samples (or some times main function) has that white at the end, but when I go down into the actual kernels being launched, the reason it's that shade of white is because the last kernel(s) does not end. It has a start time but no end time.

Is there a way to increase the size (as you suggested) using the Perfetto web UI?

Thank you.

I just checked and it looks like the default buffer limit is ~1 GB so it sounds you may be hitting it.
No, the buffer size has nothing to do with the web UI. There is nothing you can do about any existing perfetto files. You need to recollect data with  OMNITRACE_PERFETTO_BUFFER_SIZE_KB set to a larger value and/or set OMNITRACE_PERFETTO_ANNOTATIONS to OFF

We increased the buffer size to ~4 GB and unfortunately, the problem still persists. I've attached a screenshot showing the problem.

@dwchang79 Internal ticket has been created to further investigate your issue. Thanks!

Hi @dwchang79, are you still experiencing this issue? If so, do you have a simple way to reproduce it?

Hi @dwchang79, are you still experiencing this issue? If so, do you have a simple way to reproduce it?

I am no longer at AMD (was on Sabbatical there as a Visiting Scholar), but I believe it is still an issue.

Thanks for the reply! Do you recall any details about when these issues occurred? Did they only occur for a specific workload? Did you see this consistently?

Thanks for the reply! Do you recall any details about when these issues occurred? Did they only occur for a specific workload? Did you see this consistently?

When I first reported it, I was running CoralGEMM (don't remember if DGEMM or SGEMM), but later on it was LLaMa-2. And yes, I would see it consistently every run.
Thank you.

Closing for now as I can't seem to reproduce this. If we see future occurrences of this issue I'll circle back here to update.


Allow testing to be enabled per-account

One drawback is that a single guid can be used for either prod or testing but not both.

Added account config key 'testing'
Removed client configuration key 'testing'
Added server configuration keys 'appspotProd' and 'appspotTesting'
Removed use of window.BASEURL.
Updated realmAPI to accept a url via extraopts.


[🐞] Production build downloads additional ~50kB

Which component is affected?
Qwik Runtime
Describe the bug
Every project built with Qwik downloads 2 additional files (~50kB), even if it only contains simple text.

Reproduction
https://stackblitz.com/edit/qwik-starter-8kv66t?file=src/routes/index.tsx
Steps to reproduce

Download stackblitz project
Build and run
Check network tab

System Info
System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
    Memory: 18.29 GB / 31.93 GB
  Binaries:
    Node: 18.12.1 - ~\AppData\Local\pnpm\node.EXE
    npm: 8.19.2 - ~\AppData\Local\pnpm\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1413.0), Chromium (112.0.1722.39)
    Internet Explorer: 11.0.22621.1

Additional Information
No response

yes, this is a known issue:
https://github.com/BuilderIO/qwik/issues/2998
https://github.com/BuilderIO/qwik/issues/3298
https://github.com/BuilderIO/qwik/issues/3390

Sorry to bump but I would like to know if there has been any progress on this.

For this case possible fix is in 0.105.0 version. After the update, only 260B is downloaded and that's fine with me.

yep, for more interactive websites some additional files are still downloaded. There are two more opened issues for this, so I think this can stay closed.


Get-BcContainerIpAddress is not always returning an IP address

BcContainerHelper 4.0.15.
BcContainerHelper is running as administrator in PowerShell ISE.
Name                           Value
----                           -----
PSVersion                      5.1.17763.3770
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.3770
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

When compiling an AL folder under normal conditions there's a line in the output as seen below.
Downloading symbols: Microsoft_Application_22.0.53722.0.app
Url : http://<IP_ADDRESS>:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=<IP_ADDRESS>&tenant=default

However, I'm often seeing the line below which causes Compile-AppInNavContainer to fail.
Downloading symbols: Microsoft_Application_22.0.54157.54941.app
Url : http://MSFT_NetIPAddress (Name = ";?A8:8:8;55?55;55;", CreationClassName = "", SystemCreationClassName = "", SystemName = ""):7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=<IP_ADDRESS>&tenant=default

I traced this to the line in Compile-AppInNavContainer.
$ip = Get-BcContainerIpAddress -containerName $containerName
When Get-BcContainerIpAddress is working properly, it returns a regular IP address.
C:\Get-BcContainerIpAddress -containerName $containerName
<IP_ADDRESS>

When Get-BcContainerIpAddress is NOT working properly, it returns an object as seen below.
ifIndex                  : 3
PSComputerName           : 249cceb2d487e70e6fffb1f797495efd17e8fd7da27f5d4f44bbf25658f217f9
RunspaceId               : 8c70375e-922d-413e-98e0-6b7d3047725c
Caption                  :
Description              :
ElementName              :
InstanceID               :
CommunicationStatus      :
DetailedStatus           :
HealthState              :
InstallDate              :
Name                     : ;<A8:8:8;55=55;55;
OperatingStatus          :
OperationalStatus        :
PrimaryStatus            :
Status                   :
StatusDescriptions       :
AvailableRequestedStates :
EnabledDefault           : 2
EnabledState             :
OtherEnabledState        :
RequestedState           : 12
TimeOfLastStateChange    :
TransitioningToState     : 12
CreationClassName        :
SystemCreationClassName  :
SystemName               :
NameFormat               :
OtherTypeDescription     :
ProtocolIFType           : 4096
ProtocolType             :
Address                  :
AddressOrigin            : 0
AddressType              :
IPv4Address              : <IP_ADDRESS>
IPv6Address              :
IPVersionSupport         :
PrefixLength             : 8
SubnetMask               :
AddressFamily            : 2
AddressState             : 4
InterfaceAlias           : Loopback Pseudo-Interface 2
InterfaceIndex           : 3
IPAddress                : <IP_ADDRESS>
PreferredLifetime        : 10675199.02:48:05.4775807
PrefixOrigin             : 2
SkipAsSource             : False
Store                    : 1
SuffixOrigin             : 2
Type                     : 1
ValidLifetime            : 10675199.02:48:05.4775807

What's odd is that although it is happening most of the time, it is not 100% of the time.
For example, in the most recent round of testing, it successfully returned the IP address for the first application that compiled and failed on the second application. When I recompile the first app it is now failing again and Get-BcContainerIpAddress only returns the object.
I am creating the BC container the same way I always have, so nothing has changed there.
The only thing that changed was last week I was using BcContainerHelper 4.0.14.
I tried reverting from BcContainerHelper 4.0.15 to 4.0.14 and it made no difference, so I can't really say it is something in the version, even though 4.0.14 was working last week.
I've also tried multiple docker containers at this point.
I just noticed that my docker version is older. I'm going to try updating docker.
Latest stable available Docker Engine version is 23.0.3
Current installed Docker Engine version 20.10.22

Get-BcContainerIpAddress worked once after updating docker, but started failing again.
This is the code fragment in Get-BcContainerIpAddress that is failing.
    $ip = Invoke-ScriptInBcContainer -containerName $containerName -scriptblock {
        if ($global:IP) {
            $ip = $global:IP
        }
        else {
            $ip = ""
            $ips = Get-NetIPAddress | Where-Object { $_.AddressFamily -eq "IPv4" -and $_.IPAddress -ne "<IP_ADDRESS>" }
            if ($ips) {
                $ips | ForEach-Object {
                    if ("$ip" -eq "") {
                        $ip = $_.IPAddress
                    }
                }
            }
            $global:IP = $ip
        }
        $ip
    }

Write-Output ("[" + $ip + "]")

and produces this output
[MSFT_NetIPAddress (Name = ";?A8:8:8;55?55;55;", CreationClassName = "", SystemCreationClassName = "", SystemName = "")]
This fragment of the code will return a proper IP address when executed inside the docker container.
[BC-22-0-53722] PS C:\Run> $ips = Get-NetIPAddress | Where-Object { $_.AddressFamily -eq "IPv4" -and $_.IPAddress -ne "<IP_ADDRESS>" }

[BC-22-0-53722] PS C:\Run> $ips | ForEach-Object { Write-Output $_.IPAddress}
<IP_ADDRESS>

[BC-22-0-53722] PS C:\Run> $global:IP

IPAddress         : <IP_ADDRESS>
InterfaceIndex    : 3
InterfaceAlias    : Loopback Pseudo-Interface 2
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 8
PrefixOrigin      : WellKnown
SuffixOrigin      : WellKnown
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

It appears that wherever $global:IP is being initialized has a problem.
I've updated to BcContainerHelper 4.0.16 and so far, Get-BcContainerIpAddress is returning a regular IP address.
Get-BcContainerIpAddress is failing again after working a few times.
I can further confirm that docker inspect fragment of code is working and it still seems to be a problem with $global:IP.
    $ip = Invoke-ScriptInBcContainer -containerName $containerName -scriptblock {
        if ($global:IP) {
            $ip = $global:IP
        }
        else {
            $ip = ""
            $ips = Get-NetIPAddress | Where-Object { $_.AddressFamily -eq "IPv4" -and $_.IPAddress -ne "<IP_ADDRESS>" }
            if ($ips) {
                $ips | ForEach-Object {
                    if ("$ip" -eq "") {
                        $ip = $_.IPAddress
                    }
                }
            }
            $global:IP = $ip
        }
        $ip
    }

Write-Output ("[" + $ip + "]")

$ip = ""

    if ("$ip" -eq "") {
        $inspect = docker inspect $containerName | ConvertFrom-Json
        $networks = $inspect.NetworkSettings.Networks
        $networks | get-member -MemberType NoteProperty | Select-Object Name | % {
            $name = $_.Name
            if (("$ip" -eq "") -and ("$networkName" -eq "" -or "$networkName" -eq "$name")) {
                $network = $networks | Select-Object -ExpandProperty $name
                $ip = $network.IPAddress
            }
        }
    }
    return $ip

The only way I get the Get-BcContainerIpAddress function to work consistently is to comment out the portion that runs inside the container and accesses $global:IP.
function Get-BcContainerIpAddress {
    [CmdletBinding()]
    Param (
        [string] $containerName = $bcContainerHelperConfig.defaultContainerName,
        [Parameter(Mandatory=$false)]
        [string] $networkName = ""
    )

$telemetryScope = InitTelemetryScope -name $MyInvocation.InvocationName -parameterValues $PSBoundParameters -includeParameters @()
try {

    $ip = Invoke-ScriptInBcContainer -containerName $containerName -scriptblock {
       #if ($global:IP) {
       #    $ip = $global:IP
       #}
       #else {
            $ip = ""
            $ips = Get-NetIPAddress | Where-Object { $_.AddressFamily -eq "IPv4" -and $_.IPAddress -ne "<IP_ADDRESS>" }
            if ($ips) {
                $ips | ForEach-Object {
                    if ("$ip" -eq "") {
                        $ip = $_.IPAddress
                    }
                }
            }
            $global:IP = $ip
       #}
        $ip
    }

    if ("$ip" -eq "") {
        $inspect = docker inspect $containerName | ConvertFrom-Json
        $networks = $inspect.NetworkSettings.Networks
        $networks | get-member -MemberType NoteProperty | Select-Object Name | % {
            $name = $_.Name
            if (("$ip" -eq "") -and ("$networkName" -eq "" -or "$networkName" -eq "$name")) {
                $network = $networks | Select-Object -ExpandProperty $name
                $ip = $network.IPAddress
            }
        }
    }
    return $ip
}
catch {
    TrackException -telemetryScope $telemetryScope -errorRecord $_
    throw
}
finally {
    TrackTrace -telemetryScope $telemetryScope
}
}

Thanks
The $global:IP was created for performance optimizations, but it looks like it had side effects.
Will remove this.

Strange that I haven't seen this on any machines elsewhere - what OS are you running on and what Docker SKU and version?

I can see the OS is Windows Server 2019 (10.0.17763.3770 )

Are you using special docker networks?

No special docker networks.

$global:IP = "$ip"

I have reverted my other changes and applied the change you recommended as seen above and tested it on multiple computers with stopping and starting the docker container and Get-BcContainerIpAddress has been consistently returning a properly formed IP address.

I just had an instance where the above change to only quote the $ip variable did NOT work and Get-BcContainerIpAddress returned an invalid IP address.

I have been using the version of Get-BcContainerIpAddress seen below and still not having any issues.
function Get-BcContainerIpAddress {
    [CmdletBinding()]
    Param (
        [string] $containerName = $bcContainerHelperConfig.defaultContainerName,
        [Parameter(Mandatory=$false)]
        [string] $networkName = ""
    )

$telemetryScope = InitTelemetryScope -name $MyInvocation.InvocationName -parameterValues $PSBoundParameters -includeParameters @()
try {

    $ip = Invoke-ScriptInBcContainer -containerName $containerName -scriptblock {
        $ip = ""
        $ips = Get-NetIPAddress | Where-Object { $_.AddressFamily -eq "IPv4" -and $_.IPAddress -ne "<IP_ADDRESS>" }
        if ($ips) {
            $ips | ForEach-Object {
                if ("$ip" -eq "") {
                    $ip = $_.IPAddress
                }
            }
        }
       $ip
    }

    if ("$ip" -eq "") {
        $inspect = docker inspect $containerName | ConvertFrom-Json
        $networks = $inspect.NetworkSettings.Networks
        $networks | get-member -MemberType NoteProperty | Select-Object Name | % {
            $name = $_.Name
            if (("$ip" -eq "") -and ("$networkName" -eq "" -or "$networkName" -eq "$name")) {
                $network = $networks | Select-Object -ExpandProperty $name
                $ip = $network.IPAddress
            }
        }
    }
    return $ip
}
catch {
    TrackException -telemetryScope $telemetryScope -errorRecord $_
    throw
}
finally {
    TrackTrace -telemetryScope $telemetryScope
}
}

In the above code  if $ip is empty string after the first check, the function will return two values.
You should remove the $ip line.

@freddydk Is there a chance of getting the $global:IP change to Get-BcContainerIpAddress reverted?

Yes, sorry - have been caught up in other things.
Next version will have the functionality reverted as you suggested.

Available in preview now.

Shipped in 5.0.0


Bugfix/ningyu meteralert project support

余额/消费报警引入了项目归属的概念，在创建、列出规则时都需要指定是哪个项目:
/cherrypick release/2.8.0
/cherrypick release/2.9.0
/cc @yousong
/cc @Zexi
/cc @swordqiu

/cherrypick release/2.8.0

/cherrypick release/2.9.0

/ok-to-test

/lgtm
/approve

Codecov Report

Merging #549 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #549      +/-   ##
=========================================
+ Coverage    7.37%   7.37%   +<.01%
=========================================
  Files         346     346
  Lines       54692   54692
=========================================
+ Hits         4031    4034       +3
+ Misses      50285   50283       -2
+ Partials      376     375       -1

Flag
Coverage Δ

#aFlag
7.37% <ø> (ø)
:arrow_up:

Impacted Files
Coverage Δ

pkg/util/rbacutils/rabc.go
73.86% <0%> (+1.13%)
:arrow_up:

Continue to review full report at Codecov.

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


Make ArtifactoryDocker not fail if image to pull doesn't exist

We're experimenting with pulling previously built images from Artifactory and use them as Docker build cache in our CI pipeline. Naturally, we use ArtifactoryDocker to pull the image:
- task: ArtifactoryDocker@1
  displayName: Pull Docker image from Artifactory
  inputs:
    command: pull
    artifactoryService: $(ARTIFACTORY_SERVICE_CONNECTION)
    sourceRepo: $(ARTIFACTORY_DOCKER_REPO)
    imageName: $(IMAGE_NAME):99999999

This works like a charm. However, the task fails if the image doesn't exist (which will often be the case in practice), causing the pipeline to fail:
Login Succeeded
Error response from daemon: manifest for example.com/docker-images/foobar:99999999 not found: manifest unknown: The named manifest is not known to the registry.
[Error] exit status 1

We'd like to be able to specify something like failOnMissing: false, so that the task doesn't fail if the image to be pulled doesn't exist.

The best workaround we've found is to specify continueOnError: true for the ArtifactoryDocker task. The disadvantage is that we'll continue on any error, not just when the image is missing.

Currently not sure whether we actually need this. Will investigate more and reopen if needed.


Prevent anachronous sample reading.

Not so pretty way of solving this. Please let me know if you have thoughts. (UPDATE: On second thoughts, maybe this is not too bad of a code design compromise between testability and regular flow in the real system).
Passing in time allows testing easier. But, that also leads to time reversal problems. Example scenario

Connection stats worker gets a time and initiates quality calculation.
A layer transition is recorded after that.
By the time, scorer is called to calculate score with time from Step 1, there is time reversal and results in anachronous sample.

One option is to use a scorer lock in connection stats module and wrap all calls to scorer in that lock, but that does not prevent the passed in time stamps themselves getting out of order. Also, stand alond use of scorer in some other context will be problematic.
Doing the hybrid thing of taking current time in scorer if passed in time is zero so that scorer lock domain controls it.

you could split the functions if you need the explicit time version for testing ex.
UpdateMuteAt(isMuted bool, time time.Time) UpdateMute(isMuted bool) { UpdateMuteAt(isMuted, time.Now()) }
either way works though

Yeah, that is cleaner. Let me do that. Adds a few functions, but that is cleaner.

you could split the functions if you need the explicit time version for testing ex.
UpdateMuteAt(isMuted bool, time time.Time) UpdateMute(isMuted bool) { UpdateMuteAt(isMuted, time.Now()) }
either way works though

Yeah, that is cleaner. Let me do that. Adds a few functions, but that is cleaner.

Did in this commit. Needed one place to check zero time, but overall it is nicer to not pass in time.Time{}.


[ansible] Add Ansible Galaxy Support

Adding support for Ansible Galaxy [1] will make it easy to find, reuse and share contrib/ansible roles. The contrib/ansible roles can be bundled using librarian-ansible [2].
[1] https://galaxy.ansible.com/
[2] https://github.com/bcoe/librarian-ansible

/cc: @eparis @rutsky @stephenrlouie @adamschaub

Issue https://github.com/kubernetes/contrib/issues/793 was created to allow ansible roles to be loosely coupled.


Multistep confirmation

Catalog # 15
Link to Design

Marked as blocked as @carrenelloyd marked this as 'status: refining'

Worth following up with Sichao about this one.  It originated from API Connect requiring it but wasn't ever progressed so either needs to be picked up or closed off.


error in 1.5.1

Describe the bug
I got an error popup (invalid dataview query).  None of my tasks displayed but ics calendar is displayed partially.  Saw this in the developer console
2
plugin:dataview:18905 Uncaught (in promise) Error: Failed to parse query in 'pagePaths': Error:
-- PARSING FAILED --------------------------------------------------

1 | "" and ()
|         ^

Expected one of the following:
'!', '(', '-', 'csv(', 'outgoing(', file link, string, tag ('#hello/stuff')
at DataviewApi.pagePaths (plugin:dataview:18905:19)
at DataviewApi.pages (plugin:dataview:18927:21)
at ObsidianAPI.loadTasks (plugin:time-ruler:68430:28)
at reload (plugin:time-ruler:70471:19)

I was glad to see the logging of every task gone, but perhaps catch the error and log the task on a parse error.  Could be I have a bad task or a bug or both, right?
Note:  today had an all day item from my ics calendar and one item with a timezone that was not my timezone.

Yep so sorry about this issue. I've fixed in 1.5.2.


Updated doc package

Coverage remained the same at 0.0% when pulling faa8ba4a60ba063c1dd3fda4301065797ff0da89 on add_doc into f174516abe8fbb2d7608ff712e0464c526eaebf3 on master.

Coverage remained the same at 0.0% when pulling 1069b1db6c9085ded36456d5252825228b601e52 on add_doc into f174516abe8fbb2d7608ff712e0464c526eaebf3 on master.


Multi line write

Can you make sure to test this by running the app, modifying a script on the scriptDAO and saving it and ensuring that it comes out reasonable in the journal?
Better yet, add a test to the testDAO that parses then outputs a multiline serialization of a Script object and ensure that the output matches the input.

Let's add a nano test to this PR that makes an object with a bunch of different string properties.  In the properties put bunch of random code like content with various newlines, tabs, quotation marks, lines with indentation, lines without indentation, blank lines etc.  And then run it through Outputter in multiline mode and then parse it again and ensure that the String properties are identical.


how to solve this github.com/atomicals-go/atomicals-indexer/atomicals-core/witness/python-parse: cannot find module providing package

[solve](go: finding module for package github.com/atomicals-go/atomicals-indexer/atomicals-core/witness/python-parse)

Thanks, the problem has been solved, however, I cannot find the "init" file in the "repo" file, which prevents me from "go run ./"

me too and I can't find conf/config.json.

i pushed init.go and json file again

me too and I can't find conf/config.json.

hey anchor, 我记得你曾经回复过我的推特。如果你想参与进来，我觉得你可以看下atomicals-api服务。这个服务接口还很单一，你可以根据自己的想法添加更多新的接口，这样可以熟悉服务的sql表字段。
另外，为了避免btc链分叉的影响，api服务需要承担部分区块的atomicals交易处理工作。这部分逻辑的实现并不优雅，我也希望更多人和我讨论，看看有没有什么更好的方案

When I "go run ./" in "atomical-api" it returns "Error: Configuration file etc/main-api.yaml, field 'btc_rpc_user' not set" and then I found the parameters of "main.go" for "atomicalsConfigFilePath", however, I couldn't find the path in the "atomicals-api" file, so, I copied the "conf" of the "atomical-indexer" file to this, but it still doesn't work, please help me

hey michael, thx for trying, these are indeed my negligence, I'm used to running code locally, but I didn't double-check the correctness of the uploaded code.  i have pushed again. but i suggest u run atomicals-indexer first, until atomicals-indexer catching latest btc block, atomicals-api service won't start, it will panic.
i u have any question just comment here

You're welcome, the program is already running, however, I don't know if the atomic indexer gets new Bitcoin blocks, I checked my database and there is nothing there

u can check log or atomicals_tx table, it record all atomicals transactions.
the first atomiclas tx will be catched on blockheight=808081, "atom" ft was deployed. u can see it in atomicals_global_distributed_ft table.
and from 808513, atom fts ware minted. form 808080 to 808513, it do need some time. when it catched 808513 u can see atom amount in atomicals_utxo_ft table.
by the way, in the latest version, i only catch dft and dmt operation, which indicat deploy ft asset and mint ft asset. because i have to implement payment model. if anyone want to take part in, connect me plz.


module-test: fix wrong escape characters

These are prohibited in strict mode hence how I noticed it.
EDIT: later we can switch to template literals and make this snippet cleaner.

:+1:


New command: Apply a retentionlabel to a file using spo file retentionlabel ensure

Usage
m365 spo file retentionlabel ensure [options]
Description
Apply a retention label to a file
Options

Option
Description

-u, --webUrl <webUrl>
The url of the web

--fileUrl [fileUrl]
The server-relative URL of the file that should be labelled. Specify either fileUrl or fileId but not both.

i, --fileId [fileId]
The UniqueId (GUID) of the file that should be labelled. Specify either fileUrl or fileId but not both.

--name <name>
Name of the retention label to apply to the file.

Examples
Apply the label some label to a file
m365 spo file retentionlabel set --webUrl 'https://contoso.sharepoint.com/sites/sales' --fileUrl '/sites/sales/somelibrary/somefile.pdf' --name 'Some retention label'

More information

This command can be implemented with shared code created for #4158.

Putting this on hold till #4158 is implemented.

looks solid 👍

Hey @martinlingstuyl, why are we waiting with implementation until #4158 is done?

Hey @martinlingstuyl, why are we waiting with implementation until #4158 is done?

Hi @waldekmastykarz, because we might be able to use shared code. In principle files and folders are listItems as well, so we could possibly reuse the listItem command. That was my initial thought.

If you have a better idea though.., do let me know :)

Hey @martinlingstuyl, why are we waiting with implementation until #4158 is done?

Hi @waldekmastykarz, because we might be able to use shared code. In principle files and folders are listItems as well, so we could possibly reuse the listItem command. That was my initial thought.

Make sense. Next time, let's include this reasoning upfront just so that we make it clear to everyone why we're waiting 👍

This command can be implemented with shared code created for #4158.

I'd written something, but I agree it could have been more clear @waldekmastykarz

Can I work on this one please

Awesome, all yours!


select and open gist from list

instead of copy and paste link to a gist:
add an Open button which opens list of your Gists. the list has a name filter input.
what do you think?

I like it- in the meantime, here's a chrome extension to make it easy to run your gists:
https://chrome.google.com/webstore/detail/gistrun/cmikephimncflideoipflcfacmadghno


Remove .INSTANCE from Tessellator in providedLibs

Should fix Tessellator issues.

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

(matt's committing instead apparently)


Slicing cube with dask.slicing (dask 2.0) runs into stack overflow

hey guys, we noticed that a particular type of cube slicing done by dask.slicing with dask=2.0.0 produces a stack overflow error. The problem is described in https://github.com/ESMValGroup/ESMValTool/issues/1188 specifically https://github.com/ESMValGroup/ESMValTool/issues/1188#issuecomment-507759318 and boils down to an example: take any cube with time-lat-lon dims:
cube[(0, slice(None, None, None), slice(None, None, None), slice(None, None, None))]

results in Fatal Python error: Cannot recover from stack overflow. and core dumping.
I am not 100% sure this is dask's fault, but if it is, we should raise it with them :beer:

Does this present pre dask v2 I wonder?
I have an issue with memory with iris2 when slicing a cube with time but for me the proccess itself is just killed (due to memory).  The same example works on iris1

@cpelley no, all works fine with the latest dask pre 2.0 (1.2.2). Fairly sure it's having to do with the code changes in dask.slicing for 2.0 but since those code changes are a LOT I am not able to figure out what is going on. Maybe you or @bjlittle can file an issue on the dask gitHub page? :beer:

Thanks @valeriupredoi
I'll investigate further. Related to https://github.com/SciTools/iris/issues/3349

Closed by https://github.com/SciTools/iris/pull/3355


instructions to install the shortcut

multiple folders are hardcoded in the apple shortcut, had to change

yes i will do iterate on a better shortcut. it's also possible just to do to "save to files" and to pick the obsidian sync folder inside of the iphone.
none of it idea.
but thnaks for the feedback!!

fixed !


Test RPM build and install for regressions

On Fedora and now Centos (added), we build RPMs based on the spec in
contrib/spec to make sure we protect against regressions when creating
RPMs.  Once the RPM is built, we then test actually installing the RPM
to ensure that no deps are missing for install.
Signed-off-by: baude<EMAIL_ADDRESS>

LGTM

@rh-atomic-bot r+


Release URL allocated with createObjectURL using revokeObjectURL

Probably, blob URI which is allocated with createObjectURL will not be collected by GC...
We should revoke this explicitly.

@anuraaga Thank you for your investigation!
PTAL 🙇


Update links

Replace preprint with peer reviewed article URL.
Some of the Wikipedia section headings changed, update to most pertinent/consistent.
#35 did this for one file but is still unmerged.

thanks!
will test these and get them into production soon :)
(may take a week or so due to vacations)


Fix gRPCid out when registering empty messages

Similar to #336. Convert tunnel to shift register to protect against zero iteration For Loops causing the gRPCid out from getting reset to zero.

Change looks fine. Just curious what effects there are of the bug and how you encountered this problem.

Also looks like you have a build error related to this VI

Also looks like you have a build error related to this VI

For some reason LV ended up saving in 2024 even though the owning library has configured the source version as 2019. Should be fixed now.

Change looks fine. Just curious what effects there are of the bug and how you encountered this problem.

The bug is that gRPCid in/out won't chain through correctly if the for loop executes zero times. It's a "classic" bug with LV code that continually pops up because it is not intuitive and it is easy to overlook in code reviews. I don't recall if their is a VI analyzer check for this, but there probably is. To my knowledge, nobody has been burned by this yet. There was a similar bug filed against Register Enum Metadata which is essentially the same block diagram as this (see PR comment). However, when that was fixed, we overlooked the same bug with this VI. It came to my attention in another code review when I noticed the code was forking the "in" wire rather than using the "out" terminal.


Upgrade to web SDK v10.1.0

What does this PR do?
Upgrades the demo to support Appwrite 1.0
Test Plan
Tested all crud operations manually on multiple accounts.
Related PRs and Issues
N/A
Have you read the Contributing Guidelines on issues?
Yes

@codercatdev you can merge this now, right?

Thanks @sseth !


Flow breaks when checking type via Object.prototype.toString

Flow breaks in the following excerpt. This is modified from the "Dynamic code" example.
    function getType(obj) {
        return Object.prototype.toString.call(obj).slice(8,-1).toLowerCase();
    }

    function length(x) {
      if (x) {
        if (getType(x) === 'string')
        {
          return x.length; //Flow error: "Property length not found in Number"
        }
        return x
      } else {
        return 0;
      }
    }

    var a, b = 10;
    var total = length("Hello") + length(a) + length(b);

Hi, thanks for noting this! Adding refinements based on Object.prototype.toString.call as a feature request.
As an aside, note that it's unlikely Flow will acquire the ability a) detect the test behind a user function call, or b) statically evaluate the subsequent slicing, etc., in the example. The detectable form of the refinement would be an inline check of the unmodified return value, e.g.
if (Object.prototype.toString.call(x) === '[object String]')
{
  return x.length;
}

I think this feature is basically a dupe for predicate types as described in: #34
Closing.


Refactors /browse page

Refactors the code to make it a bit more React/Flux-like. Creates
a BrowseActions class to generate dispatches. The Recipe and Filter
(Course and Cuisine) stores listen to dispatches, and call the API
when required to refresh the data.
Fixes #138

I haven't had much time to take an in-depth look over the code but I'm having a few issues and have a question as well.
Issues:

The limit is set to 4 by default. That seems a bit low.
Giving the URL bad data (or out-of-date data) causes some weirdness. To replicate you can go to this URL: http://localhost:8080/browse/?limit=4&course=sdfgsdfg. For me, that is loading data, which it shouldn't, since there are no recipes with course=sdfgsdfg. If you paginate, then the results go away but you can also paginate back. Which, as expected, also doesn't give back results.

The only general question I have is why you decided to place the API calls in the store. Most of the examples/articles I've read on flux have all the API calls in the actions. I'm not saying its wrong to do it. Just wanted to pick your brain as to why you did it that way.

Whoops, the limit of 4 was what I was using to test the pagination, forgot to reset it!
The bad URL data is a good catch, will have to look into it.
As for the API calls in the stores, it seemed like the most self-contained at the time, but now that you've pointed it out I'm starting to think it may be better to put the API calls in the actions. I'll do a quick rewrite and see if it looks/feels better.

You were right, making the API calls from the Actions makes more sense. I've also moved all the filter stuff out of the Stores, having it in there was causing lots of extra API calls when we loaded a URL with query params in it.


xegtao isn't fully correct?

in the original shader by intel they prefilter the depth buffer with mipmaps to later sample lod to achieve the AO blurring. this step seems to have been skipped in your implementation

yeah that's cause i skipped that step in my implementation


about library..

no such file proto.lib
#pragma comment(lib, "proto.lib") <-- error
#pragma comment(lib, "libprotobuf.lib")
There is already a protobuf library on this line.
what is proto.lib?

It's a module of caffe. You should build caffe libs first. https://github.com/lltcggie/caffe-builder

Thank you for your help.
I succeeded Caffe libs but I still have errors
LNK2001: mdb_env_close unresolved external symbol.	C:\waifu2x-caffe-master\waifu2x-caffe-dll\caffe.lib(db_lmdb.obj)	waifu2x-caffe-dll
i guess caffe.lib doesn't open the lmdb.lib
Caffe builder option is like this

Solved them!
unchecked USER_LMDB and USER_LEVELDB

yeah, lltcggie presented the cmake option at https://gist.github.com/lltcggie/6af687bca94aba8c78b4


[BUG] zero2 and zero3 has different behavior using the same hyperparameter to train a large model

Describe the bug
Zero3 and zero2 grad_norm are totally not in the same scale, which eventually leads to the crash of zero2's loss.
Expected behavior
Zero2 should have the same smoothing loss as that of zero3.
ds_report output

Please run `ds_report` to give us details about your setup.
[2023-09-10 20:53:54,125] [INFO] [real_accelerator.py:133:get_accelerator] Setting ds_accelerator to cuda (auto detect)
--------------------------------------------------
DeepSpeed C++/CUDA extension op report
--------------------------------------------------
NOTE: Ops not installed will be just-in-time (JIT) compiled at
      runtime if needed. Op compatibility means that your system
      meet the required dependencies to JIT install the op.
--------------------------------------------------
JIT compiled ops requires ninja
ninja .................. [OKAY]
--------------------------------------------------
op name ................ installed .. compatible
--------------------------------------------------
 [WARNING]  async_io requires the dev libaio .so object and headers but these were not found.
 [WARNING]  async_io: please install the libaio-dev package with apt
 [WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
async_io ............... [NO] ....... [NO]
cpu_adagrad ............ [NO] ....... [OKAY]
cpu_adam ............... [NO] ....... [OKAY]
fused_adam ............. [NO] ....... [OKAY]
fused_lamb ............. [NO] ....... [OKAY]
quantizer .............. [NO] ....... [OKAY]
random_ltd ............. [NO] ....... [OKAY]
 [WARNING]  sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.1
 [WARNING]  using untested triton version (2.1.0), only 1.0.0 is known to be compatible
sparse_attn ............ [NO] ....... [NO]
spatial_inference ...... [NO] ....... [OKAY]
transformer ............ [NO] ....... [OKAY]
stochastic_transformer . [NO] ....... [OKAY]
transformer_inference .. [NO] ....... [OKAY]
utils .................. [NO] ....... [OKAY]
--------------------------------------------------
DeepSpeed general environment info:
torch install path ............... ['/usr/local/lib/python3.9/dist-packages/torch']
torch version .................... 2.1.0.dev20230424+cu117
deepspeed install path ........... ['/usr/local/lib/python3.9/dist-packages/deepspeed']
deepspeed info ................... 0.10.0, unknown, unknown
torch cuda version ............... 11.7
torch hip version ................ None
nvcc version ..................... 11.7
deepspeed wheel compiled w. ...... torch 2.1, cuda 11.7

Additional context
The training will crash after one day or two. Hard to reproduce.

Can you please share steps to repro? Also, can you confirm that the loss scaling is initialized similarly?

By comparing deepspeed stage-2 with native torch DDP, I also encountered a similar problem, I think there must be some gap in the smoothing strategy between DS stage-2 and DDP thus leading to different scale of loss (or grad_norm)
you can see that with the same training config, the grad_norm of deepspeed (stage-2) is about 5 times higher than DDP, and this will eventually cause a diverge issue.

also, if we scale up to more gpus (1node 8gpu -> 2node 16 gpu), we can immediately see a huge mismatch:

According to @superaha's observations, I'm happy to run a double-check experiment on stage-1 & stage-3 to prove that this issue only occurs at stage-2, and I could give a minimal repro recipe if I have time.

By comparing deepspeed stage-2 with native torch DDP (both fp32 training), I also encountered a similar problem, I think there must be some gap in the smoothing strategy between DS stage-2 and DDP thus leading to different scale of loss (or grad_norm)
you can see that within the same training config, the grad_norm of deepspeed (stage-2) is about 5 times higher than DDP, and this will eventually cause a diverge issue.

Also, if we scale up to more gpus (1node 8gpu -> 2node 16 gpu), we can immediately see a huge mismatch and loss crash:

Hello, recently I'm using ZeRO2 to train a llama2 13B model on 64 gpus. I also find similar issue. The loss seems going down in the first dozens of steps, then loss divergence happens. So is this a new bug imported in the recent version? Cause this is a pretty serious question and should have been noticed long ago.

Besides, loss converges normally when I use Megatron for training, all the hyper-parameters the same except I set tensor parallel to 2 in Megatron, so the dp size is different. However this shouldn't make loss diverge in my opinion. I've also tried smaller lr, also doesn't work. At first I doubt maybe something is wrong in the bf16 optimizer implementation, but in this issue fp32 also triggers the problem as mentioned by @xingchensong.

@kisseternity could u try stage-3 to double-check this issue?

@kisseternity could u try stage-3 to double-check this issue?

As I'm using Ethernet between nodes, ZeRO3 is not a choice... When the training is done with Megatron, I may try it.

Besides, loss converges normally when I use Megatron for training, all the hyper-parameters the same except I set tensor parallel to 2 in Megatron, so the dp size is different. However this shouldn't make loss diverge in my opinion. I've also tried smaller lr, also doesn't work. At first I doubt maybe something is wrong in the bf16 optimizer implementation, but in this issue fp32 also triggers the problem as mentioned by @xingchensong.

Add DeepSpeed training tensorboard(unfortunately not with grad_norm), comparing to Megatron.
DeepSpeed

Megatron(With multiple runs)

double-check that there has a pretty serious question in stage-2.
stage-1 & stage-3 look good and almost equal in loss & grad_norm.

I have also encountered the same problem and look forward to a solution.

Maybe this is a bug introduced recently, I will try to degrade the deepspeed version this weekend to see if it's true.

@kisseternity, @xingchensong, @zzhanghub thanks for the triaging effort on this issue. Could you please try v0.10.0 as well? Thanks!

@kisseternity, @xingchensong, @zzhanghub thanks for the triaging effort on this issue. Could you please try v0.10.0 as well? Thanks!

I've tried v0.10.0 and the issue still occurred.

@kisseternity, thanks for the update. We will investigate further.

@kisseternity could u try stage-3 to double-check this issue?

I've tried ZeRO3 and it's fine. Besides the training speed is fine compared to ZeRO2 with communication overlap, better than expected. It seems that the prefetch in ZeRO3 can overlap some 1.5x communication costs, making the speed pretty fast even between Ethernet connected nodes.

Does 'prefetch' here refer to a parameter of the torch dataloader or a parameter of deepspeed?

@kisseternity could u try stage-3 to double-check this issue?

I've tried ZeRO3 and it's fine. Besides the training speed is fine compared to ZeRO2 with communication overlap, better than expected. It seems that the prefetch in ZeRO3 can overlap some 1.5x communication costs, making the speed pretty fast even between Ethernet connected nodes.

Does 'prefetch' here refer to a parameter of the torch dataloader or a parameter of deepspeed?

Here I mean the prefetch of next layer of the model to do all_gather, you can refer to stage3_prefetch_bucket_size for reference. The prefetch of dataloader also overlap the process time of data, but the main communication time costs lay in the  all_gather and scatter ops in llm.

@kisseternity could u try stage-3 to double-check this issue?

I've tried ZeRO3 and it's fine. Besides the training speed is fine compared to ZeRO2 with communication overlap, better than expected. It seems that the prefetch in ZeRO3 can overlap some 1.5x communication costs, making the speed pretty fast even between Ethernet connected nodes.

Does 'prefetch' here refer to a parameter of the torch dataloader or a parameter of deepspeed?

Here I mean the prefetch of next layer of the model to do all_gather, you can refer to stage3_prefetch_bucket_size for reference. The prefetch of dataloader also overlap the process time of data, but the main communication time costs lay in the all_gather and scatter ops in llm.

great, thx

Update: We have investigate further. The norm difference is caused by the gradient difference. Our current solution is to turn the overlap_comm to False when using Zero2. This fixes the issue, however, makes the training slower. @tjruwase hope this may help.

@superaha, thanks for this valuable tip.

@tjruwase Also, overlap_comm and cotiguous_gradients seem to have some conflict. If set both to True, the training loss will crash.

Hi, teams, any update?

Has there been any recent progress? 🤔

I am convinced that this issue is of significant concern. Have you identified any potential solutions?

This issue still exists in 0.14.0.

why is the problem still not solved? :(


Ideas for new examples

Default layout

Adopt, Don't Shop, by Tim Pleiko-Izik 🚀 for Awesomed

Travel, by Chris Yang for New Beee

Travel, by Chris Yang

Data Visualisation App #2, by Rifayet Uday

Travel App for iOS, by Serge Vasil

Hangout App, by Rifayet Uday

Citadela, by Vilém Ries

Cinema app animation, by Adrian Reznicek for PLATFORM
Invision Projects - Spaces iOS, by Charles Patterson for InVision
I'm Back and Two invitations, by Leo Leung
ToFind - Concept controller, by Leo Leung
Animation idea: animate item height on onSnapToItem

Default layout with small slides

Food Application, by Chris Yang for New Beee
Animated demo

Food Application, by Chris Yang for New Beee

Cisco - Latest events, by Alim Maasoglu for Norde

Fitesta App, by Rifayet Uday

Analytics App, by Rifayet Uday

Fitnefy App, by Rifayet Uday

Travel, by Chris Yang for New Beee

inactiveSlideShift

Poster Gallery, by Jakub Nespor for STRV

Media, by MAXVISION

'Stack' layout

Event-cards-iOS-interaction, by Divan Raj

Painting add to cart Interaction, by Johny vino™

See also #195

Tinder layout

Social App, by MAXVISION

Travel, by Chris Yang for New Beee

mobile application, by uixNinja

Cinema App Concept, by Anton Skvortsov for Norde

Custom interpolations

Music Player Interaction, by Asif Adnan Uday
See #275

SiFi Mobile, by Rifayet Uday

Style Exploration, by Chris Yang for New Beee
Animated demo

Flo App, by MAXVISION
Edmé Mobile // Blog, by Andrew Baygulov for Revølve

Others

Full-page parallax (see this plugin)
2-way control (see #202)
Infinite scroll
Scroll inside carousel items
Zoom inside carousel items (see #264)
Use GIF

Here are some thoughts on how to make examples easier to use.

Put them in snacks and or update installation instructions

Actually i couldn't get it installed easily.  The instructions are simply to use npm install, but ive already installed the main repo and it's not a subdirectory.... so how do you really install it?

Pair it down or make multiple versions.

the current example seems to do too much. There are two main components and there's lots of case handling in them in order to remain two components. This means that in order to use the example, you should read and comprehend the whole thing. Most users will only have one case, and they want a copy/paste solution, so they can get it working in their app as quickly as possible. so instead of handling so many cases and building an component with a lot of componentry in it, try simplifying as much as possible, and if you want multiple looks and feels, make multiple components.

Make sure the event methods are exposed in the item component.  Its probably also good to show how to both keep this component in the same file, and to pass the handlers as props, if youre making multiple examples.

Please add an example of Infinite Scroll. Especially in the case of Tinder, technically it would be an infinite load. Until the resource queue ends.
cheers

@fotoflo Those are valid points. I had similar thoughts and they led to the decision that a complete overhaul of the example app was needed ;-)
@MichelDiz I'll see what I can do about it :-)
Note that I don't have time at the moment to work on it, but it seats at the top of my to-do list.

I'm not skilled enough at this point to provide new examples, but I was having trouble running the existing examples. I ported the code to a new react-native init project, and got the example working with react-native 0.61.5 here: https://github.com/kylebarron/react-native-snap-carousel-example
I could submit a PR for it if you'd like

Thank you for the offer @kylebarron! I would definitely appreciate it :-)

Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2

but i was deprecated in my project kindly fix that,


Payload Path in WebhookAgent

How do I set the payload path to be passed as event in Webhook Agent.
The documentation is very vague in this part.Please include examples.
Also, it would be good if webhook agent can behave like a REST API interface, also taking params  in the URL.
@cantino @dsander

Hi @sriramsv,
what configuration did you try to use the received event?

Alternatively, set data_from_event to a Liquid template to use data directly without fetching any URL. (For example, set it to {{ html }} to use HTML contained in the html key of the incoming Event.)

That means the WebsiteAgent will use the string which is in the html key of the received event hash, for example: {"html": "<html>....."}

Also, it would be good if webhook agent can behave like a REST API interface, also taking params in the URL.

Do you want to use data from the received event in the URL? That is possible by using liquid in url_from_event, but liquid should also work in url.

My POST body has a JSON being passed such as {"state":"Home"}, so I tried
$.state in the payload path, but did not work.
Btw this is regarding the Webhook Agent which makes huginn listen for
incoming POST requests.
On Fri, Aug 12, 2016 at 11:56 AM Dominik Sander<EMAIL_ADDRESS>wrote:

Hi @sriramsv https://github.com/sriramsv,
what configuration did you try to use the received event?
Alternatively, set data_from_event to a Liquid template to use data
directly without fetching any URL. (For example, set it to {{ html }} to
use HTML contained in the html key of the incoming Event.)
That means the WebsiteAgent will use the string which is in the html key
of the received event hash, for example: {"html": "....."}
Also, it would be good if webhook agent can behave like a REST API
interface, also taking params in the URL.
Do you want to use data from the received event in the URL? That is
possible by using liquid in url_from_event, but liquid should also work
in url.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cantino/huginn/issues/1631#issuecomment-239531077,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGPRelIboEFkyAI4jXp53LMEbfYO8LMeks5qfMHVgaJpZM4JizhU
.

--
Sriram S Venkatakrishnarao
Graduate Student at Stony Brook University
+1<PHONE_NUMBER>
<EMAIL_ADDRESS>http://sriramsv.com

Oh sorry, my bad. I think that might cause problems because the event the WebhookAgent emits needs to be a hash. Did you try using . as the payload_path? That should emit whole received JSON blob.

Yes,  the "."  works.. But what I really need is the payload path to set
correctly..
On Fri, Aug 12, 2016, 12:09 PM Dominik Sander<EMAIL_ADDRESS>wrote:

Oh sorry, my bad. I think that might cause problems because the event the
WebhookAgent emits needs to be a hash. Did you try using . as the
payload_path? That should emit whole received JSON blob.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cantino/huginn/issues/1631#issuecomment-239534409,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGPReqsK1rtLG4VFeLN5QWbFP2zgFjXWks5qfMTxgaJpZM4JizhU
.

--
Sriram S Venkatakrishnarao
Graduate Student at Stony Brook University
+1<PHONE_NUMBER>
<EMAIL_ADDRESS>http://sriramsv.com

You can do that, but the path you select has to be a hash/object, you can not use array, strings or integers as events.

Like how does that work?
On Fri, Aug 12, 2016, 12:19 PM Dominik Sander<EMAIL_ADDRESS>wrote:

You can do that, but the path you select has to be a hash/object, you can
not use array, strings or integers as events.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cantino/huginn/issues/1631#issuecomment-239536742,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGPRevKRPnjCtcGZnZEwUs5tZJLVKBvPks5qfMdCgaJpZM4JizhU
.

--
Sriram S Venkatakrishnarao
Graduate Student at Stony Brook University
+1<PHONE_NUMBER>
<EMAIL_ADDRESS>http://sriramsv.com

I am passing a JSON object as part of the body, so ideally it shd parse it right?

You need to make sure your JSONPath query returns an array $.data with a JSON body like {"data: {"state":"Home"}} will work and emit {"state":"Home"} as the event. $.data.state will not work because "Home"is not a valid event payload.

yeah this worked! Thank @dsander

Glad you figured it out! Is it okay if we close this issue?


refactor:tokenize the text if the input is string.

The pos_tag method past implementation had a problem with tagging un-tokenized strings. This issue illustrates the problem.
The suggested changes to solve the problem was raising an error or warning to the user that the pos_tag does not support the type string.
I believe a better approach might be tokenising the string into tokens.

I'm not sure that tokenising the input if the user doesn't use the function correctly is the best course of action. Users may start thinking that pos_tag works with strings, and they might not get the desired tokenization for their use case. They would never realise that there are other tokenization options out there for them to use.
NLTK itself provides 15+, and there are countless of other modules that provide tokenization too:
https://github.com/nltk/nltk/blob/d21646dbd547cdd02d0c60f8e23d1d28a9fd1266/nltk/tokenize/__init__.py#L65-L92
I'm all in favor of helping out the average developer, but I believe this is restricting them. I would rather keep throwing a TypeError and let them know to use one of the many tokenization options before using pos_tag.
Beyond that argument, I'm of the opinion that preserving tokenization as a "real" step in the NLP pipeline is somewhat important. I'd rather not have developers think they have no influence over that.
Perhaps others might disagree with me here, and I'm happy to go with whatever option seems best according to the rest of the team, but these are my 2 cents.
My perfect solution to this problem is simply to edit the TypeError to say, for example:
raise TypeError("tokens: expected a list of strings, got a string.\nConsider tokenization, for example with `nltk.word_tokenize`.")

 (phrasing can be modified to whatever sounds best, this is just to give an idea)
This way, developers are notified that they should tokenize. It mentions a quick and easy solution, but the developers know that they can modify the tokenization to their likings.

I agree with the fact that tokenisation is an important preprocessing step in the NLP pipeline, and changing the format of input will theoretically affect the flow of the system. But, I though of this as a work around of solving the problem instead of throwing an error. In fact, anyone with humble knowledge with NLTK and NLP in general will know the processing of tagging tokens, but there is simple solutions like TextBlob, which tokenise string directly as far as I know. But of course, this change might confuse developers using NLTK.

I'm not sure that tokenising the input if the user doesn't use the function correctly is the best course of action. Users may start thinking that pos_tag works with strings, and they might not get the desired tokenization for their use case. They would never realise that there are other tokenization options out there for them to use.

Precisely. Ad hoc polymorphism is not going to do us any favours, just encourage sloppiness.


pod2man 4.05 (update + Makefile.PL patch) - Issue #743

Please submit this PR to Homebrew/homebrew.
https://travis-ci.org/Linuxbrew/linuxbrew/builds/104542738
==> brew audit pod2man
Error: 1 problem in 1 formula
pod2man:
 * A top-level "man" directory was found
Homebrew requires that man pages live under share.
This can often be fixed by passing "--mandir=#{man}" to configure.

To avoid the following error, please push the branch to your personal GitHub repository, and then submit a pull request to Linuxbrew/linuxbrew.
https://travis-ci.org/Linuxbrew/linuxbrew/builds/104542684
==> brew update-test
Start commit: origin/master
End   commit: a76f02c558198352f2e62f847283f54e1053f473
==> Setup test environment...
Cloning into '.'...
done.
Cloning into bare repository 'remote.git'...
done.
error: pathspec 'master' did not match any file(s) known to git.


Unexpected use of reserved word 'let' in strict mode

Problem description
Experience issue in Safari due to ES6 standards such as let.
Happens when one import MuiThemeProvider which requires https://www.npmjs.com/package/brcast - brcast use let in their index.js
Versions

Material-UI: v1.0.0-beta.5
Browser: Safari 9.1

Sorry, we don't support Safari 9.1, it's 0.25% of the market share.

Also, brcast is only keeping let in his jsnext:main version. You might have an issue in your bundle configuration.

Actually, it will most likely be fixed by https://github.com/vesparny/brcast/issues/7

So it's definitely an issue with some browsers we are supporting. But the issue isn't on Material-UI side, I have closed the issue.

Thanks for raising, hopefully brcast will soon fix the issue :).

Thanks @oliviertassinari for clarifying! Always extremely fast help.

fixed in<EMAIL_ADDRESS>


Fixed issue

Checklist:
This is my first PR as a contributor, Please guide me if I have any mistakes in my PR

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the main branch of freeCodeCamp.
[ ] I have tested these changes either locally on my machine, or GitPod.

Closes #43059

Hello , I see that some of my checks are failing , can someone help me out ? Thank you.

Hey @shikhar13012001
This PR seems to make similar changes as the existing PR #43210. As such, we are going to close this as duplicate.
If you feel you have additional changes to expand upon this PR, please feel free to push your commits and request this PR be reopened.
Thanks again! 😊

If you have any questions, feel free to ask questions on the 'Contributors' category on our forum or the contributors chat room.


[Docs] Update Material UI Guide for v4

Reporting a bug?
The guide in the repository doesn't work for the latest Material UI. API for SSR has changed. MUI v4 is still in Beta, but an update needs to be made. Any suggestions of how it can be patched temporarily before the official release is welcome too @tannerlinsley @sw-yx
Latest API: https://next.material-ui.com/guides/server-rendering/
Oudated Guide: https://github.com/nozzle/react-static/blob/master/docs/guides/material-ui.md

https://github.com/nozzle/react-static/issues/1082 < same issue

@sw-yx @tannerlinsley how to fix this? https://next.material-ui.com/guides/migration-v3/#styles pretty much says the plugin is broken now and as much as i tried, i couldnt fix it. Are you not going to look into it until MUI v4 releases? (It's going to be released soon)

i cant speak for tanner but i dont use MUI right now. this is an early stage oss project, we all have to chip in to maintain and update things we care about. i encourage you to dive in yourself to fix the plugin, if not we will have to wait til someone else does.

Of course, I don't expect anything from anyone and I take nothing for granted. I tried to solve it myself, but was unable to. Seems to me
import React from 'react'
import { ServerStyleSheet, StyleSheetManager } from 'styled-components'
import { ServerStyleSheets } from '@material-ui/styles'

export default () => ({
  beforeRenderToHtml: (element, { meta }) => {
    meta.styledComponentsSheet = new ServerStyleSheet()
    meta.muiSheet = new ServerStyleSheets()
    meta.muiSheet.collect(element)
    return <StyleSheetManager sheet={meta.styledComponentsSheet.sheet}>{element}</StyleSheetManager>
  },
  headElements: (elements, { meta }) => {
    elements = [
      ...elements,
      meta.styledComponentsSheet.getStyleElement(),
      <style
        id="jss-server-side"
        // @ts-ignore
        dangerouslySetInnerHTML={{ __html: meta.muiSheet.toString() }}
      />
    ]
    return elements
  }
})

should work, but it doesn't

Im placing $75 bounty if someone gets this done in the next 3 days. If not, the bounty's cancelled as Ill be moving on

What's up with the imports from styled-components? That's not part of MUI.

@Herohtar if you noticed im using meta.styledComponentsSheet.sheet, because latest SC alpha release changed .instance to .sheet, so that is a hotfix to SC, not related to MUI.

This is how it seems it should work from looking at their documentation:
node.api.js
import React from 'react'
import { ServerStyleSheets, ThemeProvider } from '@material-ui/styles'

import theme from './src/theme'

export default () => ({
  beforeRenderToElement: (App, { meta }) => props => {
    meta.muiSheets = new ServerStyleSheets()

    return meta.muiSheets.collect(
      <ThemeProvider theme={theme}>
        <App {...props} />
      </ThemeProvider>
    )
  },
  headElements: (elements, { meta }) => [
    ...elements,
    meta.muiSheets.getStyleElement(),
  ],
})

Specifically:

ServerStyleSheets.collect() returns a React element that should be included in the rendering, so you need to return that and not just ignore it.
You can simply use ServerStyleSheets.getStyleElement() to add the style element instead of creating your own from toString().
You should include ThemeProvider if you want to be able to access the theme at all, but if you don't need that then I guess you can leave it out

This seems to mostly work on my site, but I noticed that the generated class names aren't being shortened -- they're still the full .MuiGrid-align-content-xs-flex-start, etc. Also, there are some components that aren't being styled correctly. I'm not sure if I'm doing something wrong somewhere or if there's an issue with MUI.
You can see the full code for my test repo here: https://github.com/Herohtar/thalion-herohtar/tree/mui-v4

@Herohtar Yes! You are right, muiSheets.collect needs to be returned. Your other concerns are also legitimate that not everything gets styled and class names arent being shortened, but you've still saved me a lot of potentially wasted time, so link me your twitter and we can talk about your bounty!

By the way Styled Components v5 also suggests to use collect instead of wrapping in the Provider. Let's discuss implementing the plugins for the new versions here. People are going to open issues for them when they release anyway, so better if we prepare for it https://www.styled-components.com/docs/advanced#example

I've updated the example in my post with beforeRenderToHtml since that was what you were using. It seems to behave the same either way.
I figured out the issues with styling on my site were because of the MUI v4 changes to Typography -- it now doesn't have a default color and just inherits its color if you don't give it one yourself.
Still not sure what the problem is with MUI not generating the production class names.
I never active on my Twitter account, but it's @Herohtar.

wow, glad this is working out!

Confirmed bounty received, glad I could be of help!
The plugins and guides will definitely need updating for the new releases of those components.

My problem is solved but Ill leave the issue opened as we still need to figure out a good way to integrate the new apis. As far as I know collect is much more preferred than wrapping with providers (which is what current plugins do)

The guides probably still need updating, so not stale.

@Herohtar thank you for solution, everything works again.
But I think 'ThemeProvider' is redundant. Everything works without it. My final version:
import { ServerStyleSheets } from '@material-ui/styles';

export default () => ({
  beforeRenderToHtml: (App, { meta }) => {
    meta.muiSheets = new ServerStyleSheets();

    return meta.muiSheets.collect(App);
  },
  headElements: (elements, { meta }) => [
    ...elements,
    meta.muiSheets.getStyleElement(),
  ],
});

Any objections?

@6pm That might work -- I'm not sure if it will cause any issues, but I believe it is okay as long as you are only making a very basic site that just uses the default theme. You also won't be able to access the theme values to use in custom components. However, if you want to do either of those things you will definitely need the ThemeProvider. I would recommend leaving it there for completeness.

I suppose that injecting styles in this manner should prevent flickering view during first load, but it doesn't.
I even flip the order
    headElements: (elements, { meta }) => {
        return [
            meta.muiSheets.getStyleElement(),
            ...elements,
        ];
    },
})

We currently don't have the bandwidth to support MUI. Happy to take PRs.

@captainkovalsky did you ever figure out the answer to this?

I noticed that processing stylesheets inside beforeRenderToHtml method just returns the MUI theme css, not custom styles used with makeStyles. Does any one know how to get all css not only for basic material UI ?

Hi from late 2020 -- a few links have broken above, namely here's the PR for @Herohtar's working JSS plugin node.api.js (original comment is https://github.com/react-static/react-static/issues/1179#issuecomment-491552921)
I'll officially submit a PR to fix the React Static documentation once I can get it fully working together; that PR helped a lot but I'm still encountering little issues with serving in production. Cheers.

Thanks Kevin! Shout if you need anything in particular.


Array literals as method parameter cause compiler to silently exit

The following program causes the compiler to silently exit with rc -1:
actor Main
  new create(env: Env) =>
    test("1", [1, 2, 3])

  fun ref test(name: String, config: Array[U64]) ? =>
    error

The issue will most likely be that an error is not reported, where we should report one. The problem is that test is partial, but the compiler doesn't complain about it not being put in a try expression.
This issue is most likely related to #190 and possibly its the same bug.

This is duplicate of #190.


Dev

@Sami64 @Android-Jester @nanaadomako Please merge your changes in your forked repositories. We will not accept this PR as we do not require the changes. If you still want to push changes to main repository, please follow the guidelines to create a PR with a description and required commits. Thank you.


Fix typo

Overview
Found this while looking into a canvas inspector bug. Tiny PR, but ¯_(ツ)_/¯

/azp run


Improve SocketSelector in-documentation example

No need for std::unique_ptr nor std::list now that we have move semantics. Also need to check return value for .listen.

SFMLBuildMaster: Build this please.

SFMLBuildMaster: Build this please.


[Enhancement][AutoBench] Adding more columns for detailed report

Description of changes:
This is an enhancement PR which gives out a more detailed report of all the benchmarks of Master vs v1.0.
Initially, the report had Winrate, training time, inference time and rank.
This may not provide sufficient information to determine if the framework is necessarily better hence this PR is to give out a more detailed report (upload the entire evaluation as a zipped artifact for every module).
P.S. We can add it as a 1.1 milestone item if required, may not be necessary.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Previous CI Run
Current CI Run


I dont know what to do

Try this command in CMD as Administrator
net start termService

Solution in https://github.com/stascorp/rdpwrap/issues/1883 --> Problem 1


Feature/kubectl to client go

This PR is the client-go implementation and move away from os.exec - kubectl execution. That way we will be able to remove the os.exec dependency and kubectl binary in docker image.
please note: due to the way client-go objects work in order to form the CPU% I need to identify total cores etc, which is not part of this PR, will be awesomee to get some thoughts on that as well please. thanks guys.

To start with this initial work takes a dig at the existing system-err_collector and tends to move it away from direct kubectl implementation to client-go implementation.
https://github.com/kubernetes/client-go - is a Kubernetes client-go source code.

Thanks, 🙏 ^Tats
Opening this for wider opinion and suggestions.
cc: @arnaud-tincelin , @davidkydd, @JunSun17 and anyone interested, Thanks
Any new collectors should spend time doing this way.

I can't approve this PR @Tatsinnit because I opened it ... But this message will do. Feel free to merge!


SvelteKit swallows parse errors

Describe the bug
If vite-plugin-svelte throws a ParseError it gets swallowed by SvelteKit making it impossible to figure out what's wrong in many cases
Reproduction
Put this in +page.svelte
<script>
</script>

<script>
</script>

Logs
No response
System Info
`latest`

Severity
serious, but I can work around it
Additional Information
No response

The default handle error here only logs the stack, which appears to not be populated with anything at the moment.
Although I think it should probably be logged here instead,
I got an output like this using vite.config.logger.error, is there another utility in vite to present the error in a better way?

you can send the error over devserver websocket so it gets presented to the user as an overlay.
thrown errors from plugin hooks should end up there automatically.
might need a bit of transformation to get the error to display nicely https://github.com/sveltejs/vite-plugin-svelte/blob/360171392990cd907c87b6ba16e17d7698fe9f8e/packages/vite-plugin-svelte/src/utils/error.ts#L11

Hmm, if the error happens while editing a loaded page, or client side navigating to a broken page there is already an overlay. The user just doesn't see anything when doing a native navigation to a page with the compiler error and the ws wouldn't be ready by then.

thrown errors from plugin hooks should end up there automatically

Turns out there was something logged before 1.0.13,

Was this logged from one of v-p-s's hooks? I think Kit calling loadSsrModule in a middleware makes the error not show up as a plugin hook error.
1.0.13 was this huge change so it's going to be fun trying to figure out what changed there to suppress V-P-S's logging.

We definitely used to log the frame property. I remember adding that like a year or two ago. It looks like that was somehow lost in a refactoring. We should probably update the default handleError to use the frame and message properties when frame is present.


regenerate d.ts files

We should do this at build time.

Oh, we already do. It's just that nothing changed for v3.


Input file support for target_acceptance for Monte-Carlo moves

This PR adds input file support for adding MC moves with a target acceptance (see #23). Also, the update_amplitude_frequency - which is needed to achieve the acceptance - can be set from the input.

[x] Extract unsigned integer from TOML
[x] Add key for target_acceptance
[x] Add key for ~update_delta_every (since all our displacements are called delta)~ update_frequency
[x] Add example input file
[x] Add tests in input/tests
[x] Add documentation

Open questions:

[x] How to handle the case, where an acceptance is given, but no update_frequency? Set default? Error?

Solution: Throw error telling the user to specify update_frequency.

[x] How to handle the case, where an update_frequency is given, but no acceptance? Ignore? Set default for acceptance?

Solution: Accept input. Updates don't change scaling factor.

I'd be happy to discuss naming of keys and any other kind of feedback.

How to handle the case, where an acceptance is given, but no update_frequency? Set default? Error?
How to handle the case, where an update_frequency is given, but no acceptance? Ignore? Set default for acceptance?

I would go for the conservative way: accept update_frequency without acceptance, but not the reverse.

@g-bauer, could you also squash together related commits (the fix whitespace ones; the add examples ones; ...)

@g-bauer, could you also squash together related commits (the fix whitespace ones; the add examples ones; ...)

I'll try. Fingers crossed that I'm not killing my branch 😄

Edit: Aaaaaand I forgot to add the new input tests 😞

Did you? I see them in the last commit.


Giant Rat XP was incorrect.

DMG p209 lists XP for giant rat at 7+1. This matches what is likely in that a rat is a sub 1HD creature with 1 special ability (disease).

Ah, that was me. I honestly have no idea why I put those numbers in. Every source I check says 7+1. Thanks for the correction, merging.


PureScript Discussion

I'm not sure if you all have considered it, but would you be open to an implementation of daedalus in purescript, or at least a partial implementation?
Purescript's React.js bindings are really nice; it properly codifies the react component methodology, and with the Thermite library (Redux analogue), it's very convenient to realize a properly reactive system that works with react-native or electron, as you're using in this application.
Especially with all the haskell, purescript wouldn't hurt I don't too bad I don't think. Especially given paf31's latest design with proper push-pull frp behaviors, I don't see why there wouldn't be any use of some cutting edge tech in the wallet. Additionally, there is a lot of proper type-codification of the traditional Node.js interfaces, coupled with explicit TChan-like references, it's pretty easy to create sophisticated programs that are much more correct than usual, when working with a single-threaded javascript.

@athanclark we did consider purescript for Daedalus but actually just replaced the single purescript middleware we had with Flow.js typed Javascript because it's hard to hire frontend developers for such a niche language. Also … it's a very new and unstable environment without backing from major players like Facebook, Google etc.


Testnet build crashes on 40% sync and wallet doesn't load on restart iPhone 8+

While building dcrios master with dcrlibwallet master, app freezes once sync hits 40%.  See the log below.
2021-05-31 21:37:37.133 [INF] SYNC: [1] Connected 2000 blocks, new tip 000000521b595107455cf7da39f4cd5c80b1e647871ee901856292bf4e7b0449, height 576000, date 2020-12-11 19:51:03 +0000 UTC
2021-05-31 21:37:43.134 [INF] SYNC: [1] Connected 2000 blocks, new tip 0000003c0dc3021b85fa561fec1e3c6d537a1ed37cd70eb679340ae7e255464b, height 578000, date 2020-12-14 15:16:33 +0000 UTC
2021-05-31 21:37:45.782 [INF] SYNC: [1] Received sidechain or orphan block 00000000fd3a63b0748cfbf7449fe4d5bccc9273fe75dc9fa86a84aeada59eac, height 695954
2021-05-31 21:37:50.599 [INF] SYNC: [1] Connected 2000 blocks, new tip<PHONE_NUMBER>b16db910860ca45084c21e8137cb68cf4a8670e7efa35ea2a975dd, height 580000, date 2020-12-17 10:50:18 +0000 UTC
2021-05-31 21:37:57.972 [INF] SYNC: [1] Connected 2000 blocks, new tip 000000442ee4fe26d1c880418ce2281ff0f1c6a4d8b0224395fccf303935624a, height 582000, date 2020-12-20 04:57:52 +0000 UTC
(lldb)

After restarting the App new error which is shown in log below occurs
runtime/cgo: chdir(/private/var/containers/Bundle/Application/B43256B7-CA67-484E-8157-827ADCF892B9/Decred%20Wallet%20Testnet.app) failed
user authorized notifications: true
2021-05-31 21:46:36.617 [INF] DLWL: Loaded 1 wallets
network changed to WiFi
2021-05-31 21:46:41.624 [ERR] LODR: Failed to open database: wallet.OpenDB: cannot allocate memory
2021-05-31 21:46:41.625 [ERR] DLWL: loader.OpenExistingWallet:: wallet.OpenDB: cannot allocate memory

Build type: Testnet
Device: iPhone 8+
Ios version: 14.4.2
Hardware: 3GB RAM

This issue is yet to be replicated on the latest build.


filled 7-11 placeholders of the story

Please review my commit.

I think we are supposed to change the madlibs_list.txt file as well.
With the respective placeholders.

Please make the necessary changes and create a pull request again.


Expand / Collapse on node click

I would like some internal Option for this behaviour:
If i have a tree where not every node has an href, i would like to click on the entire node to expand / collapse.
For the moment i add the "nohref" property to those nodes, check for it and, if present, call the actions.
	onNodeSelected: function(event, data) {
		if( data.nohref ) {			$(this).treeview('toggleNodeExpanded',data.nodeId).treeview('unselectNode',data.nodeId);
		}
	}

Maybe this is of use for someone else

From your code it looks like you are trying to achive what you already get when setting 'selectable' to false on all nodes.

thx for mentioning, i recogniced just half an hour after my post.


Alerting based on number of resque workers

Setting an alert in newrelic based on the number of background workers alerts when the number of background workers is higher than the set value rather than lower. Shouldn't the alert work the other way around? If background worker count drops below the set value it should alert rather than alert when background worker count is above the set value.

Yes! It would be really good if this could be fixed - still an issue in 2015.

Yes! It is still the case. We need to have an alert when worker is down.