Is there a way to implement multiple level verbs?

 Issue by akfish
Thursday Oct 31, 2013 at 19:48 GMT
Originally opened as https://github.com/gsscoder/commandline/issues/107

I am trying to make an app with multiple level of verbs, something like:
app repo list
app repo add
app account list

What I tried is:
    class Options
    {
        #region Global Options
        //...
        #endregion

        #region Help
        //..
        #endregion

        #region Verbs
        [VerbOption("account", HelpText = "Manage mail accounts")]
        public AccountOptions AccountVerb { get; set; }

        [VerbOption("repo", HelpText = "Manage repositories")]
        public RepoOptions RepoVerb { get; set; }
        #endregion
    }

In each verb, nested a sub verb:
    class AccountOptions : IOptions
    {
        [VerbOption("add", HelpText = "Add an account")]
        public AddOption AddVerb { get; set; }

        //And so on....

        public class AddOption : IOptions
        {
        }
        //And so on....

    }

main:
    class Program
    {
        static void Main(string[] args)
        {
            string theVerb = null;
            IOptions theOptions = null;

            var options = new Options();
            if (CommandLine.Parser.Default.ParseArguments(args, options, (verb, subOptions) =>
            {
                theVerb = verb;
                if (verb != null)
                    theOptions = subOptions as IOptions;
            }))
            {
                theOptions.Execute(options);
            }
            else
            {
                Console.Error.WriteLine("Command line parsing error.");
            }
        }
    }

I was able to get first level of verbs to working (e.g. app repo, app account, as the documents said. But the second level ones (app account list, app account add) didn't.
So is there a way to do this? Thanks.

 Comment by nemec
Saturday Nov 02, 2013 at 01:26 GMT

There was some talk of this in #17, but I don't think nested verbs ever made it into the code. As you mentioned, it's probably quite easy if we switch to a recursive parsing model.

 Comment by akfish
Friday Nov 01, 2013 at 14:57 GMT

After some messing around I found that the sub verbs did get initialized correctly. So the problem was to get the last level of verb instance. That's easily solve by some recursive checking.
Though it would be cool to have a build-in way to get the parsed verb-path in these multiple level situation.

 Comment by nemec
Saturday Nov 02, 2013 at 17:27 GMT

Not as far as I know. I'm sure @gsscoder would accept a pull request for it, but I haven't seen him around in a while.

 Comment by akfish
Saturday Nov 02, 2013 at 13:23 GMT

I see. So are there any plans to support nested verbs in future versions?

 Comment by akfish
Tuesday Dec 02, 2014 at 07:01 GMT

@Nate-Wilkins I was able to implement this feature in my project without actually modifying this project.
Here is my implementation:
https://github.com/akfish/git-mail/tree/develop/git-mail
You should know that the project linked above was never finished, since later I moved on to node.js for cross-platform purpose and I haven't been working on .Net platform for almost a year.
But the CLI part was completed and would hopefully give you some hints.

 Comment by Nate-Wilkins
Tuesday Dec 02, 2014 at 06:33 GMT

This would probably be a breaking change. But I definitely want this. Was anyone working on a PR?

 Comment by Nate-Wilkins
Tuesday Dec 02, 2014 at 07:26 GMT

@akfish Great thanks! I'll take a gander

 Comment by cosmo0
Tuesday Dec 02, 2014 at 08:07 GMT

If you create this feature that doesn't break the existing usage, I accept PRs into my fork (which is the only one more or less active at this point, I believe)

 Comment by Nate-Wilkins
Tuesday Dec 02, 2014 at 17:28 GMT

@nemec Could you point me to some of the code that does the verb parsing? I'll be taking a look at this but no promises :(
@cosmo0 I'll send the PR to your fork should I also send one here? (This is all assuming I implement the feature...)
@akfish Looks like the general gist is to use a sub parser :+1: project looks pretty cool too.

 Comment by cosmo0
Tuesday Dec 02, 2014 at 17:45 GMT

Well, you can do both, but @gsscoder has vanished from the web, so I'm pretty sure he won't merge it.

 Comment by cosmo0
Wednesday Dec 03, 2014 at 08:00 GMT

@nemec : great to hear that he's still alive, at least.

 Comment by nemec
Tuesday Dec 02, 2014 at 19:28 GMT

@Nate-Wilkins try this file or this file.
@cosmo0 I did manage to get a reply from Giacomo, he said he's busy at work these days and doesn't have time for this project.

A small trick I found that works quite well. When I find a match with an existing verb, I skip the 1st argument, and forward it to another Parser. This could be done recursively, and probably in a better way than reflection.
    interface ISubParser
    {
        int RunAndReturnExitCode(string[] args);
    }

    [Verb("repo", HelpText = "Manage repositories.")]
    public class RepoVerb : ISubParser
    {
        int ISubParser.RunAndReturnExitCode(string[] args)
        {
            return Parser.Default.ParseArguments<AddOptions, RemoveOptions>(args)
                .MapResult(
                  (AddOptions opts) => AddRepo.RunAndReturnExitCode(opts),
                  (RemoveOptions opts) => RemoveRepo.RunAndReturnExitCode(opts),
                  errs => 1);
        }
    }

    class Program
    {
        private static Type GetSubParser(string verb)
        {
            return Assembly.GetExecutingAssembly().GetTypes().FirstOrDefault(x =>
                typeof(ISubParser).IsAssignableFrom(x)
                && x.GetCustomAttribute<VerbAttribute>()?.Name == verb);
        }

        static int Main(string[] args)
        {
            if (args.Length > 0)
            {
                Type type = GetSubParser(args[0]);
                if (type != null)
                {
                    // Command with sub-verbs
                    return (Activator.CreateInstance(type) as ISubParser).RunAndReturnExitCode(args.Skip(1).ToArray());
                }
            }

            return Parser.Default.ParseArguments<RepoVerb, AccountVerb>(args)
                .MapResult(
                  (RepoVerb opts) => 1,
                  (AccountVerb opts) => 1,
                  errs => 1);
        }
    }


Add support for grouping by tuple keys

It looks like we've been allowing the by columns of a groupby to be specified in a list or tuple, but expected pandas behavior treats a tuple as a column key; this PR attempts to align us with pandas behavior, marking this as a draft as I imagine this will break a few tests.
Also noting that the added tests seem to be failing due to numpy warnings getting emitted in pandas while trying to index an empty dataframe with a tuple column key:
import pandas as pd

df = pd.DataFrame(columns=[('a', 'b'), 'a', 'b', 'c'])
df[[('a', 'b'), 'c']]
# /raid/charlesb/mambaforge/envs/groupby-tuple/lib/python3.9/site-packages/pandas/core/common.py:241: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
#   result = np.asarray(values, dtype=dtype)

~Will file an issue to track this if it doesn't already exist.~
EDIT:
Looks like this is resolved in pandas>=1.5, so opting to just ignore the warnings for our 3.8/3.9 testing
cc @quasiben

[x] Closes #2893
[ ] Tests added / passed
[ ] Passes pre-commit run --all-files

Light ping for rereview @jrbourbeau


Unpackaged dotnet publish fails to include assets in publish directory

Describe the bug
When using dotnet publish to publish a WinUI 3 unpackaged app with C#, the Assets directory and its files are missing in the ./publish directory.
Steps to reproduce the bug

Create a new WinUI 3 C# app using the template in Visual Studio 2022.
Set <WindowsPackageType>None</WindowsPackageType> in the *.csproj file.
Open a console and run dotnet publish -p:Platform=x64.
Open the path .\bin\Release\net6.0-windows10.0.19041.0\win10-x64\publish in Explorer and observe the .\Assets directory is missing.

Expected behavior
Any assets should be included.
Screenshots
No response
NuGet package version
Windows App SDK 1.4.5: 1.4.240211001
Packaging type
Unpackaged
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
Tested with net6 and net8. Happens on both versions.
However, running dotnet build does work as expected and the assets are included.

Not a bug; setting <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> correctly fixes the issue.


Include web view actions in extension telemetry

The web views that trigger for extension actions should be included in telemetry events with start and stop (like other patterns) so we can track invocation, failure and performance.

Initial telemetry checked in as of #977


DocsArchive-1.0.21078.2Auto archive content

Auto archive content from https://github.com/opstestprod1/E2E_DocsArchive_Prod.git

Docs Build status updates of commit 68b4d6c:
:warning: Validation status: warnings

File
Status
Preview URL
Details

e2e_archiveDocs_Prod_20210513020207/fallback.md
:warning:Warning
View
Details

.openpublishing.publish.config.json
:white_check_mark:Succeeded

.openpublishing.redirection.json
:white_check_mark:Succeeded

e2e_archiveDocs_Prod_20210513020207/TOC.yml
:white_check_mark:Succeeded
View

e2e_archiveDocs_Prod_20210513020207/breadcrumb/e2e_archiveDocs_Prod_20210513020207/toc.yml
:white_check_mark:Succeeded

e2e_archiveDocs_Prod_20210513020207/docfx.json
:white_check_mark:Succeeded

e2e_archiveDocs_Prod_20210513020207/fallback.md

Line 2, Column 1: [Warning-ms-author-missing] Missing required attribute: 'ms.author'. Add the current author's Microsoft alias.
Line 2, Column 1: [Warning-ms-prod-or-service-missing] One of the following attributes is required: 'ms.prod', 'ms.service'. Use ms.prod for on-premise products, or ms.service for cloud services.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Request: Steam turbine/Redstone Flux Power integration

I think it would be useful to have a way to produce Redstone Flux Power with the Steam mod (e.g. via steam turbine) which would make it a viable option to power other mods, too.
Imo it will help greatly to position the Steam mod among other tech-/power producing mods!

I mean, you can turn the fluid steam into RF, though that only works if a mod adding fluid steam is installed. I guess I could add a dynamo or something.


Error on DNN 8.0

The DNN 8.0.0 CTP 6 includes updates to the CDF that this extension plugs into.  Unfortunately, the update to CDF includes a breaking change which means that there needs to be a different install for DNN 8 vs. earlier versions of DNN.

What changed to make CDF breaking?

see https://github.com/dnnsoftware/Dnn.Platform/commit/92118bc1da00a1f39b04839321d8b6afe56f1a5d#commitcomment-13795654, changed access modifier from protected to public


How to build a service conditionally?

Hello.
I'm considering introducing DI into my project. Your DI implementation container looks good enough :) But I have a question: how to create services that are created through user's configuration? Here's an example:
package main

import (
	"github.com/goava/di"
	"github.com/spf13/viper"
)

type ServiceInterface interface {
	Do()
}

type DependencyA interface {}
type ServiceImplementationA struct {DependencyA}
func (s *ServiceImplementationA) Do() {}

type DependencyB interface {}
type ServiceImplementationB struct {DependencyB}
func (s *ServiceImplementationB) Do() {}

func NewService(config *viper.Viper) ServiceInterface {
	if viper.GetString("preferred_service") == "B" {
		// Resolve as ServiceImplementationB
	}

	// Otherwise resolve as ServiceImplementationA
}

func main() {
	container, _ := di.New(
		di.Provide(viper.New),
		di.Provide(NewService),
	)
	var service ServiceInterface
	container.Resolve(&service)
}

Depending on the configuration, I want to create a service interface implementation. But each implementation has its own dependencies list (I have not provided them manually in the example). I need a way to somehow call container.Resolve(&concreteImplementation) from the NewService function.
Is there any way to do this? Or maybe I just misunderstand how it should be done at all?

@erickskrauch Hi! Thanks for your interest =)
In the current implementation, the change of dependency graph after compilation is restricted for a more clear injection mechanism. This means that you can't add a provider of type based on the other providing result. The dependency graph must be formed before it is compiled and it can't change in the future.
In this case, you can create a configuration outside a container and change the list of options:
config := viper.New()
// config initialization code
// ...
var options []di.Option
switch config.GetString("preferred_service") {
case "A":
	options = append(options, di.Provide(NewServiceA))
case "B":
	options = append(options, di.Provide(NewServiceB))
}
options = append(options,
	di.Provide(func() *viper.Viper { return config }), // provide already existing config
)
container, err := di.New(options...)

