Reading data with the SharePoint REST interface errors: 401 unauthorized

when I am trying to call a SharePoint Online search service using the C# code mentioned below but it throws "The remote server returned an error: (401) Unauthorized." error to me. what could be wrong? I'm getting error: {x-ms-diagnostics: 3000006;reason="Token contains invalid signature.";category="invalid_client". However if I give 'SharePointOnlineCredentials' it is working.
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(sharepointHostWebUrl.ToString() + searchRestUrl);
                request.Method = "GET";
                request.Accept = "application/atom+xml";
                request.ContentType = "application/atom+xml;type=entry";
                //request.Credentials = onlineCredentials;
                request.Headers.Add("Authorization", "Bearer " + result.AccessToken);
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                // process response..
                XDocument oDataXML = XDocument.Load(response.GetResponseStream(), LoadOptions.None);

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 047ea71c-e866-b2dd-5530-8451de27ba4a
Version Independent ID: 3b886e81-c3b7-d5c1-136f-4cb827b4952f
Content: Complete basic operations using SharePoint REST endpoints
Content Source: docs/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints.md
Product: sharepoint
GitHub Login: @VesaJuvonen
Microsoft Alias: vesaj

Looks like there is an issue with how you are retrieving the access token for SharePoint. Could be a wrong/invalid client ID. The service you requested using the client id, may not have the proper permissions.
Can you provide a bit more information on how you are trying to authenticate.

Are you using an ACS App or an Azure AD App?
What does the code look like for when you are trying to authenticate and get an access token?
Can you share what your Azure AD or ACS App configuration looks like?

Unfortunately, there isn't enough information for us to provide valuable feedback in this regard.

Hi, thank you for looking into my issue. I have followed the sample code from git repo "https://github.com/Azure-Samples/ms-identity-aspnet-webapp-openidconnect". Yes, you are correct I'm getting "wrong/invalid client ID" in the response Headers.

I'm using Azure AD App
the code looks as below

// Upon successful sign in, get the access token & cache it using MSAL
IConfidentialClientApplication clientApp = MsalAppBuilder.BuildConfidentialClientApplication();
              AuthenticationResult result = await clientApp.AcquireTokenByAuthorizationCode(new[] { "User.Read", "Sites.Search.All" }, context.Code).ExecuteAsync();

              Uri sharepointHostWebUrl;
              sharepointHostWebUrl = new Uri("https://mytenantname.sharepoint.com");
              string queryText = "my search query";
              string searchRestUrl = string.Format("_api/search/query?querytext={0}", queryText);

  	HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(sharepointHostWebUrl.ToString() + searchRestUrl);
              request.Method = "GET";
              request.Accept = "application/atom+xml";
              request.ContentType = "application/atom+xml;type=entry";
              request.Headers.Add("Authorization", "Bearer " + result.AccessToken);
              HttpWebResponse response = (HttpWebResponse)request.GetResponse(); **here I am getting 401 unauthorized**
              // process response..
              XDocument oDataXML = XDocument.Load(response.GetResponseStream(), LoadOptions.None);

what configuration details you need?

Can you share what permissions you've granted the application in Azure? Do they match the scopes you are trying to retrieve?
Are you using a common authority, or trying to connect directly to the tenant?
Are you connecting via V1 or V2?

yes, the scopes are exact match, as you can see below

