[Bug]: We should add "RentCivit" to allowCommercialUse options on REST API References

What happened?
https://github.com/civitai/civitai/wiki/REST-API-Reference#get-apiv1models:~:text=a different license-,allowCommercialUse,-(OPTIONAL)
Steps to reproduce the problem

request "https://civitai.com/api/v1/models"
get items value and count by values.

What should have happened?
The wiki should have all possible values added.
What platforms do you use to access the site?
Linux, Other/Cloud
What browsers do you use to access the site?
No response
Additional information, context and logs
No response

While we're at it, the examples on the wiki display that field as a single value, but it's an array


Text exercise assessment: Only first occurrence of selected text is marked

Describe the bug
In the assessment for text exercises, it is possible to mark a particular line of text and assess it.
When some text is selected, a hover "Assess" will appear. When clicking on it, a new assessment form will be created.
However, after clicking the hover, the first occurrence of the selected text will be marked, which may or may not be the same as the location where the text has been selected.
To Reproduce

Start the assessment of a text exercise where there are multiple occurrences of the same text
Select one of the multiple text occurrences that is not the first.
Click on "Assess", when it appears
Now the first occurrence of the text will be marked, and not the one you selected.

Expected behavior
The selected occurrence should be marked after the click on "Assess".
Additional context
In some text-exercises, e.g. where the task is to write some pseudo-code, it is important to be able to exactly mark the erroneous occurrence of text (e.g. an instruction), and not just the first occurrence of the text (instruction).

This is supported with Text Assessments V2 #1286.


CLI command wast always produces an instantiation error

It seems no matter what file (valid Wast, invalid Wast, existing, non-existing) you feed to the wast CLI command, it always fails with an instantiation error, e.g.
$ ./target/debug/wasmtime wast foo.wast
thread 'main' panicked at 'error instantiating "spectest": failed to parse WebAssembly module

Caused by:
    Invalid input WebAssembly code at offset 0: magic header not detected: bad magic number', src/commands/wast.rs:33:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The above snippet uses the debug build from commit e0bfa7336de20f76048edbdc0157ee637a2c5fea.

This issue seems to have been resolved by #7464.


Resolve combinations of built in types

Problem
Unity supports IEnumerable, Array, and Lazy. Theoretically it should be able to distinguish these types:
IEnumerable<T>
IEunmerable<Lazy<T>>
Lazy<T>
Lazy<IEnumerable<T>>
Lazy<T>[]

The solutions break existing strategies. Please consider adding a default null for the additional parameters.  This is the second breaking API in the 5.x branch.

Would be more productive if you could provide more context or a sample of what you are talking about. Where would you like me to add null?
I know a lot of Unity bugs became 'features' and there are solutions to work around them. If you want to stay with these solutions, just do not upgrade.

The following would allow anything using these public methods to continue using them without breaking the packages. (I.E.  I can upgrade to the latest even if I have a 3rd dependency that is calling the single param constructor)
public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy) => public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy = null)
public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy) => public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy = null)
public EnumerableResolveStrategy(MethodInfo method, MethodInfo lazy) => public EnumerableResolveStrategy(MethodInfo method, MethodInfo lazy = null)

Unfortunately adding null would not solve the issue. It has to be provided now.
... and this is indeed breaking change and I should have increased minor version instead of patch, sorry for that.

looks like this also broke some working aspnet core applications
Here is everything that I could find on it.
https://github.com/unitycontainer/microsoft-dependency-injection/issues/15
I think what you describe here is exactly the problem

The container should be able to resolve chain of generics like this: IEnumerable<Lazy<IList>> if T is registered.

maybe we need a way to disable this behavior @ENikS ?

Rethinking, the feature is ok. no need for disabling. It must be a bug that GetFinalType returns IdentityServerOptions when resovling IEnumerable<IPostConfigureOptions>
due to IdentityServerOptions beign registered.

Would you accept a PR that changes this according to comment below?
 [SuppressMessage("ReSharper", "InconsistentlySynchronizedField")]
        internal Type GetFinalType(Type argType)
        {
            Type next;
            for (var type = argType; null != type; type = next)
            {
                var info = type.GetTypeInfo();

                if (info.IsGenericType) //this should be IsEnumerable || IsLazy only ? not all other generics
                {

                    if (_isTypeExplicitlyRegistered(type)) return type;

                    var definition = info.GetGenericTypeDefinition();
                    if (_isTypeExplicitlyRegistered(definition)) return definition;

                    next = info.GenericTypeArguments[0];
                    if (_isTypeExplicitlyRegistered(next)) return next;
                }
                else if (type.IsArray)
                {
                    next = type.GetElementType();
                    if (_isTypeExplicitlyRegistered(next)) return next;
                }
                else
                {
                    return type;
                }
            }

            return argType;
        }


Keep a listener reference

Hi,
Let's say I want to add a listener in afterMount and remove it in beforeUnmount, is it best practice to  keep a reference of the listener function on the component object?
function afterMount(component, el, setState) {
    let listener = function (...) { ... }
    window.addEventListener('resize', listener)
    component.resizeListener = listener
}

function beforeUnmount(component, el) {
    window.removeEventListener('resize', component.resizeListener)
}

The component object isn't guaranteed to be the same object each render (this is so we can memoize the render function). By, you do have the component id:
var listeners = {}

function afterMount(component, el, setState) {
    let listener = function (...) { ... }
    window.addEventListener('resize', listener)
    listeners[component.id] = listener
}

function beforeUnmount(component, el) {
    window.removeEventListener('resize', listeners[component.id])
    delete listeners[component.id]
}

It's not perfect, but since we're dealing with global DOM state here there's no real way to isolate the state unless you have a single resize listener at the root and set the values you need at the root and pass them down:
function onResize (e) {
  render(<App width={window.clientWidth} height={window.clientHeight} />)
}

That would be just treat it like any other data source you have.

:thumbsup: Thanks for your answer.

I came across this while looking for an answer to something else and thought I would leave my solution to this. I just store the listeners in the state as a single object. Then you don't have to worry about manually cleaning up an unmanaged variable.


Exclude Key property from update parameters if it is marked with IgnoreUpdate attribute

Fixed in 1.7.5-pre1


Switch to julia04

These changes get us really close to compatibility with Julia 0.4.

Sorry, I was away this weekend.  Was the call to Triangular() the only problem?  There's probably a way around that -- the GaussianMixtures.jl folks appear to have a set of 0.4 tests written (currently failing, but so are the 0.3 ones), and that call to Triangular() was kind of a hack anyway.

There's one other error (printed below), and a bunch of warnings, mostly from other people's package. The error is from test_optimization.jl:
ERROR: LoadError: MethodError: `f_objective` has no method matching f_objective(::Array{ForwardDiff.GradientNumber{58,Float64,Array{Float64,1}},1})
 in f_value_grad at /home/jeff/.julia/v0.4/Celeste/src/OptimizeElbo.jl:112
 in f_value at /home/jeff/.julia/v0.4/Celeste/src/OptimizeElbo.jl:132
 in _calc_gradient at /home/jeff/.julia/v0.4/ForwardDiff/src/fad_api/gradient.jl:86
 in g at /home/jeff/.julia/v0.4/ForwardDiff/src/fad_api/gradient.jl:54
 in test_objective_wrapper at /home/jeff/git/Celeste.jl/test/test_optimization.jl:97
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in process_options at ./client.jl:308
 in _start at ./client.jl:411
while loading /home/jeff/git/Celeste.jl/test/test_optimization.jl, in expression starting on line 406

I think in Julia 0.4 Triangular was replaced by UpperTriangular and LowerTriangular.
We might want to put off fixing these 2 errors and all the warnings until after the NIPS workshop deadline, though the 0.4 precompilation does seem to work nicely.


Calling populate() gets TypeError: Cannot read property 'sync' of undefined

I'm just setting up jsonapi-server to mock our JSON:API, but while I try to populate the DB, I get the following error:
/aniola-cotesco-se/node_modules/jsonapi-store-relationaldb/lib/sqlHandler.js:105
      self.baseModel.sync(options).asCallback(cb)
                    ^

TypeError: Cannot read property 'sync' of undefined
    at /aniola-cotesco-se/node_modules/jsonapi-store-relationaldb/lib/sqlHandler.js:105:21
    at /aniola-cotesco-se/node_modules/async/dist/async.js:3853:24
    at replenish (/aniola-cotesco-se/node_modules/async/dist/async.js:946:17)