I'm just thinking about how to make this functionality easy and clear.
Now, we have some ideas:

Late provides (#3 @fionera)
WithCondition() provide option

I will form some proposals for this in the near future.

Thanks for the reply!
The first idea was to create some sort of reduced container interface (without methods that would modify the dependency graph) that could be accepted as service dependency and will let to call the Invoke, Resolve and Has methods. But I think disclosing the last two methods makes it somehow close to some kind of service locator :)
Updated example:
package main

import (
	"github.com/goava/di"
	"github.com/spf13/viper"
)

type ServiceInterface interface {
	Do()
}

type DependencyA interface {}
type ServiceImplementationA struct {DependencyA}
func (s *ServiceImplementationA) Do() {}
func NewServiceA(a DependencyA) *ServiceImplementationA {
	return &ServiceImplementationA{a}
}

type DependencyB interface {}
type ServiceImplementationB struct {DependencyB}
func (s *ServiceImplementationB) Do() {}
func NewServiceB(b DependencyB) *ServiceImplementationB {
	return &ServiceImplementationB{b}
}

func NewService(container di.InjectedContainer, config *viper.Viper) ServiceInterface {
	if viper.GetString("preferred_service") == "B" {
		return container.Invoke(NewServiceB)
	}

	return container.Invoke(NewServiceA)
}

func main() {
	container, _ := di.New(
		di.Provide(viper.New),
		di.Provide(NewService),
		di.Provide(func() DependencyA {
			return &struct{}{}
		}),
		di.Provide(func() DependencyB {
			return &struct{}{}
		}),
	)
	var service ServiceInterface
	container.Resolve(&service)
}

The example looks very identical to my late provide idea ^^

I just thought that this is how the Invoke method turns out to be the most useless because there are no generics in Go and it will be impossible to recognize the return type (and Invoke returns only the err).
Need to think of something else that will allow you to automatically determine the list of dependencies and at the same time not to lose the returned type so that you don't have to perform typecasting.
You need to merge the automatic arguments injection of Invoke's method with Provide's result passing by reference (I hope you were able to understand that "English" 😅).

Let's call it CoolInvoke (the name is temp 😅):
func NewService(config *viper.Viper, container di.InjectedContainer) (result ServiceInterface, err error) {
	if viper.GetString("preferred_service") == "B" {
		err = container.CoolInvoke(NewServiceB, &result)
	} else {
		err = container.CoolInvoke(NewServiceA, &result)
	}

	return result, err
}

@erickskrauch, @fionera I lean towards to implement WithCondition() provide option:
func NewConfig() *viper.Viper {
    // initialization code omitted
	return viper.New()
}

func IsServiceA(config *viper.Viper) bool {
	return config.GetString("preferred_service") == "A"
}

func IsServiceB(config *viper.Viper) bool {
	return config.GetString("preferred_service") == "B"
}

func main() {
	c, err := di.New(
        di.Provide(NewConfig),
		di.Provide(NewServiceA, di.WithCondition(IsServiceA)),
		di.Provide(NewServiceB, di.WithCondition(IsServiceB)),
	)
}

When you implement this, you could basically implement it so that di.WithCondition gets executed like a late provide wrapper
func NewService(container di.InjectedContainer, config *viper.Viper) di.Option {
	if viper.GetString("preferred_service") == "B" {
		return di.Provide(NewServiceB)
	}

	return di.Provide(NewServiceA)
}

func main() {
	c, err := di.New(
        di.Provide(NewConfig),
		di.Provide(NewService)
	)
}

Introducing the WithCondition option looks like an acceptable (but very verbose) solution for some simple conditions of choosing the target dependency. But if the logic becomes more complex, each case will have to be rewritten over and over again, which will be the source of hard debuggable errors.
Introducing some magic interface will be a more natural way to solve this task. Maybe you should introduce some di.LateProvide(NewService), which should return di.Option as @fionera suggested. Although this raises the problem that the dependency graph is modified in this service creator.
That's why my solution with InvokeWithResult seems to be more suitable: the dependency graph doesn't change, but the initial task can be reached :)

@erickskrauch WithCondition() separates condition and provide logic. Providing already tested. Condition logic will be easy to test. Even complex cases can be tested and the test will be primitive.
@fionera Late provides needs additional instruments to test on the user side. You must be sure that you have provided the appropriate option.
@erickskrauch Your solution returns interface instead of implementation in the constructor, that doesn't fit the principle "return structs accept interfaces". And does not allow you to use di.As() as it is now. Also, introducing a magic interface is not "go way". Dependency injection already contains a lot of "magic". I wouldn't want to make it more complicated.
And if we are talking about the possibility of container resolving. Then we don't need to add additional methods:
package main

import (
	"errors"
	"fmt"
	"log"
	"net"

	"github.com/goava/di"
)

type ConnectionType string

// NewConnection
func NewConnection(typ ConnectionType, container *di.Container) (net.Conn, error) {
	switch typ {
	case "tcp":
		var conn *net.TCPConn
		return conn, container.Resolve(&conn)
	case "udp":
		var conn *net.UDPConn
		return conn, container.Resolve(&conn)
	}
	return nil, errors.New("unknown connection type")
}

func NewTCPConn() *net.TCPConn {
	return &net.TCPConn{}
}

func NewUDPConn() *net.UDPConn {
	return &net.UDPConn{}
}

func NewConnectionType() ConnectionType {
	return "udp" // change to "tcp" for tcp connection
}

func main() {
	c, err := di.New(
		di.WithCompile(),
		di.Provide(NewConnectionType),
		di.Provide(NewTCPConn),
		di.Provide(NewUDPConn),
		di.Provide(NewConnection),
	)
	if err != nil {
		log.Fatalln(err)
	}
	// hack to provide container
	if err := c.Provide(func() *di.Container { return c }); err != nil {
		log.Fatalln(err)
	}
	if err := c.Compile(); err != nil {
		log.Fatalln(err)
	}
	var conn net.Conn
	if err := c.Resolve(&conn); err != nil {
		log.Fatalln(err)
	}
	switch conn.(type) {
	case *net.TCPConn:
		fmt.Println("TCP")
	case *net.UDPConn:
		fmt.Println("UDP")
	}
}

ConnectionType can be replaced with the configuration type and this will work. But it is the hack =D

Your solution returns interface instead of implementation in the constructor, that doesn't fit the principle "return structs accept interfaces".

But the target structures, for the creation of which di is necessary, expect interfaces, not concrete implementations. Otherwise, what is the point of all this at all?
I need to define the interface implementation for the application. But its implementation is chosen based on the configuration. That's why I need some layer, which will allow me to make a decision about the final implementation based on the configuration or other dependencies.

Thus, we come to the conclusion that if we ensure the availability of the container when resolving dependencies, then, in general, the problem is solved. Maybe we should then make container available by default?

Sorry for delay, I had a hard time today.

But the target structures, for the creation of which di is necessary, expect interfaces, not concrete implementations. Otherwise, what is the point of all this at all?

di.As() binds implementation to the interface. It is bad practice to return the interface from the constructor.

Thus, we come to the conclusion that if we ensure the availability of the container when resolving dependencies, then, in general, the problem is solved. Maybe we should then make container available by default?

This may be true. I create #9 with some improvements:

removed compile stage, the graph can be modified
container provided by default
some internal improvements which I have long wanted to do

Late provide example: https://github.com/goava/di/blob/make-graph-editable/_examples/lateprovide/main.go
It still needs testing, but if it shows up well, we'll release it.

I still need to reimplement the acyclicity check and di.Prototype().

Glad we could come to a decision :)
I have already started implementing DI in my project. You can have a look at it: https://github.com/elyby/chrly/tree/di/di. I'll update the code to #9's solution when it'll be ready.

Fixes merged. I need some time to prepare the release.


Store analytics remotely