trying to connect directly to the tenant (https://login.microsoftonline.com/tenantId). Below is the code that gets executed during startup

/// The authority
public static string Authority = string.Format(CultureInfo.InvariantCulture, AADInstance, "tenantId");
AADInstancee="https://login.microsoftonline.com/{0}"

if I am not wrong it is using Azure AD V2 endpoint.

@bcameron1231, I am looking forward for your advice. I'm stuck with this issue since 2 weeks. Thanks.

Hi! So I think the actual issue is because the SharePoint Search Service to not support app authentication. Based on what I'm seeing, the code looks like, but you can't use App Credentials against the Search API.
Please see. https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/search-api-usage-sharepoint-add-in#high-level-guidelines


sp-starter-kit provisioning error

I'm not able to get the sp-starter-kit provisioned.
Pre-reqs should be fine (I was able to install O365 Custom Learning a couple weeks ago).
-My account is tenant admin
-App catalog exists, tenant admin set as primary owner
-Tenant admin set as Term store administrator
-release preferences for tenent are correct

Unfortunately, your request to provision
"SharePoint Starter Kit"
template failed.
Here is the exception that occurred: Type = System.Exception Message = {"DocumentsUrl":null,"ErrorMessage":null,"GroupId":"8afe30f0-3447-4d2d-9c88-8f35bc30c259","SiteStatus":1,"SiteUrl":null} Source = OfficeDevPnP.Core TargetSite = Void MoveNext() StackTrace = at OfficeDevPnP.Core.Sites.SiteCollection.<CreateAsync>d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at OfficeDevPnP.Core.Sites.SiteCollection.Create(ClientContext clientContext, TeamSiteCollectionCreationInformation siteCollectionCreationInformation) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectHierarchySequenceSites.ProvisionObjects(Tenant tenant, ProvisioningHierarchy hierarchy, String sequenceId, TokenParser tokenParser, ProvisioningTemplateApplyingInformation applyingInformation) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.ApplyProvisioningHierarchy(Tenant tenant, ProvisioningHierarchy hierarchy, String sequenceId, ProvisioningTemplateApplyingInformation provisioningInfo) at Microsoft.SharePoint.Client.TenantExtensions.ApplyProvisionHierarchy(Tenant tenant, ProvisioningHierarchy hierarchy, String sequenceId, ProvisioningTemplateApplyingInformation applyingInformation) at SharePointPnP.ProvisioningApp.WebJob.ProvisioningFunction.<RunAsync>d__2.MoveNext() in C:\github\sp-provisioning-service\SharePointPnP.ProvisioningApp\SharePointPnP.ProvisioningApp.WebJob\ProvisioningFunction.cs:line 388 HResult = -2146233088
PnP Correlation ID: 3f23c29e-f727-45fd-869d-88f35541bb76
Category

[ ] Question
[x] Bug
[ ] Enhancement

Hi, thank you for the issue. I realize this is an older issue and it may not be an issue for you anymore. We are working on cleaning up the issues list, does this still apply to you? If so, could you create a new issue in the issues list. Thanks!


Start api failed when run vscode tests with todo-csharp-sql-swa-func

Describe the issue:
Run task Start API and Web, the API application failed to start.

Repro Steps:

Runazd login
Run bash ./test-templates.sh -t todo-csharp-sql-swa-func -b staging -c false.
Open the project in VS Code
Hit F1, Run Task, Start API and Web

Environment:

OS: Windows desktop.
Template: todo-csharp-sql-swa-func
Branch: staging
Azd version: 0.4.0-beta.2-daily.2103577  (commit https://github.com/Azure/azure-dev/commit/d2f80f2b38cc98e3c23e18ab97ff6351018e7ab5)

Expected behavior:
API application started successfully when run vscode tests with todo-csharp-sql-swa-func
@rajeshkamal5050 for notification.

@vhvb1989 do we need a similar fix here made for #1057 ?

I used the repro steps and realized they are referring to another template: todo-java-mongo -b staging
Anyway, the java-mongo template is also failing to start the API locally:
2023-01-10 19:17:41.757  INFO 10355 --- [or-http-epoll-1] c.a.c.implementation.AccessTokenCache    : Acquired a new access token.
2023-01-10 19:17:42.510  WARN 10355 --- [or-http-epoll-1] c.a.s.k.secrets.SecretAsyncClient        : Failed to get secret - AZURE-COSMOS-CONNECTION-STRING
Status code 403, "{"error":{"code":"Forbidden","message":"The user, group or application 'appid=04b07795-8ddb-461a-bbee-02f9e1bf7b46;oid=62661785-adcf-4117-b9d0-22b3aa2b4ebf;numgroups=794;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/' does not have secrets get permission on key vault 'kv-qhvcsrgafdhni;location=eastus2'. For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287","innererror":{"code":"AccessDenied"}}}"

I'll create a side issue for that one

Unable to reproduce using devcontainer on windows.  (I started trying this set up to have a container with all the required dependencies ready to run)

Unable to reproduce on Windows11, fresh new installation on VM:

I used the repro steps and realized they are referring to another template: todo-java-mongo -b staging
Anyway, the java-mongo template is also failing to start the API locally:
2023-01-10 19:17:41.757  INFO 10355 --- [or-http-epoll-1] c.a.c.implementation.AccessTokenCache    : Acquired a new access token.
2023-01-10 19:17:42.510  WARN 10355 --- [or-http-epoll-1] c.a.s.k.secrets.SecretAsyncClient        : Failed to get secret - AZURE-COSMOS-CONNECTION-STRING
Status code 403, "{"error":{"code":"Forbidden","message":"The user, group or application 'appid=04b07795-8ddb-461a-bbee-02f9e1bf7b46;oid=62661785-adcf-4117-b9d0-22b3aa2b4ebf;numgroups=794;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/' does not have secrets get permission on key vault 'kv-qhvcsrgafdhni;location=eastus2'. For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287","innererror":{"code":"AccessDenied"}}}"

I'll create a side issue for that one

Sorry, my reproduction step was written incorrectly. I have updated it. The todo-sharp-sql-swa-fun template should be used.
Step2 : Run bash ./test-templates.sh -t todo-csharp-sql-swa-func -b staging -c false

The timeout error might related to KeyVault.  See this: https://github.com/Azure/azure-functions-host/issues/8504#issuecomment-1208250457
Talking offline with @v-jiaodi to try using an updated source code.

Couldn't reproduce it after an extensive triage with @v-jiaodi
Since the api and web are deployed correctly to Azure Functions and SWA and tests passes, the problem might be isolated to a particular system configuration (user access + nuget packages + etc).
I shared a Windows 11 VM with @v-jiaodi and ask for trying to reproduce the issue with that VM.  If reproducible, I can debug it from there.  Otherwise, it would be a system configuration issue.

Following on previous comment, @v-jiaodi logged into the provided VM and was able to repro de issue with two different approaches (using bash test-templates, which includes testing and by manually running azd to deploy)

However, when I log in to the VM, I can't reproduce the issue.
I used the same user for Windows, same path and same VSCode instance used by @v-jiaodi, but I was able to run the api locally just fine.
The only possible difference so far, between when I am running v/s @v-jiaodi are:

If the system language is set to other than English (@v-jiaodi , please confirm if you set a different lang for windows to reproduce)
The user credentials for azd. I log in (azd login) using my Microsoft account.  There could be some access or difference between the account.

I have asked @v-jiaodi to share a video of all the process, as I have been really unable to reproduce/debug on my side.
Please record the screen since the initial moment when running either the bash or azd (please mention what account is used to login) until the moment that the issue can be seen.

Had a live session with @v-jiaodi and validated that logging in azd with my account resolves the issue, and logging in back with @v-jiaodi account shows the issue again.
Also, this issue is only happening on C# template (not python or NodeJs). This leads me to believe that the account is well set up in Azure AD (roles/subscription/etc), and that the issue is actually somewhere in the C# implementation of the Azure Functions Host.
I have created a new issue for [azure-functions-host](https://github.com/Azure/azure-functions-host) to investigate, as there's nothing else on the side of azd here.
I will let this issue open just as a way to follow up.  But I will unassign it from me by now, as there's nothing else I can do for now.
@rajeshkamal5050 let me know if you have any follow ups here.

We have an upstream dependency issue created for the same. Not a blocker for Build/GA. Happening only for c# templates with certain vendor accounts.

https://github.com/Azure/azure-functions-host/issues/9029

@rajeshkamal5050 This issue also occurs in the following cases:

OS: WSL, Windows desktop, MacOS desktop, Linux desktop, Devcontainer in VS Code, Codespaces
Template: todo-csharp-sql-swa-func
Branch: Staging
Azd version: 0.8.0-beta.3-daily.2760917  (commit https://github.com/Azure/azure-dev/commit/2201b16963dc43ae045c52374c0dd395152cb309)

Still waiting for: https://github.com/Azure/azure-functions-host/issues/9029


Github repository not found

Hi,
I have followed your instructions closely (as far as I can tell). Here is my first question:
I am cloning my private repo (which is clone of sample-python-pytest-autograder). Should this repository be set for ssh access for https access? So far, I get failures in both modes. More specifically, when I upload the zip file to Gradescope, my output log file gives:
...
ollecting tomli>=1.0.0
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting iniconfig
  Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting exceptiongroup>=1.0.0rc8
  Downloading exceptiongroup-1.1.3-py3-none-any.whl (14 kB)
Installing collected packages: tomli, pluggy, packaging, iniconfig, exceptiongroup, pytest
Successfully installed exceptiongroup-1.1.3 iniconfig-2.0.0 packaging-23.2 pluggy-1.3.0 pytest-7.4.3 tomli-2.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
# github.com:22 SSH-2.0-babeld-542480ac
fatal: repository 'fsu-sc/PRIVATE-cs8-s18-labxx-gs.git' does not exist    <<<<<<< ERROR >>>>>>>
No apt-get.sh found in repo
No requirements.txt found in repo
No requirements3.txt found in repo
...

My private deploy key was stored in deploy_keys/ (public and private) via running the script ./make_deploy_keys.sh.
I would like to get verbose output so I can see the commands executed that generate the output in the output provide by the gradescope interface.
Here are the contents of ./git/config:
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
[remote "origin"]
	url = https://github.com/fsu-sc/PRIVATE-cs8-s18-labxx-gs.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main

Therefore, I added the -x option to setup.sh, but that did not seem to affect the output provided by Gradescope.
The setup.sh command:
mkdir -p ${BASE_DIR}/${REPO_NAME}
git clone ${GIT_REPO} ${BASE_DIR}/${REPO_NAME}

is executed. GIT_REPO has the value:
GIT_REPO=fsu-sc/PRIVATE-cs8-s18-labxx-gs.git

and I am able to clone it manually via git clone $GIT_REPO.
My env.sh file is:
#!/bin/sh
GIT_REPO=fsu-sc/PRIVATE-cs8-s18-labxx-gs.git

and the file envVars.sh:
#!/usr/bin/env bash

# Extract just the git repo:
#   https://serverfault.com/questions/417241/extract-repository-name-from-github-url-in-bash

BASE_DIR=/autograder/git-repo
WITHOUT_SUFFIX="${GIT_REPO%.*}"
REPO_NAME="$(basename "${WITHOUT_SUFFIX}")"

echo \$BASE_DIR=$BASE_DIR
echo \$GIT_REPO=$GIT_REPO
echo \$REPO_NAME=$REPO_NAME

Somehow my repository is not set up properly from Gradescope's point of view. Ultimately, I need more detailed logs to help my debugging. Any help would be appreciated. Thanks.
Gordon

I fixed my issue. The GIT_REPO variable has to be the SSH link to the repository. Also, the repository should be read only when inputting the deploy key.

yes GIT_REPO should be the link to the ssh e.g. git@github.com:mnoukhov/gradescope-autograder-template.git

And I do recommend making the deploy key read only

Thanks. I had this working a few days ago but then started my actual unit tests, and I ran into problems. Specifically, my grading respository (which contains grade.sh) does not appear on the gradescope server, although if I run run_autograder on the server, the GitHub files appear. This is strange to say the least.
What is the best approach to get 15-30 min of Zoom or Team time with an expert so I can get some help? Or is there a user forum for Gradescope that I can questions to? You are very busy, I am sure, so I do not wish to impose. But I am at the end of my rope now.
Thanks,
Gordon

Hi Gordon, I'm not actually at all associated with gradescope, I just created this repo as part of my creating my own course and iterating it with different TAs. I just tested it by copying my deploy key to assignment0/deploy_key and uploading that zip. Assignment 0 works for me, does it work for you as well?
I don't know where you got grade.sh from but my repo isn't made for that. Just to help unblock you, feel free to schedule a 15min call with me on Monday or Tuesday after 2pm ET using my email<EMAIL_ADDRESS>by sending a calendar invite with a meeting link.

Hi Michael,
Thanks for the offer. It so happens I got unblocked yesterday once I
understood how to use ssh. I had not realized that I should run
runautograder AFTER the ssh. I was then able to debug. I had also not
realized that it was the use of decorators in the tests that were
responsible for creating the json file. Now everything works. I simplified
your implementation for my own workflow, which is to use a repository
template for the students, as opposed to asking the students to load files
with specific names, which for me, makes testing easier.
So there is no longer a need to schedule a call, but I appreciate the
offer.
Cheers,
Gordon
On Sat, Nov 25, 2023 at 1:54 PM Michael @.***> wrote:

Hi Gordon, I'm not actually at all associated with gradescope, I just
created this repo as part of my creating my own course and iterating it
with different TAs. I just tested it by copying my deploy key to
assignment0/deploy_key and uploading that zip. Assignment 0 works for me,
does it work for you as well?
I don't know where you got grade.sh from but my repo isn't made for that.
Just to help unblock you, feel free to schedule a 15min call with me on
Monday or Tuesday after 2pm ET using my email @.*** by
sending a calendar invite with a meeting link.
—
Reply to this email directly, view it on GitHub
https://github.com/mnoukhov/gradescope-autograder-template/issues/3#issuecomment-1826397807,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACPIZCITFRQEDMVYXJDI43YGI5FHAVCNFSM6AAAAAA7SAHOLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGM4TOOBQG4
.
You are receiving this because you authored the thread.Message ID:
@.***>


Generated sample equals to input samples

I have trained 125m MPT on some small dataset, my generated inputs via inference/hf_generate.py (before this converted from composer to HF, and it's  gives me some value from eval/eval.py with winograd) are same with input samples, do u know what kind of problem it could be?

Hi @germanjke , could you clarify what data you have been finetuning on? Are you running the Quickstart instructions? If so, the outputs are not meant to be good, it's just meant to be a tour of the different scripts available in the LLM Foundry and take you from data -> model -> generations.
It would also help greatly if you could attach the commands and outputs you are seeing.

Hi, I am using the 'inference/hf_generate.py' with 'mpt-7b-instruct' (inference only) but also getting generated output which is the same as input for certain prompts. Also the answers seem to be more of a text completion, and are not similar to the instruct demo responses.  Could you clarify why this is happening, and what are the recommended changes for using this model to be able to be similar to the demo? I have set the temperature, top_p and top_k as in demo already.

Hi @kochkinaelena , could you provide a bit more info such as the prompts that you are using, or ideally the exact command python hf_generate.py ... you are running?
For the mosaicml/mpt-7b-instruct model specifically, I believe it may be best to follow the instruction format that it was finetuned with, you can see an example here of how we prompt the model in our HF space: https://huggingface.co/spaces/mosaicml/mpt-7b-instruct/blob/main/quick_pipeline.py#L8-L23. This might lead to better generations!

Closing as stale -- please re-open if you continue to have issues!


TempBasal during Omnipod change

I noticed that the tempbasal scheduled to run during the pod change will run to its end, even after the screaming starts.

This is how it looks retrospectively. I realy took the 80mins to change the pump

Not sure about the relevance, but also in Loop there is an issue with IOB counts during pod change. The recommended procedure for Loop (according to  @marionbarker, and I have followed this advice too) is to suspend the old pod before deactivating it. Then Loop will know that the insulin delivery has stopped.
Perhaps it is a good idea to do the same thing in FreeAPS X? At least until a proper solution is available?
Details for Loop here, although this may be irrelevant in the context of FreeAPS X:
https://github.com/LoopKit/Loop/issues/1271

@mountrcg This is not a bug. TRB will be drawn on the chart as indicated in the last history entry. This is why I make the pump suspend opaque. You yourself have changed the appearance of the chart.

@ivalkou my concern was not the graph, but the accounting of basal insulin during pod change, I did make that clear above - sorry.


[UTILS-77] Support Spark 2.0.0.

Resolves #77.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/bdg-utils-prb/76/Build result: FAILURE[...truncated 4 lines...]Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/bigdatagenomics/utils.git # timeout=10Fetching upstream changes from https://github.com/bigdatagenomics/utils.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/bigdatagenomics/utils.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/78/merge^{commit} # timeout=10 > git branch -a --contains 2e4e91bcfd44cf937ca445653057325cab1bdb7f # timeout=10 > git rev-parse remotes/origin/pr/78/merge^{commit} # timeout=10Checking out Revision 2e4e91bcfd44cf937ca445653057325cab1bdb7f (origin/pr/78/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 2e4e91bcfd44cf937ca445653057325cab1bdb7fFirst time build. Skipping changelog.Triggering bdg-utils-prb ? 2.10,1.0.4,centosTriggering bdg-utils-prb ? 2.10,2.2.0,centosTriggering bdg-utils-prb ? 2.11,1.0.4,centosTriggering bdg-utils-prb ? 2.10,2.3.0,centosTriggering bdg-utils-prb ? 2.11,2.2.0,centosTriggering bdg-utils-prb ? 2.11,2.3.0,centosbdg-utils-prb ? 2.10,1.0.4,centos completed with result FAILUREbdg-utils-prb ? 2.10,2.2.0,centos completed with result FAILUREbdg-utils-prb ? 2.11,1.0.4,centos completed with result FAILUREbdg-utils-prb ? 2.10,2.3.0,centos completed with result FAILUREbdg-utils-prb ? 2.11,2.2.0,centos completed with result FAILUREbdg-utils-prb ? 2.11,2.3.0,centos completed with result FAILURE
Test FAILed.

Odd that the "Modifying pom.xml files to move back to Scala 2.10 for development." commit didn't happen as part of the last release.  Was there a problem with the release.sh script?
From the looks of things, the idea here is to keep Spark 1.x and 2.x development on master and switch between them during the release process?  Nothing jumps out at me in the code changes as conflicting with 1.x.

Odd that the "Modifying pom.xml files to move back to Scala 2.10 for development." commit didn't happen as part of the last release. Was there a problem with the release.sh script?

Yeah, I thought that was odd too. I think that last commit has to be manually pushed. I'm guessing that it just didn't get pushed during the release process.

From the looks of things, the idea here is to keep Spark 1.x and 2.x development on master and switch between them during the release process?

Yep, and during CI builds.

Nothing jumps out at me in the code changes as conflicting with 1.x.

If there was, it'd cause the CI build to fail.
Jenkins failed due to a GitHub permissions issue. I just patched that, and am going to make one more Jenkins conf change (add Spark 2) and will retest.

Jenkins, retest this please.

Yep, the utils release script is missing a push at the end.
See https://github.com/bigdatagenomics/adam/blob/master/scripts/release/release.sh#L76

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/bdg-utils-prb/77/Build result: ABORTED[...truncated 28 lines...]Triggering bdg-utils-prb ? 2.11,1.6.1,1.0.4,centosTriggering bdg-utils-prb ? 2.10,1.6.1,1.0.4,centosTriggering bdg-utils-prb ? 2.10,1.6.1,2.2.0,centosTriggering bdg-utils-prb ? 2.10,2.0.0,2.3.0,centosTriggering bdg-utils-prb ? 2.10,2.0.0,2.2.0,centosTriggering bdg-utils-prb ? 2.11,1.5.2,2.3.0,centosAbortedAborted by fnothaftInterrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77Interrupting #77
Test FAILed.

Jenkins, test this please.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/bdg-utils-prb/78/
Test PASSed.

Let me give this a test locally.

Do we want to resolve these deprecation warnings now or later?
[INFO] Compiling 17 source files to utils-metrics/target/scala-2.11.4/test-classes at<PHONE_NUMBER>436
[WARNING] utils-metrics/src/test/scala/org/bdgenomics/utils/instrumentation/MetricsListenerSuite.scala:32: warning: method accumulator in class SparkContext is deprecated: use AccumulatorV2
[WARNING]     val accumulator = sc.accumulator(0)
[WARNING]                          ^
...

Do we want to resolve these deprecation warnings now or later?

I would push for later.

Thank you, @fnothaft!


slash commands: Eliminate /day and /night.

We keep /light and /dark.

It looks like this removes the slash commands but doesn’t rename the user-visible setting? We still call it “Night mode” and “Day mode” in display settings.

Yeah, this needs more work.  I should also rename some of the internal functions.


Optimize calculation of commit count

Instead of count all commits back to the beginning of time twice, and
then subtracting, just make one call to let git figure it out.
This is my first time trying to contribute, so any comments are very welcome.

Looks good to me


[Snyk] Upgrade node-file-router from 0.5.3 to 0.6.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade node-file-router from 0.5.3 to 0.6.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.
The recommended version was released 21 days ago, on 2024-02-24.

Release notes

Package name: node-file-router

0.6.0 - 2024-02-24What's new
Features
Added the ability to modify or override a final result in middlewares (#41).
For example, you can now set response headers in Bun inside middlewares:
import type { NextFunction } from 'node-file-router';
export async function useCors(req: Request, next: NextFunction<Response>) {
const res = await next();
res.headers.set('Access-Control-Allow-Methods', 'PUT, POST, OPTIONS, HEAD');
return res;
}
Documentation

Added information about this update.
Set the valid links for Edit this page

0.5.3 - 2024-02-03chore: bump to 0.5.3

    from node-file-router GitHub release notes

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Fixed in https://github.com/Danilqa/node-file-router/commit/f7863f66b069fca89fad56331947eb5991103bd2


Query regarding fixed classes of services

For the Intel(R) Xeon(R) processor E5 v3 generation which classes of service are reserved and cannot be changed?

Intel(R) Xeon(R) E5 v3 product family, all 4 classes of services can be changed

@tkanteck Thanks for the quick reply.


Is it possible to clone World? With use case.

I'm making a game editor and game with hecs. All of the game state is currently stored in a hecs World. The idea is the game designer sets up the initial World state by adding entities and components, then plays the game (prototype) in the same editor app. At that point I need to clone the World somehow.
Its components contain Entity values (dialogue graph etc), so I can't just spawn and clone individual components. As I'm writing this I'm seeing that insert allows you to assign components to a specific Entity, so I guess I could use that? Seems inefficient though.

You can (ab)use the serialization mechanism for clone by serializing and then deserializing. Admittedly, it has some drawbacks w.r.t. efficiency and determinism, but it should work right now.
Alternatively, we could implement something like the World::clone(&self, &Cloner) -> Word interface described in https://github.com/Ralith/hecs/issues/332#issuecomment-1651560564 where one would need to register Clone and Copy impls for all component types (until specialization stabilizes), but we get exact copies of World including allocator state and with minimal overhead.

Thanks @adamreichold. :) That's exactly what I ended up doing. I actually realised I'd probably want to serialise/deserialise regardless, as some of the components have "editable" versions, and I'll want the non-editable ones for play testing. For example, editable versions of components have Strings for numeric fields so I can edit them with my immediate-mode UI, but they serialise to numbers.
In other words, would be very cool if World::clone were a thing, but I wouldn't actually use it for my current use case after all.
Off-topic: what would be a good serde format for this sort of thing?

Off-topic: what would be a good serde format for this sort of thing?

My personal first choice would be bincode as a simple and efficient codec. However, that crate is currently shifting its focus away from serde support. postcard or dlhn might be considered reasonable successors with focussed on serde support.

Alternatively, we could implement something like the World::clone(&self, &Cloner) -> Word interface described in https://github.com/Ralith/hecs/issues/332#issuecomment-1651560564

It's worth noting that the public API is already powerful enough for this to be implemented downstream, even column-oriented.

is currently shifting its focus away from serde support

It's also possible to use non-serde serialization, though it may take a bit of work. The out-of-the-box serde serialization code should serve as a good example; it uses only public hecs APIs.

It's worth noting that the public API is already powerful enough for this to be implemented downstream, even column-oriented.

I think this is true for the component data but that the entity allocator state is not exposed leading to the restricted determinism as discussed in #332?

Thanks for your advice guys, and thanks a lot for your work on hecs! I'm loving it, and it's a key crate in our game, next to serde, ash and rhai.
I'll stick with serde_json for prototyping as I'm very far away from performance being a concern.


Use Kiota to generate the Graph SDK, instead of using msgraphsdk

Fixes https://issues.redhat.com/browse/ARO-4054
This removes the msgraphsdk dependency with built versions based on a cut-down OpenAPI specification. This allows us to remove a lot of code and cuts CI time in half and a good 10 minutes off E2E (from building).

I'd also like to see a knowledge share around Kiota, maybe in the architecture review forum? This is a big change with a neat new tool. 😃

I'd also like to see a knowledge share around Kiota, maybe in the architecture review forum? This is a big change with a neat new tool. 😃

Kiota is the same tool used to generate the official SDK, it just uses the whole openapi specification instead of the cut down one I've put in. Functionally, the only changes are imports, initialisers from the SDK, and some error handling function name changes to match newer Kiota versions (since I used the latest stable).

Due to the amount of changes in this PR - I request this be broken into two PRs. One with the generated graph and vendored changes and one with the changes to use the new graph SDK.
Beyond that putting the changes for vendor in to a seperate commit will allow for review in Github much easier.

@lranjbar I've already got each of the changes in separate commits for review -- it should be possible to step through them individually and skip the go mod vendor ones.
We also can't break master, so it would have to be one of adding the generated but unused code, and then another switching to the new code and deleting the old stuff -- the moment we stop using it, go mod vendor will trim the import tree and cause all of the vendor changes.

Due to the amount of changes in this PR - I request this be broken into two PRs. One with the generated graph and vendored changes and one with the changes to use the new graph SDK.
Beyond that putting the changes for vendor in to a seperate commit will allow for review in Github much easier.

@lranjbar I've already got each of the changes in separate commits for review -- it should be possible to step through them individually and skip the go mod vendor ones.
We also can't break master, so it would have to be one of adding the generated but unused code, and then another switching to the new code and deleting the old stuff -- the moment we stop using it, go mod vendor will trim the import tree and cause all of the vendor changes.

Yeah I'm aware it would create a chain of events like that. This change seems to be large enough where it warrants multiple PRs. I did walk through the commits yesterday, but it is not really easy to review in this state. I'll let others decide their own opinion on that but as it stands it's just too much change in one PR IMO.

@lranjbar I've rebased the PR to make some of the commits clearer, apart from the generation and vendoring it's ~20LoC of non-copied or non-generated golang code change, which should be a bit clearer.


Feature Request - list all Applications and be able to create sample App

Curious if you're interested at adding those 2 features
List all applications

List first 20 or 50 or 100 applications (we can try to figure out what's best heuristic number together.) Or maybe the number can be parameter and default 20 and max is 1000.
Probably don't need to consider pagination now.

Create sample application
Kind of similar to create real app, it'd be nice to allow create sample apps.
e.g.
okta create-sample --app_id=xxxxx
> 1: React
> 2: Angular
> 3: Vue

The option varies depends what kind of application (dictated by the app_id)
What it does is

check out our sample repo gitHub.com/okta/samples-* to a specific folder, e.g. ~/okta-samples
create env file
start the sample app (optional as parameter like --start cause I'm not sure if we can just start native sample from cli.)

We are actually working on something like this right now ;)

okta start will create and configure apps based on samples,
and okta apps will list all current applications in the org
(@haishengwu-okta please re-open this if this doesn't meet your needs)


Add derive library

Codecov Report

Merging #1 into master will increase coverage by 6.26%.
The diff coverage is 86.30%.

@@            Coverage Diff             @@
##           master       #1      +/-   ##
==========================================
+ Coverage   68.37%   74.63%   +6.26%
==========================================
  Files          12       15       +3
  Lines         313      481     +168
==========================================
+ Hits          214      359     +145
- Misses         73       85      +12
- Partials       26       37      +11

Impacted Files
Coverage Δ

derive/cursor/util.go
85.10% <85.10%> (ø)

derive/cursor/serialize.go
85.45% <85.45%> (ø)

derive/cursor/deserialize.go
87.87% <87.87%> (ø)

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 6e170cc...859d1d7. Read the comment docs.


Remove fac from examples

Remove factory from the unity examples, they are no longer extant.
Improves scanner speed
Disable optimiser by default

Coverage: 89.763% (-2.5%) from 92.229% when pulling d29f549a800721abc77c5ed522b4ce5b709997e1 on remove-fac-from-examples into 3a33be39d4e14a93a2a2dc9d18751d9370a3a09c on main.

coverage: 89.763% (-2.5%) from 92.229%
when pulling d29f549a800721abc77c5ed522b4ce5b709997e1 on remove-fac-from-examples
into 3a33be39d4e14a93a2a2dc9d18751d9370a3a09c on main.


Add search by parameters

#297

Thanks for the PR. It is a great contribution.
We are in the process of receiving feedback from our design team and user-base for the features. Also testing performance with large specs.
Following are some of the findings

Design team wanted some minor style changes. Also there should be support for both dark and light theme. currently it supports only the light theme
User base and User-experience have reported some tweaks to the way the search result is represented
It should offer more flexibility in terms of what user like to search... not just parameter search
do not search parameter descriptions/summary as some large specs gets into performance issues

But having said that, DO NOT UPDATE this PR. We are still reviewing this
We are more likely to accept this PR as is to record your contribution and then make some tweaks to it once we complete the feedback process

Thanks for the great PR !!!


Read tool gets called when knowledge tool encounters errors with process knowledge files resulting in string length exceeded errors.

Electron build -bf86f18e1c
Steps to reproduce the problem:

Chart with Tildy
Add a pdf file (6.5 MB in my case) using "Add Knowledge"
Tried to ask question about information in this pdf file which resulted in knowledge tool not being able to answer and LLM resorted to reading the file using read tool.

This results in following  string length exceeded errors:

Expected Behavior:
Prevent Read tool from being called for large files which it is not able to handle and results in failure.

need to think about the best way to handle this. the read tool itself should be more ...reluctant?... to blow out the context.

This exact situation shouldn't happen any longer as knowledge has been decoupled from the workspace - https://github.com/gptscript-ai/desktop/pull/360
But @g-linville I still want you to make it so that the read tool doesnt try to read binary files (and potentially just large files or it cuts them off).

This should be good now. The description for sys.read tells the LLM not to use it to read binary files, and sys.read will now return an error back to the LLM if it detects that a file is not plain text.

Tested with latest build from electron - 81ca1d72a2
sys.read tool is not  being used for reading  a pdf file .


Fix 0.25 warnings

Hmm, i'm not sure about that. I think 3.24 should be rebased on master.

Agree, guys, let's focus on https://github.com/aksonov/react-native-router-flux/tree/0.26-wip and then will delete 3.24 and current master (i.e. move 0.26 to master)


updated the feature file

issue with the start_date and "_id" vs ""id""

Codecov Report

Merging #66 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #66   +/-   ##
=======================================
  Coverage   90.97%   90.97%
=======================================
  Files           2        2
  Lines         133      133
=======================================
  Hits          121      121
  Misses         12       12

Impacted Files
Coverage Δ

service/service.py
90.41% <100.00%> (ø)

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 5ffb899...6cd5676. Read the comment docs.


how to know the sheet or cell is hiden?

how to know the sheet or cell is hiden?

Thanks for you issue, I have added new functions: GetSheetVisible() and GetRowVisible(), you can get visible state of sheet or row by these APIs.
Note that API changed:
Function HideSheet() and UnhideSheet() has been deprecated with SetSheetVisible() instead, function HideRow() and UnhideRow() has been deprecated with SetRowVisible() instead.

@Luxurioust thank you. and is there a function with column?

New functions GetColVisible() and SetColVisible() has been added.

thank you


Accept header and GitHub Enterprise instances

Hi all,
We've been looking to integrate this action with some of our workflows but ran into an issue where the api of our GitHub Enterprise instance responds with application/json whereas the octokit package only accepts application/vnd.github+json by default and results in a 406. Is there a way that this action could accept either, or have some way to configure this externally?

Good day @mrivnak1
The action uses the octokit library to do the requests, so I am afraid there's not a lot we can change in that perspective. https://github.com/octokit/rest.js
With the baseurl being used to configure the octokit instance: https://github.com/mikepenz/release-changelog-builder-action/blob/develop/src/repositories/GithubRepository.ts#L193-L205

I see, I think there's something going wrong with SAML auth that ends up returning completely the wrong result. I've tried to run the request directly with the headers that I expect octokit to provide and that works. Closing this unless I can get a better idea what's going on. SAML auth has been an issue with other external actions/services so not entirely surprised there.


Add examples for AQL string functions

Add examples for SUBSTRING, UPPER, LOWER, TO_BASE64, TO_HEX and UUID.

Other pages like https://www.arangodb.com/docs/stable/aql/functions-array.html have sort of a headline "Examples" above the code examples but the string function page not? Should it be added?

Hi @TheJPlan,
I am happy to merge the PR's but we will need the CLA signed.
The instructions for that can be found here: https://www.arangodb.com/documents/cla.pdf
If you have already done this, would you mind forwarding it to the same email address again?
Thank you again for your contributions!

Please re-open with changes added to versions:
3.8
3.9
3.10


Push rights

@OriolAbril
Do I have push rights to this repo?  If not, can I get it?

You already have them. You are a core contributor part of the community team so you have commit rights to community related repos. You can check the permissions you have for each repo at https://github.com/orgs/pymc-devs/teams/community-core/repositories


tf.image.crop_and_resize() return a wrong  values on the Jetson TX2

same as https://github.com/tensorflow/tensorflow/issues/13890
And I have tried tensorflow 1.4.0 , tensorflow 1.4.1 ,tensorflow 1.7 , all of them got a wrong value,and when I use cpu to calculate it ，it returns a right value .

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce


[DNM] rgw: Enable beast frontend to be used for rgw

Signed-off-by: Ali Maredia<EMAIL_ADDRESS>

This branch is currently DNM, further testing on the frontend still needs to be done.

Closing this due to inactivity, feel free to re-open, thanks!


Network Transmitters/Receivers/Cards

Allows adding machines to your existing network without cables over any distance
The recipes would be super expensive obviously for these blocks and items
Power cost would be distance between transmitter <-> receiver multiplied by some multiplier
Network card would link a transmitter to a receiver

Crappy graph to make clear what i'm planning:

Implemented!


enable tfstate plugin

close #31

can be enable tfstate plugin as well as way of ecspresso
replace to tfstate's values using a tfstate and tfstatef functions

replace tfstate ref to ecschedule::tfstate* value when parse yaml
lookup tfstate for ecschedule::tfstate* value when after parsed

Do you have any other good ideas?

Thanks. tfstate plugin is a good idea. Thanks for promoting the implementation as well.
May I proceed with reviewing the current implementation and suggestions for questions? If so, please assign me as a reviewer. @gotoeveryone

@Songmu
Sorry, I can't assign reviewers...

What are the detailed steps to PR merge?
Add the required Mention....

Oops, sorry... In any case, I will take a look at this pull request this weekend.

Thank you. I will merge it once and release. I would appreciate your feedback on its use.


DSPDC-1069 Run bulk-file ingest after diffing requests

Apart from the bug in the repo, this is working perfectly.

Codecov Report

Merging #13 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #13   +/-   ##
=======================================
  Coverage   62.31%   62.31%
=======================================
  Files           1        1
  Lines          69       69
  Branches        2        2
=======================================
  Hits           43       43
  Misses         26       26

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 1ab68d5...d7bea0e. Read the comment docs.

Here's an example where the steps in this PR succeeded (even though the downstream steps failed... still working on those): https://hca-argo.monster-dev.broadinstitute.org/archived-workflows/hca-mvp/422199a3-4028-4a50-b6fc-ed2ca0fade39


JSON example for GET heatMapLocation  (PR#3559)

a JSON example to reuse heatmap for heatMapLocation: [Azure/azure-rest-api-specs] add location tabs to heatmap bottom view port (#3559)
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information

[ ] The title of the PR is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[ ] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[ ] If applicable, the PR references the bug/issue that it fixes.
[ ] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[ ] I have read the contribution guidelines.
[ ] My spec meets the review criteria:

[ ] The spec conforms to the Swagger 2.0 specification.
[ ] The spec follows the guidelines described in the Swagger checklist document.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

Can one of the admins verify this patch?

Automation for azure-sdk-for-java

Automation for azure-sdk-for-python

Automation for azure-sdk-for-go

Automation for azure-sdk-for-node

Automation for azure-sdk-for-ruby

@yuncmsft The example looks good - please reference the example in your spec using x-ms-examples. Thanks!


liytellm Authenicationerror, I need help parsing my deepseek API key into aider

Issue
Hello everyone,
I'm trying to configure the DeepSeek API key in Aider, but I'm encountering an authentication error. I've added credit to my account and have a valid DeepSeek API key, but Aider is still throwing the following error:
litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable The API provider is not able to authenticate you. Check your API key.
I've tried several solutions, but none have worked so far. I would appreciate any guidance or suggestions on how to resolve this issue.
Solutions I've Tried:
Set the API Key in the Environment:
I set the DEEPSEEK_API_KEY environment variable in the terminal:
cmd
Copy
set DEEPSEEK_API_KEY=your_api_key_here
Windows (PowerShell):
powershell
Copy
$env:DEEPSEEK_API_KEY="your_api_key_here"
Verify the API Key:
I checked that the environment variable was set correctly:
cmd
Copy
echo %DEEPSEEK_API_KEY%
Windows (PowerShell):
powershell
Copy
$env:DEEPSEEK_API_KEY
Create the ~/.aider.conf File:
I created the ~/.aider.conf file in my home directory and added the following configuration:
ini
Copy
[api]
deepseek_api_key = your_api_key_here
deepseek_api_endpoint = https://api.deepseek.com/v1
model = deepseek-model-name
Use the echo Command to Append Data:
I used the echo command to append the data to the ~/.aider.conf file:
bash
Copy
echo "[api]" >> ~/.aider.conf
echo "deepseek_api_key = your_api_key_here" >> ~/.aider.conf
echo "deepseek_api_endpoint = https://api.deepseek.com/v1" >> ~/.aider.conf
echo "model = deepseek-model-name" >> ~/.aider.conf
Use the printf Command:
I used the printf command to write the data to the ~/.aider.conf file:
bash
Copy
printf "[api]\ndeepseek_api_key = your_api_key_here\ndeepseek_api_endpoint = https://api.deepseek.com/v1\nmodel = deepseek-model-name\n" > ~/.aider.conf
Restart Aider:
I restarted Aider with the specified model:
bash
Copy
aider --model deepseek-model-name
What I Need Help With:
I'm not sure if the ~/.aider.conf file is correctly configured.
I'm unsure if the environment variable is being picked up by Aider.
I need guidance on how to properly configure the DeepSeek API key in Aider
I need help editing the main model
Version and model info
Aider v0.69.1
Main model: gpt-4o-2024-08-06 with diff edit format
Weak model: gpt-4o-mini
Git repo: .git with 0 files
Repo-map: using 1024 tokens, auto refresh

I have DeepSeek as the default LLM (AIDER_DEEPSEEK=1 in .env). I have done nothing more than what is described here. Are you sure this is about deepseek? Your error message indicates a problem with OpenAI authentication (except it has a generalized meaning).

I have DeepSeek as the default LLM (AIDER_DEEPSEEK=1 in .env). I have done nothing more than what is described here. Are you sure this is about deepseek? Your error message indicates a problem with OpenAI authentication (except it has a generalized meaning).

Thank for your quick reply. I managed to resolve this issue today by running the code below in a new workspace. I was trying for 2 days to get this great tool working, I hope I won't have any issues in the near future. If someone needs help let me know.
python -m pip install -U aider-chat


Implement collect for int values

Not sure if this is related to #169.
Maybe I'm missing something, but I guess it'd be nice if the next code worked:
vec![1, 2, 3].iter().collect::<Int32Array>();

By the error I'm getting, I assume it's just not implemented. If you can confirm that this would be nice to add, I'm happy to give it a try (any hints welcome, I'm not very experienced with rust). This is the error:
$ cargo run
   Compiling arrow-examples v0.1.0 (/home/mgarcia/src/arrow-examples)
error[E0277]: the trait bound `arrow::array::array_primitive::NativeAdapter<Int32Type>: From<&{integer}>` is not satisfied
    --> src/main.rs:18:26
     |
18   |     vec![1, 2, 3].iter().collect::<Int32Array>()
     |                          ^^^^^^^ the trait `From<&{integer}>` is not implemented for `arrow::array::array_primitive::NativeAdapter<Int32Type>`
     |
     = help: the following other types implement trait `From<T>`:
               <arrow::array::array_primitive::NativeAdapter<Float16Type> as From<half::binary16::f16>>
               <arrow::array::array_primitive::NativeAdapter<Float32Type> as From<f32>>
               <arrow::array::array_primitive::NativeAdapter<Float64Type> as From<f64>>
               <arrow::array::array_primitive::NativeAdapter<Int16Type> as From<i16>>
               <arrow::array::array_primitive::NativeAdapter<Int32Type> as From<i32>>
               <arrow::array::array_primitive::NativeAdapter<Int64Type> as From<i64>>
               <arrow::array::array_primitive::NativeAdapter<Int8Type> as From<i8>>
               <arrow::array::array_primitive::NativeAdapter<T> as From<&Option<<T as ArrowPrimitiveType>::Native>>>
             and 5 others
     = note: required because of the requirements on the impl of `Into<arrow::array::array_primitive::NativeAdapter<Int32Type>>` for `&{integer}`
     = note: required because of the requirements on the impl of `FromIterator<&{integer}>` for `PrimitiveArray<Int32Type>`
note: required by a bound in `collect`
    --> /home/mgarcia/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1788:19
     |
1788 |     fn collect<B: FromIterator<Self::Item>>(self) -> B
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `arrow-examples` due to previous error

The following will work
vec![1, 2, 3].into_iter().collect::<Int32Array>();
vec![1, 2, 3].iter().copied().collect::<Int32Array>();

I think this could be extended to support &i32, etc... by defining From<&i32> for NativeAdapter<i32>. Is this what you're after, or are the above solutions sufficient?

Thanks a lot for the fast answer @tustvold . I think your first example is what I want. I'm not so familiar with iterators, and similar examples that I saw used iter, not into_iter. Let me research a bit to understand better, but it should be enough.

I had a look, and the code you shared works great for integer, but for a string array seems it fails:
vec!["foo", "bar", "foobar"].iter().collect::<StringArray>()

   Compiling arrow-cookbook v0.1.0 (/home/mgarcia/src/arrow-cookbook)
error[E0277]: a value of type `GenericStringArray<i32>` cannot be built from an iterator over elements of type `&str`
    --> src/create_arrays.rs:90:46
     |
90   |     vec!["foo", "bar", "foobar"].into_iter().collect::<StringArray>()
     |                                              ^^^^^^^ value of type `GenericStringArray<i32>` cannot be built from `std::iter::Iterator<Item=&str>`
     |
     = help: the trait `FromIterator<&str>` is not implemented for `GenericStringArray<i32>`
     = help: the following other types implement trait `FromIterator<A>`:
               <GenericStringArray<OffsetSize> as FromIterator<&'a Option<Ptr>>>
               <GenericStringArray<OffsetSize> as FromIterator<Option<Ptr>>>
note: required by a bound in `collect`
    --> /home/mgarcia/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1788:19
     |
1788 |     fn collect<B: FromIterator<Self::Item>>(self) -> B
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `arrow-cookbook` due to previous error

shell returned 101

Is this expected? Is there another syntax for this, or it just doesn't work for StringArray?
Thank you!

We've not implemented a NativeAdapter for StringArray yet, so you can only collect an iterator of Option<&str>
So
["A',"b"].into_iter().map(Some).collect::<StringArray>()

[Some("A'),Some("b")].into_iter().map(Some).collect::<StringArray>()

Alternatively you can use https://docs.rs/arrow/22.0.0/arrow/array/struct.GenericStringArray.html#method.from_iter_values

Ah, I see. Thanks a lot for the help. I may give it a try and see if I can implement it. Closing this issue.


Automatically scroll window to the bottom

Intro
I found this annoying issue using the plugin for writing a long RST text, so not esactly the usage for a development environment. Still, I'll try to report this.
Behavior
Every time you write an additional character inside the rst file window, the preview window is automatically refreshed (which is cool) but also scrolls to the top of the window. So, when you are writing something below the line, the auto-refresh become useless, and annoying.
Probably a better behavior would be to scroll to the bottom, as usually people write bottom-down.
Or even better: keep the focus onto the modified section (possible?)

I have this problem too, it diminishes the usefulness of the live-preview, when the preview is not where the newly written text is.

I'm thankful for this plugin for sure but I agree, this is a quirk that I would like very much to be fixed.


Change connection used on runtime

Hello !
I hope you can help me (us). I'm working on a API project which have two databases :
Production DB : api.myapp.fr
Testing DB : test.api.myapp.fr
Theses two databases are writable by the user.
When a user call our API, he can set the authorization header whichever he needs. For example :
Authorization: s_0

Will perform  operations on api.myapp.fr  and
Authorization: s_t_0

Will perform operations on  test.api.myapp.fr .
My question is : How can I do that with sails ?
Actually, I have a policie which check if the user is using a production key or a testing key, and I override the default models with the one for testings purposes, like this :
if (!is_production) {
   req.session.isProd = false;
   req.session.logs.environment = "test";

   User = UserTest;
   Payment = PaymentTest;
   PayzenStatus = PayzenStatusTest;
   Transaction = TransactionTest;
   Card = CardTest;
   Doc = DocTest;
}

But you can see the problem if a user makes a test request and then a production request, the models are still the tests ones...
If you have any idea on how ton achieve this (whatever the way, we can still perform deep changes in our code), I would be really happy to ear it.
Thanks

Hi @kai23, FYI this forum is for posting bugs in the Sails core.  In the future please post support queries to StackOverflow, our Google Group or our Gitter Chat.

You definitely don't want to be reassigning those global variables like `User`, as it will affect all subsequent requests.  One idea would be to assign the models to the `req` object itself, since by definition it only represents a single request.  So:
req.models = {};
// If not in production, use the test models
if (!is_production) {
    req.session.isProd = false;
    req.session.logs.environment = "test";

    req.models.User = UserTest;
    req.models.Payment = PaymentTest;
    req.models.PayzenStatus = PayzenStatusTest;
    req.models.Transaction = TransactionTest;
    req.models.Card = CardTest;
    req.models.Doc = DocTest;
}
// Otherwise use the production models
 else {
    req.models.User = User;
    req.models.Payment = Payment;
    req.models.PayzenStatus = PayzenStatus;
    req.models.Transaction = Transaction;
    req.models.Card = Card;
    req.models.Doc = Doc;
}

Then in your controller code, reference req.models.User instead of plain User.

http://stackoverflow.com/questions/28894661/change-connection-used-on-runtime


No code prompt in Xcode 10.2

I have same issues😭

I have same issues😭

I have same issues

+1

+10086

+1

+1

+1

Is this issue fixed in Xcode 11?

It has been confirmed that Xcode 11.0 beta (11M336w) fixes the issue. :smiley:

+1

It seems that it is fixed in Xcode 11.


Plotting at different saved times

OrdinaryDiffEq.jl provides a nice saveat kwarg to specify times at which to save solution snapshots. This seems like it would be useful for visualizing dynamic behavior or creating movies, but would require modification of current plot recipes.

We have to discuss what kind of approach to reach these times we want to use, see also https://github.com/trixi-framework/Trixi.jl/issues/769#issuecomment-899454244. The default of DiffEq is to interpolate (unless you also set tstops accordingly).

For callbacks, I think the specific approach matters more. However, for visualization, interpolation seems like it would be easier to implement and sufficiently accurate (given that our timesteps tend to be fairly small).

Well, a possible problem with interpolation might be to reach unphysical states (say, negative density) when using certain methods. Thus, one might wonder what the hell is going on when plotting this... Otherwise, I agree with you.

Right now, the save solution callback is basically an indirect visualization callback (via VTK). Thus, I think we should probably unify the handling of these two.

That's a good idea - thanks. I'll take a look at that callback.

Oh, I wasn't saying that this callback is good right now - in contrast, it only implements output based on a fixed step number frequency and shall be updated (https://github.com/trixi-framework/Trixi.jl/issues/19).

One thing to keep in mind: Using saveat means that we store the full solution state in RAM (which is feasible for appropriate scales). Thus, visualization using them is definitely possible (I did this in some presentations of Trixi.jl) but will not work with AMR (where we change the mesh). Thus, we should decide whether we want to use this approach or whether we would like to use a dedicated movie or continuous visualization callback, which processes the solution at desired times and saves the resulting visualization to disk without storing the numerical solution.

Ah, that's a really good point. I completely forgot that AMR would break this feature...

I guess the question would be whether or not we wish to standardize plotting features across solver types. We have a few solvers/meshes which don't yet support AMR (DGMulti, StructuredMesh2D, UnstructuredMesh2D), so we could potentially have a visualization feature which is specific only to certain solvers.
The downside is that even if documented, this would increase the mental burden for visualization to have to remember which solvers allow for what forms of visualization...

One other way around this might be plotting by specifying values of a solution array, e.g., something like plot(PlotData2D(u, semi)) where u is an array of solution values which is consistent with the underlying storage of the scheme.
Then, plotting a different solution at another saveat time would just require plot(PlotData2D(sol.u[index], semi)). What do you think of something like this, @ranocha?

We have a few solvers/meshes which don't yet support AMR (DGMulti, StructuredMesh2D, UnstructuredMesh2D), so we could potentially have a visualization feature which is specific only to certain solvers.

That's okay with me in general. However, I would of course prefer something that leaves the door open.

Then, plotting a different solution at another saveat time would just require plot(PlotData2D(sol.u[index], semi)). What do you think of something like this, @ranocha?

Don't we already allow something like this? At least I have used something like plot(ui, semi) for ui in sol.u.

This would also work for AMR if one could extract an array of the solution at different simulation times.

No, it doesn't, since we would need to also store the mesh at the same times.

Don't we already allow something like this? At least I have used something like plot(ui, semi) for ui in sol.u.

Interesting, I wasn't aware of a feature like this. Do you know if this is still available and, if so, where it's located?

An example is contained in https://nbviewer.jupyter.org/github/trixi-framework/talk-2021-juliacon/blob/main/demo.ipynb (directly before the heading https://nbviewer.jupyter.org/github/trixi-framework/talk-2021-juliacon/blob/main/demo.ipynb#Adaptive-mesh-refinement). It works due to recipes such as https://github.com/trixi-framework/Trixi.jl/blob/edfa693b4c2ee9c586a5483c105c0ca54443d3b9/src/visualization/recipes_plots.jl#L197. I don't remember whether we have something similar for the Makie recipes.

That's perfect - thanks! This should also work for Makie then through plot(PlotData2D(u, semi)).

Since the original idea would be inconsistent with AMR and since there's a pretty easy workaround, I'm closing this.

Let's re-open this and call it "movie callback"


bytenode child process fork with message passing not working

There are 2 bytenode executables - one is parent and another is child.
When parent is calling the child, the child process is getting started. However, the messages sent by the parent process are never received by the child.
For example, this is what I was trying:
parent.js
var path = require('path');
var cp = require('child_process');

var child = cp.fork(path.join(__dirname, './child.jsc'), {
    execPath: `bytenode`
});

child.send('Hello Child');

child.on('message', function (result) {
    console.log('Message from Child: ', result);
});

child.js
console.log('Child process started');

process.on('message', function (parentMessage) {
    console.log('Child process received message: ', parentMessage);
});

process.send('Hello from Child');

Appreciate your help.

This is due to how bytenode executable is implemented, which is based on spawning another process. So, when you use bytenode as the execPath, what happens is that bytenode is the real parent process. Also, due to how the procss.send function is implemented, you will end up with your situation.
The workaround is easy though, instead of using execPath: \bytenode``, use this instead:
var child = cp.fork(path.join(__dirname, './child.jsc'), {
  execArgv: ['-r', path.join(__dirname, 'node_modules', 'bytenode')]
});

That way, the node executable will be used as usual, but it will load bytenode before it execute your child.jsc.
Don't forget to install bytenode locally of course.
I tested your code and it worked with both Node v14 and v15. So I will close this issue as solved.
If you have any further question feel free to ask.

Thanks @OsamaAbbas for the help.
Awesome. It works. :)


Run at startup windows and minimize to system tray

Is it possible to add this feature?:
Run at startup windows and minimize to system tray

In order to get it to start with windows, place it in the directory below, just replace "Username" with your windows user name (obviously)
C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
I am unsure about how to get it to show up in system tray.


no notification update for each sources when soures shared same path

When there are 2 sources in the same notification path, updates are sent for only one source.
Step to reproduce
Run script:
while true; do
  echo "2017-04-15T15:21:00.280Z,7,65288,204,255,8,3b,9f,ff,01,13,01,00,00" | socketcan-writer vcan0;
  echo "2017-04-15T15:21:00.280Z,7,65288,205,255,8,3b,9f,ff,01,13,01,00,00" | socketcan-writer vcan0;
  sleep 5;
done

This generates the following path in the server:
/signalk/v1/api/vessels/self/notifications/autopilot/
{
 "PilotWatch": {
     "value": {
         "message": "Pilot Watch",
         "method": [
             "visual",
             "sound"
         ],
         "state": "alarm",
         "timestamp": "2020-03-20T20:11:38.706Z"
     },
     "$source": "vcan0.205",
     "timestamp": "2020-03-20T20:11:38.706Z",
     "pgn": 65288,
     "values": {
         "vcan0.205": {
             "value": {
                 "message": "Pilot Watch",
                 "method": [
                     "visual",
                     "sound"
                 ],
                 "state": "alarm",
                 "timestamp": "2020-03-20T20:11:38.706Z"
             },
             "pgn": 65288,
             "timestamp": "2020-03-20T20:11:38.706Z"
         },
         "vcan0.204": {
             "value": {
                 "message": "Pilot Watch",
                 "method": [
                     "visual",
                     "sound"
                 ],
                 "state": "alarm",
                 "timestamp": "2020-03-20T20:11:38.698Z"
             },
             "timestamp": "2020-03-20T20:11:38.698Z",
             "pgn": 65288
         }
     }
 }
}

But the updates are only sent for one source:
{
  "updates": [
    {
      "source": {
        "label": "vcan0",
        "type": "NMEA2000",
        "pgn": 65288,
        "src": "205"
      },
      "timestamp": "2020-03-20T20:15:59.763Z",
      "values": [
        {
          "path": "notifications.autopilot.PilotWatch",
          "value": {
            "message": "Pilot Watch",
            "method": [
              "visual",
              "sound"
            ],
            "state": "alarm",
            "timestamp": "2020-03-20T20:15:59.763Z"
          }
        }
      ],
      "$source": "vcan0.205"
    }
  ],
  "context": "vessels.urn:mrn:imo:mmsi:230035780"
}

closed via #981


Peer to Peer code reviews

Hello @netman5 !
Well done finishing your project 🎉.
To make your project more professional I recommend you have to stick the design as much as possible so please remove the home button.
But overall Great Job 👏 👏

Done thanks @selma-belhadj :+1:


Dynamic batch support

Machine Translation usually takes dynamically sized batch composed of X tokens instead of X sentences as training input. I'm wondering why deepspeed requires specifying train_batch_size and train_micro_batch_size_per_gpu, both of which refer to the number of samples. Is this a concern for implementation details? Or is it possible to support dynamic size as in the case of machine translation without extra cost of efficiency and memory usage?

The primary reason is to figure out the number of required gradient accumulation steps.


Should be able to click text case insensitive

Expected behavior
Click on text irrespective of the case
Actual behavior
Element selection fails when there is a change in case
Steps to reproduce
taiko.html
<html>
<body>
<form>
<button type="submit" style="text-transform: uppercase;">
          Iniciar sesión segura
        </button>
</form>
</body>
</html>

sample.js
const { openBrowser, goto, click, closeBrowser } = require('taiko');
(async () => {
    try {
        await openBrowser();
        await goto("file://.../taiko.html");
        await click("INICIAR SESIÓN SEGURA");
    } catch (e) {
        console.error(e);
    } finally {
        await closeBrowser();
    }
})();

Versions
works fine on 0.6.0 fails in master

This is happening because of the non-alphabetic character in the DOM which is not getting converted to lowercase by translate as it considers only alphabets currently.  Since chrome supports only xpath1.0 there is no cleaner way to support non-alphabetic characters to be matched case insensitive.
Was working earlier because we were doing toLowerCase() from javascript for user given text which will work only one way if the text in DOM is in upperCase this would fail hence that fix cannot be added.

Closing this as a Xpath 1.0 limitation


Run workflow with sample data on local machine

Hi,
I'm trying to run the workflow locally with wdl using the sample data provided however I run into errors (full error message log attached - msg_log.txt):
I ran:
java -jar /shared/aemurphy/cromwell/cromwell-83.jar run finemapping-pipeline/wdl/finemap.wdl --inputs finemapping-pipeline/wdl/finemap_inputs.json

and got:
[2022-08-16 14:57:41,48] [info] WorkflowManagerActor: Workflow fe1a47c3-db70-46b4-82f0-ccfcf076a738 failed (during ExecutingWorkflowState): java.lang.RuntimeException: Failed to evaluate 'finemap.phenos' (reason 1 of 1): Evaluating read_lines(phenolistfile) failed: java.lang.IllegalArgumentException: Could not build the path "gs://r7_data/finemap/demopheno/conf/extended_demopheno". It may refer to a filesystem not supported by this instance of Cromwell. Supported filesystems are: HTTP, LinuxFileSystem. Failures:
HTTP: gs://r7_data/finemap/demopheno/conf/extended_demopheno does not have an http or https scheme (IllegalArgumentException)

I also tried downloading the google storage data locally before running but I don't have access:
gsutil cp gs://r7_data/finemap/demopheno/conf/extended_demopheno .
AccessDeniedException: 403<EMAIL_ADDRESS>does not have storage.objects.list access to the Google Cloud Storage bucket.

I imagine there is a simple way around all this that I'm missing so any help would be great!
Cheers,
Alan.
Versions:
openjdk version "11.0.16"
cromwell-83

Hi Alan, thanks for reaching out. Unfortunately, gs://r7_data is our private bucket and we cannot grant access to users outside the FinnGen.
extended_demopheno is a plain text file, containing a list of phenotypes to fine-map (e.g., T2D). Please generate yours locally.
Best,
Masa

Hey Masa,
That makes sense thank you (and sorry on the delayed reply)! There are however some reference files stored on the private bucket that are listed:

finemap.ldstore_finemap.filter_and_summarize.snp_annot_file: gs://r7_data/annotations/R7_annotated_variants_v0.gz
finemap.ldstore_finemap.filter_and_summarize.snp_annot_file_tbi: gs://r7_data/annotations/R7_annotated_variants_v0.gz.tbi
finemap.ldstore_finemap.ldstore.sample: gs://r7_data/R7_321464_samples.sample
finemap.ldstore_finemap.ldstore.bgen_pattern: gs://r7_data/bgen/chrom/finngen_R7_{CHR}.bgen

Can these be shared or the code used to generate each? I want to make sure I follow the same procedure for this pipeline so having the exact same reference files would be paramount.
Thanks,
Alan.

Hi Alan,
Please find below for the file descriptions:

snp_annot_file: This is a large annotation file that we internally use for multiple purposes. In our fine-mapping pipeline, we essentially refer to only these two fields most_severe,gene_most_severe, which are based on VEP annotations. You can generate annotations of your own variants using existing databases (e.g., gnomAD or scripts (e.g., Hail).

Example lines of the annotation file should look like:
#variant        chr     pos     gene_most_severe        most_severe
1:13668:G:A     1       13668   DDX11L1 non_coding_transcript_exon_variant
1:14506:G:A     1       14506   WASH7P  splice_region_variant
1:14717:G:A     1       14717   WASH7P  intron_variant
1:14773:C:T     1       14773   WASH7P  intron_variant

snp_annot_file_tbi: This is a tabix index of the above file.
bgen_pattern and sample: These are private genotype bgen and sample files from FinnGen. Please use your cohort's genotype files.

Hope this helps!
Best,
Masa


[Bug report] Not able to update from Beta.54 to Beta.55

Description
Hi,
trying to update form .53 to .55 was not successfully, but using .54 is still working.

Regards
Holger
Reproduction
not available
Used Package Manager
npm
System Info
System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 8.05 GB / 15.95 GB
  Binaries:
    Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Utilities:
    Git: 2.35.1.
  Browsers:
    Chrome: 108.0.5359.99
    Edge: Spartan (44.22621.900.0), Chromium (108.0.1462.42)
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.55
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.55
    @vuepress/client:  2.0.0-beta.55
    @vuepress/core:  2.0.0-beta.55
    @vuepress/markdown:  2.0.0-beta.55
    @vuepress/plugin-active-header-links:  2.0.0-beta.55
    @vuepress/plugin-back-to-top:  2.0.0-beta.55
    @vuepress/plugin-container:  2.0.0-beta.55
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.55
    @vuepress/plugin-git:  2.0.0-beta.55
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.55
    @vuepress/plugin-nprogress:  2.0.0-beta.55
    @vuepress/plugin-palette:  2.0.0-beta.55
    @vuepress/plugin-prismjs:  2.0.0-beta.55
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: 2.0.0-beta.55 => 2.0.0-beta.55
    @vuepress/plugin-search: 2.0.0-beta.55 => 2.0.0-beta.55
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.55
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.55
    @vuepress/theme-default:  2.0.0-beta.55
    @vuepress/utils:  2.0.0-beta.55
    vue:  3.2.45
    vue-loader: Not Found
    vue-router:  4.1.6
    vuepress: 2.0.0-beta.55 => 2.0.0-beta.55
    vuepress-vite:  2.0.0-beta.55
    vuepress-webpack: Not Found

Reproduction repo please, if a new project works well, then there might be still some issues in your own project.

From the log you provides, I am not coming up with any ideas.

Maybe you need to clean the temp file (with --clean-temp).
BTW, beta.55 is deprecated because of some regressions. Sorry for that.


Circular and colliding gitdb

these derivations will be built:
  /nix/store/z7j9klg8g03jmblx6drcsdd3dilfy3py-python3-3.8.5-env.drv
building '/nix/store/z7j9klg8g03jmblx6drcsdd3dilfy3py-python3-3.8.5-env.drv'...
collision between `/nix/store/nwlzc2345clpbn0sa6imgnsaai21hq4b-python3.8-gitdb-4.0.5/lib/python3.8/site-packages/gitdb/stream.py' and `/nix/store/8lmbq8vj5gv3xqij1jprngz58n0prfj1-python3.8-gitdb2-3.0.1/lib/python3.8/site-packages/gitdb/stream.py'
builder for '/nix/store/z7j9klg8g03jmblx6drcsdd3dilfy3py-python3-3.8.5-env.drv' failed with exit code 25
error: build of '/nix/store/z7j9klg8g03jmblx6drcsdd3dilfy3py-python3-3.8.5-env.drv' failed

This shows up with:
let
   mach-nix = import (builtins.fetchGit {
     url = "https://github.com/DavHau/mach-nix/";
     ref = "refs/tags/2.2.2";
   }); #

in mach-nix.mkPython rec {
  python = mach-nix.nixpkgs.python38;
  requirements =  ''
    renku
  '';
}

The requirement depends on gitdb and gitdb2 at the same time.
renku - 0.11.1 - wheel
│
...
├── gitdb2 - 3.0.1 - wheel
│   └── smmap2 - 3.0.1 - wheel
│       └── smmap - 3.0.4 - wheel
├── gitpython - 3.1.0 - wheel
│   └── gitdb - 4.0.5 - wheel
│       └── smmap - 3.0.4 - wheel

Both gitdb and gitdb2 have the same import path. The same problem occurs with pip or other tools. They just silently ignore this problem. But still it is a problem and leads to unexpected behaviour.
This problem should be reported upstream at renku. They should add constraints to their requirements to prevent a result like this.
Nix allows you to ignore collisions for python via this override:
let
  mach-nix = import (builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix/";
    ref = "2.3.0";
  });
in (mach-nix.mkPython {
  requirements =''
    renku
  '';
}).override (oa: {ignoreCollisions = true;})

Thanks for reporting upstream as well! 👍🏾


Build ARM64 libraries (magicleap, raspi, arcore)

For support on these devices we need to build out our native dependencies on ARM64 Linux.
From here:

[x] native-audio-deps
[x] native-canvas-deps
[x] native-graphics-deps
[x] native-video-deps

Note that the OpenVR/OculusVR/other VR libs are not part of this, since these devices don't run them.

The only remaining one is Skia, which seems to depend on Android NDK to build standalone.

We have all of the libraries in https://github.com/webmixedreality/exokit/pull/274.


Implement take, drop, unfold, zip

#3

I think you still need to enable :set -XNoMonomorphismRestriction in the $setup to fix the build failure

Sounds good, done

Perfect!  Thank you for the contribution :)


Missing inferences with stratified negation

Nemo misses some inferences in certain programs with stratified negation. Here is a minimal example:
p1(a).
p1(b).
p2(a).

q1(?X) :- p1(?X).
q2(?X) :- p2(?X).

q(?X) :- q1(?X), ~q2(?X).

r(?X) :- q(?X).

The result correctly has q1(a), q1(b), q2(a), and q(b). However, r(b) is missing.

Interesting, the resulting stratification of this program is [[0, 1, 3], [2]], so the dependency between rule 2 and 3 is ignored for some reason.


Assign issues & PRs to Pulumiverse board

I added the Pulumiverse board as:

the assignees for newly created issues (via a Github Actions workflow)
the reviewers on Pull Requests (via CODEOWNERS file)

All of this to make triage of new issues/PRs more timely.

@simenandre I checked, but you can't use a team as the assignee for an issue.

I meant for CODEOWNERS :)

@simenandre fixed for CODEOWNERS.


Add Amazon object storage refresh worker class

Similar to https://github.com/ManageIQ/manageiq/pull/13457.
The new Amazon object storage refresh worker should be listed in monitored class names.
Depends on ManageIQ/manageiq-providers-amazon#106.
@miq-bot add_label providers/amazon, providers/storage, enhancement

@aiperon should be closed due to the combined PR related to the S3 changes https://github.com/ManageIQ/manageiq/pull/13580


Added support for 'y' with string data.

Previous version of CatBoostEncoder only works with numerical 'y', this update added support for string label for 'y'.

Awesome! A few notes:

It makes me nervous that some of the tests are failing (see the details from Travis). All unit tests in category_encoders\tests should pass on your computer.

When we are converting strings to numbers, we should possibly check whether there are exactly 2 unique values in y (and otherwise raise an error), because people may attempt to use this encoder on polynomial y, not realizing that it does not actually work properly.

We should add a new test into test_cat_boost.py, which tests the new support for the string y.

For ordinal encoding, we use the build in category_encoders.OrdinalEncoder instead of sklearn.preprocessing.LabelEncoder. After the switch, some of the errors will disappear (LabelEncoder is pickier about the format of the input).

I think that neither of the supervised encoders support multiclass labels because all supervised encoders always encode a single nominal feature into a single numerical feature.
To support multiclass labels, you have to first OneHotEncode the label to generate binary labels. And then apply supervised encoders on the nominal features one time for each binary class. I.e.: When you have 3 nominal features and 5 classes, you end up with 3*5=15 numerical features.
Note: I assume that we are encoding c classes into c columns. But it is actually ok to encode the label just into c-1 columns.

I have implemented a simple wrapper for supervised encoders, which adds support for multi-class problems.
Test it and let me know if it worked for you.
import copy
from category_encoders import utils
from sklearn.base import BaseEstimator, TransformerMixin
import category_encoders as encoders
import pandas as pd

# Multi-class wrapper: Extends supervised encoders to n-class labels, where n >= 2.
# The label can be numerical (e.g.: 0, 1, 2, 3,...,n), string or categorical (pandas.Categorical).
# Feature names are suffixed with underscore and the corresponding class name (edge scenarios like 'dog'+'cat_frog' vs. 'dog_cat'+'frog' are not handled).
class MultiClassWrapper(BaseEstimator, TransformerMixin):
    def __init__(self, feature_encoder):
        self.feature_encoder = feature_encoder
        self.feature_encoders = {}
        self.label_encoder = None

    def fit(self, X, y, **kwargs):
        # unite the input into pandas types
        X = utils.convert_input(X)
        y = utils.convert_input(y)
        y.columns = ['target']

        # apply one-hot-encoder on the label
        self.label_encoder = encoders.OneHotEncoder(handle_missing='error', handle_unknown='error', cols=['target'], drop_invariant=True)
        labels = self.label_encoder.fit_transform(y)
        labels.columns = [column[7:] for column in labels.columns]

        # train the feature encoders
        for class_name, label in labels.iteritems():
            self.feature_encoders[class_name] = copy.deepcopy(self.feature_encoder).fit(X, label)

    def transform(self, X):
        # unite the input into pandas types
        X = utils.convert_input(X)

        # transform the features
        features = pd.DataFrame()
        for class_name, feature_encoder in self.feature_encoders.items():
            df = feature_encoder.transform(X)
            df.columns = [str(column) + '_' + class_name for column in df.columns]
            features = pd.concat((features, df), axis=1)

        return features

    def fit_transform(self, X, y=None, **fit_params):
        # When we are training the feature encoders, we have to use fit_transform() method on the features.

        # unite the input into pandas types
        X = utils.convert_input(X)
        y = utils.convert_input(y)
        y.columns = ['target']

        # apply one-hot-encoder on the label
        self.label_encoder = encoders.OneHotEncoder(handle_missing='error', handle_unknown='error', cols=['target'], drop_invariant=True, use_cat_names=True)
        labels = self.label_encoder.fit_transform(y)
        labels.columns = [column[7:] for column in labels.columns]

        # fit_transform the feature encoders
        features = pd.DataFrame()
        for class_name, label in labels.iteritems():
            encoder = copy.deepcopy(self.feature_encoder)
            df = encoder.fit_transform(X, label)
            df.columns = [str(column) + '_' + class_name for column in df.columns]
            features = pd.concat((features, df), axis=1)
            self.feature_encoders[class_name] = encoder

        return features

Example usage:
    def test_fit(self):
        x = np.array([
            ['a', 'b', 'c'],
            ['a', 'b', 'c'],
            ['b', 'b', 'c'],
            ['b', 'b', 'b'],
            ['b', 'b', 'b'],
            ['a', 'b', 'a'],
        ])
        y = [1, 2, 3, 1, 2, 2]
        encoder = encoders.TargetEncoder()
        wrapper = MultiClassWrapper(encoder)

        wrapper.fit(x, y)
        result = wrapper.transform(x)
        print(result)

    def test_fit_transform(self):
        x = pd.DataFrame([
            ['a', 'b', 'c'],
            ['a', 'b', 'c'],
            ['b', 'b', 'c'],
            ['b', 'b', 'b'],
            ['b', 'b', 'b'],
            ['a', 'b', 'a'],
        ], columns=['f1', 'f2', 'f3'])
        y = ['bee', 'cat', 'dog', 'dog', 'dog', 'dog']
        encoder = encoders.TargetEncoder()
        wrapper = MultiClassWrapper(encoder)

        result = wrapper.fit_transform(x, y)
        print(result)

Thanks for writing the wrapper! I have tested it and found some bugs:

Inconsistencies with self.label_encoder,  where in fit_transform method, it has use_cat_names=True but not in transform method.
The fit_transform and transform method will return n copies of all features, for n is number of class labels, this includes non-categorical features, which is redundant.
Not really a bug, but the wrapper doesn't work optimally in binary class case (number of classes = 2). It will create 2 feature instead of just 1 feature for each categorical features, which is redundant.

I've fixed the issues listed above with the code provided below, here's the detail:

Both methods now uses use_cat_names=True. Fixes issue (1).
The fit_transform and transform method will only return n-1 copies of categorical features, for n is number of class labels. Numerical features is untouched. Fixes issue (2) and issue (3).

import copy
from category_encoders import utils
from sklearn.base import BaseEstimator, TransformerMixin
import category_encoders as encoders
import pandas as pd

# Multi-class wrapper: Extends supervised encoders to n-class labels, where n >= 2.
# The label can be numerical (e.g.: 0, 1, 2, 3,...,n), string or categorical (pandas.Categorical).
# Feature names are suffixed with underscore and the corresponding class name (edge scenarios like 'dog'+'cat_frog' vs. 'dog_cat'+'frog' are not handled).
class MultiClassWrapper(BaseEstimator, TransformerMixin):
    def __init__(self, feature_encoder):
        self.feature_encoder = feature_encoder
        self.feature_encoders = {}
        self.label_encoder = None

    def fit(self, X, y, **kwargs):
        # unite the input into pandas types
        X = utils.convert_input(X)
        y = utils.convert_input(y)
        y.columns = ['target']

        # apply one-hot-encoder on the label
        self.label_encoder = encoders.OneHotEncoder(handle_missing='error', handle_unknown='error', cols=['target'], drop_invariant=True, use_cat_names=True)
        labels = self.label_encoder.fit_transform(y)
        labels.columns = [column[7:] for column in labels.columns]

        self.n_classes = len(labels.columns)

        if self.n_classes > 2:
            # train the feature encoders
            for class_name, label in labels.iteritems():
                self.feature_encoders[class_name] = copy.deepcopy(self.feature_encoder).fit(X, label)
            # Remove last class to have a more compact encoding
            self.feature_encoders.pop(class_name)
        else:
            # binary class case
            self.feature_encoders = copy.deepcopy(self.feature_encoder).fit(X, y)

        return self

    def transform(self, X):
        # unite the input into pandas types
        X = utils.convert_input(X)

        if self.n_classes > 2:
            # transform the features
            features = pd.DataFrame()
            for class_name, feature_encoder in self.feature_encoders.items():
                df = feature_encoder.transform(X)
                # Select categorical features that are specified by encoder only
                new_feats = df[feature_encoder.cols]
                feat_names = [str(column) + '_' + class_name for column in df.columns if column in feature_encoder.cols]
                new_feats.columns = feat_names
                features = pd.concat((features, new_feats), axis=1)
            # Combine categorical and none categorical features as output
            features = pd.concat((df[df.columns[~df.columns.isin(feature_encoder.cols)]], features), axis=1)
        # binary class case
        else:
            features = self.feature_encoders.transform(X)

        return features

    def fit_transform(self, X, y=None, **fit_params):
        # When we are training the feature encoders, we have to use fit_transform() method on the features.

        # unite the input into pandas types
        X = utils.convert_input(X)
        y = utils.convert_input(y)
        y.columns = ['target']

        features = self.fit(X, y).transform(X)

        return features

    def test_fit(self):
        x = np.array([
            ['a', 'b', 'c'],
            ['a', 'b', 'c'],
            ['b', 'b', 'c'],
            ['b', 'b', 'b'],
            ['b', 'b', 'b'],
            ['a', 'b', 'a'],
        ])
        y = [1, 2, 3, 1, 2, 2]
        encoder = encoders.TargetEncoder()
        wrapper = MultiClassWrapper(encoder)

        wrapper.fit(x, y)
        result = wrapper.transform(x)
        print(result)

    def test_fit_transform(self):
        x = pd.DataFrame([
            ['a', 'b', 'c'],
            ['a', 'b', 'c'],
            ['b', 'b', 'c'],
            ['b', 'b', 'b'],
            ['b', 'b', 'b'],
            ['a', 'b', 'a'],
        ], columns=['f1', 'f2', 'f3'])
        y = ['bee', 'cat', 'dog', 'dog', 'dog', 'dog']
        encoder = encoders.TargetEncoder()
        wrapper = MultiClassWrapper(encoder)

        result = wrapper.fit_transform(x, y)
        print(result)

Good points. I have uploaded the code into the master branch.
Notes:

I am removing the single class before fitting the encoders (i.e. as soon as possible).
It is necessary to respect that fit_transform(x, y) behaves differently than fit(x, y).transform(x) in encoders like LeaveOneOut or CatBoostEncoder.
I did not incorporate a special path for binary case because I am leaving it up to the wrapper to deal with string labels.

Few questions:

I am removing the single class before fitting the encoders (i.e. as soon as possible).

What do you mean?

It is necessary to respect that fit_transform(x, y) behaves differently than fit(x, y).transform(x) in encoders like LeaveOneOut or CatBoostEncoder.

Care to explain why? I get the same output from fit_transform(x, y) and fit(x, y).transform(x) , I think I'm missing something here.

I did not incorporate a special path for binary case because I am leaving it up to the wrapper to deal with string labels.

If I understand correctly, you're making the wrapper to handle string labels? But if so, what does it had to do with the binary case?

I am removing the single class before fitting the encoders (i.e. as soon as possible).

What do you mean?

In the proposal, we first fit n encoders and then remove one of them:
         # train the feature encoders
         for class_name, label in labels.iteritems():
            self.feature_encoders[class_name] = copy.deepcopy(self.feature_encoder).fit(X, label)

         # remove last class to have a more compact encoding
         self.feature_encoders.pop(class_name)

Instead of that, we can first remove one class and only then train n-1 encoders:
        # drop one label
        labels = labels.iloc[:, 1:]

        # train the feature encoders
        for class_name, label in labels.iteritems():
            self.feature_encoders[class_name] = copy.deepcopy(self.feature_encoder).fit(X, label)

It should be a tiny bit faster this way.

It is necessary to respect that fit_transform(x, y) behaves differently than fit(x, y).transform(x) in encoders like LeaveOneOut or CatBoostEncoder.

Care to explain why? I get the same output from fit_transform(x, y) and fit(x, y).transform(x) , I think I'm missing something here.

That is suspicious. When I run test test_transform_only_selected(self) in category_encoders/tests/test_wrapper.py in the master branch, I actually assert that the results are different. I am getting different result1 and result2 for both, LeaveOneOut and CatBoostEncoder.
A blog post about the differences for LeaveOneOut. For training data, we should always use fit_transform(x, y), which uses the longer equation. For testing data, we should always use transform(x), which uses the shorter equation.

I did not incorporate a special path for binary case because I am leaving it up to the wrapper to deal with string labels.

If I understand correctly, you're making the wrapper to handle string labels? But if so, what does it had to do with the binary case?

Currently, the wrapper in the master branch unnecessarily encodes the label even when the label consists only of {0,1}. Your proposal takes care of that. On the other hand, when the label consists of {'a', 'b'}, the proposal crashes.
I was feeling too lazy to cover just {0,1} scenario, since if you are after speed, then in this special case, you do not need to use the wrapper at all...


can't run listen onStartusChange in Workmanager

Hi, can i use instance under an isolate in workmanager. It works fine when running in the app’s main class or on the main thread, but because of certain tasks I’m trying to run in the background, I’m wondering if it's feasible to execute it under workmanager. Is that possible? I'm new with this.
Thank you
it look like that
case internetCheckingTaskKey:
            if (inputData == null) {
              break;
            }

            final startCheck = inputData['turnOn'] as bool;
            if(startCheck){

            //This not run
              InternetConnectionChecker.instance.onStatusChange.listen(
                    (InternetConnectionStatus status) {
                  debugPrint('test : $status');
                },
              )
            } else {
              InternetCheckerService.instance.stopCheckingInternet();
              IsolateNameServer.lookupPortByName(internetCheckingChannel)
                  .let((sendPort) {
                sendPort?.send({
                  'isChecking': false,
                });
              });
            }

            break;

Well, I ran it in another place in isolate and it was successful, that's because I used it wrong, I shouldn't have put it in the worker.