Fixes NullReferenceException that is thrown in Full Screen mode startup.

In Full Screen mode, FullScreenPropertyChanged fires before HamburgerBackground brush is initialized, and fails with System.NullReferenceException at L432 of HamburgerMenu.xaml.cs. This PR sets the null initial values to default brush values for the Dark Theme.
Note the non-null value is non persistent -- only to avoid NullReferenceException and doesn't matter what value;the usual theme setting follows for persisting brush values.
Perhaps a good idea to set all the brushes to their default non-null values? For now, it's only FullScreenPropertyChanged that needs fixing.

Or set HamburgerMenu.AccentColor's default to something (e,g. Application.Current.Resources["SystemAccentColor"]) with call of RefreshStyles in ctor.

It is not important what value you set it to as long as it's non-null as this value is not persistent.
The [dev] theme setting comes just after FullScreenPropertyChanged-> UpdateFullScreen() is done.
... bit intrigued by the above suggestion though -- you're sending back dev XAML resources back into HamburgerMenu code ?

SystemAccentColor is not usually defined by a developer. And yes, I'm not sure at all that it's good (that's why I didn't submit PR).
I think that if you define HamburgerBackground (or better AccentColor) in App.xml (or in a merged resource) or locally at HamburgerMenu you should not get the error.

I have defined HamburgerBackground (which you want to do after Loaded event) but FullScreenPropertyChanged comes too soon. It's a matter of timing not for lack of definition. For instance, if FullScreenPropertyChanged  is delayed it will work. But why bother with timing at all when the culprit null can be avoided?

There are more commits around the feature of full screen, then I think anything else in this entire library. Hopefully this will put this feature to bed.

I think that setting default value for AccentColor is better than doing it for HamburgerBackground/Foreground etc., because these colors are set in RefreshStyles (depending on AccentColor). In such way we'll have a good looking menu out of the box, without applying any local style to the app's menu (which is the case with BottomAppBar sample), instead of menu with visible only a button.
And about the null reference exception, it's enough to check if HamburgerBackground is null before setting its Opacity (in UpdateFullScreen):
if (HamburgerBackground != null) HamburgerBackground.Opacity = opacity;


Submenu category selection does not work in mobile

Hi,
This was written with reference to #1522.
Project owner have fixed the original feedback with an enhancement to allow menu items with sub-items to be selected. This was tested and works on a desktop browser.
However this problem still exists when the same test page is accessed via mobile browser, chrome in this case.
My guess is that a particular event.preventDefault() code in dropdown.js is preventing the enhancement from working. Wonder if any fixes is possible for this? Thanks.

I understand that there is some complexity to this issue due to mobile not having a "hover" event. Thus touches on the menu item is translated to hover event in order to open up the sub-menu.
Just a suggestion, while in mobile, maybe allow selection of the category by tapping on the menu item text. While allow expansion of sub-menu items through tapping on the dropdown icon.
Something like this, which is how Google Drive works now.


Feature: Handling structs and maps

This library is very good at making one off validations for most types but the documentation does not present a very easy way to pass multiple options without repeatedly passing in the same variable/value. This will make it easier to implement validations for structs and maps.

This library is very good at making one off validations for most types but the documentation does not present a very easy way to pass multiple options without repeatedly passing in the same variable/value. This will make it easier to implement validations for structs and maps.

What do you have in mind for this?

This library is very good at making one off validations for most types but the documentation does not present a very easy way to pass multiple options without repeatedly passing in the same variable/value. This will make it easier to implement validations for structs and maps.

I can think of a few different ways.

Pass a struct into a validator

Pass Struct Validators (Different validators) into the validator to check the fields
Check struct by name using reflection
Slower runtime

Pass struct values into each validator (current implementation)
Implement your validators for your custom structs (Can be extended based on use case)

func ValidateStruct(value YourStruct) ttypes.Validator {
    return func() error {
        // Add checks here and return errors that you want
    }
}

Number 1 has a runtime speed tradeoff for convenience while being more error-prone to implement.
Number 2 is when the validation is 1 off for the struct, which should not be too much of an issue.
Number 3 is the way to go if you have some custom use case that requires validating a particular struct a lot.
Once you have implemented your validator, you can use it together with the validators defined in this project.

Are you looking for something like this?
a := "b"
ValidateValue(a).WithValidator(
    options.IsNotEmpty,
    options.IsLength(10),
)

That approach is something I was looking for I do agree with your points I just think that there should be a way to implement something similar to zod's validation without needing to much reflection. Maybe instead of making a generic function that handles every possible value type that could be passed (like what ozzo-validation does). You can streamline the validation to be more type specific which should slow down runtime as much since only a little to no reflection is needed.
Example:
a := "b"
err := ValidateString(a).IsNotEmpty().IsLength(10).validate()

This might help improve convenience while not slowing down runtime by a considerable margin

That approach is something I was looking for. I do agree with the points you made, I just think that there should be a way to implement something similar to zod's validation without requiring as much reflection as ozzo-validation. Maybe instead of a generic function that handles every possible value type that could be passed. You can streamline the validation to be more type specific which should not slow down runtime as much, since only a little to no reflection is required. Example:
a := "b"
c := 1
err :=Validator(
    ValidateString(a).IsNotEmpty().IsLength(10),
    ValidateInt(b).Min(-1).Max(3)
).validate()

// or
msg := "hello"
err := ValidateString(msg).IsNotEmpty().Contains("hello").validate()

This might help improve convenience while not slowing down runtime by a considerable margin

I've added a slightly different version of what is mentioned here.
Please let me know what you think 👍

This is a more convenient version and I feel like this is the right direction for this library!

This is a more convenient version and I feel like this is the right direction for this library!

I've started on another repo which aims to be a go port of zod using reflection.
https://github.com/Jh123x/go-zod
It uses reflection which may lead to slower code.


Remove style prop from ToggleSettingOptionRow

@hayata-suenaga @trjExpensify @Expensify/design
Details

Fixed Issues

$ https://github.com/Expensify/App/issues/42309
PROPOSAL:
Tests

Go to workspace > Categories
Click on Settings
Verify that the switch label is not in bold
Go to workspace > Workflows
Verify that switch labels are not in bold
Go to workspace > More features
Verify that switch labels are not in bold

[X] Verify that no errors appear in the JS console

Offline tests

Same as Tests
QA Steps

Same as Tests

[X] Verify that no errors appear in the JS console

PR Author Checklist

[X] I linked the correct issue in the ### Fixed Issues section above
[X] I wrote clear testing steps that cover the changes made in this PR