After creating a management command to generate tag analytics (#811), we should store the output to a remote location and/or email it to someone

Hey, @shrayshray! We're thinking through how these tag analytics reports should be delivered to you. I think I remember you saying Metro uses Dropbox – would it be convenient for us to post the reports to a shared Dropbox? Then, you all could manage access (and even your own email notifications) on your end, and have an archive of past reports handy.
Let me know what you think!

Steps to upload a file to Google Drive:

Create a service account following the instructions in the first section of this blog post: https://www.twilio.com/blog/2017/02/an-easy-way-to-read-and-write-to-a-google-spreadsheet-in-python.html

Be sure to follow the project / service account naming conventions outlined in https://github.com/datamade/how-to/issues/178#issue-815551873

Create a reports folder in Google Drive and share it with DataMade, Shelly, Omar<EMAIL_ADDRESS>and your service account
Encrypt and add your client secret to version control
Use the Google API Python library to upload generated reports to your reports folder

Authentication example:

Part 1: https://github.com/security-force-monitor/sfm-cms/blob/bdf72bee05fb9842353a563e110d9fb70aa92afe/sfm_pc/management/commands/import_google_doc.py#L9
Part 2: https://github.com/security-force-monitor/sfm-cms/blob/bdf72bee05fb9842353a563e110d9fb70aa92afe/sfm_pc/management/commands/import_google_doc.py#L181-L181
Part 3: https://github.com/security-force-monitor/sfm-cms/blob/master/sfm_pc/management/commands/import_google_doc.py#L321-L324

Uploading will probably look something like this: https://developers.google.com/drive/api/v3/manage-uploads#python

@hancush to run May report and share access to Drive with Metro, then close.

@hancush there are many, MANY, copies of the monthly report .csv in the Google Drive folder - is this expected?

@shrayshray Hmm, we'll take a look.

It looks like this started behaving when I deployed the upgrade!


Using the return value of the same function in a dialog will only show the return value of one function.

Describe the bug
Prepare the following dialog:
Get skills: {{Master.get_new_random_ability()}}, {{Master.get_new_random_ability()}}
(get_new_random_ability() returns a String)
But in the game both function return values are displayed as the first function's return value.
Affected version

Dialogue Manager version: v2.32.0
Godot version: 4.2.1 Stabel

To Reproduce
Steps to reproduce the behavior:

Preparation of dialogues.
See error.

Expected behavior
The correct return value will be show.
Screenshots
If applicable, add screenshots to help explain your problem. Try to include as much detail as possible.

That isn't a bug with Dialogue Manager - just the nature of Godot's randomisation. The default randomiser uses the system clock to generate a value so if you're calling it twice in the same tick you might want to also pass in a value to reseed it with each call.

No .... This is indeed a bug, see the picture.

@nathanhoad

Ah yep, I think I know what it might be then.


Organize the output from RMC to make it more user friendly

An RMC run includes multiple stages (codegen, symtab2gb, cbmc, etc.) each of which produces its own output and warning/error messages. It's often daunting to find the relevant pieces of information in the output, for example the results of specific assertions (#477), or whether there were warnings in codegen that may impact soundness (#316), etc. The proposal is to reorganize the output from RMC as follows:

The output printed in the terminal (stdout) should be minimal; it should only include an indicator of the progress, e.g. which stage the run is in, the number of codegen'd crates out of the total, how many CBMC checks are solved so far, etc., and a summary at the end that includes the number of warnings/errors from the different stages, and how many checks passed or failed. This would be similar in spirit to the output from cargo test where by default no output is emitted for passing tests. The user should be able to increase the output verbosity via a switch.

(Optional) A log file that includes all the detailed output from all stages.

A report file (e.g. rmc-report.txt) that includes the verification results organized by category, where categories include user-specified assertions, arithmetic overflow checks, bound checks, etc. Each section should list the specific checks that were done, and the result of each.

We should cover this issue as part of #1194


Merge pull request #1 from gohugoio/master

merge

 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.


Add creating Nvmeof Profile support

Hi, the opensds/opensds project already support nvme over fabic. In the dashboard "Profile" module(see current.png), it only support ISCSI/FC/RBD. Could you please add the feature to create "accessProtocol: nvmeof" profile. Thank you.
And see the nvmeof.png, the nvmeTcp1 profile is that I created it in command line. In the web of creating volume, I can create volume successfully by using the nvmeTcp1. So, just add a feature to select nvmof accessProtocol to create profile. Thanks a lot.

@anvithks please help add nvmeof protocol in dashboard, thanks

@wisererik @CongMinYin I will take a look at this.

@CongMinYin Can you please post the command that you used to create the profile.

Hi,
The command ：
osdsctl profile create '{"name": "nvmeTcp", "description": "default policy", "storageType": "block", "provisioningProperties":{"ioConnectivity": {"accessProtocol": "nvmeof"}}}'
Best regards.
Congmin Yin
From: Anvith KS<EMAIL_ADDRESS>Sent: Wednesday, September 11, 2019 4:55 PM
To: opensds/opensds-dashboard<EMAIL_ADDRESS>Cc: Yin, Congmin<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [opensds/opensds-dashboard] Add creating Nvmeof Profile support (#184)
@CongMinYinhttps://github.com/CongMinYin Can you please post the command that you used to create the profile.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/opensds/opensds-dashboard/issues/184?email_source=notifications&email_token=ADFE2YJFRALSN4D5GQLPAJLQJCW7FA5CNFSM4IUGOTRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NY2MI#issuecomment-530287921, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADFE2YLDWDFWYQJACFTCHSDQJCW7FANCNFSM4IUGOTRA.

@CongMinYin please check the PR #185, if it's ok, we can merge it.

@CongMinYin Thank you. I figured it out and already added the fix. Please review the PR #185 .


pure_pulse in CyclicNoiseGen_v1 is not pure pulse.

pure_pulse is not pure pulse in this line, because the noise is not simple additive noise (the added noise is masked).
Is this behavior intended?

Hi, thanks for pointing it out.
I will check it during the weekends.

Hi @skitaoka
Thank you for looking into the implementation.
You are correct, the pure_pulse has small noises in voiced regions.
I think a better implementation should be like this:
https://github.com/nii-yamagishilab/project-NN-Pytorch-scripts/pull/38/files
Please have check : )

Here are two samples using the pre-trained model in 00_demo.sh, one before revising the code, the other after.
samples.zip

great! :+1:


Example beer API seems to be not available anymore

I've tried the example application, but it seems that the employed API: https://api.punkapi.com/v2/beers (remote_api.dart) has already gone.
Official statement from the website says that the API will be shutdown on 01/05/2024 ("PunkAPI is shutting down on May 1st 2024") @ https://punkapi.com/documentation/v2.
It seems that the source code for the API itself is not available. I've found only the DB employed in the API: https://github.com/sammdec/punkapi

Here is a quick and dirty web server providing the employed API in the example (written in Rust). The api does only support the endpoint required by the example.
Open points:

parse JSON files of punkapi to provide the real beer names
add support to search over beer name

Filename: main.rs
mod models {
    use serde::{Deserialize, Serialize};

    #[derive(Debug, Deserialize, Serialize, Clone)]
    pub struct BeerSummary {
        pub id: u64,
        pub name: String,
        pub image_url: String,
    }
}

mod handlers {
    use super::models::BeerSummary;
    use std::collections::HashMap;

    pub async fn get_beer(
        params: HashMap<String, String>,
    ) -> Result<impl warp::Reply, warp::Rejection> {
        // parameter: per_page
        let dval = "20".to_string();
        let tval = params.get("per_page").unwrap_or(&dval);
        let per_page = match tval.parse::<u64>() {
            Ok(ival) => ival,
            Err(_) => 20, // default value
        };
        // parameter: page
        let dval = "0".to_string();
        let tval = params.get("page").unwrap_or(&dval);
        let page = match tval.parse::<u64>() {
            Ok(ival) => ival,
            Err(_) => 0, // default value
        };
        // parameter: beer_name / TODO implement filter
        let beer_name = params.get("beer_name");

        let beers: Vec<BeerSummary> = ((page - 1) * per_page..page * per_page)
            .map(|id| BeerSummary {
                id,
                name: format!("Beer #{}", id),
                // TODO not all images are available, would be better to parse JSON files of punkapi-db
                image_url: format!("https://images.punkapi.com/v2/{}.png", id),
            })
            .collect();

        Ok(warp::reply::json(&beers))
    }
}

mod routes {
    use super::handlers;
    use std::collections::HashMap;
    use warp::Filter;

    pub fn routes() -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
        get_beers()
    }

    fn get_beers() -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
        warp::path!("v2" / "beers")
            .and(warp::get())
            .and(warp::query::<HashMap<String, String>>())
            .and_then(handlers::get_beer)
    }
}

#[tokio::main]
async fn main() {
    let routes = routes::routes();

    println!("Beer serving at http://localhost:8081");
    warp::serve(routes).run(([127, 0, 0, 1], 8081)).await;
}

Thank you for your issue.
I have updated the example project on the develop branch.
We will no longer be using the PunkAPI.


fix(@angular/cli): update copy-webpack-plugin to 4.1.1

This release picks up a ReDoS security patch in minimatch: https://nodesecurity.io/advisories/minimatch_regular-expression-denial-of-service

LGTM, thanks for updating this 👍

I'll make sure that at an absolute minimum, all the releases in contrib that relate to security get a pull request here as well.

That's much appreciated, honestly. You can ping me as well and I'll add make one. Is there a place where you list these contrib security releases, twitter maybe?

https://twitter.com/WebpackContrib


ESAS Species

ESAS, should the ESAS species be added to SpeciesWORMS vocab?

@Osanna123 to check if all ESAS species are in WoRMs, and add them to SpecWoRMS.
https://esas-docs.ices.dk/species/

[ ] Create new CodeType for the ESAS list
[ ] Add ESAS aphia IDs to SpecWorms
[ ] Semantically map the ESAS list to SpecWorms
[ ] Reflect SpecWorm based search in disclaimer

Added ESAS aphia IDs to SpecWorms, however, these are not accepted and not added thus far:
137100 junior objective synonym of 1571853 (status changed in 2022)
137147 unaccepted, ref 1584284 (2022)
148764 unaccepted family, ref 136988
1534756 unaccepted, ref. 1534755
1534769 unaccepted, ref. 1534773
1534806 unaccepted, ref. 1534805
1534834 unaccepted subspecies, ref. species 1037315

present unaccepted:
137178
1534834
1484453

@cmspinto the respective WoRMS codes are in the SpecWoRMS.
Could you please make sure to replace the ESAS disclaimer?
the latest version is here: https://github.com/ices-tools-prod/disclaimers