I kept my resource file very simple and already tried to remove the attributes, but that doesn't make a difference:
jsonApi.define({
  namespace: 'json:api',
  resource: 'settings',
  handlers: dbHandler,
  attributes: {
    title: jsonApi.Joi.string().required()
      .description('The articles title, should be between 8 and 15 words')
      .example('Learning how to use JSON:API'),
    content: jsonApi.Joi.string().required()
      .description('The main body of the article, provided as HTML')
      .example('
Paragraph 1. Lovely.

The End.
'),
    created: jsonApi.Joi.string().regex(/^[12]\d\d\d-[01]\d-[0123]\d$/)
      .description('The date on which the article was created, YYYY-MM-DD')
      .example('2017-05-01'),
    status: jsonApi.Joi.string().default('published')
      .description('The status of the article - draft, ready, published')
      .example('published'),
    views: jsonApi.Joi.number().default(0)
      .description('Number of views for this article')
  }
})

What might it be that I'm not aware of? 🤗

Your error is unexpected. I'll try to reproduce it locally to gain more insight.

I also have this issue, node version doesn't seem to make a difference

I bumped into this. Looking at the source I discovered that you can only call populate() after you called jsonApi.start().

I also have this problem, is there any solution already?

I bumped into this. Looking at the source I discovered that you can only call populate() after you called jsonApi.start().

What does that mean for us developers?

Thank to vnen I think I figured this out. Kind of stupid:
You cann't populate the database directly after creating the handler.
Call handler.populate after defining the database resource. In my case:
'use strict';

const jsonApi = require('jsonapi-server');

const handler = require('../handlers/handler');

jsonApi.define({
  resource: "userCourseHighscore",
  handlers: handler,
  attributes: {
    userId: jsonApi.Joi.string(),
    courseId: jsonApi.Joi.string(),
    score: jsonApi.Joi.number(),
    createdAt: jsonApi.Joi.date(),
    updatedAt: jsonApi.Joi.date()
  }
});

handler.populate();


Delete duplicate jmx_use_ssl parameter

jmx_use_ssl  parameter existed twice in pipelines/tiles/jmx-bridge/params.yml. I suppose parmeter should appear only one time and it was a typo.

Thank you @Ykisialiou


changed localhost:xxxx to localhost:{PORT}

This time for Add A View section.

@Rick-Anderson
Can you review this PR and merge it?
/cc: @anangaur


Argument issue with /lastdeaths

Lastdeaths always gives your last deaths even if you specify another username.

Issue's location: in Last.java, the code processes the sender instead of the player specified in the command. Can be quickly changed with getPlayerExact.


Added secondary button with icon

Done. #23

Good job @RajKanani1206 . Looks amazing.
Congrats 🎉, your PR got merged. To be eligible for the swags from ClueLess. Follow this steps.

Star this repository. ⭐

SignIn / SignUp in [ClueLess Website](https://www.clueless.tech/) .

Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.


dead links in dockerfile_gpu

All three links around line 31 to ggerganov/whisper.cpp/raw/master/models/* are dead.

This has been updated now. Can you try the new dockerfile ?

I'll try the other two dockerfiles now, but this is what I got building the dockerfiles:
https://gist.github.com/Dobbelklick/e619ae6e0040d6bafff37ade10067467

Can you try building 0.3.0 ? I have also uploaded a nvidia image as well. Try that out using the latest docs available at https://scriberr.app
Please let me know if it works. I don't have nvidia hardware with me to test it so I'm completely relying on feedback from users as of now. Apologies for the trial and error :)


Relax rules for valid github usernames

The current rules for github usernames only allow for alphanumeric
characters or single hyphens and they cannot begin or end with a hyphen.
In the past however github username rules were less strict and we need
to support these (issue #194).
Using the Google BigQuery public github dataset, I've checked the
usernames of all public commits against the currently defined regex in
deduce.go. From these results I've concluded that usernames with
multiple consecutive hyphens and usernames that end with a hyphen were
allowed in the past and do exist. Fortunately these are the only
exceptions I've found, there were no usernames that started with a
hyphen or contained any other special characters.
In addition, this change now also allows one-letter usernames.

Using the Google BigQuery public github dataset, I've checked the
usernames of all public commits against the currently defined regex in
deduce.go

HAH, what an awesome use of BigQuery - thanks so much for this!


[mysql] Add schema validation for table schema #493

Hi @luoyuxia, thanks for your contribution! Could you please rebase this PR with latest master branch before we can merge it?


fixed syntax error in package-lock.json

This PR simply consists in a syntax error fix in package-lock.json

Fixed a conflict in locales/en.json and now the build passes as expected. For your review please!

Snyk seems to have problems parsing package.json and package-lock.json. However, the files syntactically look OK and the build passes as expected. I am also able to deploy the app locally. Any idea?


[Op] Add shape inference for PyTorch convolution op

Description
This PR addresses issue #14 and adds shape inference for PyTorch convolution operator.
Checklist

[x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
[x] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage
[x] Code is well-documented

cc @awslabs/raf-reviewer

Thanks @zhouyuan1119


Change JSInterop to avoid using async locals

This is good to go. Here's the follow PR in AspNetCore: https://github.com/aspnet/AspNetCore/pull/13154 that I was able to build & verify locally


feat: mark 7.21 as the latest stable Camunda 7 version

Nearly forgot about that one :see_no_evil:

Awaiting internal confirmation.


Fix pytest warnings

Adds custom mark (functional) as per the pytest documentation.
Fixes typo in tests/test_conf.py
@pytest.mark.usefixture('load_source') to @pytest.mark.usefixtures('load_source')

Looks good, thanks!


add in daily SPI calculation?

If you are looking for a daily index I would consider either the Effective Drought Index (EDI) or the Keetch-Byram Drought Index (KBDI). You can find information in the following papers:

https://journals.ametsoc.org/view/journals/clim/12/9/1520-0442_1999_012_2747_oqodsa_2.0.co_2.xml (EDI)

https://link.springer.com/article/10.1007%2Fs00704-017-2315-2 (KBDI)


Master

Reverting the executable flags.

hi, did follow this to nail the exe flag into the git db:
http://stackoverflow.com/a/13593391/4583360
Wow, no I see also run_transcrypt is not executable anymore.... will do the same, moment...


Question: Is anyone using specbind with Selenium Grid

Hi there,
This is not really an issue as I'm sure it's more likely to be something to do with my code and not SpecBind. But recently we have changed our remote selenium server to run Selenium Grid and now several tests are failing. There seems to be numerous issues:

error: Session ID is null. Using WebDriver after calling quit()?
error: Errors occurred while entering data. Details: The HTTP request to the remote WebDriver server for URL http://myserver:4444/wd/hub/session/1bd50689-c5db-4322-9507-a60fd5f32942/ element timed out after 60 seconds.
Then I am on the Dashboard Page page => results in:
error: Cannot navigate to page: DashboardPage, Url: {DashBoardUrl}, Actual: {PreviousUrl}
Created Error Screenshot: {Screenshot of Dashboard Page }

They all seem to be like timing issues, which is why I think it is probably just something we need to fix by putting more wait checks in place.
But one interesting thing I've noticed is it is always the last 3 tests that are run which fail. So I'm wondering if there is anything different with the way that SpecBind/Grid combined close down test sessions.
Is anyone else using Selenium Grid with SpecBind?
Has anyone else seem similar issues with Grid?
Thanks for any help that you can provide!
Cheers,
Rob
P.S. I really love this project. It is the missing link for me between Specflow and Selenium and makes the whole thing come alive. Keep up the great work!

Ok no responses, I've moved on with life so no worries.
Closing this issue.


[Feature Request] update go tools

Dear Maintainer,
I have a request regarding features/go
The go tools currently installed using feature:go are as follows:
GO_TOOLS="\
    golang.org/x/tools/gopls@latest \
    honnef.co/go/tools/cmd/staticcheck@latest \
    golang.org/x/lint/golint@latest \
    github.com/mgechev/revive@latest \
    github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
    github.com/ramya-rao-a/go-outline@latest \
    github.com/go-delve/delve/cmd/dlv@latest"

I'm finding it a bit inconvenient as the deprecated golint is included, and some handy modules such as gotests are missing. The vscode extension currently defines the following tools as GOTools, would you consider revising this feature to install these tools?
https://github.com/golang/vscode-go/blob/e0d7ae91095b85266076549ff62db217b01bb516/src/goToolsInformation.ts#L5

Hi 👋
Thanks for the suggestion, I like the idea of removing golint and syncing other tools with VS Code extension. @devshun we appreciate community contributions, would you be willing to open a PR with required changes?

@samruddhikhandale
Thank you for your response.
I appreciate the opportunity to have my opinion heard.
I will consider the most suitable go tools and open a PR.
Please wait a moment.

@samruddhikhandale
I have opened the pull request, so please take a look and review it when you have a moment!
https://github.com/devcontainers/features/pull/559


Credential Seeding data fix

Summary
Update the seeding data file for the credential by setting the expiry date for all (except Traceability v2) to 16th of Oct. 2024.
Traceability v2 should get set to 30.06.2025.
--
Additionally (for test reasons) an expired credential as well as a future credential needs to get shown. Please configure the following test credentials (should be highlighted as test data)

Traceability v0 (valid from: 01.01.2023; expiry: 31.12.2023)
FrameWorkAgreement (valid from: 16.10.2024; expiry: 16.10.2025) - not useCase specific

I'd like to split this into two issues. one with the expiry adjustments, one with the test credentials. The test credentials will need a bit more work I guess, the expiry adjustments are already done within PR #115

Ok, separation via ticket: https://github.com/eclipse-tractusx/ssi-credential-issuer/issues/118


glue_privesc scenario create terraform issue

Error: creating EC2 Instance: InvalidParameter: Security group sg-000d0f7eb0e93817a and subnet subnet-0d77b0ea70f0dd160 belong to different networks.
│ 	status code: 400, request id: b0530485-b2e5-47c8-ab78-2d9afa3eccc6
│
│   with aws_instance.cg-ubuntu-ec2,
│   on ec2.tf line 14, in resource "aws_instance" "cg-ubuntu-ec2":
│   14: resource "aws_instance" "cg-ubuntu-ec2" {
│
╵
╷
│ Error: attaching policy arn:aws:iam::aws:policy/AWSLambdaBasicExecutionRole to IAM Role s3_to_gluecatalog_lambda_role: NoSuchEntity: Policy arn:aws:iam::aws:policy/AWSLambdaBasicExecutionRole does not exist or is not attachable.
│ 	status code: 404, request id: 7f68dcae-aa9a-45b8-9d28-53edff0031e3
│
│   with aws_iam_role_policy_attachment.s3_to_gluecatalog_lambda_role_policies["arn:aws:iam::aws:policy/AWSLambdaBasicExecutionRole"],
│   on iam.tf line 171, in resource "aws_iam_role_policy_attachment" "s3_to_gluecatalog_lambda_role_policies":
│  171: resource "aws_iam_role_policy_attachment" "s3_to_gluecatalog_lambda_role_policies" {
│
╵
╷
│ Error: creating Lambda Function (s3_to_gluecatalog): operation error Lambda: CreateFunction, https response error StatusCode: 400, RequestID: 69adfff5-26d2-4d04-b591-3873efea9e85, InvalidParameterValueException: Could not unzip uploaded file. Please check your file, then try to upload again.
│
│   with aws_lambda_function.s3_to_gluecatalog,
│   on lambda.tf line 1, in resource "aws_lambda_function" "s3_to_gluecatalog":
│    1: resource "aws_lambda_function" "s3_to_gluecatalog" {
│
╵
╷
│ Error: creating RDS DB Instance (terraform-20231110142425143800000008): InvalidParameterValue: DBName must begin with a letter and contain only alphanumeric characters.
│ 	status code: 400, request id: 0a489347-53be-4d8b-949c-62225a67d25a
│
│   with aws_db_instance.cg-rds,
│   on rds.tf line 1, in resource "aws_db_instance" "cg-rds":
│    1: resource "aws_db_instance" "cg-rds" {
│
╵
╷
│ Error: Conflicting configuration arguments
│
│   with aws_security_group_rule.attache_source_group-in,
│   on rds.tf line 124, in resource "aws_security_group_rule" "attache_source_group-in":
│  124:   cidr_blocks = ["<IP_ADDRESS>/0"]
│
│ "cidr_blocks": conflicts with source_security_group_id
╵
╷
│ Error: Conflicting configuration arguments
│
│   with aws_security_group_rule.attache_source_group-in,
│   on rds.tf line 127, in resource "aws_security_group_rule" "attache_source_group-in":
│  127:   source_security_group_id = aws_security_group.cg-ec2-rds-security-group.id
│
│ "source_security_group_id": conflicts with cidr_blocks
╵
╷
│ Error: Conflicting configuration arguments
│
│   with aws_security_group_rule.attache_source_group-out,
│   on rds.tf line 150, in resource "aws_security_group_rule" "attache_source_group-out":
│  150:   cidr_blocks = ["<IP_ADDRESS>/0"]
│
│ "cidr_blocks": conflicts with source_security_group_id
╵
╷
│ Error: Conflicting configuration arguments
│
│   with aws_security_group_rule.attache_source_group-out,
│   on rds.tf line 153, in resource "aws_security_group_rule" "attache_source_group-out":
│  153:   source_security_group_id = aws_security_group.cg-rds-ec2-security-group.id
│
│ "source_security_group_id": conflicts with cidr_blocks
╵
╷
│ Error: creating S3 Bucket (cg-data-s3-bucket-glue-privesc-cgidv3zfvds9c0) ACL: operation error S3: PutBucketAcl, https response error StatusCode: 400, RequestID: GVJD0XES632E2RC3, HostID: DuwSeK1XwvBOXiAeqt9zHbfv9crpZaG+78HIRu75+X4Y1VyMI5jVb43SduGVHrcHc/hRc0EcEEE=, api error AccessControlListNotSupported: The bucket does not allow ACLs
│
│   with aws_s3_bucket_acl.cg-data-s3-bucket-acl,
│   on s3.tf line 20, in resource "aws_s3_bucket_acl" "cg-data-s3-bucket-acl":
│   20: resource "aws_s3_bucket_acl" "cg-data-s3-bucket-acl" {
│
╵
╷
│ Error: putting S3 Bucket (cg-data-from-web-glue-privesc-cgidv3zfvds9c0) Policy: operation error S3: PutBucketPolicy, https response error StatusCode: 403, RequestID: GVJAZ6G0H4QS0X37, HostID: fhkgglfFURTMlkH4q9Y4ys9AtXf/2XC4XfX8h0MswYBeb2AEAt/D6bCwBBzO2+6GrSOW2ovFgcwI211+wcX3Jw==, api error AccessDenied: Access Denied
│
│   with aws_s3_bucket_policy.putobject,
│   on s3.tf line 62, in resource "aws_s3_bucket_policy" "putobject":
│   62: resource "aws_s3_bucket_policy" "putobject" {
│
╵
╷
│ Error: creating EC2 VPC Endpoint (com.amazonaws.us-east-1.glue): InvalidParameter: Route table IDs are only supported for Gateway type VPC Endpoint.
│ 	status code: 400, request id: fdaace36-6f79-4944-90ce-5247430f3932
│
│   with aws_vpc_endpoint.glue,
│   on vpc.tf line 8, in resource "aws_vpc_endpoint" "glue":
│    8: resource "aws_vpc_endpoint" "glue" {
│
╵
[cloudgoat] Error while running terraform apply.
exit code: 1
stdout: None
stderr: None

해결 완료


Fix mention icon

The color is taken from the TDesktop theme and looks pretty good.

Thanks for this contribution @kirizdev, it means a lot to me! Fix in this PR is working, and I'm going to merge it to the "dev" branch.
However, I have abosulety no idea how import these changes to the cloud-synced theme, as there's no way to upload the local attheme from device and themes.contest.com is absolutely broken. So if you have any "secret knowledege" about this issue, help will be greatly appreciated.

Well, looks like themes.contest.com is working fine again, all changes have been successfully applied.


[WIP] S-expression parsing of text modules

What was wrong?
Issue #
How was it fixed?
Summary of approach.
Cute Animal Picture

Was just taking a look at this.  It looks like you've written a grammar which is pretty explicit.  Is there a reason you didn't go with a more generic s-expression grammar and then verify s-expression content as a kind of post-processing step?  I'm wondering if that wouldn't be simpler and allow you to forgo any possible headaches relating to writing a lengthy grammar.

Actually, reviewing the WASM spec now, it looks like the text grammar is pretty well-defined.  So I guess that's probably one reason you did it that way.

Actually, reviewing the WASM spec now, it looks like the text grammar is pretty well-defined. So I guess that's probably one reason you did it that way.

Yeah, I took their provided grammar and am converting it bit-by-bit to parsimonious.
I had that thought yesterday (use a generic s-expression grammar), but I think I like the up-front validation that this explicit grammar provides.


artifactory_ldap_group_setting_v2 resource seems to be giving false results

Describe the bug
I'm trying to use the artifactory_ldap_group_setting_v2 resource to create an ldap group and it says:
Plan: 1 to add, 0 to change, 0 to destroy.
artifactory_ldap_group_setting_v2.ldap_group_pipelineadmin_acf: Creating...
╷
│ Error: Unable to Create Resource
│
│   with artifactory_ldap_group_setting_v2.ldap_group_pipelineadmin_acf,
│   on main.tf line 19, in resource "artifactory_ldap_group_setting_v2" "ldap_group_pipelineadmin_acf":
│   19: resource "artifactory_ldap_group_setting_v2" "ldap_group_pipelineadmin_acf" {
│
│ An unexpected error occurred while creating the resource update request. Please report this issue to the provider developers
 Error:
│ 409 POST https://artifactory.dev.gmfinancial.com/access/api/v1/ldap/groups/
│ {
│   "errors" : [ {
│     "code" : "CONFLICT",
│     "message" : "ldap group configuration (core-entauto-pipelineadmin-acf) already exists"
│   } ]
│ }

but the group doesn't exist anywhere in artifactory
Requirements for and issue
When I try to use the resource artifactory_ldap_group_setting_v2 create a group, it says ldap group configuration (core-entauto-pipelineadmin-acf) already exists
Artifactory version: Enterprise Plus 7.63.5 rev
provider version:  registry.terraform.io/jfrog/artifactory v8.4.
terraform version: Terraform v1.4.6
Expected behavior
The group should be created
Additional context
I tried to find the group with postman just to make sure and it's not there.

this group did exist at a point and has since been deleted using Terraform

more context: whenever this group existed, we were on an older version of Artifactory and had to update. This group was not deleted before the update.
The fix was to manually create the group in Artifactory, then import the group into Terraform and then delete the group using Terraform. Now, I'm able to recreate the group


include tflite_elixir for armv6 devices

Hi @fhunleth, tflite_elixir v0.3.6 (i.e., its dependency tflite_beam v0.3.5) now has precompiled binaries for armv6 devices!

Nice! Thank you!


Issue after upgrade to 5.4.1 (from 5.0.0)

VERSION:
5.4.1
We have some polymorphism objects and had no problems with v5.0.0 but after update to 5.4.1 we got some issues.
First issue was, that all complex properties becomes Required attribute on our generated SDK client (NSwag). We fixed that by using UseAllOfToExtendReferenceSchemas() Method.
Second one is, that reference type is not correct. it is the abstract class type, of the inherited one.
The class looks like this
    public class BoolStep : SurveyStep
    {
        private string _id;

        public BoolStep()
        {
            ResultObject = new BoolStepResult();
        }

        public override string Id
        {
            get => _id;
            set
            {
                _id = value;
                ResultObject.Id = value;
            }
        }

        public string Question { get; set; }

        public BoolStepResult ResultObject { get; }
    }

    public class BoolStepResult : SurveyStepResult
    {
        public bool Value { get; set; }
    }

    public abstract class SurveyStepResult : ITypeDiscriminator
    {
        public string Id { get; set; }

        public string TypeDiscriminator => GetType().Name;
    }

so the expected ResultObject ref type should be BoolStepResult.
EXPECTED RESULT:
with v5.0.0
"BoolStep": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/SurveyStep"
          },
          {
            "type": "object",
            "properties": {
              "question": {
                "type": "string",
                "nullable": true
              },
              "resultObject": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BoolStepResult"
                  }
                ],
                "nullable": true,
                "readOnly": true
              }
            }
          }
        ],
        "additionalProperties": false
      }
    }

ACTUAL RESULT:
with 5.4.1
"resultObject": {
    "allOf": [
           {
              "$ref": "#/components/schemas/SurveyStepResult"
           },
           { }
    ],
    "nullable": true,
    "readOnly": true
}

Is it some misconfiguration on our site?
Thanks!

When I try this locally with UseAllOfToExtendReferenceSchemas and GeneratePolymorphicSchemas enabled, I get the following schema definitions, which differ from what you've posted as the Actual Result.
"BoolStepResult": {
  "allOf": [
    {
      "$ref": "#/components/schemas/SurveyStepResult"
    },
    {
      "type": "object",
      "properties": {
        "value": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  ]
},
"BoolStep": {
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "nullable": true
    },
    "question": {
      "type": "string",
      "nullable": true
    },
    "resultObject": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BoolStepResult"
        }
      ],
      "nullable": true,
      "readOnly": true
    }
  },
  "additionalProperties": false
}

What's I've posted here looks correct to me:

The resultObject property extends a reference to the BoolStepResult definition using allOf  so that it can include the contextual nullable and readOnly metadata in the property definition.
The BoolStepResult definition uses allOf correctly, as specified here, to express an inheritance hierarchy with the first item being a reference to the base type and the second being any additional properties that are defined in the subtype - in this case the value property.

On reflection, the "actual" I've posted above from my local test looks to be the "expected" that you've provided with your issue. So, it seems I'm unable to repro your issue!
With that being the case, could you please create a "minimal" application (i.e. starting with an empty project) that repro's your issue and post it to github where I can pull it down and investigate further? Thanks

I may confirm the issue. Without UseAllOfToExtendReferenceSchemas all reference types isn't marked as nullable.

Okay, we got it. Thank you @domaindrivendev!
The problem was, we had or own custom filter for polymorphic types. It was necessary, because we didn't get it to work (correct) with swashbuckle 5.0.0 standard configurations.
I removed the filter and added GeneratePolymorphicSchemas and it looks good now.
I will close the issue.
Have a nice day!

@domaindrivendev Hi Richard, I still have some issues and posted it on stackoverflow. Can you take a look at it please? Thanks a lot!
Stackoverflow

I will reopen the issue. I still have Problems with polymorphism and 5.4.1.
See Stackoverflow

Rather than referring to a SO post, please point out the specific issue(s) that you see in the generated Swagger / OpenAPI that I posted above. I cannot speak for NSwag as that's a completely independent library so you'll need to describe your issue purely from the POV of the Swagger / OpenAPI JSON that's being generated by Swashbuckle.

Okay, sorry I will try to explain it here.
Your example is ok and I closed the issue, but I figured out, that a combination of polimorphic objects and not polimorphic but inherit classes generates also type discriminator description in OpenApi.
I tried to configure GeneratePolymorphicSchemas to exclude this types, but without success. I'm getting errors on generating the swagger.json.
I tried this both configurations without success
options.GeneratePolymorphicSchemas(t =>
{
    var types = t.Is<SurveyStep>() ? new List<Type>() {typeof(BoolStep)}
        : t.Is<SurveyStepResult>() ? new List<Type>() {typeof(BoolStepResult)}
        : null;
    return types;
} , t => t.Is<ITypeDiscriminator>() ? nameof(ITypeDiscriminator.TypeDiscriminator).ToCamelCase() : null);

// or
options.GeneratePolymorphicSchemas(discriminatorSelector: t => t.Is<ITypeDiscriminator>() ? nameof(ITypeDiscriminator.TypeDiscriminator).ToCamelCase() : null);

I did also a sample project to show the Problem
Sample project

Please describe your issue in terms of the Swagger JSON you want to emit for the type hierarchy in question.
Also, I can't access your sample project

I changed the link to sample project in comment above.
I try to describe the problem.
This swagger is generated without any special configuration on GeneratePolymorphicSchemas
"SurveyStep": {
        "required": [
          "$type"
        ],
        "type": "object",
        "properties": {
          "$type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "typeDiscriminator": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "discriminator": {
          "propertyName": "$type"
        }
      },
      "BoolStep": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SurveyStep"
          },
          {
            "type": "object",
            "properties": {
              "question": {
                "type": "string",
                "nullable": true
              },
              "resultObject": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BoolStepResult"
                  }
                ],
                "nullable": true,
                "readOnly": true
              }
            },
            "additionalProperties": false
          }
        ]
      },
"SomeBaseModel": {
        "required": [
          "$type"
        ],
        "type": "object",
        "properties": {
          "$type": {
            "type": "string"
          },
          "baseValue": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "discriminator": {
          "propertyName": "$type"
        }
      },
      "SomeConcreteModel": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SomeBaseModel"
          },
          {
            "type": "object",
            "properties": {
              "concreteValue": {
                "type": "integer",
                "format": "int32"
              }
            },
            "additionalProperties": false
          }
        ]
      }

for BoolStep and ServeyStep the definition is all fine, expect the discriminator property name, but not for SomeBaseModel and SomeConcreteModel. I don't need discriminator here. so I tried different configurations on GeneratePolymorphicSchemas method without any success.
Maybe I just don't do it correct, but I didn't found any example or descriptions that helps me
With those two configurations I'm getting Exceptionson swagger generation.
options.UseAllOfToExtendReferenceSchemas();
options.GeneratePolymorphicSchemas(t =>
{
    var types = t.Is<SurveyStep>() ? new List<Type>() {typeof(BoolStep)}
        : t.Is<SurveyStepResult>() ? new List<Type>() {typeof(BoolStepResult)}
        : null;
    return types;
} , t => t.Is<ITypeDiscriminator>() ? nameof(ITypeDiscriminator.TypeDiscriminator).ToCamelCase() : null);

// or
options.GeneratePolymorphicSchemas(discriminatorSelector: t => t.Is<ITypeDiscriminator>() ? nameof(ITypeDiscriminator.TypeDiscriminator).ToCamelCase() : null);

Okay, after cloning the project and debugging I found out what is wrong. Like I sad, maybe it was the configuration and it was.
subTypes selector had a unending loop because the Is<> Extension returned true for sub types too. That was the problem.
One last question. Is it correct, that swagger looks like this for code below?
public async Task<IActionResult> StoreSurveyResultAsync([FromBody] SurveyResultRequestViewModel surveyResult)
...
public class SurveyResultRequestViewModel
{
    public string SurveyId { get; set; }

    public List<SurveyStepResult> Steps { get; set; }
}
----------------- Swagger ----------
        "SurveyResultRequestViewModel": {
        "type": "object",
        "properties": {
          "surveyId": {
            "type": "string",
            "nullable": true
          },
          "steps": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BoolStepResult"
                },
                {
                  "$ref": "#/components/schemas/StarsStepResult"
                },
                {
                  "$ref": "#/components/schemas/TextStepResult"
                }
              ]
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },

should the items property not be a ref to SurveyStepResult?
I'm not sure, how the c# code generator can find correct property type for this class?

I created a pull rquest #1728 with extensions, that help's us with current problem.
I know, maybe it's not OpenApi confirm specification, but it help's us at the moment with the issue.
Can you check this please and give me some feedback?
Thanks!

OK, I will close the issue. You closed my PR, but you are refactoring this by your sef and it's ok for me. We need this for surveys only, but we dont make any at the moment, so we have time.
Thanks!


[Spike] Granular roles

Check on more Granular roles in the contracts

[ ] https://github.com/gnosis/zodiac-modifier-roles

I was able to spike using the zodiac-modifier-roles. Few pointers:

there are 2 versions the latest one and the v1. The v1 is audited but uses gnosis/zodiac 3.2.0 which is old.
the latest one uses openzeppelin 4.8.1 instead of 5.0.0
The latest one has a compilation at https://github.com/gnosis/zodiac-modifier-roles/blob/main/packages/evm/contracts/Periphery.sol#L12. For my test I just patched the file.

I haven't committed the spike as I want to discuss if which version we should use or if we should be looking at something else. The code is quite complex so reusing the existing module is almost a must.


Enable reporting build-related metrics to datadog.

@dsjen @clintonb
cc @jzoldak

Coverage remained the same at 100.0% when pulling 857c130be23ed23286c011bba1c402180627c7a7 on benp/datadog-stats into 859e98ca9469170b74a48866302eecc04bf5cf8b on master.

:+1:

:+1:


Add positional options support

Currently, positional options are not explicitly supported but just remain as unparsed arguments. This commit adds support for positional arguments so that these are treated like other options including parsing and listing in the help output.
Positional arguments can be defined as regular options but with the OPT_POSITIONAL flag:
        OPT_GROUP("Positional options"),
        OPT_INTEGER(0, "posi", &posi, "positional integer", NULL, 0, OPT_POSITIONAL),
        OPT_STRING(0, "poss", &poss, "positional string", NULL, 0, OPT_POSITIONAL),

The long name is used in error messages if the argument cannot be parsed.
This PR addresses issue: #46

@tripulse what do you think?

Why isn't this approved yet?

Why isn't this approved yet?


US: Game background sound and effects

Front / Description:
I as a player in the game, when I playing, I want to hear background music and sounds feedback so I can enhance my user experience in the game.
Back / Acceptance criteria:
Scenario: Background Music on start game
Given the player launches the game
When the game loads successfully
Then background music starts playing
And it loops seamlessly without interruption
Scenario: Alert when an hexagon is clickable
Given the player is playing the game
When an hexagon is clickable (is blinking)
Then an appropriate sound effects is played
Scenario: Sound effects when an hexagon is clicked
Given the player is playing the game
When the player click on the hexagon
Then an appropriate sound effects is played
Scenario: Sound effects when an answer is selected
Given the player is playing the game
And has to answer a question
When the player select an answer
Then an appropriate sound effects is played based on the answer impact

We thought that having different sounds when selecting an answer could be beneficial to the player, as it provides an immediate impact to their choice, which is a core aspect of the game, rather than relying solely on the progress bar.


Add plugin for Twemproxy

This plugin collects data from Twemproxy's stats interface

Thanks for addressing the comments @codeb2cc :+1:, one last thing, please open this PR for merging into the master branch, not 0.2.0.
Release 0.2.0 has already been packaged and made, and new features cannot be added to it.

Also please update CHANGELOG and README, thanks!


Formatted .py files according to PEP8 guidelines

As always please review and suggest improvements.

Ping @isuruf.

Updated @isuruf. Please take a look.

Updated @isuruf. Please take a look here.

Ping @isuruf.


Using predefined _id

I'm creating an unmanaged/unnamed collection on the client and then inserting a doc with a predefined ID:
var customers = Collections.createTemporary();
customers.insert({_id: 'foo', name: 'bar'});

This works fine. If I also attach a schema to this collection, then I'm no longer able to use a predefined ID. This is because simple-schema removes _id when cleaning since allowsKey() returns false. I added a condition to allow _id here but then noticed the field is actually removed temporarily in collection2 before validation. See here and here.
I think the fix would be to allow this on the client as well, but I'm not sure why you've limited it to the server. Why would the id be needed on client collections during validation?

@aramk MongoDB supports a lot of surprising things as IDs including objects.  I'm pretty sure it supports numbers too.  The limitation is due to Meteor's Minimongo: since JS maps with object keys compare instance equality and not deep value equality, there's not really a nice way Meteor would be able to make it work on the client side with Minimongo.

@jedwards1211 yeah it seems like strings are the way to go

Well for one of my use cases objects would have been better if I didn't have to use Meteor actually.


Introduce constant layer

It would be convenient to be able to wrap existing tensors in an Axon layer to be easily used in operations later in the model. This also will aid ONNX integration.

Closed with #94


fix: use the controller name when creating the lease name

Changes

When defining more than a single validating/defaulting/conversion webhooks with the sharedmain contructors, I detected that only one of the webhooks was mutated and fully reconciled.
sharedmain.MainWithContext(ctx, "policy-controller",
		certificates.NewController,
		NewValidatingAdmissionController,
		NewMutatingAdmissionController,
		trustroot.NewController,
		clusterimagepolicy.NewController,
		NewPolicyValidatingAdmissionController,
		NewPolicyMutatingAdmissionController,
		newConversionController,
	)

After looking at the code, I found the controllers of the same type (e.g. defaulting) were competing for the lease. The main reason comes from the lease name creation which doesn't take into account the name of the controller itself. It uses a component name and a hardcoded queueName.
As a consequence, if I have two validating webhooks I'll only get one lease and the reconciliation of the second validating webhook will exit here.
Therefore I propose to reuse the name of the controllers or the path (for the conversion webhooks), and thus allow declaring more than a single webhook for the same sharedmain.Main... execution.
{component-name}.{webhook-type}.{webhook-name}-%02d-of-%02d

/kind bug

Fixes #

Release Note

webhooks: use controller name to construct the lease name.

Docs

@pierDipi Let's see what we can do to overcome this concern.
Generally, I believe there is already a leakage in terms of leases with the current version. We have to often delete the leases during the re-installation.
Anyway I'd like to find a solution for this problem. I assume none has defined more than a single webhook, therefore I was wondering if we could store in the context the list of registered webhooks. If the list of webhook is greater than 1 then we could follow this new approach, otherwise we could stick to the old naming.

How about something like this? https://github.com/knative/pkg/pull/2420

I assume none has defined more than a single webhook

We do this, this is our "hack": https://github.com/knative-sandbox/eventing-kafka-broker/blob/main/hack/patches/defaulting-webhook-queue-name.patch (that I'd like to get rid of)

@pierDipi  Indeed It looks similar to what I proposed. However it looks like the queueName remains the same all the time.

However it looks like the queueName remains the same all the time.

is that a problem for you?

@pierDipi The queueName is creating conflicts as done in my PR. The controllers are competing regarding the lease name which is always the same if you define multiple webhooks of the same type (conversion, defaulting, validation). That is why I initially proposed in my changes to make the queue name to align with the controller.Name.

closing this PR as fixed in https://github.com/knative/pkg/pull/2738!


"FGA has stopped" error

Preparation

[X] I tested the latest release
[X] I looked at other issues (even the closed ones)
[X] I read the Troubleshooting Guide

FGO server
JP
FGA build number
1575
Describe the bug
I have downloaded the app from https://github.com/Fate-Grand-Automata/FGA/releases/tag/canary
So, when I click on the start button (after making script of course), fga gives an error which says "FGA has stopped" and another error following the first one "FGA keeps stopping"
It's my first time running fga on an emulator and I don't know what to do other than asking.
Video
https://user-images.githubusercontent.com/87274372/145858344-d7a91cea-cb85-4d0c-8374-5ede82f3a2fe.mp4
Device model
ONEPLUS A5010 (MEMU Version 7.6.3)
Android version
7
Screen size
1440x810 (270 dpi)
RAM
4GB

Try using root mode. According to the internet, root is enabled by default on Memu.

Used it and FGA works right now. It missclicks some skill activation but I can ask it on a different issue. Thank you very much.

That's probably skill confirmation, check the troubleshooting guide.


Ginkgo CI: Migrate tests/21-ct-clean-up.sh

Parent issue #1839

I do not have the bandwidth to migrate individual tests as I am focusing on things that the CI itself needs, not the tests themselves. I am removing myself from the list of assignees. @aanm can you please take care of this? Migrating tests you have written is a good way to get introduced to how Ginkgo works and will distribute the load of writing / validating tests.


transforms.v2.Normalize() does not work as expected for multiple inputs

🐛 Describe the bug
Transforms v2 supports processing multiple inputs together (https://pytorch.org/vision/main/auto_examples/transforms/plot_transforms_getting_started.html). Though transforms like Resize and Crop work well, I found Normalize() method does not work as expected. Here is an example to reproduce the error.
import torchvision.transforms.v2 as transforms
from PIL import Image

train_transforms = transforms.Compose(
    [
        transforms.ToTensor(),
        transforms.Normalize([0.5], [0.5]),
    ]
)

url = 'http://images.cocodataset.org/val2017/000000039769.jpg'

x_image = Image.open(requests.get(url, stream=True).raw)
y_image = Image.open(requests.get(url, stream=True).raw)

x_image_trans, y_image_trans = train_transforms(x_image, y_image)
print([x_image_trans.min(), x_image_trans.max()], [y_image_trans.min(), y_image_trans.max()])

Output:
([tensor(-1.), tensor(1.)], [tensor(0.), tensor(1.)])

The y_image here is not normalized to [-1,1], which is not expected.
Versions
Collecting environment information...
PyTorch version: 2.1.2+cu118
Is debug build: False
CUDA used to build PyTorch: 11.8
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.3 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31
Python version: 3.9.19 | packaged by conda-forge | (main, Mar 20 2024, 12:50:21)  [GCC 12.3.0] (64-bit runtime)
Python platform: Linux-4.14.0_1-0-0-51-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 11.3.109
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A800 80GB PCIe
GPU 1: NVIDIA A800 80GB PCIe
Nvidia driver version: 525.125.06
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 57 bits virtual
CPU(s):                          128
On-line CPU(s) list:             0-127
Thread(s) per core:              2
Core(s) per socket:              32
Socket(s):                       2
NUMA node(s):                    2
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           106
Model name:                      Intel(R) Xeon(R) Gold 6338 CPU @ 2.00GHz
Stepping:                        6
CPU MHz:                         858.987
BogoMIPS:                        4000.00
Virtualization:                  VT-x
L1d cache:                       3 MiB
L1i cache:                       2 MiB
L2 cache:                        80 MiB
L3 cache:                        96 MiB
NUMA node0 CPU(s):               0-31,64-95
NUMA node1 CPU(s):               32-63,96-127
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Vulnerable, IBPB: disabled, STIBP: disabled
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp_epp avx512vbmi umip pku avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid md_clear pconfig flush_l1d arch_capabilities
Versions of relevant libraries:
[pip3] numpy==1.24.4
[pip3] open-clip-torch==2.0.2
[pip3] pytorch-lightning==1.5.0
[pip3] torch==2.1.2+cu118
[pip3] torchaudio==2.1.2+cu118
[pip3] torchmetrics==1.4.0.post0
[pip3] torchvision==0.16.2+cu118
[pip3] triton==2.1.0
[conda] numpy                     1.24.4                   pypi_0    pypi
[conda] open-clip-torch           2.0.2                    pypi_0    pypi
[conda] pytorch-lightning         1.5.0                    pypi_0    pypi
[conda] torch                     2.1.2+cu118              pypi_0    pypi
[conda] torchaudio                2.1.2+cu118              pypi_0    pypi
[conda] torchmetrics              1.4.0.post0              pypi_0    pypi
[conda] torchvision               0.16.2+cu118             pypi_0    pypi
[conda] triton                    2.1.0                    pypi_0    pypi

Hi @lixirui142 and thanks for the reproducing example.
You're sort of hitting an edge case: the first pure tensor is transformed while the rest of the pure tensors are passed-through. This behaviour exists for backward-compatibility reasons and is documented in the note here.
To avoid this issue, you should convert the PIL images to tv_tensors.Image instead. And you should avoid using ToTensor() as it does more than just a "to tensor" conversion. To achieve what you want to do, the recommended pipeline would be:
 train_transforms = transforms.Compose(
    [
        transforms.ToImage(),
        transforms.ToDtype(torch.float32, scale=True),
        transforms.Normalize([0.5], [0.5]),
    ]
)

Hope this helps, feel free to re-open if there is any further issue


Add WebTorrent support to Playback

Once this issue is fixed, let's add WebTorrent support to @mafintosh's excellent Playback app :)
https://github.com/mafintosh/playback

In progress diff here: https://github.com/mafintosh/playback/compare/master...feross:master

This will be awesome!

This is now being tracked here: https://github.com/feross/webtorrent/issues/369


Automatically Comment on Pull Requests

Related Issue
issue #274
Description
Implementing a feature to automatically comment on a pull request when it is raised. This comment will serve as an acknowledgment to the contributor for their contribution and provide any necessary instructions or next steps.
Type of PR

[x] Feature enhancement

Screenshots / videos (if applicable)
Checklist:

[x] I have performed a self-review of my code
[x] I have read and followed the Contribution Guidelines.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have commented my code, particularly in hard-to-understand areas.

Additional context:
I'm excited to contribute to this project and believe this feature will improve the contributor experience. Looking forward to your feedback!

@thevijayshankersharma please check Contributing.md

@subhadeeproy3902 Now is it correct ?


AWSLambda:list_functions() should only return the latest version by default

Fixes #3422
Only return full version list when the user specifies FunctionVersion="ALL"
Also makes some changes to ensure that FunctionARN is always returned in the correct format.
Tests have been verified against AWS.

Codecov Report

Merging #4047 (e4bcab0) into master (9f47c0c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4047      +/-   ##
==========================================
+ Coverage   95.11%   95.13%   +0.01%
==========================================
  Files         485      485
  Lines       54117    54143      +26
==========================================
+ Hits        51474    51507      +33
+ Misses       2643     2636       -7

Flag
Coverage Δ

servertests
53.99% <25.00%> (-0.93%)
:arrow_down:

test_responses
31.76% <16.66%> (?)

unittests
95.03% <100.00%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

moto/awslambda/models.py
92.79% <100.00%> (+0.10%)
:arrow_up:

moto/awslambda/responses.py
91.46% <100.00%> (+0.05%)
:arrow_up:

moto/iam/access_control.py
97.04% <0.00%> (+0.42%)
:arrow_up:

moto/s3/exceptions.py
91.16% <0.00%> (+0.46%)
:arrow_up:

moto/core/models.py
96.84% <0.00%> (+1.24%)
:arrow_up:

Continue to review full report at Codecov.

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


have semi-transparent popups (e.g. for autocomplete) when using CTRL key

With Visual Studio Intellisense, I can hold down the CTRL key and popups become semi-transparent so I can see the code behind them.  Is there a way to get this same behavior with Visual Studio Code! Thanks!

This is a duplicate. Unfortunately, I don't recall the exact issue number nor its title :flushed: Anyways, searching for issues with the same labels will likely help you :point_right:
https://github.com/microsoft/vscode/issues?utf8=✓&q=is%3Aopen+label%3Aeditor-hover


removing bearer token auth removed ability to do user-context requests with oauth 2.0

Hey Erik,
Thanks for the Twitter library and this new X library. I used your Twitter gem in a production app for many years, and it was a model of robustness. I was writing my own X library this summer, but I stopped when I saw the elegance of this code.
This commit last week (https://github.com/sferik/x-ruby/commit/efff940ec27bffc4849900aaf59c1f442646fd07), which removed bearer token auth, broke my X OAuth 2.0 user-context requests.
For the folks at home, if you want to make OAuth 2.0 requests on behalf of a user (e.g., @elonmusk) you do the normal 3-legged auth flow first with @elonmusk's explicit opt-in. X gives you @elonmusk's access_token, a refresh_token, and an expires_at timestamp. You then use @elonmusk's access_token as a bearer token in an HTTP header like this: "Authorization: Bearer #{elon_musk_access_token}"
Re: 3-legged OAuth 2.0 flow: https://developer.twitter.com/en/docs/authentication/oauth-2-0/authorization-code
Re: using the OAuth 2.0 user-context access token: https://developer.twitter.com/en/docs/authentication/oauth-2-0/user-access-token
I suspect using OAuth 1.0 user-context auth would be a work-around, but I am concerned X will suddenly and arbitrarily turn off access to it because it's older, just as they turned off access to the Twitter v1.1 API.
Would you consider reintroducing bearer token support?

Thanks for opening this issue, @drmikexo2! I removed bearer token support for a few reasons:

I didn’t get an official answer to whether or not it was still being supported by X.
I wasn’t able to figure out how to test it with any of the free endpoints.
Removing it simplified the code significantly, allowing me to remove 44 lines or about 8% of the total library/tests.

That said, I am open to reintroducing bearer token support, but I could use your help…
Which API endpoints are you using that support bearer token auth? Specifically, are you using APIs that are exposed in the Free API or do they require Basic or Pro access? If so, I would appreciate your help testing my implementation.
For what it’s worth, I just applied for GitHub Sponsors. If you (or your company) would be willing to sponsor me to the tune of $100/month, I’d put 100% of that toward paying for my own Twitter API Basic account, so I could do my own testing and ensure this feature works.

Added (back) and released in gem version 0.8.0. I’d appreciate you verifying that this actually works, since I’m not able to test it myself.


Add MultiStreamThroughput benchmark to object storage benchmarks

Add the MultiStreamThroughput benchmark for object storage
services. This also requires splitting WriteObjects() in
scripts/object_storage_api_tests.py into two functions that work
together.

@stfeng @yuyantingzero please take a look.

This is cool. It looks like you have n workers read the same files concurrently, yes?
I'm hoping later that there will be another object_storage_service scenario that tests parallelized operations, a la https://github.com/rlmcpherson/s3gof3r for S3 and composite objects/parallel uploads for GCP -- that's actually what I'd think of with "multistream," vs. perhaps "concurrent" here. Not sure if the result would be much different though -- do you?
I don't think any GCS SDK or CLI provides parallel composite downloads (e.g. using the Range parameter to get parts of an object and reassemble client-side) yet to add what I'm describing.

I see now, different files for each worker, which is yet another scenario than what I was thinking of... Pardon the noise.

Regarding parallel operations to the same object:
Gsutil has recently added a feature to download a large object in parallel,
Google: { gsutil Sliced Object Downloads} and its enabled by default with 4
"slices"
As to benchmarking support, pkb already supports CLI based parallelism: as
long as the default setting of a CLI tool uses parallelism, we will use it
in PKB too. (And take a look at the large object CLI test)
On Tuesday, February 9, 2016, Zach Bjornson<EMAIL_ADDRESS>wrote:

This is cool. It looks like you have n workers read the same files
concurrently, yes?
I'm hoping later that there will be another object_storage_service
scenario that tests parallelized operations, a la
https://github.com/rlmcpherson/s3gof3r for S3 and composite
objects/parallel uploads
https://cloud.google.com/storage/docs/composite-objects for GCP --
that's actually what I'd think of with "multistream," vs. perhaps
"concurrent" here. Not sure if the result would be much different though --
do you?
I don't think any GCS SDK or CLI provides parallel composite downloads
(e.g. using the Range parameter to get parts of an object and reassemble
client-side) yet to add what I'm describing.
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/pull/840#issuecomment-182170166
.

The timing constants at the top of object_storage_service_benchmark.py are not yet ready for production. I'm still working out what the values should be. However, I'd appreciate a review of the rest of the code. Those are static variables that can be changed with no changes to anything else, so that should not make much difference.

Noah, I made a couple of additional comments for the object name files that are stored under the /tmp directory (based on our in person chat). Please take a look.
Let me know when you are done incorporating my first round of CR feedback. I will make another pass. Thanks.

Should we wait for this to pull it into 1.3?

No need to wait on this one.
On Friday, February 26, 2016, Kris Hildrum<EMAIL_ADDRESS>wrote:

Should we wait for this to pull it into 1.3?
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/pull/840#issuecomment-189386763
.

@stfeng I've updated this in response to your review. Please take a look.

I am going to take a pass on the new code, but before that, here are a few un-answered comments from round 1 of CR. Probably you have already addressed them, if so please update these in the tool here:

In order to support object size distribution in the (near) future, please consider writing 2-tuples here to the file: {object_name, object_size}, although with this PR, the object_size will all be the same.

variable naming: "inp", consider use full name.

A couple of additional questions regarding the object name files under /tmp:

Who is going to cleanup these files? Do we need to add cleanup logic in the cleanup function where we currently cleanup objects in the bucket?

@stfeng I'm sorry I didn't reply to those comments before! I've gone back and added replies. Here they are again, all in one place:

I now write 2-tuples to the state file as you suggested.
I refactored the code so the inp variable no longer exists.
I added cleanup logic in object_storage_service_benchmark.Cleanup().

@noahl / @stfeng
Looks like there are > 100 comments on this pull request.  Should we take this offline and have a meeting to review the design and issues?  Happy to include @zbjornson as well in the meeting if he would like to be there.

@voellm, we've already had a couple of f2f discussion meetings. Noah's latest commit here reflects the outcome of these discussions. I expect the focus of CR from this point on would be mostly "fit-and-finish" type of comments. If there were to be major comments, we will sure to talk and discuss again just like we have been doing.

I finished another pass, nothing major this time, a couple of bugs though, please take a look.
(It's getting really close to the finish line now!!)
At the next update, please outline the set of verification and regression tests that you will do after the code is signed-off but before the final merge.

@stfeng I've updated in response to your comments; please take a look.
For verification and regression testing, I suggest that I run these tests:

Make sure the non-multistream API benchmarks still work and still return similar (within normal variance) results to what they did before the change
Test that the multistream test with 1 stream has similar throughput to the single stream throughput test

I think those are good for regression testing. I'll think more about verification testing.

I finished another pass, getting even closer! To summarize the remaining comments:

Move the usage of memory view object and the size_to_write variable one level up from WriteObjectFromBuffer(), and share the memory view object.
After obtaining raw results from the target VM, we need to aggregate raw results as part of the "analysis" step, and report the final results as Samples (for multiple reasons, see my comments inline for details).

@noahl Regarding test plan: the regression test plan you wrote above looks good. As to verification tests for this particular PR, we just need to make sure basic p0 use cases work (e.g., multiple streams + x objects per stream). Since you will have a couple of more PRs for this work (distribution support, post-analysis logic, and multiple VM), more comprehensive verification can happen at later PRs.

@stfeng I've responded to all of your comments. I left one question for you, about whether to use raw latency or latency / size, but otherwise everything is ready here.
I'm glad you think the verification tests I suggested are enough.

@noahl, I've responded to your question above about raw latency aggregation.
Look forward to review your new commit whenever it's ready. Please do not squash, it's easier to review incremental commits. Thanks!

@stfeng I've updated the PR in response to your review. Please take a look.

@stfeng I've added a commit in response to your memoryview comments. For right now it just removes the memoryview code. As we discussed in person, I haven't found a way to make it actually zero-copy, even by switching to set_contents_from_file.

LGTM.
Please make sure the regression tests and verification tests as discussed above are performed before the merge. Also, I'd run at least one of the test cases on all 3 providers.

@stfeng I added the TODO you asked for and I've been running tests. Here are the results:

api_multistream, api_data, and api_namespace scenarios all complete successfully on GCP.
I ran the api_multistream scenario with 1B objects to compare with the one byte upload scenario. The upload latencies were almost identical. The multistream download latency was about 0.01 seconds slower than the one byte download latency. I think this is noise - they are effectively the same.
I also checked whether the single-stream upload and download benchmark from the api_data scenario matches the multistream throughput benchmark running with 1 stream and 100MiB objects. The throughputs are generally within 10-20 Mbps of each other at the same percentile. I think that's acceptable, especially given that I'm computing the throughput of the multistream throughput benchmark by inverting the latency numbers, which is very numerically unstable. When I submit the analysis PR I'll try to do better than this. (As further evidence that the number should be the same, the measurements are done by literally the same function in the backend code.)
api_data scenario completes successfully on AWS and Azure. I didn't check the api_namespace scenario because it takes a very long time to do the test and I didn't touch any code that it uses anyway.

Given these positive results, I am going to go ahead and merge.


Contributors  file

Given the current influx of contributors I would like to thank all of them! I like what https://github.com/goreleaser/goreleaser#contributors does, but I am open for other suggestions.

Closing this as multiple people discouraged having a Contributors file


(GH-43) Use Svg or Png for icons

@ferventcoder is this enough? Or do we need to be smarter about discerning the file type?

@ferventcoder updated with your suggestions.


IsConfirm generates error if response is not "y"

when I perform a confirmation prompt, I am getting an empty error when entering any value other than y is this expected behavior?
to reproduce
package main

import (
	"fmt"

	"github.com/manifoldco/promptui"
)

func main() {
	prompt := promptui.Prompt{
		Label:     "does this work?",
		IsConfirm: true,
		Default:   "n",
	}
	answer, err := prompt.Run()
	fmt.Printf("error <%v>, answer <%s> \n", err, answer)
}

// type "y" => error <<nil>>, answer <y>	// err == nil (true)
// type "n" => error <>, answer <n> 		// err == nil (false)
// type "" => error <>, answer <>		// err == nil (false)
// type "foo" => error <>, answer <foo>		// err == nil (false)

Also ran into the same issue and took the same path as @fiws... err != nil -> No / Empty

It looks like this is expected behavior. Reading the godocs states:
var ErrAbort = errors.New("")

ErrAbort is the error returned when confirm prompts are supplied "n"

Yeah this is frustrating behavior. No shouldn't be an error. If you want to split the logic tree based on the confirm result you can't do that, since it's an error. Also an acceptable answer should be "y, yes, YES, Y, 1", etc.

for anyone coming across this issue, I've gotten around this issue by mocking a normal prompt to look and act like a confirm prompt. I run the results through regex to get a true/false statement.

func confirm(label string) (bool, error) {
	val := func(input string) error {
		//if input == "" {
		//	return errors.New("input required")
		//}
		if len(input) > 3 {
			return errors.New("Please give a yes or no answer")
		}
		return nil
	}
	faintText := promptui.Styler(promptui.FGFaint)
	boldText := promptui.Styler(promptui.FGBold)
	greenText := promptui.Styler(promptui.FGGreen)
	redText := promptui.Styler(promptui.FGRed)
	defaultLabel := fmt.Sprintf("%s %s ", boldText(label), faintText("[y/N]"))

	template := promptui.PromptTemplates{
		Prompt:  defaultLabel,
		Valid:   defaultLabel,
		Invalid: fmt.Sprintf("%s %s ", redText(label), faintText("[y/N]")),
		Success: greenText(label) + " ",
	}

	prompt := promptui.Prompt{
		Validate:  val,
		Templates: &template,
	}
	result, err := prompt.Run()
	if err != nil {
		return false, err
	}
	return isConfirm(result), nil
}

// acceptable answers: y,yes,Y,YES,1
var confirmExp = regexp.MustCompile("(?i)y(?:es)?|1")

func isConfirm(confirm string) bool {
	return confirmExp.MatchString(confirm)
}

Repeated with latest version both in Windows and Linux

oh, man...this threw me for a loop. The confirm within _examples doesn't make this clear either. I agree with @randallmlough that "No" shouldn't be an error since it's a valid user response.

Just test for ErrAbort like
if err != nil {
  if err == promptui.ErrAbort {
    // deal with abort
  }

  // deal with error
}


How can I differentiate fields from the endpoint layer to the field in the DB?

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the SQLModel documentation, with the integrated search.
[X] I already searched in Google "How to X in SQLModel" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to SQLModel but to Pydantic.
[X] I already checked if it is not related to SQLModel but to SQLAlchemy.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
class Task(SQLModel):
    name = Field()
    status = Field() # This one I would like it to be a string for the API and an integer for DB

Description
I would like to know if I can have a different representation of a value using SQLModel. This would aim for the normal process of handling ENUMS as integer values in the DB but as Readable values in the API:
Let's say that I have a field status with the following possible values: (IN_PROGRESS, DONE) but in the DB, I want this field to be numeric: 0 for IN_PROGRESS and 1 for DONE, is this possible or with SQLModel I am forced to have the same representation for both API and DB Layer?
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
3.9
Additional Context
No response

@Miguelme It sounds like you need to define a response model, assuming you are using SQLModel with FastAPI.
Essentially a response model splits your model structure out so you can have "In", "Out" and "DB" models as an example.
When you define "response_model" on an endpoint you can return an instance of your database model, then FastAPI will automatically convert the instance into an instance of your response model or "Out" model.
Take a look at these docs, should be fairly straight forward, also note that your response model can simply be a Pydantic model.
https://sqlmodel.tiangolo.com/tutorial/fastapi/response-model/
https://fastapi.tiangolo.com/tutorial/response-model/


Normalize image

Hello,
The input image seems have no noralized to [0,1] in histoGAN.py, but RGBuvHistBlock clamp the input into [0,1].

Thanks for catching this. It looks i did this clamping when i was polishing the code and didn’t notice this issue.
If you can create a PR to fix this issue that would be great.

I checked the code again. Unfortunately, I don't have the environment setup in my current device to test. But, I couldn't catch where the input is not normalized? All inputs should go through the transform function which implicitly normalize images to 0-1 range. Please let me know where exactly you find the (0-255) images to check again.

Sorry to reply this late, I checked this code again, I find that I ignore the totensor() function will normalize images to 0-1, so there is no more issures, I will close this.

Sorry to reply this late, I checked this code again, I find that I ignore the totensor() function will normalize images to 0-1, so there is no more issures, I will close this.


ERROR: 'gbk' codec can't decode byte 0xa1 in position 82: illegal multibyte sequence

Environment:

NNI version:1.8
NNI mode (local|remote|pai):local
Client OS:windows10.1809
Server OS (for remote mode only):
Python version:3.7.6
PyTorch/TensorFlow version:tensorflow. 2.0.0
Is conda/virtualenv/venv used?:conda
Is running in Docker?:no

Log message:

nnictl stdout and stderr:
ERROR: 'gbk' codec can't decode byte 0xa1 in position 82: illegal multibyte sequence

What issue meet, what's expected?:
when i run cmdnnictl create --config config_windows.yml,then stdout decode error,nii cann`t start.
How to reproduce it?:
only remove chinese Hanzi Comments from config_windows.yml, nni can normal start
Additional information:
eg. maxTrialNum: #可选项: local, remote, pai, kubeflow,   remove "可选项"

@HGladiator this issue may related to the encoding of your cmd/powershell, please change your command line's encoding to UTF-8 and try again.

my code file is utf-8, use git bash.

We are removing non-ascii characters from example yaml files. This needs to go through the translation process so it may take some time.

my code file is utf-8, use git bash.

you may want to change your git bash encoding to UTF-8: right click on git bash -> options -> Text -> change Character set to UTF-8 -> Save, then try again.

my code file is utf-8, use git bash.

you may want to change your git bash encoding to UTF-8: right click on git bash -> options -> Text -> change Character set to UTF-8 -> Save, then try again.

yes. it`s utf-8, the gbk ERROR  reappeared.

I meet this problem also. Have you fixed it?

I meet this problem also. Have you fixed it?

The Chinese characters inside example config file are merely comments. You can safely remove them.


Integration Test - Release - 2018/05/25 14:44:35

Auto create for integration test. AnotherAuthorUpdatedArticleFlow

@PRMergerTest1 : Thanks for your contribution! The author, @ meganbradley, has been notified to review your proposed change.

@PRMergerTest3 : Thanks for your contribution! The author, @meganbradley, has been notified to review your proposed change.


Proposal : Add color / custom class to .col-type-bool in Admin UI for true/false

It would be nice if the Boolean property was a little easier to see in the admin ui.
Either color, or a pill box or a checkbox?
Or maybe by just adding a custom class to the div, so users can attach their own stylesheet using browser extension
.col-type-bool .col-type-bool-true
.col-type-bool .col-type-bool-false
.col-type-bool-true{
    color:green
}
.col-type-bool-false{
    color:red
}

The solution is making your own admin page 😬

This is implemented as part of the refactoring and will be available with the next v0.23.0 release soon (there are no ETAs yet).
At the moment it looks like this (the colors are based on the default label style and the form toggle state):


keras_nlp.models.GemmaPreprocessor No Longer Exists

Describe the bug
The keras_nlp.models.GemmaPreprocessor class described here no longer exists.
To Reproduce
!pip install -U keras-nlp
!pip install -U tensorflow

import keras_nlp
import tensorflow as tf

gemma_backbone = keras_nlp.models.GemmaBackbone.from_preset("gemma_2b_en", trainable = True)
gemma_preprocessor = keras_nlp.models.GemmaPreprocessor(gemma_backbone.vocabulary)

inputs = tf.keras.layers.Input(shape=(None,), dtype=tf.string)
x = gemma_preprocessor(inputs)
x = gemma_backbone(x)
sentence_embeddings = x['sequence_output'][:, 0, :]
x = tf.keras.layers.Dense(64, activation='relu')(sentence_embeddings)
x = tf.keras.layers.Dropout(0.2)(x)
outputs = tf.keras.layers.Dense(1, activation='sigmoid')(x)
model = tensorflow.keras.models.Model(inputs=inputs, outputs=outputs)

Output of the line that attempts to create the preprocessor:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[75], line 1
----> 1 gemma_preprocessor = keras_nlp.models.GemmaPreprocessor(gemma_backbone.vocabulary)

AttributeError: module 'keras_nlp.api.models' has no attribute 'GemmaPreprocessor'

I get the same results if I replace keras_nlp with keras_hub.
Expected behavior
As described here, this class used to exist.
Additional context
I am trying to use Gemma as a sentence encoding layer in a binary classifier. How should I do so if not with keras_nlp.models.GemmaPreprocessor and the code above?

That was removed in dd0651e711b0da1a9f4149520860bb4537df4059. We'll update the docs. The new one is here:
https://keras.io/keras_hub/api/models/gemma/gemma_causal_lm_preprocessor/#gemmacausallmpreprocessor-class

Hi @rlcauvin,
I have reproduced the issue, please refer to this gist file. To avoid it could you please use keras_hub.models.GemmaCausalLMPreprocessor class as mentioned by @jeffcarp and also please refer this keras documentation.
Thank you.

For reference, here is what @jeffcarp suggested for accessing token embeddings directly in KerasHub models.

The original link points to the keras_nlp docs. In the updated keras_hub docs the GemmaPreprocessor class (correctly) no longer exists:
https://keras.io/keras_hub/api/models/gemma/
Closing this as the keras_nlp docs should remain (unlinked in the navigation) for legacy reference.


LFS-681: When clicking (+) on a subject child chart to add a form, do not show parent subject in the subject selection dialog

Jira link
To test: When creating a new form from a patient chart, the following behaviours should occur:

If you try to create a form whose subject can be the patient you're looking at, it automatically chooses the patient as the subject for your new form. E.g., create a new patient, go to its chart, and then try creating a Demographics form. It should automatically choose the patient you're looking at as the subject for that form.
If you try to create a form for a new subject, and the parent of that subject can be the patient you're looking at, the patient is automatically chosen as its parent. For example, create a Patient, then go to its chart and create a Tumour form. It will prompt you to create a new Tumour, which should then *automatically choose the patient you're looking at as its parent.

Draft until #454 is merged

I do not expect to see other subject's children of the same type. This perhaps will be addressed in 871

I do not expect to see other subject's children of the same type. This perhaps will be addressed in 871

We should still be showing the eligible children.
...
It works well when I open tumor T's chart and create a Radio form. The Radio form gets created for the tumor T.

This has been fixed. in 069f398 :heavy_check_mark:

We should still be showing the eligible children.
...
It works well when I open tumor T's chart and create a Radio form. The Radio form gets created for the tumor T.

This has been fixed. in 069f398 :heavy_check_mark:

The parent is still shown in the Select a subject dialog

Steps to reproduce:

create patient and tumor
go to tumor chart
click on + and choose Radio form
Select a subject dialog opens up offering patient and tumor
ideally the Radio form should just be created for the tumor shown in the tumor chart, rather than offering the same tumor as a singe option in the dialog

The parent is still shown in the Select a subject dialog

Steps to reproduce:

create patient and tumor
go to tumor chart
click on + and choose Radio form
Select a subject dialog opens up offering patient and tumor
ideally the Radio form should just be created for the tumor shown in the tumor chart, rather than offering the same tumor as a singe option in the dialog

Found only one inconsistency. Steps to reproduce:

create patient and tumor
go to the tumor chart
click on (+)
select Radiotherapy form
click on the NEW button
expected outcome: only subject tumor type should be shown (which upon creation should be assigned to the current patient)
actual outcome: both patient and tumor types are offered in the dialog

Found only one inconsistency. Steps to reproduce:

create patient and tumor
go to the tumor chart
click on (+)
select Radiotherapy form
click on the NEW button
expected outcome: only subject tumor type should be shown (which upon creation should be assigned to the current patient)
actual outcome: both patient and tumor types are offered in the dialog

That's a bit out of scope, and should be covered by https://phenotips.atlassian.net/browse/LFS-877 .


AutoMerge failed for PPWL

I'm submitting a ...
[ ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
[x] failed automerge

Summary
error validating schema: chainId: conflicting values 103 and 0
I am not sure what I did wrong and I'm sorry. Can some one help?

Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

I did think I caught an error, closed my initial PR (which also failed auto merge).

https://github.com/solana-labs/token-list/pull/23287

https://github.com/solana-labs/token-list#error-validating-schema-chainid-conflicting-values-103-and-0

https://github.com/solana-labs/token-list#error-validating-schema-chainid-conflicting-values-103-and-0

Thank you, I'm not sure how I missed that, but do I now have to fix it and resubmit? Or will the original PR be manually merged?


Permission Denied while creating table on Alluxio with supergroup user.

Alluxio Version:
2.2.1
Describe the bug

Got exceptions while creating tables with Presto

I failed to create table in the following case:Query 20200515_055447_00008_q2ruu failed: java.security.AccessControlException: Permission denied: user=presto, path="alluxio://<IP_ADDRESS>:19998/projects/test":hdfs:hadoop:drwxrwxr-x

I create the table from scratch with Alluxio path. (actually copying schema from another table)

The Presto user is presto, it is in supergroup of HDFS. No permission issue if it is an HDFS path.

If I create the table on Hive with hdfs (owner), the table can be created. When query on Presto, there is no data returned, and files are not loaded to Alluxio. If I manually load those files, still no data returned on Presto

If I change the ownership of the directory to presto , I am able to create table and the data can be automatically loaded to Alluxio and returned.

Got following warnings during Alluxio startup (might not be related)

2020-05-14 19:22:30,836 WARN  HdfsUnderFileSystem - Cannot create SupportedHdfsAclProvider. HDFS ACLs will not be supported.
2020-05-14 19:22:31,548 WARN  NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2020-05-14 19:22:31,554 WARN  DomainSocketFactory - The short-circuit local reads feature cannot be used because libhadoop cannot be loaded.

To Reproduce
Create a table with an HDFS supergroup account(e.g. presto) on a path without ownership (e.g. hdfs:hadoop:drwxrwxr-x)
Expected behavior

Be able to create table without any issue
Data can be automatically loaded to Alluxio and returned while querying

Urgency
Describe the impact and urgency of the bug.
Additional context
Add any other context about the problem here.

Hi @lxqfy sorry for the late response, is this still a valid issue? I think it should be resolved in newer version. Feel free to reopen it if it's not resolved.


Looses script editor title formatting on restart

I want use the ${fileName}.${fileExt}  script title format

And it works when applied.

But on restart the only retained part is the dot:

I'm on Dbeaver portable 21.3.2 on Windows Server 2016 Standard

@ClodoaldoPinto Unfortunately, cannot reproduce it. Is there something in the logs? Could you check if it is reproducible for you against 21.3.4?

The portable version is still at 21.3.2. Nothing in the log catches my eyes. What am I looking for in the log?


Bug: Device name doesn't update in Home Assistant

Please make sure that the issue you're planning to report is not already registered :)

Describe the bug
After setting a new device name in the HASS.Agent application, the Home Assistant integration fails to recognize it and keeps discovering the old one, in which no functions work as the names don't match between the client and HA.
MQTT broker updates correctly, in MQTT Explorer under hass.agent/devices, both the old and new name show up.
To Reproduce
Steps to reproduce the behavior:

Go to Configuration > General in HASS.Agent
Change device name to something else and save
Remove old name entry from the HASS.Agent Home Assistant Integration and restart
In the "Discovered" tab, the old device name will show up.

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Misc info (please complete the following information):

Windows build (ideally screenshot/info of winver.exe output):
Windows' UI language:
HASS.Agent version: 2.0.1

Please check what's applicable (multiple answers possible):

[x] Installed via installer
[ ] Installed manually
[ ] Problem occurs in HASS.Agent
[ ] Problem occurs in Satellite Service

Additional context
Add any other context about the problem here.
Logs
If possible, please provide the logs of HASS.Agent and - if applicable - the Satellite Service. You can find HASS.Agent's logs by going to the main window, then Configuration -> Logging -> open logs folder. The Satellite Service's logs are in the same window, but the Satellite Service tab -> open service logs folder.

Thank you very much for detailed information!
Part of the issue is that the "HASS.Agent Integration" requires HA restart to refresh (but that's something we need to fix separately @DrR0X-glitch) but anther half is issue of "device discovery messages" not being cleared after name change.
I'll create a PR with fix for the 2.0.1-beta2.

Reopened until 2.1.0-beta2 is released for clarity sake.


Feat: Implement the functions in the oracle_module library.

Description
Implement with_oracle_prices_before and with_oracle_prices_after functions in the Oracle_module library.
File: src/oracle/oracle_module.cairo.
Function signature:
/// Sets oracle prices, perform any additional tasks required,
/// and clear the oracle prices after.
///
/// Care should be taken to avoid re-entrancy while using this call
/// since re-entrancy could allow functions to be called with prices
/// meant for a different type of transaction.
/// The tokensWithPrices.length check in oracle.set_prices should help
/// mitigate this.
/// # Arguments
/// * `oracle` - `Oracle` contract dispatcher
/// * `dataStore` - `DataStore` contract dispatcher
/// * `eventEmitter` - `EventEmitter` contract dispatcher
/// * `params` - parameters used to set oracle price
#[inline(always)]
fn with_oracle_prices_before(
    oracle: IOracleDispatcher,
    data_store: IDataStoreSafeDispatcher,
    event_emitter: IEventEmitterSafeDispatcher,
    params: SetPricesParams
);

fn with_oracle_prices_after();

Implement with_simulated_oracle_prices_before and with_simulated_oracle_prices_after functions in the Oracle_module library.
File: src/oracle/oracle_module.cairo.
Function signature:
/// Set oracle prices for a simulation.
/// TokensWithPrices is not set in this function.
/// It is possible for withSimulatedOraclePrices to be called and a function
/// using withOraclePrices to be called after or for a function using withOraclePrices
/// to be called and withSimulatedOraclePrices called after.
/// This should not cause an issue because this transaction should always revert
/// and any state changes based on simulated prices as well as the setting of simulated
/// prices should not be persisted
/// # Arguments
/// * `oracle` - `Oracle` contract dispatcher
/// * `params` - parameters used to set oracle price
#[inline(always)]
fn with_simulated_oracle_prices_before(
    oracle: IOracleDispatcher, params: SimulatePricesParams
);

fn with_simulated_oracle_prices_after();

PLEASE READ:

Equivalent of solidity modifers with before functions to put at the beginning of
functions and after functions to put at the end.

Acceptance criteria

Function is implemented and well commented.
Associated unit tests (nominal and failure) are implemented and passing.

Resources

withOraclePrices function in GMX repo
withSimulatedOraclePrices function in GMX repo

@JordyRo1 will work on this :)

Yeah sure but can he comment on the issue so I can assign it to him please :)

Hey, I will be working on this.

Great, I'll assign it !

following issue required for this issue:

#320

following functions required but not in any issue :

withOraclePrices function in GMX repo
withSimulatedOraclePrices function in GMX repo

Hi @JordyRo1, any news on the progress of the code?

Hey, sorry for the delay, was a bit busy, working on it today !


improve rendering performance dramatically in certain situations

should resolve #770

Whow, this is such a massive improvement I'm surprised it hasn't made it in a release in over three years! We have a large amount of metrics that would be a headache to configure manually WRT resolution so we'd rather waste a bit of cheap disk space and use a fine resolution for everything if it didn't result in several minutes of CPU time for a handful of graphs.
I'd be happy to contribute any unit tests that might be missing if that would help get this into v1.0.3, alas I can't figure out in what way the existing ones aren't adequate. Any ideas, @esc and @drawks?
@steve-dave You're right, the first line of the __consolidate function is redundant. When I ran into this problem I thought about dropping the whole buf logic and using only this list comprehension but in the end @powo's optimization is probably more efficient as it does less copying.

@mbethke : First, it should be rebased. Did you really try that change? Is it really a big improvement?
Second - that's a good question about tests in this particular case. It's a change of TimeSeries class, main core thing of whole Graphite. Do we really need a unit test for such case? For what then - for a private function?
Thoughts? /cc @DanCech @iksaif @brutasse ?

The patch itself looks reasonable, adding unit tests is definitely a good idea, the suggested patch for checking valcnt makes sense to me.  I'll check it out.

@deniszh It's such a big speedup that I believed it to be a fluke at first. One of our Whisper files takes just over a minute to condense down to 10 JSON data points on reasonably beefy hardware (2.4.GHz E5-2630, 128 GB), most of which is spent pointlessly manipulating lists of None in __consolidatingGenerator (as I think @powo has pointed out already, the remove operation is O(n) over the length of the list, and with most entries being None this is basically done n times for an effective O(n²)).
With the patch, this time is down to a little over two seconds!

I think I would be fine with that as long as it's rebased, tested, and you provide a graph showing the improvements.

I just made my own rebased branch and it seems to work ok, test coverage actually isn't bad but the tests will need to be updated to be able to fix the issue with the extra None values.  I'll dig into it more tomorrow.

As I couldn't rebase this PR myself, I worked on my own repo and just opened  #2051.
I didn't see any issues with extra values but the 'average' function didn't work due to a cast in the wrong order and the new-since-2014 functions 'first' and 'last' were missing. Feel free to cherry-pick and merge/reject as is easiest :)

Closing in favor of #2052


install error

Thanks for your brilliant work!
After i run make install, i got this
ImportError: /home/envs/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so: invalid ELF header.
How can i solve this.

Hi @raozhongyu ,
From a quick search and from #55 , this seems to be due to compiling and running modules across different OS-es.


Terminate workflow should terminate children workflow first

Version of Cadence server, and client(which language)
all version
Describe the bug
If a workflow that have pending children workflows be terminated, will never be resettable now. And in this situation, children workflow also can not be terminated.
To Reproduce
Is the issue reproducible?

Yes

Steps to reproduce the behavior:
Start a workflow with children workflow, when children workflow is running, terminate the workflow.
Then try reset workflow or terminate children workflow will fail.
Expected behavior
Terminate children workflow first then terminate parent workflow.

This is not a bug. It’s the designed behavior based on parent close policy.
The design makes it like OS process, killing a parent process will populate
to children recursively.
What you described to expect could be a new feature.
On Wed, Jul 27, 2022 at 7:51 PM zedongh @.***> wrote:

Version of Cadence server, and client(which language)
all version
Describe the bug
If a workflow that have pending children workflows be terminated, will
never be resettable now. And in this situation, children workflow also can
not be terminated.
To Reproduce
Is the issue reproducible?

Yes

Steps to reproduce the behavior:
Start a workflow with children workflow, when children workflow is
running, terminate the workflow.
Then try reset workflow or terminate children workflow will fail.
Expected behavior
Terminate children workflow first then terminate parent workflow.
—
Reply to this email directly, view it on GitHub
https://github.com/uber/cadence/issues/4919, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABCQPM56WK2METRVOOBFNGTVWHYUXANCNFSM543U75QQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Thanks,
Quanzheng