[X] I added steps for local testing in the Tests section
[X] I added steps for the expected offline behavior in the Offline steps section
[X] I added steps for Staging and/or Production testing in the QA steps section
[X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[X] I included screenshots or videos for tests on all platforms
[X] I ran the tests on all platforms & verified they passed on:

[X] Android: Native
[X] Android: mWeb Chrome
[X] iOS: Native
[X] iOS: mWeb Safari
[X] MacOS: Chrome / Safari
[X] MacOS: Desktop

[X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[X] I followed proper code patterns (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[X] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I followed the guidelines as stated in the Review Guidelines
[X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] I verified that if a function's arguments changed that all usages have also been updated correctly
[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[X] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[X] I verified that all the inputs inside a form are aligned with each other.
[X] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

Networking issue

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

Design-wise this looks good to me

Straight styles changes, shouldn't require C+ review

checking if we can merge this PR (internal link)

confirmed that we can merge the PR 😄

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.77-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

I think this might have caused a regression... for these toggle switches for our features, we didn't want to remove the bold text:

This is what it should look like:

All good, but let's confirm with @Expensify/design - maybe we want to keep it as-is 🤣

Haha, I don't mind it at all. Maybe the bolded features is a little more scannable though?

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

ah sorry I didn't realized that I also changed toggle texts on the cards.
If we want to change that, I can also raise a RP 😄

I think I lean towards bringing the bold text back just for these feature toggles. @Expensify/design any one feel strongly for or against?

Don't feel strongly, let's bring 'em back!

https://github.com/Expensify/App/issues/42998

I think I lean towards bringing the bold text back just for these feature toggles. @Expensify/design any one feel strongly for or against?

I'm okay with that. Most of the workspace edit sub screens uses bold, so it feels weird without it

Yeah I'm for bringing back the bold text on these ones. They feel different than our regular toggle switch rows, and because some of them have fields that appear beneath them once you enable them, the bold helps them stand out at the top level.

We brought the bold styling back to the switch texts on the card in this PR 😄


[v2] basic action layer

Hi, I'm wondering where this is documented?

Hello @chcokr. Right here for higher-order pattern. The same explanation also exists for other patterns.

As for hot-reload, just using react-transform should work without further ado.


Fix: prevent accumulation of SelectFields in PyTorchPredictor

Issue #, if available: #2947
Description of changes: Have simple check to not accumulate the same field names, resulting in a RecursionError.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Please tag this pr with at least one of these labels to make our release process faster: bug fix
@abdulfatir @lostella Please review as this relates to changes you (co-)authored

@Cameronwood611 thanks for this; it seems like this fix is breaking the behaviour of models, so I'm not sure it's the right way to go. Is there any way you could share the model you're using for #2947, for debugging purposes? Or even a simpler, smaller dummy model that just runs into the issue. What kind of model are we talking about?

@Cameronwood611 thanks for this; it seems like this fix is breaking the behaviour of models, so I'm not sure it's the right way to go. Is there any way you could share the model you're using for #2947, for debugging purposes? Or even a simpler, smaller dummy model that just runs into the issue. What kind of model are we talking about?

Yes! I updated the issue linked but I'll also post the example here --sorry about that. I noticed I had to raise the for loop above 1000 iterations (around the default recursion depth) for it to break; not sure if that's related to loading vs not loading the model. I'm not sure of the side effects this change has but maybe we could look into a certain filter or adding SelectFields into a set? Would be willing to help with this effort.
import random
import numpy as np
import pandas as pd
from gluonts.torch import PyTorchPredictor
from gluonts.dataset.common import ListDataset, DataEntry
from gluonts.torch import TemporalFusionTransformerEstimator

estimator = TemporalFusionTransformerEstimator(
freq='S',
context_length=10,
prediction_length=5,
trainer_kwargs={'max_epochs': 5}
)
train = ListDataset([{'target': np.array([random.uniform(-1, 1) for _ in range(50)]), 'start': pd.Period('01-01-2023', freq='S')} for _ in range(20)], freq='S')

pred = ListDataset([{'target': np.array([random.uniform(-1, 1) for _ in range(50)]), 'start': pd.Period('01-01-2023', freq='S')} for _ in range(20)], freq='S')
model = estimator.train(train, pred)

x, y, z = np.array([x for x in range(10)]), np.array([y for y in range (10)]), np.array([z for z in range(10)]) #for example
start = pd.Period('01-01-2023', freq='S')
_input = ListDataset([{'target': x, 'start': start},
                          {'target': y, 'start': start},
                          {'target': z, 'start': start}], freq='S')
for i in range(5000):
    pred = model.predict(_input)
    output = [sig.mean for sig in pred]  #this calls on a generator which causes the recursion error

@Cameronwood611 thanks for the bug hunting and the fix, if you update it as suggested then it should work fine, and we'll backport it and release it soon

Thank you!


Revert "flare ghetto chem chemicals"

Reverts space-wizards/space-station-14#24407
Guidebook needs fixing stop breakin CI.

what i didnt even make a guidebook entry

what i didnt even make a guidebook entry

Reagens make them, https://github.com/space-wizards/space-station-14/pull/24427 might fix it.

lives spared CI is passing.


ENYO-1160: Shadows Pointer Tip of ContextualPopup is Truncated

Issue:
The shadow pointer tip in contextual popup is found truncated in both dark and light css theme. The issue caused by the improper usage of tip height and width css property.
Fix:
The height and width css property of contextual popup tip made 0 to get the proper triangle share. The margin css properties of the tip also changed to accommodate the new change.
DCO-1.1-Signed-Off-By: Anish TD<EMAIL_ADDRESS>

Master PR not required


Users first and last name is editable in dojo page.

Expanded the form on the dojo page so users can change their first and last name along with their bio.

@MVanderwood @bkellgren
This only updates the mentor model. We need it to update the CDCUser model as well. We use the User model first/last name for emails and other things.
To make things cleaner, I think the mentor/guardian model shouldn't have first/last name fields as they are in the CDCUser model.
Thoughts?

#360 should fix this.

Duplicated by #237


Failed to get resource endpoints: Not Found

Describe the bug

Steps to reproduce

Go to resource details page.
Check the endpoints.

Result

Returned an error.

Expected behavior

Environment

Walrus version: main 942e758b93603e9ad40f9da90260c30af5ea350b
UI version: dev-b511a81

Additional context
Add any other context about the problem here.

Environment

Walrus version: main 8ff16bfe4326036642753b1ba895fa5b0e3b1791
UI version: dev-567aeb4

Test Result: pass


Default httpApi payload to 2.0

Description
Change the default httpApi payload to 2.0
If payload is not provided it is now assumed to be 2.0 (serverless 2.0 default)
Motivation and Context
Version 2.0 of serverless changed the default httpApi payload to 2.0: [Changelog: https://github.com/serverless/serverless/compare/v1.83.0...v2.0.0]
This change adjusts the default to match the serverless default.
How Has This Been Tested?
Tested with serverless 2.11.0 and serverless-offline 6.8.0

haha woops!! silly github forked your fork instead of the original branch, sorry!!!


why both in the main thread

why

I'm not sure I understand the question?

Ah. It's mostly because I'm lazy and multithreading is hard 😉
Few.swift was/is mostly a proof of concept. So I did just enough to convince myself it'd work.


Broken Windows integration suite: workspace-namespace

There are three failing integration tests on Windows.
https://vscode.visualstudio.com/VS Code/_build/index?buildId=14&_a=summary
I'm not sure who owns this, so please just forward to the right person, if it isn't you.
They all seem to be coming from this exception: https://github.com/Microsoft/vscode/commit/bca16d831e53c7966d821cc33f72b7b5c3f7b472 cc @jrieken
2018-05-02T19:06:33.4399371Z   1) workspace-namespace openTextDocument, untitled is dirty:
2018-05-02T19:06:33.4399844Z      Error: cannot open untitled:d%3A%5Ca%5C1%5Cs%5Cextensions%5Cvscode-api-tests%5CtestWorkspace%5Cnewfile.txt. Detail: Files above 50MB cannot be synchronized with extensions.
2018-05-02T19:06:33.4400507Z       at file:///D:/a/1/s/out/vs/workbench/api/electron-browser/mainThreadDocuments.js:158:60
2018-05-02T19:06:33.4400944Z       at Object.notifySuccess [as _notify] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1185:59)
2018-05-02T19:06:33.4401384Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:867:30)
2018-05-02T19:06:33.4401804Z       at _Base.Class.derive._creator._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4402265Z       at _Base.Class.derive._creator._completed (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1051:18)
2018-05-02T19:06:33.4402723Z       at CompletePromise_ctor.CompletePromise_then [as then] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1581:49)
2018-05-02T19:06:33.4403137Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:762:28)
2018-05-02T19:06:33.4403718Z       at _Base.Class.derive._creator._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4404148Z       at _Base.Class.derive._creator._setCompleteValue (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1067:18)
2018-05-02T19:06:33.4404559Z       at Object.notifyError [as _notify] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1224:32)
2018-05-02T19:06:33.4404957Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:916:30)
2018-05-02T19:06:33.4405343Z       at Promise_ctor._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4405881Z       at Promise_ctor._error (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1056:18)
2018-05-02T19:06:33.4406255Z       at file:///D:/a/1/s/out/vs/base/common/async.js:612:135
2018-05-02T19:06:33.4406600Z       at file:///D:/a/1/s/out/vs/base/node/extfs.js:37:32
2018-05-02T19:06:33.4406933Z       at D:\a\1\s\node_modules\graceful-fs\polyfills.js:284:29
2018-05-02T19:06:33.4407281Z       at FSReqWrap.oncomplete (original-fs.js:114:15)
2018-05-02T19:06:33.4407579Z
2018-05-02T19:06:33.4407890Z   2) workspace-namespace openTextDocument, untitled closes on save:
2018-05-02T19:06:33.4408366Z      Error: cannot open untitled:d%3A%5Ca%5C1%5Cs%5Cextensions%5Cvscode-api-tests%5CtestWorkspace%5Cnewfile.txt. Detail: Files above 50MB cannot be synchronized with extensions.
2018-05-02T19:06:33.4408837Z       at file:///D:/a/1/s/out/vs/workbench/api/electron-browser/mainThreadDocuments.js:158:60
2018-05-02T19:06:33.4409252Z       at Object.notifySuccess [as _notify] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1185:59)
2018-05-02T19:06:33.4409669Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:867:30)
2018-05-02T19:06:33.4410403Z       at _Base.Class.derive._creator._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4410849Z       at _Base.Class.derive._creator._completed (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1051:18)
2018-05-02T19:06:33.4412345Z       at CompletePromise_ctor.CompletePromise_then [as then] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1581:49)
2018-05-02T19:06:33.4412817Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:762:28)
2018-05-02T19:06:33.4413230Z       at _Base.Class.derive._creator._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4413677Z       at _Base.Class.derive._creator._setCompleteValue (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1067:18)
2018-05-02T19:06:33.4414120Z       at Object.notifyError [as _notify] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1224:32)
2018-05-02T19:06:33.4414700Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:916:30)
2018-05-02T19:06:33.4415090Z       at Promise_ctor._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4415483Z       at Promise_ctor._error (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1056:18)
2018-05-02T19:06:33.4415837Z       at file:///D:/a/1/s/out/vs/base/common/async.js:612:135
2018-05-02T19:06:33.4416182Z       at file:///D:/a/1/s/out/vs/base/node/extfs.js:37:32
2018-05-02T19:06:33.4416517Z       at D:\a\1\s\node_modules\graceful-fs\polyfills.js:284:29
2018-05-02T19:06:33.4416864Z       at FSReqWrap.oncomplete (original-fs.js:114:15)
2018-05-02T19:06:33.4417057Z
2018-05-02T19:06:33.4417310Z   3) workspace-namespace applyEdit:
2018-05-02T19:06:33.4417756Z      Error: cannot open untitled:d%3A%5Ca%5C1%5Cs%5Cextensions%5Cvscode-api-tests%5CtestWorkspace%5Cnew2.txt. Detail: Files above 50MB cannot be synchronized with extensions.
2018-05-02T19:06:33.4418259Z       at file:///D:/a/1/s/out/vs/workbench/api/electron-browser/mainThreadDocuments.js:158:60
2018-05-02T19:06:33.4418652Z       at Object.notifySuccess [as _notify] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1185:59)
2018-05-02T19:06:33.4419048Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:867:30)
2018-05-02T19:06:33.4419447Z       at _Base.Class.derive._creator._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4420035Z       at _Base.Class.derive._creator._completed (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1051:18)
2018-05-02T19:06:33.4420650Z       at CompletePromise_ctor.CompletePromise_then [as then] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1581:49)
2018-05-02T19:06:33.4421086Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:762:28)
2018-05-02T19:06:33.4421666Z       at _Base.Class.derive._creator._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4422313Z       at _Base.Class.derive._creator._setCompleteValue (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1067:18)
2018-05-02T19:06:33.4422753Z       at Object.notifyError [as _notify] (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1224:32)
2018-05-02T19:06:33.4423146Z       at Object.enter (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:916:30)
2018-05-02T19:06:33.4423707Z       at Promise_ctor._run (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1083:29)
2018-05-02T19:06:33.4424102Z       at Promise_ctor._error (file:///D:/a/1/s/out/vs/base/common/winjs.base.js:1056:18)
2018-05-02T19:06:33.4424453Z       at file:///D:/a/1/s/out/vs/base/common/async.js:612:135
2018-05-02T19:06:33.4424796Z       at file:///D:/a/1/s/out/vs/base/node/extfs.js:37:32
2018-05-02T19:06:33.4425147Z       at D:\a\1\s\node_modules\graceful-fs\polyfills.js:284:29
2018-05-02T19:06:33.4425475Z       at FSReqWrap.oncomplete (original-fs.js:114:15)

@alexandrudima

I'm sorry guys, but I had to comment out those tests, in order to get a green build.
I noticed also many tests in that file are commented out... does this test suite need a quick refresh?

Problem is that we don't allow relative file-uris anymore and that, internally, in order to get an untitled file with path we need a file-uris. I have changed that in the untitled-editor service (fyi @bpasero) with a flag to indicate that the path of the uri should be trusted.


Make folder of Performance can be specified by argument

#11978

Can one of the admins verify this patch?

alluxio-bot, merge this please

alluxio-bot, cherry-pick this to branch-2.4 please


[stable/postgresql] use recommended labels

What this PR does / why we need it:
Use recommended k8s labels
https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels
https://github.com/helm/helm/blob/master/docs/chart_best_practices/labels.md
Checklist

[x] DCO signed
[x] Chart Version bumped
[x] Labels updated by recommended ones
[x] template function replaced by include

As usual, I would recommend not to do a breaking change if the only goal is to update to recommended labels.
Do not misunderstand me: the change is interesting but we should keep breaking changes amount at a vital minimum in order not to break production deployments very month.
Maybe we should wait for another breaking change to pack them together. What do you think?


[CI] Disable test_ios_e2e and test_js_e2e tests

Disables the test_ios_e2e and test_js_e2e tests temporarily until the regression introduced in https://github.com/facebook/react-native/pull/25190 is fixed. A fix has been identified and proposed at https://github.com/facebook/jest/pull/8558.
We can re-enable these once a release of Jest with a patched jest-haste-map is available.

The Jest PR got merged, I'll land the CLI upgrade that will fix CI.

Even with the latest CLI upgrade, we are now running into issues on CI about the amount of files we are opening: https://github.com/facebook/react-native/pull/25241#issuecomment-501634553
We are trying to resolve it but if we can't today, please feel free to reopen and merge this PR.

Landing https://github.com/facebook/react-native/pull/25257 which should fix CI. Thank you @thymikee.

Thanks @thymikee and @cpojer!


Cargo Features to slim down transitive dependencies for simpler cases

(from https://pact-foundation.slack.com/archives/CA2S7E6KC/p1686600740215599)
Has there ever been any discussion whether it would be desirable/feasible to slim down the transitive dependencies of the Pact crates for simpler use cases?
I find myself reluctant to add Pact right now to the main project workspace as the deps added to the Cargo.lock dwarf the (admittedly simple) set that are currently used in my Axum / JSON Rest service. I wonder if I’m missing the intended usage pattern?
See the attached graph from the pact_consumer crate cargo depgraph --root pact_consumer --build-deps --filter-platform x86_64-unknown-linux-gnu --dedup-transitive-deps | dot -Tpng > pact_consumer_graph.svg

pact_consumer 1.0.2 now has a number of features to remove functionality and associated dependencies.

Thanks for this, it's looking really promising.
I get an error with:
pact_consumer = { version = "=1.0.2", default-features = false }

error[E0432]: unresolved import `pact_models::time_utils`
 --> /Users/xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pact_consumer-1.0.2/src/patterns/date_time.rs:7:18
  |
7 | use pact_models::time_utils::parse_pattern;
  |                  ^^^^^^^^^^ could not find `time_utils` in `pact_models`

Works fine with
pact_consumer = { version = "=1.0.2", default-features = false, features = ["datetime"] }

but that of course pulls in a few extra crates once more.

So sorry, I don't know how I missed that. Try 1.0.3

1.0.3 works great - on my test Axum project running cargo clean && cargo test --timings before and after these changes gives:
Total Units: 391 > 263 - 33% reduction
Total Time: 76 > 56s - 26% reduction
Thanks!


Dvv drupal 9 upgrade

Upgrades site to Drupal 9
Upgrades site to PHP 7.4
Upadates several modules with version upgrades or code changes for D9 compatibility
Forks nodeorder module as a custom module due to deployment/patching issues
Installs SecKit for additional security headers

Note:

Re-runs some update hooks in post-install command "drush-updb-fix" - this needs to be reverted in next deployment

Known issues:

purge_users module has some mismatching parameters that are logged on cron runs. It is suggested that this will be fixed later as a separate issues as PR includes security updates and it is recommended to proceed.

drush updb seems to fail:
`>  [error]  Exception thrown while performing a schema update. Cannot rename 'tmp_e70c43groups_revision' to 'groups_revision': table 'groups_revision' already exists.

[error]  Update failed: group_post_update_make_group_revisionable
[error]  Update aborted by: group_post_update_make_group_revisionable
[error]  Finished performing updates. `

Merged to another branch


Return status if cell number is invalid

Is there a way to return a status when the message was not sent? For example, the mobile number does not exist or is invalid or not a valid whatsapp number.
Thanks

.

I dont think so that this is possible because there is no way you can determine wether a message has been sent or not. It would have been possible if there was an API. But i am not sure about this.

I can create a flask API for that, only problem is that I don't have any spare numbers. Let's see what can be done.

WhatsApp web shows this if the specified number is not found.

So there must be a way to determine that this box popped up or not.

WhatsApp web shows this if the specified number is not found.

So there must be a way to determine that this box popped up or not.

Yes, we can simply call the source of the page page when there is this pop up and we can simply check if the source code contains "Phone number shared by url...". Only way of doing this is to use selenium and whatsapp doesn't allow this either so I need to keep it as a separate project so in case someone report it, I won't have to remove pywhatkit.

Oh I see. Let's see if there is any other way because i can't find anything related to this.

I believe that this functionality would be very beneficial, as it would avoid not sending it due to human error, for example.

@obinakiller Yes it would be beneficial. We are looking for a safe way to implement this.

maybe we can take a screenshot at the time for sending message and use opencv for text recognition

https://nanonets.com/blog/ocr-with-tesseract/ but it would take extra libraries

I don't think so using OCR would be an efficient way to do this.

so, any updates about this? i'm having the same issue using pywhatkit and couldn't find any way to resolve it


Hyperlink broken

This is a...

[ ] Feature Request
[x] Bug Report

Problem:
On page - https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/
the spec format for a Deployment object can be found here
points to https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentspec-v1-apps
This url does not works.
Proposed Solution:
Fix hyperlink - https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentspec-v1-apps
Page to Update:
https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/

@mohi048 thank you for raising the issue.
i think this is all caused by https://github.com/kubernetes/website/issues/13396 which should be fixed shortly

Should have been fixed. Closing.


Credentials file download fails with GUID filename

As of this morning, I am no longer able to download the credentials file using the extension. Instead of the file, I now get a failed download with a GUID as a filename.

Debug log below:
script.js:59 DEBUG: onBeforeRequest event hit!
script.js:79 DEBUG: samlXmlDoc:
script.js:80 [redacted]
script.js:120 ApplySessionDuration: false
script.js:121 SessionDuration: null
script.js:122 hasRoleIndex: true
script.js:123 roleIndex: arn:aws:iam::[redacted]
script.js:161 RoleArn: arn:aws:iam::[redacted]
script.js:162 PrincipalArn: arn:aws:iam::[redacted]:saml-provider/[redacted]
script.js:187 DEBUG: Successfully assumed default profile
script.js:188 docContent:
script.js:189 [default]
aws_access_key_id = [redacted]
aws_secret_access_key = [redacted]
aws_session_token = [redacted]
script.js:195 Generate AWS tokens file.
script.js:261 DEBUG: Now going to download credentials file. Document content:
script.js:262 [default]
aws_access_key_id = [redacted]
aws_secret_access_key = [redacted]
aws_session_token = [redacted]
script.js:266 DEBUG: Blob URL:blob:chrome-extension://ekniobabpcnfjgfbphhcolcinmnbehde/b7e150af-9f7a-4bf4-88b7-e8a5859511d7

Attempting to visit the above URL results in a 404.
Settings:
Filename: credentials
Apply SessionDuration: no
Debug logging: yes
ARN list: none
Running on Chrome version 72.0.3626.81 (updates are disabled by group policy)
Extension version: 2.7

Thanks for reporting. This is a known bug in Chrome.
See issue https://github.com/prolane/samltoawsstskeys/issues/28
You need Chrome 72.0.3626.96 or higher.
You could try the workaround mentioned over here if you are unable to upgrade Chrome:
https://github.com/prolane/samltoawsstskeys/issues/28#issuecomment-460381707


the subfolder is gpt_researcher

single character typo in readme, fixed.

made a mistake. sorry to waste your attention.


allow setting .cache location via environment variable

On some HPCs mriqc fails because /home/bidsapp is located on a readonly filesystem (see https://neurostars.org/t/mriqc-v0-15-2-read-only-error-on-hpc-cluster-oserror-errno-30-read-only-file-system-home-bidsapp-cache-mriqc/7005).
While the solution mentioned in the above works it requires the user to have control over the singularity call, which isn't always possible, for instance in flywheel or XNAT gears/modules.
It would be convenient if mriqc used an environment variable similar to (https://numba.readthedocs.io/en/stable/reference/envvars.html?highlight=ENVIRONMENT#envvar-NUMBA_CACHE_DIR) to allow user control over where this written.
Best,

This is a great idea! Would you like to contribute it?


is it a bug in spread body parameter ?

In this example https://cadlplayground.z22.web.core.windows.net/?options={}&sample=HTTP+service,
model Widget {
  @visibility("read", "update")
  @path
  id: string;

  weight: int32;
  color: "red" | "blue";
}

we have patch and post defined as
  @post create(...Widget): Widget | Error;
  @patch update(...Widget): Widget | Error;

should it have some kind of payload flatten to have parameters weight, color or id depends on the visibility for this two operations instead of having a requestBody parameter ?
How about spread alias ?  See typespec playground link

duplicate with https://github.com/microsoft/typespec/issues/1472


Implementation and Updating Submodules

I have updated the submodules and done my best at implementing new and older methods.

Okay, I didn't see PR 107, this is unneccesary. Closing.


Parse text blocks

some elements \
	which are followed by
	an indented block of
	very important text

Can these contain comments?

Can these contain comments?

Good question. I'd expect so, as long as the lines excepting the comments still follow the correct indentation rules.


fix: support helm in freightline

Fixes #1280

@rbreeze this is non-blocking, but would the Helm logo be a more intuitive thing to use here than the anchor? Or are we already using the anchor to represent Helm charts in other places?

In an ideal world I'd also prefer the "real" Helm logo, but unfortunately FontAwesome doesn't have a built-in icon for Helm... eventually we could consider adding a custom PNG (and same thing for the Argo logo), but for now I figured it's more trouble than it's worth. I've been using the anchor icon in other PRs to represent Helm up to this point too

but for now I figured it's more trouble than it's worth

Totally fine with that. And even with it being an anchor instead of the Helm logo, this is a major improvement. Thanks for this!


Allow numbers on scope

The grammar is not accepting numbers on scope.

That's right, I'll fix it.


atom-ide-community compatibility and some features not working

Yes. I am using it with atom-ide-community myself.
@Ron-SK Would you be interested in sending a PR to update the documentation to point users to https://atom-ide-community.github.io/ instead?

Yes. I am using it with atom-ide-community myself.
@Ron-SK Would you be interested in sending a PR to update the documentation to point users to https://atom-ide-community.github.io/ instead?

@lgeiger Sure. I will try to send a PR ASAP. I don't believe some features work such as formatting (hence I am using atom-beautify which is great as well) and I'm not sure whether that's a bug in this package or the atom-ide-community set of packages. Additionally, Jedi hover doesn't work on all functions (only a few such as the print function). Could you confirm that everything works on your end as you mentioned that you are using this with atom-ide-community?

Can confirm that I submitted a PR for the documentation to be updated.

I don't believe some features work such as formatting

Yes, atom-ide-community doesn't provide a mechanism to do code formatting yet.

Could you confirm that everything works on your end as you mentioned that you are using this with atom-ide-community

For me everything seems to work fine.

Final question - Is there a way to enable Jedi autocomplete without having to press Ctrl + Space

I think there should be a setting for this in autocomplete-plus (I am getting completions on every keystroke).

I don't believe some features work such as formatting

Yes, atom-ide-community doesn't provide a mechanism to do code formatting yet.

Could you confirm that everything works on your end as you mentioned that you are using this with atom-ide-community

For me everything seems to work fine.

Final question - Is there a way to enable Jedi autocomplete without having to press Ctrl + Space

I think there should be a setting for this in autocomplete-plus (I am getting completions on every keystroke).

Oh so I'm supposed to use ide-python in tandem with autocomplete-plus?

Oh so I'm supposed to use ide-python in tandem with autocomplete-plus?

Yes, ide-python is a provider for autocomplete-plus

Oh so I'm supposed to use ide-python in tandem with autocomplete-plus?

Yes, ide-python is a provider for autocomplete-plus

Thank you so much! I didn't see that in the documentation (README.md) so I was confused.

@lgeiger Final things before I close this issue, what are the functions/keywords/etc. that Jedi hover is supposed to work on and is Goto definition enabled? Thank you very much for the support.

Can confirm that goto-definition works, not sure about Jedi hover. Closing this issue.


Remove badly designed test

Solution not known. Create simpler tests with known solutions.

Coverage decreased (-0.1%) to 77.727% when pulling 6d80d9412df3d6ffc19a1687a73c765d23b926da on fix/contact_test into a8a3e0b46e15a1d2590f94ff36b2af24c10f0257 on master.


No files to exctract from unknown.zip

Could you throw a file not found exception instead of generating an unknown.zip that is corrupted? I would  like to send you a pull request to update your code if you wish to. Please add me as contributor
`public void Zip()
{
    string folder = AppDomain.CurrentDomain.BaseDirectory;
    var slnFile = new DirectoryInfo(folder).GetFiles("*.sln");
    if(!slnFile.Any()){
        throw new FileNotFoundException("Solution file was not found inside this directory.");
    }
    string zipFile = $"{slnFile?.FirstOrDefault()?.Name[..^4]}.zip";
    Zip(folder, zipFile);
}`

The empty zip file is a different issue than the unknown.zip. It sounds like the application did not complete the process of filling the zip file. I liked the option of unknown.zip when it could not find the sln file because that's not a big deal. You could be zipping up a project file and it would still work. Let's not throw an exception when it isn't necessary.
As for the empty zip file, I would be interested in what situation caused it. That's the issue that needs to be addressed.
As for submitting pull requests, you don't need to be a contributor to submit a pull request. Just fork the repo, make the change, and submit the pull request from there.


tests: arch: arm: arm_interrupt: remove side effect in assertion

Remove a side effect in an assertion check of the
expected reason after spurious interrupt handling.
Signed-off-by: Ioannis Glaropoulos<EMAIL_ADDRESS>Fixes #23582

I suggest just marking the Coverity as a false-positive; it thinks zassert_* functions are conditionally compiled because they have "assert" in their name when they actually aren't.
We'll continue to get Coverity failures over and over like this until these APIs are renamed


CVE-2017-5645 & CVE-2017-12629  with current versions of log4j-core and elasticsearch

Currently, Jest uses v2.7 of log4j.
This version contains a known vulnerability: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5645
Similarly, the latest Jest version uses elasticsearch v5.3.2, that itself uses lucene v6.4.2.
This version has a security vulnerability in the lucene-queryparser module: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-12629
The first Elasticsearch version that uses a non-vulnerable lucene version is Elasticsearch v6.1.0
Could you upgrade logj to v2.8.2 please ?
For Elasticsearch, it may be a more difficult change given that it introduces a major version jump.
Note: those 2 security alerts were detected by snyk and evaluated "HIGH SEVERITY":

https://snyk.io/vuln/SNYK-JAVA-ORGAPACHELOGGINGLOG4J-31409
https://snyk.io/vuln/SNYK-JAVA-ORGAPACHELUCENE-31569

Jest has been upgraded to 6.3.0, but the log4j version remains at v2.7. Maybe in future updates, it will be upgraded as well.


Adding XLNet model

Current status:

[x] model with commented code and pretrained loading logic
[x] tokenizer
[x] tests for model and tokenizer
[x] checking standard deviation of hidden states with TF model is ok (max dev btw 1e-4 & 1e-5 until last layer, last layer 1e-3, should be ok)
[x] converting and uploading model to S3

Model/tokenizer are usable, now just need to

[ ] check the model behave well under various conditions and in a few corner cases
[ ] add a few classes variants (for sequence and token fine-tuning)
[ ] add a finetuning example with results close to TF
[ ] add models in README
[ ] add models on torch.hub

@thomwolf I could get the XLNetLMHeadModel running, but I have some issues with the "normal" XLNetModel implementation:
import torch
from pytorch_pretrained_bert import XLNetTokenizer, XLNetModel

import logging
logging.basicConfig(level=logging.INFO)

tokenizer = XLNetTokenizer.from_pretrained("xlnet-large-cased")

text = "Who was Jim Henson ? Jim Henson was a puppeteer"
tokenized_text = tokenizer.encode(text)

indexed_tokens = torch.tensor([tokenized_text])

model = XLNetModel.from_pretrained("xlnet-large-cased")
model.eval()

with torch.no_grad():
    hidden_states, mems = model(indexed_tokens)
    print(hidden_states)

-> is currently not working, hidden_states = model(indexed_tokens) always returns nans for the embeddings.
Thanks :heart:

Indeed the from_pretrained() was not loading weights in XLNetModel (did you see that in the logs?). Should be fixed now. This is all very WIP so beware @stefan-it!

Codecov Report

Merging #711 into master will decrease coverage by 0.08%.
The diff coverage is 61.71%.

@@            Coverage Diff             @@
##           master     #711      +/-   ##
==========================================
- Coverage   62.27%   62.18%   -0.09%
==========================================
  Files          18       22       +4
  Lines        3979     4742     +763
==========================================
+ Hits         2478     2949     +471
- Misses       1501     1793     +292

Impacted Files
Coverage Δ

pytorch_pretrained_bert/modeling_transfo_xl.py
52.93% <ø> (ø)
:arrow_up:

pytorch_pretrained_bert/modeling_openai.py
68.11% <0%> (ø)
:arrow_up:

...ytorch_pretrained_bert/modeling_xlnet_utilities.py
0% <0%> (ø)

pytorch_pretrained_bert/modeling.py
79.49% <0%> (ø)
:arrow_up:

pytorch_pretrained_bert/modeling_gpt2.py
69.79% <0%> (ø)
:arrow_up:

...rained_bert/convert_xlnet_checkpoint_to_pytorch.py
0% <0%> (ø)

pytorch_pretrained_bert/__init__.py
100% <100%> (ø)
:arrow_up:

pytorch_pretrained_bert/modeling_xlnet.py
65.22% <65.22%> (ø)

pytorch_pretrained_bert/tokenization_xlnet.py
72.94% <72.94%> (ø)

pytorch_pretrained_bert/tokenization_gpt2.py
82.44% <0%> (-1.07%)
:arrow_down:

... and 4 more

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 c304593...c946bb5. Read the comment docs.

Thanks for the fix - it's working now :)
Sorry, if that's not the right place here:
I've implemented a new embedding class in flair. But when the complete model is going to be saved (via torch.save), the following error message is shown:
Traceback (most recent call last):
  File "train_xlnet.py", line 36, in <module>
    max_epochs=500)
  File "/mnt/flair/flair/trainers/trainer.py", line 341, in train
    self.model.save(base_path / "best-model.pt", pickle_module=self.pickle_module)
  File "/mnt/flair/flair/nn.py", line 86, in save
    self.save_torch_model(model_state, str(model_file), pickle_module)
  File "/mnt/flair/flair/nn.py", line 76, in save_torch_model
    torch.save(model_state, str(model_file), pickle_protocol=pickle_protocol)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 224, in save
    return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 149, in _with_file_like
    return body(f)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 224, in <lambda>
    return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 297, in _save
    pickler.dump(obj)
TypeError: can't pickle SwigPyObject objects

This error message does not appear, when e.g. using the GPT1 embeddings. Do you have any hint, what's going wrong here 🤔

I made a finetuning model with this. The training loss seems to be reducing implying that model is learning, however, during inference all values are the same.

Am I correct that model.eval() does not work with this yet? It seems all predictions generated are the same.
This is how im doing it:
config = XLNetConfig('config.json')
model = XLNetForSequenceClassification(config, num_labels=3)
model.load_state_dict(torch.load("xlnet_pytorch.bin"))
model.to(device)
for param in model.parameters():
    param.requires_grad = False
model.eval()

@thomwolf I think this is branch still WIP yes? Because the run_xlnet_squad.py still refers to BertForQuestionAnswering. SHould I just change that to XLnetForQuestionAnswering and it should work? or maybe I should wait more?

Yeah, I'm still on it, finishing the tests of XLNetForSequenceClassification so you should wait more (or help me code the XLNetForQuestionAnswering, haha).
I'll make the description of the PR more explicit that only the base model is up now and XLNetForSequenceClassification and XLNetForQuestionAnswering are not ready yet.

I think I found the root cause of the serialization problem (described in one of the previous comments here):
The sentencepiece processor object cannot be correctly serialized. I found a similar issue in the xnmt library:
https://github.com/neulab/xnmt/pull/351

Yeah, I'm still on it, finishing the tests of XLNetForSequenceClassification so you should wait more (or help me code the XLNetForQuestionAnswering, haha).
I've started to work on it with whatever time I've :(
So far I'm getting an error in the modeling_xlnet.py in line 752:
    attention_mask = attention_mask.transpose(0, 1).contiguous() if attention_mask is not None else None

Whoever finishes first should let here know..But appreciate your work here @thomwolf.

@stefan-it do you know if there is a workaround to the sentencepiece serialization issue?

@thomwolf I think this can be fixed with:
    def __getstate__(self):
        state = self.__dict__.copy()
        state["sp_model"] = None
        return state

    def __setstate__(self, d):
        self.__dict__ = d
        try:
            import sentencepiece as spm
        except ImportError:
            logger.warning("You need to install SentencePiece to use XLNetTokenizer: https://github.com/google/sentencepiece"
                           "pip install sentencepiece")
        self.sp_model = spm.SentencePieceProcessor()
        self.sp_model.Load(self.vocab_file)

In the XLNetTokenizer class. A nice test case would be:
import pickle
from pytorch_pretrained_bert import XLNetTokenizer

tokenizer = XLNetTokenizer.from_pretrained('xlnet-large-cased')

text = "Munich and Berlin are nice cities"
filename = "tokenizer.bin"

subwords = tokenizer.tokenize(text)

pickle.dump(tokenizer, open(filename, "wb"))

tokenizer_new = pickle.load(open(filename, "rb"))
subwords_loaded = tokenizer_new.tokenize(text)

assert subwords == subwords_loaded

I'm hitting a bug where the head mask created here:
https://github.com/huggingface/pytorch-pretrained-BERT/blob/xlnet/pytorch_pretrained_bert/modeling_xlnet.py#L854
is a list of None values instead of just None, which eventually results in an error:
  File "../pytorch-pretrained-BERT/pytorch_pretrained_bert/modeling_xlnet.py", line 397, in rel_attn_core
    attn_prob = attn_prob * head_mask
TypeError: mul(): argument 'other' (position 1) must be Tensor, not list

I think the fix is to either make the mask a single None value, or to index it with the layer number when it's used.

@stefan-it Great, thanks!

@nikitakit Yeah I'm refactoring the API among models to make it more consistent/simpler to switch among models. Will be finished soon.

While modifying run_xlnet_squad.py I looked through the run_squad.py of the xlnet repo. It seems he made a bunch of changes to convert_examples_to_features (adding lcs etc.) Also, I didn't see that he put the cls at the end; rather p before than q (I think; hope I'm not wrong). Have you started to work on it @thomwolf ? It's interesting :)

One quick update in case someone else is also working on the Squad XLnet fine tuning. I got this error and working on it seems that the end logits in the QA layer is buggy.
Traceback (most recent call last):   File "/dccstor/avistor4/squad/expts/xlnet_branch_hf/pytorch-pretrained-BERT/examples/run_squad.py", line 478, in <module>     main()   File "/dccstor/avistor4/squad/expts/xlnet_branch_hf/pytorch-pretrained-BERT/examples/run_squad.py", line 470, in main     result = evaluate(args, model, tokenizer, prefix=global_step)   File "/dccstor/avistor4/squad/expts/xlnet_branch_hf/pytorch-pretrained-BERT/examples/run_squad.py", line 219, in evaluate     args.null_score_diff_threshold)   File "/dccstor/avistor4/squad/expts/xlnet_branch_hf/pytorch-pretrained-BERT/examples/utils_squad.py", line 463, in write_predictions     feature_null_score = result.start_logits[0] + result.end_logits[0] TypeError: unsupported operand type(s) for +: 'float' and 'list'`

Is there any rough estimation as to when "a finetuning example with results close to TF" will be available?

Thanks for the fix - it's working now :)
Sorry, if that's not the right place here:
I've implemented a new embedding class in flair. But when the complete model is going to be saved (via torch.save), the following error message is shown:
Traceback (most recent call last):
  File "train_xlnet.py", line 36, in <module>
    max_epochs=500)
  File "/mnt/flair/flair/trainers/trainer.py", line 341, in train
    self.model.save(base_path / "best-model.pt", pickle_module=self.pickle_module)
  File "/mnt/flair/flair/nn.py", line 86, in save
    self.save_torch_model(model_state, str(model_file), pickle_module)
  File "/mnt/flair/flair/nn.py", line 76, in save_torch_model
    torch.save(model_state, str(model_file), pickle_protocol=pickle_protocol)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 224, in save
    return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 149, in _with_file_like
    return body(f)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 224, in <lambda>
    return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 297, in _save
    pickler.dump(obj)
TypeError: can't pickle SwigPyObject objects

This error message does not appear, when e.g. using the GPT1 embeddings. Do you have any hint, what's going wrong here 🤔

Hi, have you solved this issue? I'm trying to implement XLMRoberta in my model based on flair.


Android - Unable to login into idp portal from QR code login

Describe the bug
Unable to login into idp portal from QR code login
To Reproduce
Prerequiste: one VC should be downloaded and binded, have idp compatable login with qr portal ready

Authenticate app and get into it
Go to scanner page
Scan the IDP portal QR code log-in
select the binded UIN and perform the authentication method
select the requird atributes on the consent page

Expected behavior
We should able to login in successfully with out any errors
Observed
We unable to login and getting error as "auth factor mismatch" as shown in the below screen shot
Screenshots

Smartphone :

Device: PIXEL 6
OS: Android 13
MOSIP Version: <IP_ADDRESS>
MOSIP server: qa-1201-b2.net
APP link; https://github.com/mosip/inji/actions/runs/3986424542

@MonobikashDas This issue is fixed, add the root cause and assign it back to QA

@santhoshsunder Please verify this issue and confirm

Tested this issue in the new  build, the issue is not observed anymore, able to login into IDP portal success fully, iam attaching the screenshot and the remaining details below, hence closing this bug
Screenshot :

Mobile details :
Phone make: Pixel 6
OS: Android 13
BLE version : 5.2
MOSIP Version : <IP_ADDRESS>
MOSIP server : qa-1201-b2.net
APP link : https://github.com/mosip/inji/actions/runs/4293687772


Do not trigger validation for pull requests

After #1179 the validation trigger will always fail for pull requests. I think we should modify the definition so it's skipped instead of failing. cc @jorgepiloto

Sure! Working on this... 🚀


Multiform support?

This is a question.
I have a project where I want to provide some basic edit screens around some $resource modules.  Currently, I'm using ng-grid for list view and angular-schema-form for the detail view.  This means that I have duplicate logic for grabbing related data and doing validation.  I want to somehow combine these and use the schema-form validation in the ng-grid layout.
Do you have thoughts on where to start?

Hi @aczapszys,
I'm not entirely sure on why you have duplicate logic for grabbing the data or why you need to do validation in the list view, presumably anything saved is also valid?
One way would be to do an ng-grid add-on, but you're just displaying the data right? For validation you can use tv4 with the same schema that you use for the details view, that way you have one validation logic.

@davidlgj
Displaying data?  No, it's the same logical edit form definition in either list or detail view.
Thanks for the tip!

Is it one form and schema per item in the ng-grid? you can always just run
schema form inside each of them in that case.
fre 17 apr 2015 17:27 aczapszys<EMAIL_ADDRESS>skrev:

@davidlgj https://github.com/davidlgj
Displaying data? No, it's the same logical edit form definition in either
list or detail view.
Thanks for the tip!
—
Reply to this email directly or view it on GitHub
https://github.com/Textalk/angular-schema-form/issues/357#issuecomment-94008803
.

@aczapszys it's been a while so I'm closing this, please re-open if you do not feel the question has been answered sufficiently.


USHIFT-251: Sync more core and CRD manifests

Updates rebase script to copy in more of the assets/core and assets/crd manifests from the respective OpenShift components.
Signed-off-by: Frank A. Zdarsky<EMAIL_ADDRESS>Closes USHIFT-251

/retest

/lgtm


Unchecked possible null values referenced in me-shim.js

In lines 433 and 434 of me-shim.js, access to node.parentNode and node.parentNode.parentNode are unchecked for null values, which has caused errors for me in Firefox (15.0.1).  Line 433 should probably read:
if (node.parentNode && node.parentNode.parentNode && node.parentNode.tagName.toLowerCase() == 'p') {
or some other such fix.

@nborko Is this still an issue?

@nborko Closing old issues. If you'd like to reopen this, let us know. Thanks!


NUT sensor shows raw status instead of human-readable status

Home Assistant release with the issue:
0.68.1
Last working Home Assistant release (if known):
I've been using the NUT sensor for a few months now, and I've never seen it display correctly.
Operating environment (Hass.io/Docker/Windows/etc.):
Virtualenv with Python 3.6.3 on a Raspberry Pi 3
Component/platform:
NUT sensor
Description of problem:
The NUT sensor shows the raw status of a monitored UPS, rather than the human-readable status. E.g.: 'OL' instead of 'Online', 'OB' instead of 'On Battery', ...

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
- platform: nut
  name: "Host UPS"
  host: <IP_ADDRESS>
  port: 3493
  username: ****
  password: ****
  resources:
    - battery.charge
    - battery.runtime
    - battery.voltage
    - input.voltage
    - ups.load
    - ups.status

- platform: nut
  name: "NAS UPS"
  host: 192.168.***.*
  port: 3493
  username: ****
  password: ****
  resources:
    - battery.charge
    - battery.runtime
    - battery.voltage
    - input.voltage
    - ups.load
    - ups.status

Traceback (if applicable):
none

Additional information:
It was because of PR #13787 that I noticed that the code has a list of every possible UPS status with its human-readable counterpart (lines 109-124 in nut.py):
STATE_TYPES = {
    'OL': 'Online',
    'OB': 'On Battery',
    'LB': 'Low Battery',
    'HB': 'High Battery',
    'RB': 'Battery Needs Replaced',
    'CHRG': 'Battery Charging',
    'DISCHRG': 'Battery Discharging',
    'BYPASS': 'Bypass Active',
    'CAL': 'Runtime Calibration',
    'OFF': 'Offline',
    'OVER': 'Overloaded',
    'TRIM': 'Trimming Voltage',
    'BOOST': 'Boosting Voltage',
    'FSD': 'Forced Shutdown',
}

It seems the code doesn't make (correct) use of this list. The fix is probably pretty simple, but I couldn't make sense of the code myself (lines 215-225 in nut.py) as I'm not a developer.

That mapping of state types is only used when generating the device attributes visible in the "more info" dialogue. The state shown on the card is the raw value coming from NUT.

True, for this particular sensor type it would make more sense. However, all NUT sensors generated by this component show the state (human-readable) in their more info dialogue.
So, we would be turning around the behaviour of this one sensor type only.

Sounds alright to me 🙂

How about a compromise: On the state card the sensor shows the human-readable form of the status, and in each more info dialogue we show the human-readable form and the raw value? This way all more info dialogues remain consistent.
State Card:

More Info:

Fix for this issue and some additional small enhancements here: https://github.com/home-assistant/home-assistant/compare/dev...exxamalte:nut-enhancements

There is one more aspect that we should consider: automations. I haven't set one up for my UPS, but you could for example set up an automation that sends a notification if the battery needs replacement.
trigger:
  <on state change of status sensor to 'RB'>
action:
  <send me an e-mail or pushover message to replace battery>

Maybe the solution is to have an additional sensor that shows the human-readable form of the status? That way you can use the raw value in automations, and the nice one in the UI.

I'm not sure what the best approach is here. I suspect one of the main devs will have to give their opinion on that.
And I currently don't have any automations set up for my UPS' either, but any change could potentially be a breaking change for someone who does.

OK, so now I introduced a new virtual sensor type for the display status in a human-readable. It's based on the status coming from NUT. This way there is no breaking change, each user can decide if they want to use the raw value for example in automations (hidden in the UI), and the human-readable value in the UI.


R version CUDA failure on Amazon ec2 (ubuntu14.04)

Environment info
Operating System: Amazon ec2 ubuntu 14.04LTS
Compiler: gcc
Package used (Python/R/Scala/Julia): R
MXNet version:
Or if installed from source:
MXNet commit hash (git rev-parse HEAD):
If you are using python package, please provide
Python version and distribution:
If you are using R package, please provide
R sessionInfo(): 3.3.3 RC
I am trying to install MXNet R version on Amazon Web Service EC2 (ubuntu 14.04LTS) by following the instruction: http://mxnet.io/get_started/ubuntu_setup.html.
First I downloaded CUDA 8toolkit from nvidia.
sudo dpkg -i cuda-repo-ubuntu1404_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda

Then downloaded the latest cudnn file(cudnn-8.0-linux-x64-v6.0.tgz) and transfer it to ec2 instance by scp.
In ec2 console (accessed by SSH), I typed
tar xvzf cudnn-8.0-linux-x64-v5.1-ga.tgz
sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
sudo ldconfig
(thou I originally transfered cuda install file on /usr/local/. So the two lines of codes copying files to my local directory.)

Then I install mxnet source file from git, made config.mk file, and modified the config.mk to USE_CUDA=1, and so on (for GPU usage). Moved to set-utils directory and compiled ubuntu r version shell script.
git clone https://github.com/dmlc/mxnet.git ~/mxnet --recursive

cd ~/mxnet
cp make/config.mk .
# If building with GPU, add configurations to config.mk file:
echo "USE_CUDA=1" >>config.mk
echo "USE_CUDA_PATH=/usr/local/cuda" >>config.mk
echo "USE_CUDNN=1" >>config.mk

cd ~/mxnet/setup-utils
bash install-mxnet-ubuntu-r.sh
Of course I added environment variable by following commands:

export CUDA_HOME=/usr/local/cuda-8.0
export CUDA_ROOT=/usr/local/cuda-8.0/bin
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda
PATH=${CUDA_HOME}/bin:${PATH}

FYI, I checked the nvidia driver is installed properly by 'nvidia-smi' command.
I launched R and punched,
library(mxnet)
Then the output was
Rcpp Init>
I ran some test code for mxnet and it worked fine.
So I proceed to run GPU using code (Lenet):
require(mxnet)
train <- read.csv('train.csv', header=TRUE)
test <- read.csv('test.csv', header=TRUE)
train <- data.matrix(train)
test <- data.matrix(test)

train.x <- train[,-1]
train.y <- train[,1]

train.x <- t(train.x/255)
test <- t(test/255)

# input
data <- mx.symbol.Variable('data')
# first conv
conv1 <- mx.symbol.Convolution(data=data, kernel=c(5,5), num_filter=20)
tanh1 <- mx.symbol.Activation(data=conv1, act_type="tanh")
pool1 <- mx.symbol.Pooling(data=tanh1, pool_type="max",
                      kernel=c(2,2), stride=c(2,2))
# second conv
conv2 <- mx.symbol.Convolution(data=pool1, kernel=c(5,5), num_filter=50)
tanh2 <- mx.symbol.Activation(data=conv2, act_type="tanh")
pool2 <- mx.symbol.Pooling(data=tanh2, pool_type="max",
                      kernel=c(2,2), stride=c(2,2))
# first fullc
flatten <- mx.symbol.Flatten(data=pool2)
fc1 <- mx.symbol.FullyConnected(data=flatten, num_hidden=500)
tanh3 <- mx.symbol.Activation(data=fc1, act_type="tanh")
# second fullc
fc2 <- mx.symbol.FullyConnected(data=tanh3, num_hidden=10)
# loss
lenet <- mx.symbol.SoftmaxOutput(data=fc2)

train.array <- train.x
dim(train.array) <- c(28, 28, 1, ncol(train.x))
test.array <- test
dim(test.array) <- c(28, 28, 1, ncol(test))
n.gpu <- 4
device.gpu <- lapply(0:(n.gpu-1), function(i) {
mx.gpu(i)
})
mx.set.seed(0)
tic <- proc.time()
model <- mx.model.FeedForward.create(lenet, X=train.array, y=train.y,
                                ctx=device.gpu, num.round=5, array.batch.size=100,
                                learning.rate=0.05, momentum=0.9, wd=0.00001,
                                eval.metric=mx.metric.accuracy,
                                  epoch.end.callback=mx.callback.log.train.metric(100))

This is a basic tutorial code from mxnet page.
But I got following error messages:
Auto-select kvstore type = local_update_cpu
Start training with 4 devices
[07:05:37] /root/mxnet/dmlc-core/include/dmlc/logging.h:300: [07:05:37] src/storage/storage.cc:77: Compile with USE_CUDA=1 to enable GPU usage

Stack trace returned 10 entries:
[bt] (0) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7f296b8659cc]
[bt] (1) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(+0xed1be3) [0x7f296c51cbe3]
[bt] (2) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(+0xed43c3) [0x7f296c51f3c3]
[bt] (3) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(_ZN5mxnet11StorageImpl5AllocEmNS_7ContextE+0x3f) [0x7f296c51f77f]
[bt] (4) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(MXNDArrayCreate+0x63d) [0x7f296c0e83bd]
[bt] (5) /usr/local/lib/R/site-library/mxnet/libs/mxnet.so(_ZN5mxnet1R7NDArray5EmptyERKN4Rcpp9DimensionERKNS2_6VectorILi19ENS2_15PreserveStorageEEE+0xdd) [0x7f295ac7ebbd]
[bt] (6) /usr/local/lib/R/site-library/mxnet/libs/mxnet.so(_ZN4Rcpp12CppFunction2INS_4XPtrIN5mxnet1R6NDBlobENS_15PreserveStorageEXadL_ZNS_25standard_delete_finalizerIS4_EEvPT_EELb0EEERKNS_9DimensionERKNS_6VectorILi19ES5_EEEclEPP7SEXPREC+0xd2) [0x7f295ac8b552]
[bt] (7) /usr/local/lib/R/site-library/Rcpp/libs/Rcpp.so(_Z23InternalFunction_invokeP7SEXPREC+0xd1) [0x7f2971c69cd1]
[bt] (8) /usr/lib/R/lib/libR.so(+0xce3c1) [0x7f29762a83c1]
[bt] (9) /usr/lib/R/lib/libR.so(Rf_eval+0x6fb) [0x7f29762ed5ab]

Error in mx.nd.internal.empty.array(shape, ctx) :
  [07:05:37] src/storage/storage.cc:77: Compile with USE_CUDA=1 to enable GPU usage

Stack trace returned 10 entries:
[bt] (0) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7f296b8659cc]
[bt] (1) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(+0xed1be3) [0x7f296c51cbe3]
[bt] (2) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(+0xed43c3) [0x7f296c51f3c3]
[bt] (3) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(_ZN5mxnet11StorageImpl5AllocEmNS_7ContextE+0x3f) [0x7f296c51f77f]
[bt] (4) /usr/local/lib/R/site-library/mxnet/libs/libmxnet.so(MXNDArrayCreate+0x63d) [0x7f296c0e83bd]
[bt] (5) /usr/local/lib/R/site-library/mxnet/libs/mxnet.so(_ZN5mxnet1R7NDArray5EmptyERKN4Rcpp9DimensionERKNS2_6VectorILi19ENS2_15PreserveStorageEEE+0xdd) [0x7f295ac7ebbd]
[bt] (6) /usr/local/lib/R/site-library/mxnet/libs/mxnet.so(_ZN4Rcpp12CppFunction2INS_4XPtrIN5mxnet1R6NDBlobENS_15PreserveStorageEXadL_ZNS_25standard_delete_finalizerIS4_EEvPT_EEL

I want to make sure:
I modified the config.mk file 'before' I actaully compile by 'bash install--mxnet-ubuntu-r.sh' command.
Changed enviornment variables as many ways as possible.
Repeated above steps at least 7 times.
My final goal is to run a code which contains mxnet lenet by batch file(R CMD BATCH ~.R)
I would be very appreciated if someone can actually solve my problem.

Can you show your log when compiling mxnet?

ps -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda-8.0/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv   -fopenmp -DMSHADOW_USE_CUDNN=1  -I/root/mxnet/cub -DMXNET_USE_NVRTC=0 -MMD -c src/operator/convolution_v1.cc -o build/src/operator/convolution_v1.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/root/mxnet/mshadow/ -I/root/mxnet/dmlc-core/include -fPIC -I/root/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda-8.0/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv   -fopenmp -DMSHADOW_USE_CUDNN=1  -I/root/mxnet/cub -DMXNET_USE_NVRTC=0 -MMD -c src/operator/correlation.cc -o build/src/operator/correlation.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/root/mxnet/mshadow/ -I/root/mxnet/dmlc-core/include -fPIC -I/root/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda-8.0/include -DMSHADOW_USE_CBL

::op::ActivationParam) [with DType=mshadow::half::half_t]"
src/operator/activation.cu(27): here
src/operator/./cudnn_activation-inl.h(137): warning: variable "beta" was declared but never referenced
detected during:
instantiation of "void mxnet::op::CuDNNActivationOp::Backward(const mxnet::OpContext &, const std::vector<mxnet::TBlob, std::allocatormxnet::TBlob> &, const std::vector<mxnet::TBlob, std::allocatormxnet::TBlob> &, const std::vector<mxnet::TBlob, std::allocatormxnet::TBlob> &, const std::vector<mxnet::OpReqType, std::allocatormxnet::OpReqType> &, const std::vector<mxnet::TBlob, std::allocatormxnet::TBlob> &, const std::vector<mxnet::TBlob, std::allocatormxnet::TBlob> &) [with DType=mshadow::half::half_t]"
(44): here

src/operator/./cudnn_convolution-inl.h(286): error: too few arguments in function call
1 error detected in the compilation of "/tmp/tmpxft_00007035_00000000-5_convolution_v1.cpp4.ii".
make: *** [build/src/operator/convolution_v1_gpu.o] Error 2

Can you tell me which AWS instance you used?

It's ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20160627 (ami-2d39803a)
[type g2.8xlarge]

It seems like the code is using gpu resource because when I put 'nvidia-smi' to server, it says I am using it.
But when I ran it on other properly working ubuntu server (14.04 LTS  also) shows messages like below:
used  (Mb) gc trigger  (Mb) max used  (Mb)
Ncells  1459016  78.0    2637877 140.9  1459016  78.0
Vcells 14991815 114.4   22282032 170.0 14991815 114.4
[1] TRUE
[1] TRUE
[1] TRUE
[1] TRUE
[[11:31:3111:31:31] ] /home/mining/mxnet/dmlc-core/include/dmlc/logging.h/home/mining/mxnet/dmlc-core/include/dmlc/logging.h::235235: : [11:31:31] src/operator/./convolution-inl.h:370: Check failed: ksize_y <= dshape[2] + 2 * param_.pad[0] && ksize_x <= dshape[3] + 2 * param_.pad[1] kernel size exceed input[11:31:31] src/operator/./convolution-inl.h:370: Check failed: ksize_y <= dshape[2] + 2 * param_.pad[0] && ksize_x <= dshape[3] + 2 * param_.pad[1] kernel size exceed input

I am closing this since it has been inactive for quite a while. Feel free to reopen if necessary.


Heads up, jxnblk.com/grid-styled disappeared

Was up recently, 404'ing now

Thanks! Think I forgot to rebuild 😅

🥂 Cheers!


Needs to standardize style?

Some time ago I used your project to generate a hCalendar formated output to publish the agenda in a web page. It is a very nice project, thanks for the good work!
Now I wanted to update my code with the last version of gcalcli and I'm seeing two styles for doing things:

In _IterateEvents you call to _PrintEvent in order to produce a textual human-readable output for the calendar.
In _tsv you do the iteration inside of the method

Wouldn't make it sense to use the same style for both?
Which one is the preferred one? Maybe there are other places with the same differences in style?

This is still an issue.  I've been working hard at refactoring to reduce duplicated paths.  I'll see if I can tackle this one soon.


Fix Bitop Edge Case

This PR fixes edge case where bitop will result in null ptr exception when none of the source keys exist.
I added also some more negative tests for bitop.

cc @kevin-montrose


add high z-index to ensure progress bar shows above everything else

Hey there, love this plugin! It wasn't showing up when I first set it up and I quickly realized it was rendering below my header block bc of a z-index thing.
If you set a z-index over 1 for anything at the top of the viewport it will obscure the progress bar so all we have to do is set a really high z-index to ensure that this renders above all else.
Thanks for the awesome plugin, saved me a ton of time!

Hey! Apologies for the late reply. Thank you for your contribution!
Makes sense to me. This should be a default behavior of the plugin. It should also be worth mentioning here for reference that we also have the choice to prepend or append the bar to the body. This can potentially help with z-indexing issues with other elements that exist on all pages.
Really glad this helped you!

v2.0.14 released with your changes 🚀


[Feature Request] Add OTP SMS authentication

I have a fully working SMS OTP authentication patch. Would it be accepted or SMS OTP authentication is too insecure to be merged in this project?
It is basically a copy of magic-link implementation but without using KMS to generate and validate the OTP codes. From a security perspective I was thinking in storing some validation in to compensate:
https://github.com/aws-samples/amazon-cognito-passwordless-auth/blob/5bfdab2b13a07be24020cb4f8032337f242e48ee/cdk/custom-auth/magic-link.ts#L138-L140
This way the only one who could use the OTP is the one who requested it.

Very interested in that.
That similar to this implementation?: https://github.com/aws-samples/amazon-cognito-passwordless-email-auth
But using dynamodb again, like magic links, for rate limiting? Implementing OTP is easier than magic link because you don't have to deal with the link being opened in a different browser. On the other hand, I'd like to include the option to send the OTP using either email or SMS, depending on the user's choice at the time of signing in.

Very interested in that.
That similar to this implementation?: https://github.com/aws-samples/amazon-cognito-passwordless-email-auth

I would say that is closer to the magic link implementation. I have copied most of the code from it. The idea is the same.

But using dynamodb again, like magic links, for rate limiting?

Yes.

Implementing OTP is easier than magic link because you don't have to deal with the link being opened in a different browser. On the other hand, I'd like to include the option to send the OTP using either email or SMS, depending on the user's choice at the time of signing in.

It is doable. I can adjust.
What to you think of this proposal?

For OTP the exact same session that initiated the authentication flow should be the one that enters the OTP code.
The default for OTP will be e-mail and an SMS example will be given.

For (1) does Cognito provides a "guest" session that I can use?
Thanks.

Not sure what you mean with guest session. You shouldn't need it I think ?
Maybe we should implement this as 2 separate flows. Email OTP and SMS OTP.
Even though they share a lot of code, may be beneficial for implementation simplicity to keep it separate

I mean is there a way I can guarantee that given an authentication flow X that called the define authentication challenge requesting an OTP code, only X can use the OTP?

That's what Cognito takes care of for you (it's tied to the session, which is the very long string Cognito returns to you in custom auth calls, that you must provide back again in respondtoauthchallenge)


Error for new certificates after upgrade to 2.1.0

After upgrading to version 2.1.0 and issuing a new certificate I get an error on my puppet master.
Error: Could not retrieve catalog from remote server:
Error 500 on SERVER: Server Error:
Could not find resource 'File[/etc/acme.sh/configs/gitlab.example.com/params.dh]' in parameter 'require'
(file: /etc/puppetlabs/code/environments/production/modules/acme/manifests/deploy/crt.pp, line: 99) on node puppet.example.com

Not sure why this is happening..
After downgrading to 2.0.0 the error is gone.

@phifre How are you using the module, could you paste your manifest/hiera code?

Sure!
I was trying to build a simple reverse proxy / load balancer that also terminates ssl.
Here is my profile:
class profiles::load_balancer (
  Hash[String, Hash] $servers = undef,
  String $acme_profile        = undef,
  String $acme_account        = undef,
) {
  include nginx
  include acme

  $servers.each | String $server, Hash $server_hash | {
    if !$server_hash['proxy'] {
      fail("Proxy destination must be defined.")
    }
    if $server_hash['ssl'] == true {
      acme::certificate { $server:
        use_profile    => $acme_profile,
        use_account    => $acme_account,
        letsencrypt_ca => 'production',
        notify         => Class['nginx::service'],
      }
      nginx::resource::server { $server:
        proxy        => $server_hash['proxy'],
        ssl          => true,
        ssl_redirect => true,
        ssl_cert     => "${acme::crt_dir}/${server}/cert.pem",
        ssl_key      => "${acme::key_dir}/${server}/private.key",
      }
    } else {
      nginx::resource::server { $server:
        proxy => $server_hash['proxy'],
      }
    }
  }
}

with the following example hiera data:
profiles::load_balancer::acme_profile: 'cloudflare'
profiles::load_balancer::acme_account<EMAIL_ADDRESS>profiles::load_balancer::servers:
  'gitlab.example.com'
    proxy: 'http://internal.dns.name'
    ssl: true

@phifre Thanks! Just to verify my assumption: is this node also running your Puppetserver, or is it a different node?

That's indeed a node different from the puppetserver.

That's an interesting bug. It seems to date back to version 1.0. But I don't know which change caused this bug to surface.
Anyway, it seems odd that class acme::deploy::crt requires a file that is created by acme:csr in a previous Puppet run.
@phifre Can you confirm that https://github.com/fraenki/puppet-acme/commit/d77cb1808d56064ecd192fd81d17ccdef0588a3c fixes this issue?

Well it does not really fix it.. Now I get the following error on my Puppet Master node:
Error: /Stage[main]/Acme/Acme::Request::Crt[gitlab.example.com]/Acme::Deploy::Crt[gitlab.example.com]/Concat[/etc/acme.sh/certs/gitlab.example.com/fullchain.pem]/Concat_file[/etc/acme.sh/certs/gitlab.example.com/fullchain.pem]: Failed to generate additional resources using 'eval_generate': Could not retrieve source(s) /etc/acme.sh/configs/gitlab.example.com/params.dh
Error: /Stage[main]/Acme/Acme::Request::Crt[gitlab.example.com]/Acme::Deploy::Crt[gitlab.example.com]/Concat[/etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem]/Concat_file[/etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem]: Failed to generate additional resources using 'eval_generate': Could not retrieve source(s) /etc/acme.sh/keys/gitlab.example.com/private.key
Error: Could not set 'file' on ensure: No such file or directory @ rb_sysopen - /etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem
Error: Could not set 'file' on ensure: No such file or directory @ rb_sysopen - /etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem
Wrapped exception:
No such file or directory @ rb_sysopen - /etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem
Error: /Stage[main]/Acme/Acme::Request::Crt[gitlab.example.com]/Acme::Deploy::Crt[gitlab.example.com]/Concat[/etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem]/File[/etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory @ rb_sysopen - /etc/acme.sh/keys/gitlab.example.com/fullchain_with_key.pem

I hope I have some time to dig a little deeper in the next days..
Thanks for your help!

I think I have an idea why this is happening.
Let's say I need two different certificates. For sake of argument let's call them puppet.example.com and gitlab.example.com. The first certificate is for the puppetserver node. The seconds one is for a different node.
The fact acme_crtscontains
gitlab.example.com
puppet.example.com

Now puppet is executed on the puppetserver.
In line 137 of init.ppthese two certificate names are stored in acme_crts_array.
One line after that ::acme::request::crtis called with this array.
In line 33 of request/crt.pp acme::deploy::crt is called. This works fine with a certificate for the puppetserver because all required files are already there. However for a certificate for a different node for example the params.dhfile ($dh = "${cfg_dir}/${real_domain}/params.dh") does not exists on the puppetserver.
The same is true for the fullchain or the fullchain_with_key.
I hope what I write makes sense..

I have fixed this in 35a0421. Please have a look and confirm this makes sense.
It fixes the issue for me.
Can you confirm if requesting certificate from the puppetserver and other nodes is working for you before?

@phifre TBH, this puzzles me. Nothing in version 2.1.0 could explain the issue that you have reported in your first post, AFAICT:
https://github.com/fraenki/puppet-acme/compare/2.0.0...2.1.0
I've noticed that you have only provided the code that you use on "gitlab.example.com". Could you also provide the manifest/hiera code for "puppet.example.com"?

Check if certificate was requested from current node and skip creation of chains if not.
This is necessary because otherwise all nodes would try to create the chain.

Could you please elaborate further on this? The code should already prevent this:
https://github.com/fraenki/puppet-acme/blob/master/manifests/certificate.pp#L53-L56
https://github.com/fraenki/puppet-acme/blob/master/manifests/deploy.pp#L16-L19
To trigger this code, your node would need to have acme::certificate { 'gitlab.example.com': ...} defined somewhere. So if this is only defined on one node, then this code cannot run on any other node.

First of all, here is my puppetserver profile
class profiles::puppetserver (
  Boolean $use_ssl     = false,
  String $acme_profile = undef,
  String $acme_account = undef,
) {
  # Configure puppetdb and its underlying database
  include puppetdb
  # Configure the Puppet master to use puppetdb
  class { 'puppetdb::master::config':
    manage_report_processor => true,
    enable_reports => true,
  }
  # Configure puppetboard
  class { 'puppetboard':
    manage_git         => true,
    manage_virtualenv  => true,
    virtualenv_version => '3.6',
    enable_catalog     => true,
  }
  # Configure Apache on this server
  include apache
  class { 'apache::mod::wsgi':
    package_name     => 'libapache2-mod-wsgi-py3',
    mod_path         => '/usr/lib/apache2/modules/mod_wsgi.so',
  }
  if $use_ssl {
    # Issue certificate for puppetboard
    include acme
    acme::certificate { $::fqdn:
      use_profile    => $acme_profile,
      use_account    => $acme_account,
      letsencrypt_ca => 'production',
      notify         => Class['apache::service'],
    }
    # where acme stores our certificate and key files
    $my_key = "${acme::key_dir}/${::fqdn}/private.key"
    $my_cert = "${acme::crt_dir}/${::fqdn}/cert.pem"
    $my_chain = "${acme::crt_dir}/${::fqdn}/chain.pem"
    # Access Puppetboard through https://$::fqdn
    class { 'puppetboard::apache::vhost':
      vhost_name => $::fqdn,
      port       => 443,
      ssl        => true,
      ssl_cert   => $my_cert,
      ssl_key    => $my_key,
      subscribe  => Acme::Certificate[$::fqdn],
    }
    # Redirect requests to https
    apache::vhost { "${::fqdn}:80":
      servername      => $::fqdn,
      port            => 80,
      docroot         => '/var/www/redirect',
      redirect_status => 'permanent',
      redirect_dest   => "https://${::fqdn}"
    }
  } else {
    # Access Puppetboard through http://$::fqdn
    class { 'puppetboard::apache::vhost':
      vhost_name => $::fqdn,
      port       => 80,
    }
  }
}

with the following hiera data:
# Activate ssl for puppetboard
profiles::puppetserver::use_ssl: true
# Set acme profile and account
profiles::puppetserver::acme_profile: 'cloudflare'
profiles::puppetserver::acme_account<EMAIL_ADDRESS>

@phifre Thanks! I guess you call the acme class somewhere else to set accounts and profiles?

Well I have the include acme in this profile and the common.yaml sets the accounts and profiles:
....
acme::accounts<EMAIL_ADDRESS>acme::profiles:
  'cloudflare':
    challengetype: 'dns-01'
    hook: 'cf'
    env:
      CF_Account_ID: 7xxxxxxxxxxxxxxxxxxxxa
      CF_Token: ENC[PKCS7,MIICmQ...x4Kr/HDqBmq1]
    options: {}
....

Regarding my commit 35a0421: The code lines you mentioned prevent certificates from being shipped to nodes that have not requested them. However the error I am seeing is on the puppetserver.
To my understanding init.pp#L138 is called for every certificate requested by some node. In my case $acme_crts_array = ['gitlab.example.com', 'puppet.example.com'].
Now request/crt.pp#L33 is called with $domain = 'gilab.example.com' (still on the puppetserver).
However in deploy/crt.pp#L78 the puppetserver tries to access the key which is only present on the node that requested the certificate.
This is why puppet on the puppetserver fails for me when any node (other than the puppetserver) has requested a certificate.

Regarding IRC: fraenki :)

Now request/crt.pp#L33 is called with $domain = 'gilab.example.com' (still on the puppetserver).

No, this code is not executed on your Puppetserver, it is a exported resource (note that it's prepended with @@):
https://puppet.com/docs/puppet/6.17/lang_exported.html#syntax

@phifre Thanks for taking the time to debug this issue! Let me summarize our discussion on IRC.
By looking at your PuppetDB we found something interesting:
  {
    "certname": "puppet.example.com",
    "type": "Acme::Deploy::Crt",
    "title": "gitlab.example.com",
    "tags": [
      "deploy",
      "acme::deploy::crt",
      "gitlab.example.com",
      "puppet.example.com",
      "crt",
      "class",
      "puppetserver",
      "profiles",
      "request",
      "acme",
      "profiles::puppetserver",
      "acme::request::crt",
      "roles::puppetserver",
      "roles",
      "node"
    ]
  },

One can see that tags contains both the name of the certificate gitlab.example.com and the name of your Puppetserver puppet.example.com. This explains why the module tries to deploy all certs on the wrong host – it finds a matching tag.
It looks like the nesting is the issue here: By including the acme module in your puppetserver role/profile, the name of your Puppetserver is automatically added to the tags of the exported resource. This also explains why I was unable to reproduce this issue: using the acme module directly does not trigger this issue.
This in turn reveals that the usage of tags in this module is flawed; only using the FQDN as tag identifier is not sufficient, because the FQDN could easily be added to tags by other modules/manifests.
I've modified all tags to use prefixes, this allows the module to better identify which exported resource should be run on the Puppetserver and which should be run only on the requesting node. Automatically added tags are no longer an issue.
BEFORE
In version 2.1.0 the tag only contains the FQDN:
puppet query "resources[certname, type, title, tags] { exported = true and type ~ 'Acme' and title ~ 'test' }"

[
  {
    "certname": "puppetserver.example.com",
    "type": "Acme::Deploy::Crt",
    "title": "test.example.com",
    "tags": [
      "deploy",
      "acme::deploy::crt",
      "crt",
      "class",
      "test.example.com",
      "request",
      "acme",
      "acme::request::crt"
    ]
  },
  {
    "certname": "test.example.com",
    "type": "Acme::Request",
    "title": "test.example.com",
    "tags": [
      "class",
      "acme::certificate",
      "acme::request",
      "puppetserver.example.com",
      "test.example.com",
      "certificate",
      "request",
      "acme",
      "acme::csr",
      "csr"
    ]
  }
]

AFTER
Now the tags are either prefixed with crt_ or master_ to reliably identify the target host for each exported resource:
puppet query "resources[certname, type, title, tags] { exported = true and type ~ 'Acme' and title ~ 'test' }"

[
  {
    "certname": "puppetserver.example.com",
    "type": "Acme::Deploy::Crt",
    "title": "test.example.com",
    "tags": [
      "deploy",
      "acme::deploy::crt",
      "crt",
      "class",
      "crt_test.example.com",
      "test.example.com",
      "request",
      "acme",
      "acme::request::crt"
    ]
  },
  {
    "certname": "test.example.com",
    "type": "Acme::Request",
    "title": "test.example.com",
    "tags": [
      "master_puppetserver.example.com",
      "class",
      "acme::certificate",
      "acme::request",
      "test.example.com",
      "certificate",
      "request",
      "acme",
      "acme::csr",
      "csr"
    ]
  }
]

@phifre, could you give https://github.com/fraenki/puppet-acme/commit/038f49493074267615e62b38bc47439d61789d9a a try?

Awesome! I can confirm it is indeed working now.
I tried with my existing configuration / certificates and the error did not come up on the puppetserver (so it seems backwards compatible) and I cleaned the PuppetDB to issue completely new certificates and in both cases it worked!
Thanks a lot for your time & help! Looking forward to the release ;)

Version 2.2.0 was just released.
@phifre Thanks again for your patience and time!


Ledger - accepting terms - not translated property

When creating profile using Ledger I got not translated property (please_approve)

Fixed.


Bump python version to 3.11

Hello,
Thanks a lot for your work on this client! It's really nice to easily access the typed models.
However, my project is using python 3.11 and this version supports >=3.8, <3.11
As there is not a lot of dependencies, would it be possible to update the requirements so I could install it without downgrading my python version ?
Thanks in advance for any help.
Have a great day.

Hello,
Sorry to bump, but reviewing the PR would help me a lot as I would be able to use the python SDK.
I'm willing to make more changes or test more stuff if needed to make the PR pass.
Thanks,
Have a great day,


SAK-29307 - Add NPE check to RealmsAction for roleid

LGTM, As I said on the Jira this is probably because the user is listed as inactive in the AuthzGroup(Site).


Stack trace exclude option added

Thanks for this reporter I realy liket it.
This little feature missied for the heaven :)

Just a small note for later visitors. This can be uses for instance like this:
--reporter mocha-better-spec-reporter
--reporter-options hide-stats=true,stack-exclude=node_modules/**