Hi @LApetre, I can't load the ESAS project because of the local references, could you update the disclamer like Anna suggests?

The disclaimer is updated now. @Osanna123


This custom blocker extension is great but only loads on certain pages if you refresh the rules work every time. So my objective here is to find a script that could be applied here. CustomBlocker.

This custom blocker extension is great but only loads on certain pages if you refresh the rules work every time. So my objective here is to find a script that could be applied here. CustomBlocker.
Everything works great with the current extension just to have the rule always work 100 percent of the time a quick refresh is needed; the page can be halfway loaded just a refresh of the site once or twice causes this extension to work with no problems. I looked at tampermonkey extensions, and I cannot find a script that reloads specific assign webpages that custom locker has rules applied. And only reload once each time within milliseconds of when a site is about to load completely it quickly reloads. So am I am looking for a possible way to the currently built addon that has this capability or using tampermonkey with a script that could apply here
_
Looking for additional chrome extension, custom chrome simple script, or script I can use with tampermonkey for custom blocker chrome extension to work every time. This custom blocker extension is great but only loads on certain pages if you refresh the rules work every time.
_

Note that this issue is also being discussed at Stack Overflow question number 50072966.

Now also cross-posted at Super User, Question 1320599.


Authentication failing

Preflight Checklist

[X] I have installed the latest version of Storage Explorer.
[X] I have checked existing resources, including the troubleshooting guide and the release notes.
[X] I have searched for similar issues.

Storage Explorer Version
1.34.0
Regression From
1.33.0
Architecture
x64
Storage Explorer Build Number
Unable to get just gives (Empty)
Platform
Windows
OS Version
windows 11 22H2 22621.3593
Bug Description
open Storage Explorer, all menus (File, Edit etc) say (Empty)

Click the user icon "Sign in with Azure" Azure next. just stops on "Your browser should now open and redirect you to a login page. Waiting for authentication..." nothing else.
Also if you click the plug for a new connection select "Subscription" > Azure this does the same.
I've uninstalled deleted all contents from AppData for it etc. still the same.
Steps to Reproduce
Click the user icon "Sign in with Azure" Azure next. just stops on "Your browser should now open and redirect you to a login page.
OR
Also if you click the plug for a new connection select "Subscription" > Azure
Actual Experience
open Storage Explorer, all menus (File, Edit etc) say (Empty)

Click the user icon "Sign in with Azure" Azure next. just stops on "Your browser should now open and redirect you to a login page. Waiting for authentication..." nothing else.
Also if you click the plug for a new connection select "Subscription" > Azure this does the same.
I've uninstalled deleted all contents from AppData for it etc. still the same.

Expected Experience
Should open browser and allow MFA / Sign in.
Additional Context
No response

@Ian-256 Sometimes it takes a few seconds for everything in Storage Explorer to initialize, including the menus. Can you try waiting a few seconds for the menus to populate and then try signing in? If that doesn't work, can you please share the app and the authentication logs?

Hello all, I am facing the same issue and not able to login after upgrading the storage explorer version. It is stuck on waiting for authentication or the default browser option doesn't open the browser at all.

HI, Ive left this opening for about 15mins come back to it and it has timed out and does ask if you want to retry. Click retry and it waits another 15mins or so.

After a lot of diffing, I've managed to resolve the issue.
when logging I noticed sometimes I get a .net 8 error. Event ID1023...
Description: A .NET application failed.
Application: Microsoft.ServiceHub.Controller.exe
I've basically removed .net 8 and reinstalled it (redownloaded it) rebooted tested storage explorer and its all working.


Support passing OPENAI base url w/ env variable

hey @baichuan-assistant could you modify the tests too and we would love to merge this in :)

closing this since it has been fixed with v0.2


Create a bot to close stale issues

@danlester  suggested using https://probot.github.io/apps/stale/, which is an app to auto close stale issues and PR's. By its configuration, there are some interesting options as: exemptLabels and  staleLabel.
This app once enabled just needs a yaml file .github/stale.yml with it's config.
Besides that option, there is an action for github called stale which can be implemented as:
name: "Close stale issues"
on:
  schedule:
  - cron: "15 00 * * *"

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/stale@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        stale-issue-message: 'This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.'
        days-before-stale: 30
        days-before-close: 5


dunfell][gatesgarth][hardknott][honister][kirkstone] Use new overrides syntax also in comments and wxwidgets in meta-webos-backports-gatesgarth

Merged to other branches as well:
fdd0ea08d..ea3596dbc  dunfell -> dunfell-next
8f28ff02f..4e66ddf2f  gatesgarth -> gatesgarth
8f28ff02f..4e66ddf2f  gatesgarth -> gatesgarth-next
ac1a046b1..951ab29a1  hardknott -> hardknott
ac1a046b1..951ab29a1  hardknott -> hardknott-next
3bc47154e..6773e3d32  honister -> honister
3bc47154e..6773e3d32  honister -> honister-next
3bc47154e..6773e3d32  master -> master
3bc47154e..6773e3d32  master -> master-next


Allow elements to be clicked that must reside on top of a zoom element

It's very common to have elements to be on top of an element that has a zoom, but say an absolute  element sits top of the zoomed element and its in the same container, the zoom is always triggered when you try to click the element that sits on top.
Is there anyway to allow jquery access to an element that sits on top and in the same container, instead of the zoom being triggered.

I understand what you are asking for, but this isn't a feature I'm interested in supporting.  If you want to modify zoom to support what you are doing, you'll need to do a couple of things.
In the event handler, add a condition to short circuit the event handler if the target of the event is not the same as the zoomed img element.  For example, this:
$source.on('click.zoom',
	function (e) {
		if (e.target !== img) return;
		// code
	}
);

Would change to this:
$source.on('click.zoom',
	function (e) {
		if (e.target !== img) return;
		// code
	}
);

Then you'll also need to give your absolutely positioned element a z-index so that it sits above the zoomed img element.

the two blocks of code above are identical.

Fixed the code block.


Update compatibility tests to include the CDH5.2.4 version of parquet

https://github.com/CommBank/ebenezer/issues/99

:+1:

:+1: Looks good


Clicking code lens: "run test" or "debug test" fails.

Environment data
dotnet --info output:
.NET Command Line Tools (1.0.1)

Product Information:
 Version:            1.0.1
 Commit SHA-1 hash:  005db40cd1

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.1

VS Code version:
1.10.2
C# Extension version:
1.7.0
Steps to reproduce
In the source of an XUnit test click on code lens: "run test" or "debug test"
Expected  behavior
Test should run.
Actual behavior
Shows error message: "Failed to run test because null."
Omnisharp Log shows:
[fail]: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
        An unhandled exception has occurred: Value cannot be null.
Parameter name: path1
System.ArgumentNullException: Value cannot be null.
Parameter name: path1
   at System.IO.Path.Combine(String path1, String path2)
   at OmniSharp.DotNetTest.Helpers.ProjectPathResolver.GetProjectPathFromFile(String filepath) in C:\projects\omnisharp-roslyn\src\OmniSharp.DotNetTest\Helpers\ProjectPathResolver.cs:line 11
   at OmniSharp.DotNetTest.Services.RunTestServices.GetResponse(String filepath, String methodName, String testFrameworkName) in C:\projects\omnisharp-roslyn\src\OmniSharp.DotNetTest\Services\RunTestService.cs:line 32
   at OmniSharp.DotNetTest.Services.RunTestServices.Handle(RunDotNetTestRequest request) in C:\projects\omnisharp-roslyn\src\OmniSharp.DotNetTest\Services\RunTestService.cs:line 27
   at OmniSharp.Middleware.Endpoint.EndpointHandler`2.<HandleSingleRequest>d__18.MoveNext() in C:\projects\omnisharp-roslyn\src\OmniSharp.Host\Middleware\Endpoint\EndpointHandler.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at OmniSharp.Middleware.Endpoint.EndpointHandler`2.<Process>d__16.MoveNext() in C:\projects\omnisharp-roslyn\src\OmniSharp.Host\Middleware\Endpoint\EndpointHandler.cs:line 130
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at OmniSharp.Middleware.EndpointMiddleware.<Invoke>d__7.MoveNext() in C:\projects\omnisharp-roslyn\src\OmniSharp.Host\Middleware\EndpointMiddleware.cs:line 91
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()
[info]: OmniSharp.Middleware.LoggingMiddleware
        /v2/runtest: 500 12ms

Hi! This is a duplicate of https://github.com/OmniSharp/omnisharp-vscode/issues/1100. The feature simply isn't implemented for .csproj-based .NET Core projects yet. We're working on it right now.


Let PoolThreadCache work even if allocation and deallocation Thread a…

…re different
Motivation:
PoolThreadCache did only cache allocations if the allocation and deallocation Thread were the same. This is not optimal as often people write from differen thread then the actual EventLoop thread.
Modification:

Add MpscArrayQueue which was forked from jctools and lightly modified.
Use MpscArrayQueue for caches and always add buffer back to the cache that belongs to the allocation thread.

Result:
ThreadPoolCache is now also usable and so gives performance improvements when allocation and deallocation thread are different.
Performance when using same thread for allocation and deallocation is noticable worse then before.

@trustin please review.
@nmittler @ejona86 @louiscryan this should also be interesting for grpc :)

How about making the new classes package-private and adding the factory methods to PlatformDependent?

@trustin good point let me address both comments

@trustin addressed comments... please check

See #3835

LGTM. Please consider to take care of #3835 :-)

@trustin can we handle #3835 after this is merged ?

@normanmaurer Sure!

@netkins build

Cherry-picked into 4.0 (f765053ae740e300a6b696840d7dfe5de32afeb3) , 4.1 (81fee66c78b6afad1d92647669c67bcf44f7cbdf) and master (ee1219b6b70878618d382182ea71cc47936ad8de)


Update/balance img

Description of the change
Balance the image

Screenshots

Checklist

[x] Added description of the change
[x] I've read the contributing guidelines
[x] Search previous suggestions before making a new PR, as yours may be a duplicate.
[x] I acknowledge that all my contributions will be made under the project's license.

Notes (optional):

the image become smaller, please follow the design here 👇
https://devprotocol.xyz/

so you want the third image to be greater than all?

no greater, make it all balance and the size should look like 👇
don't change the alignment of "Latest on Medium"

Vincent, I think what you are saying is not possible, either the image would be stretched or smaller. The only way to fix this without complications is to directly made the images of the same aspect ratio on medium

the image become smaller, please follow the design here 👇
https://devprotocol.xyz/

so you want the third image to be greater than all?

no greater, make it all balance and the size should look like 👇
don't change the alignment of "Latest on Medium"

I mean like in this the third image height is larger than all you wan something like this

there's no problem with that, we are using API, it comes from medium

Do you have any idea why these extra things are coming in pr i have not committed them or changed them

the image become smaller, please follow the design here 👇
https://devprotocol.xyz/

so you want the third image to be greater than all?

no greater, make it all balance and the size should look like 👇
don't change the alignment of "Latest on Medium"

Vincent, I think what you are saying is not possible, either the image would be stretched or smaller. The only way to fix this without complications is to directly made the images of the same aspect ratio on medium

Ah didn't see krish message, yes this is from medium image I think, I think this PR should not continue?

Thanks for your contributions @shreyaansjain06, really appreciate your work. Please see other bugs to our projects :D sorry for confusion.
Thanks for bringing up that @krishguptadev, I will tell them.


Saved State on Disk is very large

Is your feature request related to a problem? Please describe.
When using Llama.save_state, the size on disk is very large, partially because Llama.scores is always of size (n_ctx, n_vocab), even when the number of tokens actually used is much less than this.
Describe the solution you'd like

Only store the number of tokens used by the model (self.n_tokens).
If possible, re-use logits from the llama_context struct instead of serializing scores.

These didn't match when I loaded both and compared, though didn't have logit processor callbacks.

Describe alternatives you've considered

Somehow compressing LlamaState
Re-using logits from C++ state saving functions and eliminating scores on Python model

Looks like this is needed for sampling logic

Partially fixed by #1296

Closing bc #1296 merged


fix: allow queries to be fetched with zero cache time and do not hydrate it

Fixes for https://github.com/tannerlinsley/react-query/issues/1432 .

Prevents queries from getting cancelled in flight when a low cache time is set.
Do not hydrate cache time because environments can have different caching requirements.

:tada: This PR is included in version 3.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


dask.dataframe cannot handle timestamps-as-objects, even though Pandas can

What happened:
Comparing a column that is a timestamp-with-dtype-object to a datetime.datetime() object blows up.
What you expected to happen:
In Pandas, the comparison works.
Minimal Complete Verifiable Example:
This happens when using a fairly new Pyarrow feature that allows loading timestamps as objects in order to handle larger date ranges.
import pyarrow as pa
from pyarrow import parquet as pq
import numpy as np
from dask import dataframe as dd
import pandas as pd
from pandas.testing import assert_frame_equal
from datetime import datetime

def make_df_with_timestamps():
    # Some of the milliseconds timestamps deliberately don't fit in the range
    # that is possible with nanosecond timestamps.
    df = pd.DataFrame(
        {
            "dateTimeMs": [
                np.datetime64("0001-01-01 00:00", "ms"),
                np.datetime64("2012-05-02 12:35", "ms"),
                np.datetime64("2012-05-03 15:42", "ms"),
                np.datetime64("3000-05-03 15:42", "ms"),
            ],
            "dateTimeNs": [
                np.datetime64("1991-01-01 00:00", "ns"),
                np.datetime64("2012-05-02 12:35", "ns"),
                np.datetime64("2012-05-03 15:42", "ns"),
                np.datetime64("2050-05-03 15:42", "ns"),
            ],
        }
    )
    # Not part of what we're testing, just ensuring that the inputs are what we
    # expect.
    assert (df.dateTimeMs.dtype, df.dateTimeNs.dtype) == (
        # O == object, <M8[ns] == timestamp64[ns]
        np.dtype("O"),
        np.dtype("<M8[ns]"),
    )
    return df

def test_timestamp_as_object_out_of_range(tmpdir):
    # Out of range timestamps can be converted Arrow and reloaded into Dask
    # DataFrame with no loss of information if the timestamp_as_object option
    # is True.
    pandas_df = make_df_with_timestamps()
    table = pa.Table.from_pandas(pandas_df)
    filename = tmpdir / "timestamps_from_pandas.parquet"
    pq.write_table(table, filename, version="2.0")

    dask_df = dd.read_parquet(
        filename, engine="pyarrow", arrow_to_pandas={"timestamp_as_object": True}
    )

    # Check roundtripping:
    print(pandas_df)
    pandas_df2 = dask_df.compute()
    print(pandas_df2)
    assert (pandas_df2.dateTimeMs.dtype, pandas_df2.dateTimeNs.dtype) == (
        # O == object, <M8[ns] == timestamp64[ns]
        np.dtype("O"),
        np.dtype("<M8[ns]"),
    )

    assert_frame_equal(pandas_df, pandas_df2)

    # Check operations:
    print("Dask metadata", dask_df.dateTimeMs.dtype, dask_df.dateTimeNs.dtype)

    # Comparing the nanoseconds datetime column works fine:
    pandas_df[pandas_df.dateTimeNs > datetime(2050, 1, 1, 0, 0, 0)]
    dask_df[dask_df.dateTimeNs > datetime(2050, 1, 1, 0, 0, 0)].compute()

    # Comparing the milliseconds datetime column blows up:
    pandas_df = pandas_df[pandas_df.dateTimeMs > datetime(2500, 1, 1, 0, 0, 0)]
    print("Filtered to years>2500", pandas_df)
    # This next line blows up:
    dask_df = dask_df[dask_df.dateTimeMs > datetime(2500, 1, 1, 0, 0, 0)]
    assert_frame_equal(pandas_df, dask_df.compute())

This blows up with  TypeError("'>' not supported between instances of 'str' and 'datetime.datetime'") on the line doing the Dask comparison (line before last).
Anything else we need to know?:
I will attempt to provide a PR fixing this.
Environment:
This is Dask from git as of Feb 15, 2021, but was reported to me by user using some other, released version. Python 3.8 on Linux.
Package         Version              Location
--------------- -------------------- -------------------------
attrs           20.3.0
dask            2021.2.0+8.g02b466d2 /home/itamarst/Devel/dask
fsspec          0.8.5
iniconfig       1.1.1
locket          0.2.1
numpy           1.20.1
packaging       20.9
pandas          1.2.2
partd           1.1.0
pip             21.0.1
pluggy          0.13.1
py              1.10.0
pyarrow         3.0.0
pyparsing       2.4.7
pytest          6.2.2
python-dateutil 2.8.1
pytz            2021.1
PyYAML          5.4.1
setuptools      49.1.3
six             1.15.0
toml            0.10.2
toolz           0.11.1

A PR to fix this would be very welcome :)

Sometime this week, hopefully.

Further notes:

The Arrow stuff is unrelated (albeit how the user encountered this originally), you can get same effect by just using the Pandas dataframe directly.
At least part of the issue appears to be metadata detection: dtype("O") is always assumed to store strings, even when (as in this case) it is other object types.

Hacking the meta detection code to return a datetime object rather than a hardcoded string ("foo", see _simple_fake_mapping in dask/dataframe/utils.py) results in some progress, where I get a pandas._libs.tslibs.np_datetime.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 2500-01-01 00:00:00 error instead.
So fixing meta type detection to take values from underlying Series might help somewhat, but is not sufficient. np.datetime64("1970-01-01", "ms") had same result.

If you have a smaller MRE that would be helpful to put on this issue.
As a note, some of the IO methods use part of the data as their _meta so I think that is a reasonable approach. We'd probably just want to do it in the case of dtype='O'.

I guess doing it at load time would solve it for the Arrow case? And I guess that could be done for Pandas too. Will add smaller MRE.

A smaller MRE:
import numpy as np
from dask import dataframe as dd
import pandas as pd
from pandas.testing import assert_frame_equal
from datetime import datetime

def test_timestamp_as_object_out_of_range():
    """
    Timestamps stored as objects can be used in Dask.
    """
    pandas_df = pd.DataFrame(
        {
            "datetime": [
                np.datetime64("0001-01-01 00:00", "ms"),
                np.datetime64("2012-05-02 12:35", "ms"),
                np.datetime64("2012-05-03 15:42", "ms"),
                np.datetime64("3000-05-03 15:42", "ms"),
            ],
        }
    )
    assert pandas_df.datetime.dtype == np.dtype("O")
    dask_df = dd.from_pandas(pandas_df, npartitions=1)
    assert dask_df.datetime.dtype == np.dtype("O")

    # Check that roundtripping works:
    pandas_df2 = dask_df.compute()
    assert pandas_df2.datetime.dtype == np.dtype("O")
    assert_frame_equal(pandas_df, pandas_df2)

    # Check that we can operate on the datetimes correctly:
    pandas_df = pandas_df[pandas_df.datetime > datetime(2500, 1, 1, 0, 0, 0)]
    dask_df = dask_df[dask_df.datetime > datetime(2500, 1, 1, 0, 0, 0)]
    assert_frame_equal(pandas_df, dask_df.compute())

Oh, and thank you for the help and suggestions!

I did something kind of similar in https://github.com/dask/dask/pull/6976 for reference

Interestingly, if I go back to the Arrow variant and do two things, the original MRE passes:

Load with additional meta=pandas_df.head() argument to read_parquet().
Hardcode (as temporary workaround) scalar for dtype("O") to np.datetime64("3000-01-01", "ms") (np.datetime64("1970-01-01", "ms") somehow gets reset back to nanoseconds, and doesn't work?!).

So this suggests there are two different places meta is coming from (maybe _meta vs _meta_empty?).
Seems like reasonable stopping point, will continue later in the week.

So here's the problem with just passing in meta with some data to e.g. read_parquet():

_Frame.__init__ (baseclass for Series and DataFrame) gets passed in meta.
It passes it to make_meta().
make_meta() drops all the values.
Later, references to obj._meta_nonempty create a new DataFrame/Series with fake data.

In order to fix this, I propose:

If passed in meta for _Frame.__init__ is not empty, and it's a Series, and the dtype is object (the only case where ambiguity of type is possible), store a 2-row version of it on the DataFrame.
When looking up _meta_nonempty, just return _meta if it is non-empty.

With these changes, passing in meta will make objects match the original.
In addition, I suggest always passing in real data, rather than relying on user to pass in meta themselves, when reading in data formats like Parquet. so read_parquet(..., meta=None) would actually use the underlying data for meta detection.

Is what I wrote above clear? If not, I can submit a sketch PR.
If it is clear, what is your opinion of these two proposals?

FWIW, I'd recommend against adding a bunch of hacks in Dask to work around this issue. I suspect that pandas will have proper support for non-nanosecond resolution timestamps sometime within the next year or two (through an extension type).
In the meantime, if we wanted to support something like this, we could do it through DataFrame.gt and Series.gt. That would allow the user to pass the correct meta in cases where Dask can't correctly determine it:
    dask_df = dask_df[dask_df.datetime.gt(datetime(2500, 1, 1, 0, 0, 0) meta=bool)]

The thing is, we want foo > datetime(...) to raise when foo is just a regular object column with anything other than datetimes. Any kind of guessing is bound to get stuff wrong at least some of the time, so let's ask the user to clarify here.

The datetime/timestamp things seems like a special case of a more general issue? Specifically, you can store any Python object in a dtype("O") Series, but Dask assumes it's always strings.
And if Dask wants to restrict itself to strings, that's another alternative too I guess, but if so there should probably be some code that complains if it notices blatant non-strings in the column during construction of the Dask DataFrame.

Historically object-dtype was most often strings. I think it's use is shrinking as extension types come online. But as you say, it can hold any arbitrary Python object, not just strings.
So when the user tries to do a dtype-dependent operation (like compare with a scalar), what are we to do? The established behavior is to assume strings. IMO, we should push users away from object-dtype, while providing them a way to specify the correct meta if necessary.

if it notices blatant non-strings in the column during construction of the Dask DataFrame.

This is somewhat difficult, since "construction" of the Dask DataFrame is in principal done without looking at the data. So it wouldn't be until executing the graph that we could actually check the contents of the object dtype column.

"Providing [users] a way to specify the correct meta if necessary" is exactly what my proposal above does, I believe, and in a way that has nothing to do with timestamps/datetimes or whatever, it's completely generic.

To expand on the above, the usage of > is just an example, there are plenty of other operations that could presumably break. I don't even know what operation the original person who reported this to me was using, this was just my attempt at a reproducer. So a solution that isn't tied to specific operations, but rather to how the dataframe is constructed, seems more robust and less of a burden for users.

I like this part of the proposal:

If passed in meta for _Frame.__init__ is not empty, and it's a Series, and the dtype is object (the only case where ambiguity of type is possible), store a 2-row version of it on the DataFrame.
When looking up _meta_nonempty, just return _meta if it is non-empty.

But I think the logic of 1 can be simplified. I think it can just be: if a meta is passed in the init, use up to 2 rows of it as the _meta. In general, I like ._meta to look as much like the computed object as possible.
I think this proposal fits with @TomAugspurger's suggestion that we encourage users to specify the anticipated meta of the output of a task.
The second part of the proposal might be a bit more controversial:

In addition, I suggest always passing in real data, rather than relying on user to pass in meta themselves, when reading in data formats like Parquet. so read_parquet(..., meta=None) would actually use the underlying data for meta detection.

I do think we could enable this behavoir with a kwarg, but I am not sure we'd want to enable it by default since like Tom mentioned, calling read_parquet does not necessarily read from any of the datafiles and this would be changing that behavior.

Downside to this proposal is that, now that I'm reading the code, it will involve changing meta construction in pretty much every reader API separately.

A related issue: https://github.com/dask/dask/issues/6537

I haven't read the proposal in https://github.com/dask/dask/issues/7219#issuecomment-780649326 closely, but a couple general comments:

pandas has regretted every instance of values-dependent (rather than dtype-dependant) behavior, and we're trying to remove all possible instances of it.
Dask prefers to use _meta rather than _meta_nonempty wherever possible.

So all else equal, my preferred solution is something like

Offer a workaround at the site of the problem (so a meta argument to .gt).
Encourage the development and use of extension types.

I will go talk to the original reporter and see if extension type might work better for them.

Hi, I wanted to ask if there are any more plans/desire to work on this?

I am not planning on working on it, it turned out the users requesting it were trying to do this as workaround, and solving the underlying issue was better approach.


Multidevice

Is your feature request related to a problem? Please describe.
Is it possible to have the option to send to multiple devices instead of one a time?
Describe the solution you'd like
Like airdrop thing
Describe alternatives you've considered
No response
Additional context
No response

This is possible since v1.8.0

This is possible since v1.8.0

How can I do this?

On the "Send" tab, there are 3 icons next to each other. Press on the settings icon. Finally, select "Multiple Recipients"

On the "Send" tab, there are 3 icons next to each other. Press on the settings icon. Finally, select "Multiple Recipients"

So I think the single recipient mode should be removed at all, multiple recipients it's obviously better

There are a lot of users who have LocalSend in background, and they complained that the selection persists after a file transfer.

There are a lot of users who have LocalSend in background, and they complained that the selection persists after a file transfer.

You should make a discord server (if it doesn't exists already)


cache embeddings within an operation

when recursively looking for embeddings, cache any queries that have already been tried
will cut down on all of these repeated queries per transaction:

:+1: otherwise

lgtm!


bug: using source-dir produces broken SDists

Description
Using src dir makes broken SDists.
Steps to Reproduce
Use the following minimal pyproject.toml:
[tool.whey]
source-dir = "src"

[build-system]
requires = ["whey"]
build-backend = "whey"

[project]
name = "spam"
version = "0.1.0"

And the following "package":
$ mkdir src
$ mkdir src/spam
$ touch src/spam/__init__.py

Actual result:
Running build:
$ pipx run build

Dies when it tries to make the wheel out of the SDist (requires build 0.5+ with https://github.com/pypa/build/pull/304 )
Traceback (most recent call last):
  File "/Users/henryschreiner/.local/pipx/.cache/a7836b47fd2acf2/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 280, in <module>
    main()
  File "/Users/henryschreiner/.local/pipx/.cache/a7836b47fd2acf2/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 263, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/Users/henryschreiner/.local/pipx/.cache/a7836b47fd2acf2/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 204, in build_wheel
    return _build_backend().build_wheel(wheel_directory, config_settings,
  File "/private/var/folders/_8/xtbws09n017fbzdx9dmgnyyr0000gn/T/build-env-ohg7b683/lib/python3.9/site-packages/whey/__init__.py", line 57, in build_wheel
    return foreman.build_wheel(build_dir=tmpdir, out_dir=wheel_directory, verbose=True)
  File "/private/var/folders/_8/xtbws09n017fbzdx9dmgnyyr0000gn/T/build-env-ohg7b683/lib/python3.9/site-packages/whey/foreman.py", line 145, in build_wheel
    return builder.build()
  File "/private/var/folders/_8/xtbws09n017fbzdx9dmgnyyr0000gn/T/build-env-ohg7b683/lib/python3.9/site-packages/whey/builder.py", line 764, in build_wheel
    self.copy_source()
  File "/private/var/folders/_8/xtbws09n017fbzdx9dmgnyyr0000gn/T/build-env-ohg7b683/lib/python3.9/site-packages/whey/builder.py", line 185, in copy_source
    for py_file in self.iter_source_files():
  File "/private/var/folders/_8/xtbws09n017fbzdx9dmgnyyr0000gn/T/build-env-ohg7b683/lib/python3.9/site-packages/whey/builder.py", line 167, in iter_source_files
    raise FileNotFoundError(f"Package directory '{self.config['package']}' not found.")
FileNotFoundError: Package directory 'spam' not found.

Forcing build to build the wheel from the source directly, and not the SDist, works correctly.
$ pipx run build --sdist --wheel

Expected result:
The SDist should not be broken.
Version

whey: 0.16

Any chance this can get looked at? Producing broken SDists is rather serious (though most users install from wheels). I can't add whey to scikit-hep/cookie unless it produces valid SDists when src folders are present.

Hi @henryiii, sorry for the delay. Can you try with 0.0.17? Should be fixed in that version

Yes, it works! Thanks!


Notebook to run inference for LCM using Optimum Intel with OpenVINO

Notebook allows to run inference with the standard Diffusers pipeline and the Optimum Intel pipeline on CPU and GPU

Who else shall we add as reviewer?

@DimaPastushenkov thanks, important general notes:

we do not store images in repository and prefer downloading or using them as links on external resources if they should be embedded in markdown
we avoid naming Core object as ie in code as ie is associated with old API 1.0 and for new users it brings more questions then answers
We prefer install optimum without openvino extra as in one day our required version and optimum intel may be different
What good for specific training section or blog post not always good for regular users. Notebook has assumption that both CPU and GPU exists in user setup  but on practice it is not always true (user may have GPU from different manufacturer or multiple cards, or even his platform does not support GPU inference via openvino (I mean ARM)), instead of loading on specific devices, we prefer to allow user choice it by device selection widget. Please rewrite using it or at least make GPU part optional (skip execution if there is no GPU in available devices).

@eaidova, I have made all requested changes and set PR to "Ready for review".
One image is still stored in the repo, but I've significantly reduced its size. Please let me know if it is acceptable.

@DimaPastushenkov my suggestion to replace it with
https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/ede014d1-64cd-4692-9f6f-59fd66083807
(it is the same image, just uploaded on github in different way, for doing that it irequired to put inage into any comment filed on github, it will be automatically uploaded and in preview mode you can see link on you image)

What good for specific training section or blog post not always good for regular users. Notebook has assumption that both CPU and GPU exists in user setup  but on practice it is not always true (user may have GPU from different manufacturer or multiple cards, or even his platform does not support GPU inference via openvino (I mean ARM)), instead of loading on specific devices, we prefer to allow user choice it by device selection widget. Please rewrite using it or at least make GPU part optional (skip execution if there is no GPU in available devices).
@eaidova , I have made GPU part optional. Please let me know whether it is better to make device selectable by device selection widget and will rework the notebook accordingly.

View / edit / reply to this conversation on ReviewNB
aleksandr-mokrov commented on 2024-02-22T13:10:40Z ----------------------------------------------------------------
Line #1.    from optimum.intel import OVLatentConsistencyModelPipeline
It causes error:
No module named 'onnx'
If onnx is installed:
KeyError: 'clip-text-model is not supported yet with the onnx backend. Only [] are supported. If you want to support onnx please propose a PR or open up an issue.'

@aleksandr-mokrov , I cannot reproduce the issue in Linux and in Windows. Could you please let me know which environment do you use?
This is the output, which I get:
Using framework PyTorch: 2.1.0+cpu
Using framework PyTorch: 2.1.0+cpu
Using framework PyTorch: 2.1.0+cpu
Using framework PyTorch: 2.1.0+cpu
Compiling the vae_decoder to CPU ...
Compiling the unet to CPU ...
Compiling the text_encoder to CPU ...
Compiling the vae_encoder to CPU ...

View / edit / reply to this conversation on ReviewNB
aleksandr-mokrov commented on 2024-02-22T13:10:40Z ----------------------------------------------------------------
Line #1.    from optimum.intel import OVLatentConsistencyModelPipeline
It causes error:
No module named 'onnx'
If onnx is installed:
KeyError: 'clip-text-model is not supported yet with the onnx backend. Only [] are supported. If you want to support onnx please propose a PR or open up an issue.'

@aleksandr-mokrov , I cannot reproduce the issue in Linux and in Windows. Could you please let me know which environment do you use? This is the output, which I get: Using framework PyTorch: 2.1.0+cpu Using framework PyTorch: 2.1.0+cpu Using framework PyTorch: 2.1.0+cpu Using framework PyTorch: 2.1.0+cpu Compiling the vae_decoder to CPU ... Compiling the unet to CPU ... Compiling the text_encoder to CPU ... Compiling the vae_encoder to CPU ...

I created new empty virtual environment, all packages are installed by running this notebook. Ubuntu, python3.10, torch==2.2.1+cpu

View / edit / reply to this conversation on ReviewNB
aleksandr-mokrov commented on 2024-02-22T13:10:40Z ----------------------------------------------------------------
Line #1.    from optimum.intel import OVLatentConsistencyModelPipeline
It causes error:
No module named 'onnx'
If onnx is installed:
KeyError: 'clip-text-model is not supported yet with the onnx backend. Only [] are supported. If you want to support onnx please propose a PR or open up an issue.'

@aleksandr-mokrov , I cannot reproduce the issue in Linux and in Windows. Could you please let me know which environment do you use? This is the output, which I get: Using framework PyTorch: 2.1.0+cpu Using framework PyTorch: 2.1.0+cpu Using framework PyTorch: 2.1.0+cpu Using framework PyTorch: 2.1.0+cpu Compiling the vae_decoder to CPU ... Compiling the unet to CPU ... Compiling the text_encoder to CPU ... Compiling the vae_encoder to CPU ...

I created new empty virtual environment, all packages are installed by running this notebook. Ubuntu, python3.10, torch==2.2.1+cpu
After installing onnx and restarting the kernel it works. Add onnx for installation

I have added onnx to the dependencies


Is there a way run this with a github action?

I've been trying to automate the release of Excel Addins with github actions and I would love to be able to validate the file as part of the process. I have a repository to demonstrate some of the tools I've created:
https://github.com/Beakerboy/VBA-CI-CD-Test/tree/dev
This repository just has a helloWorld function that I'm trying to bundle into an xlam as a proof of concept. Unfortunately, Excel complained that it is invalid and the decalage2/olevba says it is bad, but not why. I was hoping I could incorporate this tool into the CI/CD workflow.
https://github.com/Beakerboy/VBA-CI-CD-Test/releases/download/0.0.14/Addin.xlam
I found that one  problem was that the .rels file says standalone="true" instead of "standalone="yes", but after changing that, excel still says it's corrupt.
I've started a github organisation to publish some of these:
https://github.com/Vba-actions
Thanks!

I haven't tried to use it in a GitHub action, but it is a dotnet project, so you should be able to checkout the repo with https://github.com/actions/checkout?tab=readme-ov-file#checkout-multiple-repos-side-by-side and then run the project on dotnet.


Errors Galore: ModuleNotFoundError: No module named 'langchain_google_vertexai

I manually installed the software to setup to run.
My Environment
pythong 3.10
MAC OS Sanoma 14.3
There were no errors on pip install -r requirements.txt
Followed the instructions as given .
cd backend
pip install -r requirements.txt
langchain serve --port=8100
INFO:     Will watch for changes in these directories: ['/Users/randolphhill/govbotics/opengpt/newtest/opengpts/backend']
INFO:     Uvicorn running on http://<IP_ADDRESS>:8100 (Press CTRL+C to quit)
INFO:     Started reloader process [14149] using StatReload
Process SpawnProcess-1:
Traceback (most recent call last):
File<EMAIL_ADDRESS>line 314, in _bootstrap
self.run()
File<EMAIL_ADDRESS>line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/.venv/lib/python3.10/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/.venv/lib/python3.10/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File<EMAIL_ADDRESS>line 44, in run
return loop.run_until_complete(main)
File<EMAIL_ADDRESS>line 649, in run_until_complete
return future.result()
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/.venv/lib/python3.10/site-packages/uvicorn/server.py", line 68, in serve
config.load()
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/.venv/lib/python3.10/site-packages/uvicorn/config.py", line 467, in load
self.loaded_app = import_from_string(self.app)
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/.venv/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
raise exc from None
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/.venv/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File<EMAIL_ADDRESS>line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/backend/app/server.py", line 9, in
from app.api import router as api_router
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/backend/app/api/init.py", line 3, in
from app.api.assistants import router as assistants_router
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/backend/app/api/assistants.py", line 7, in
import app.storage as storage
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/backend/app/storage.py", line 9, in
from app.agent import AgentType, get_agent_executor
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/backend/app/agent.py", line 16, in
from app.llms import (
File "/Users/randolphhill/govbotics/opengpt/newtest/opengpts/backend/app/llms.py", line 6, in
from langchain_google_vertexai import ChatVertexAI
ModuleNotFoundError: No module named 'langchain_google_vertexai'

same issue with conda, Python 3.11.7, on a up to date Mac.

How to fix ? Do I need to update to 3.11.7 ?

What is the best course of action?

I was able to get past both... for the 2nd one i mentioned, had to upgrade to latest "langchain_community" pkg.


Saltern map fix

About the PR
Added a missing reinforced window on Saltern that was originally a Grille at -44.5,7.5.
fixes #11862

is the grille underneath the window still there or was it replaced by just a window with this? like were there two grilles on the same tile initially

there where two grilles instead of one grille and one window


AdminMetadata bf:generationProcess bf:GenerationProcess rdfs:label

It might be polite of us to generate a note on how and when we have generated our data once we're ready to start uploading it to Sinopia. For example, Alma lets us know it has used a specific version of LC's converter at a specific time:
bf:generationProcess
bf:GenerationProcess
rdfs:labelDLC marc2bibframe2 v1.6.0-SNAPSHOT: 2020-09-21T19:45:44+00:00</rdfs:label>
</bf:GenerationProcess>
</bf:generationProcess>
@mcm104 is there a way for us to accomplish this using python for all of our AdminMetadata? All of the bibframe I've looked at from other places has it and I've found it useful in other projects.

Yes! We can insert any triples we want using rdflib. I've added the code for this to rml.py, and here's what it will look like in the output:
<https://trellis.sinopia.io/repository/washington/018e4c97-fb45-4333-9e8e-6cc0584e49ac> a bf:Work ;
    bf:adminMetadata [ a bf:AdminMetadata ;
            bf:generationProcess [ a bf:GenerationProcess ;
                    rdfs:label "rml.py SNAPSHOT: 2020-09-21T16:07:21+00:00" ] .

I based the label on your example from the LC converter, but we can format it however we want!

You are magic!!!!

I'm stoked on it as-is.


Multiple Filters on Websocket

Is mavlink to rest setup to accept multiple filters or is it just one message per websocket stream?
I have tried this
"ws://<IP_ADDRESS>:6040/ws/mavlink?filter=LOCAL_POSITION_NED,ATTITUDE

but that doesn't seem to work

Is mavlink to rest setup to accept multiple filters or is it just one message per websocket stream?
I have tried this
"ws://<IP_ADDRESS>:6040/ws/mavlink?filter=LOCAL_POSITION_NED,ATTITUDE

but that doesn't seem to work

Hi @ericjohnson97, you should be using a regex: "LOCAL_POSITION_NED|ATTITUDE"
As explained here: https://github.com/mavlink/mavlink2rest?tab=readme-ov-file#websocket

Forgot to respond to this.
Yep it is regex! I need to read more carefully 🤦♂


Org src block error on save

Describe the bug
If you label a src_block as being in the org language, there is a long pause upon saving, and then an error message appears, but the save is successful.
The traceback is normally:
Error executing vim.schedule lua callback: vim/shared.lua:0: stack overflow
stack traceback:
        vim/shared.lua: in function 'validate'
        vim/shared.lua: in function 'startswith'
        ...-linux64/share/nvim/runtime/lua/vim/treesitter/query.lua:94: in function 'get_query_files'
        ...-linux64/share/nvim/runtime/lua/vim/treesitter/query.lua:183: in function 'get_query'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:52: in function 'new'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:230: in function 'add_child'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:161: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:166: in function 'parse'
        ...te/pack/packer/start/orgmode/lua/orgmode/parser/file.lua:158: in function 'from_content'
        ...te/pack/packer/start/orgmode/lua/orgmode/parser/file.lua:145: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

But sometimes just appears as:
Error detected while processing BufWritePost Autocommands for "*.org":
Error executing lua callback: error in error handling

It appears to get stuck in an infinite loop having an org block inside org. Maybe this is better to take up with a treesitter dev, but thought it best to start here!
Steps to reproduce
Have an org file of the form
#+begin_src org
 Hello
#+end_src

And try to save it
Expected behavior
It would just save as normal
Emacs functionality
n/a
Minimal init.lua
local org = require('orgmode')
org.setup_ts_grammar()
org.setup({
    org_agenda_files = {'~/Documents/org/gtd/*'},
    org_default_notes_file = '~/Documents/org/gtd/inbox.org',
})

Screenshots and recordings
No response
OS / Distro
Linux Mint
Neovim version/commit
0.8, but was present in 0.7
Additional context
No response

@Daniel-Jenkins thanks for reporting :+1: This happens for me as well

Is this still happening? I can't reproduce it on 0.10.2


Cannot parse wc_sessionPropose after pairing

Describe the bug
While receiving wc_sessionPropose meet a json parse error.
SDK Version
implementation platform("com.walletconnect:android-bom:1.4.1")
implementation "com.walletconnect:android-core"
implementation "com.walletconnect:web3wallet"
To Reproduce
Steps to reproduce the behavior:

Go to https://react-app.walletconnect.com/
Select Ethereum chain and click on Connect
Scan QR
See log 'Error(throwable=java.lang.InternalError: JsonRpcInteractor: Unknown request params)'

Expected behavior
Receive session proposal message.
Device (please complete the following information):

Device: [OnePlus7T]
OS: [Android 12]

payload json
{"id":1675306731223594,"jsonrpc":"2.0","method":"wc_sessionPropose","params":{"requiredNamespaces":{"eip155":{"methods":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"],"chains":["eip155:137","eip155:5","eip155:1"],"events":["chainChanged","accountsChanged"]}},"relays":[{"protocol":"irn"}],"proposer":{"publicKey":"e18034b0635bb4d731126863aed77f3f1af60afae94cca53f390b025dec2822b","metadata":{"description":"React App for WalletConnect","url":"https://react-app.walletconnect.com","icons":["https://avatars.githubusercontent.com/u/37784886"],"name":"React App"}}}}

relation code
JsonRpcInteractor.kt L259
private suspend fun handleRequest(clientJsonRpc: ClientJsonRpc, topic: Topic, decryptedMessage: String) {
        if (jsonRpcHistory.setRequest(clientJsonRpc.id, topic, clientJsonRpc.method, decryptedMessage)) {
            serializer.deserialize(clientJsonRpc.method, decryptedMessage)?.let { params ->
                _clientSyncJsonRpc.emit(WCRequest(topic, clientJsonRpc.id, clientJsonRpc.method, params))
            } ?: handleError("JsonRpcInteractor: Unknown request params")
        }
    }

JsonRpcSerializer.kt L21
val deserializedObject = tryDeserialize(json, type) ?: return null

more
The project I am working on is open source, and I can link to the source code if needed.
Thanks!

Fix by remove exclude 'kotlin/**' inside packagingOptions in build.gradle


add coverage instrumentation using istanbul

Istanbul:
http://gotwarlost.github.io/istanbul/
Grunt-Istanbul:
https://github.com/taichi/grunt-istanbul
If medic has an account with Coverall, Coverall-Istanbul-TravisCI can be mixed together like this:
http://thecodebarbarian.com/2015/02/13/travis_coveralls

This module utilizes almost entirely promise-based logic. It turns out coverage tools aren't all created equal and might not necessarily handle promises.
Example QA regarding the subject on SO.
http://stackoverflow.com/questions/23733108/code-coverage-for-node-js-project-using-q-promises

NB: I'm going to raise tickets about making sure we have tests that cover core functionality and logic branches etc. However, I'm not convinced that code coverage is as useful as people say it is (especially when you take into account the subtleties and potentially misleading aspects of code coverage vs. branch coverage etc).
If we at some point decide that it's important at the Medic level (ie we want to do it for medic-webapp and medic-api) then we can revisit it.


SavedModel Loading Issue - '_UserObject' object has no attribute 'add_slot'

Some models that used to be working in TensorFlow 2.5 are now impossible to load with TF 2.6 and onward.
Google Colab to reproduce the issue: https://colab.research.google.com/drive/1n_FY1YNBDaWd43SJI8oxjHPEsA32FPEV?usp=sharing
Script:
import tensorflow as tf
from tensorflow.python.saved_model import tag_constants

print("TF Version:", tf.__version__)

saved_model_loaded = tf.saved_model.load(
    "resnet_v1.5_50_tfv2", tags=[tag_constants.SERVING]
)

print("Success !")

Error:
AttributeError                            Traceback (most recent call last)

<ipython-input-2-714dfc7741a0> in <module>()
      5
      6 saved_model_loaded = tf.saved_model.load(
----> 7     "resnet_v1.5_50_tfv2", tags=[tag_constants.SERVING]
      8 )
      9

4 frames

/usr/local/lib/python3.7/dist-packages/tensorflow/python/saved_model/load.py in _load_nodes(self)
    446         optimized_variable = nodes[
    447             slot_variable_proto.original_variable_node_id]
--> 448         slot_variable = optimizer_object.add_slot(
    449             var=optimized_variable,
    450             slot_name=slot_variable_proto.slot_name)

AttributeError: '_UserObject' object has no attribute 'add_slot'

@DEKHTIARJonathan Was able to reproduce the issue on colab using TF v2.6 but the issue is not replicating in tf-nightly version 2.8.0-dev20211012,Could you please find the attached gists and confirm the same ? This issue seems to be fixed in recent nightly version .Thank you!

@DEKHTIARJonathan Could you please find the latest  commit reference and let us know if it helps ?
Please move this issue to closed status if it is resolved for you.Thank you!

@DEKHTIARJonathan Could you please find the latest  commit reference and let us know if it helps ?
Please move this issue to closed status if it is resolved for you.Thank you!

@DEKHTIARJonathan
I had the same issue. I loaded the model in the same notebook that I was trying to load the saved_model and solved the problem. I assume TensorFlow recognizes the used objects in RAM and it prevents further errors.

I also encounter this issue.
With all the respect but this issue is not solved as the problem is still there in all of the versions of 2.6 (2.6.0, 2.6.1, 2.6.2), it does indeed work for 2.7, but this version comes with other changes which might not be suitable for everybody.
I don't think nighly is the version which you can safely run on production,  which means that basically saving does not work and issue is not solved.
@pooya-mohammadi loading in the very same notebook is not always possible, for instance when you try to optimize the model for production hardware and methods under the hood actually load graph via tf.saved_model.load(..).
After some investigation I found a few things:

Loading model (tf.saved_model.load(...)) works somehow if you add an import import tensorflow_io as tfio, but that's might be specific for my model.
It is not always possible to add to runtime tensorflow_io so I also tried saving the model after training without the optimizer(tf.keras.models.save_model( ...,include_optimizer=False)) which also worked.

This makes me believe that there is some problem with the graph if you add an optimizer while saving it. The issue is solved on TF-2-7.
I will try to add Colab with a meaningful example soon, but ofc it will need to be restarted between saving the model and loading it, to simulate the behaviour of saving and loading in different notebooks (different kernel/scope).

@rpytel1 Tnx for sharing. I had a custom layer in my network, which I knew would cause errors, and indeed it did. How about your optimizer? Is it a custom or one of the pre-defined ones?

@pooya-mohammadi I use only tf.keras.optimizers.Adam with tf.keras.experimental.CosineDecay learning rate. But indeed I do have some custom layers. Also as stated on multiple other similar issues, this used to work earlier (i.e. TF-2.3.4) without adding anything to custom_object flags.

I have same problem, in TF2.6. But, I fix it just need append
from tensorflow.keras import Model
hope it's useful for you.


Using PIXEstl to create a non lithophane image

I see you have the option to create a Pixel Art image. Is it supposed to create an image that can be used to hand on wall, etc without light?  If so I have had little luck with it creating the colors needed to recreate the file I was using. It mainly create a image with CMYK and nothing seemed 'mixed' to create the desired effect.
Here is the command I used:
java -jar /Users/jwhiteman/Documents/Projects/PIXEstL-0.0.9/PIXEstL.jar -Y -w 108 -H 134 -p /Users/jwhiteman/Documents/Projects/PIXEstL-0.0.9/8.json -f 0.24 -m .2 -b 0.12 -M 1.8 -tW .1 -cW .1 -z true -Z true -F FULL -d RGB --srcImagePath '/Users/jwhiteman/Documents/3D/_clipart/StainedGlass/Stained-Glass-Dragon-Background-84739800/1 (1).png'
Perhaps I am doing something wrong or I am not understanding what this feature does.  I was hoping it worked similar to Hue Forge and performed the color mixing.

Hi,
The 'FULL' mode doesn't work like that. It doesn't mix the colors. It takes them as they are.
I've started working on a mode that does the mixing in a painting mode (like hueforge), but progress is slow.
Sorry.

Look forward to it

Hi,
The 'FULL' mode doesn't work like that. It doesn't mix the colors. It takes them as they are.
I've started working on a mode that does the mixing in a painting mode (like hueforge), but progress is slow. Sorry.

@gaugo87  I can tell you this, if you were able to get this painting mode (aka HueForge) working I would definitely be willing to pay for your app.  Heck, I would pay for just the lithophane part as it stands.  Sure, it's not perfect, and requires way too much effort in the filament calibration department, but it does work well.  I would like to be able to give it the base color of the filament and that TD (aka HueForge again) value and the code figure out the layering of those colors.
HueForge, in my opinion, is too tricky to use for multi color photos unless you want to chop up the picture into layers, print those "parts" in the colors you want, and then glue it all back together.  That is not something that is worth the effort to me.  So, I look forward to the day you get this working!
Greg


Create install script

To make it easier to install the git utils, there should be an install script. I think that by default it should install all of the git utils, into ~/bin, but that if you do e.g. ./install.sh sync it would only install git sync

@Leo6Leo what do you think?

Closed by #9


compiler warning in client_options.hpp

Severity	Code	Description	Project	File	Line	Suppression State
Warning	C26439	This kind of function may not throw. Declare it 'noexcept' (f.6).	azure-core	C:\Users\Jamis\Desktop\azure-sdk-for-cpp\sdk\core\azure-core\inc\azure\core\internal\client_options.hpp	34

https://github.com/Azure/azure-sdk-for-cpp/blob/3eab83a635af6ece7554c8a3a4fab1ba63a748e2/sdk/core/azure-core/inc/azure/core/internal/client_options.hpp#L35

Same as the other, please add more info for how to reproduce. Then please assign to me


drop Node.js 4 support

engines is set to node >= 4 but Node.js 4 already reached its EOL.
See https://github.com/nodejs/Release/blob/master/README.md

updated, thanks