Language adjustment, especially in German and text size adjustment

It would be a nice feature if you could adapt texts in weather.py to German (or other languages). For example date, times of day and days of the week. A simple adjustment of the text size would also be ingenious, so that texts on the info screen and also in the feels like, wind, humidity window could be adjusted accordingly.

I think this may be easier than I first thought... I will push up a change shortly that adds a new configuration setting so that the results from the Dark Sky api can be in any language they support. For example, here's the daily summary in multiple languages:

English: "Possible drizzle in the morning."
German: "Nieselregen m\u00f6glich am Vormittag."
Czech: "R\u00e1no mo\u017enost mrholen\u00ed."

Note the non-english ones include unicode characters too

Further on and on! I'm glad to see you're making progress!

@genebean  Hi I tried the new version and conditions_text is translated very well. The only two things that bothers me is the translation of the day of the week and the month. Would there be any possibility to translate this in the future, or at least suggest what part of the code to focus on? Thank you. I add photos of my changes and translations to Czech language. Thank you very mutch. https://drive.google.com/open?id=1FepewO1XvrovqhtK-I1exCIekFOzKEF3  and  https://drive.google.com/open?id=11slENn3kBLieMb5y4ScYYQVM8RmQToUi

Have you tried the setting yet @dodas425 ?
Sent with GitHawk

Sorry I didn't get back to you sooner. I've been under some stress with work I had to do at home. I haven't had time to apply the changes you've made so nicely. Are the translations in now? Thanks so much!
Von: Gene Liverman<EMAIL_ADDRESS>Gesendet: Freitag, 28. Februar 2020 12:48
An: genebean/PiWeatherRock<EMAIL_ADDRESS>Cc: dodas425<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Betreff: Re: [genebean/PiWeatherRock] Language adjustment, especially in German and text size adjustment (#31)
Have you tried the setting yet @dodas425 https://github.com/dodas425  ?
Sent with GitHawk http://githawk.com
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/31?email_source=notifications&email_token=AOBY6ILNXDV2U7U3BM3CWGLRFD2WPA5CNFSM4KMQKDR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENIIJOA#issuecomment-592479416 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBY6IOQ6OWN2BXQFQHKEC3RFD2WPANCNFSM4KMQKDRQ .  https://github.com/notifications/beacon/AOBY6IKPCTHISQA25Z6S5O3RFD2WPA5CNFSM4KMQKDR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENIIJOA.gif

No problem! The parts that come directly from Dark Sky like the summary are now translated. I just realized that the only documentation of this is in the sample config file though. I’ll get the docs updated and link them here so it’s more clear.
Sent with GitHawk

Hi there! This is how the 2 views look on my display. Unfortunately, the writing and the texts do not fit on my 320/240 resolution display. Do you already have a solution to my resolution?

@dodas425  Hi look to line 632 in weather.py, you might be a bit further or closer
find this line:  time_string = time.strftime("%-d. %b,   %-H:%M", time.localtime())   and test this change.

@dodas425  and here is a nice explanation of what each value means. For example, you may have to use only time to fit the text. try it
https://strftime.org/

@dodas425  or there is time and tada text size line 267 at me         self.time_date_small_text_height = 0.175

This coming week I am planning on digging into the issues with the 320 resolution. I had another project with a deadline that has taken my time this week.
Sent with GitHawk

https://linkode.org/#RanYQoA2t1cJJVpjFX5PO4 will help with the translation bit

Hello. This is probably not for me, I filled in this table a long time ago.
My language is Czech (cs)
---------- Původní e-mail ----------
Od: Gene Liverman<EMAIL_ADDRESS>Komu: genebean/PiWeatherRock<EMAIL_ADDRESS>Datum: 11. 5. 2020 15:01:28
Předmět: Re: [genebean/PiWeatherRock] Language adjustment, especially in
German and text size adjustment (#31)
"
https://linkode.org/#RanYQoA2t1cJJVpjFX5PO4
(https://linkode.org/#RanYQoA2t1cJJVpjFX5PO4) will help with the translation
bit
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
(https://github.com/genebean/PiWeatherRock/issues/31#issuecomment-626686912)
, or unsubscribe
(https://github.com/notifications/unsubscribe-auth/AJRBFKEQKNB2TQU5S7G25VTRQ7ZKFANCNFSM4KMQKDRQ)
.
"

@repkadan sorry, no - the link was because I got @metaMMA to share it with me the other day and I wanted to include it here to keep from losing it. With the move to ClimaCell and the changes I have already merged into the code base its going to be even more important that I deal with all the places that need the language taken into account. Thanks for filling it in too!

Hello. OK. Have fun.
---------- Původní e-mail ----------
Od: Gene Liverman<EMAIL_ADDRESS>Komu: genebean/PiWeatherRock<EMAIL_ADDRESS>Datum: 11. 5. 2020 22:37:43
Předmět: Re: [genebean/PiWeatherRock] Language adjustment, especially in
German and text size adjustment (#31)
"
@repkadan(https://github.com/repkadan) sorry, no - the link was because I
got @metaMMA(https://github.com/metaMMA) to share it with me the other day
and I wanted to include it here to keep from losing it. With the move to
ClimaCell and the changes I have already merged into the code base its going
to be even more important that I deal with all the places that need the
language taken into account. Thanks for filling it in too!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
(https://github.com/genebean/PiWeatherRock/issues/31#issuecomment-626948263)
, or unsubscribe
(https://github.com/notifications/unsubscribe-auth/AJRBFKBKKHJ7FRJY75Y3BY3RRBOZJANCNFSM4KMQKDRQ)
.
"


chore: bump sqlx version due to security alert

User description
also had to bump tempfile for it to work

PR Type
Enhancement, Bug fix

Description

Upgraded sqlx dependency from version 0.7.4 to 0.8.1 to address a security alert.
Updated tempfile dependency in dev-dependencies from 3.10.0 to 3.10.1 for compatibility with the new sqlx version.
No changes to feature flags or other dependencies.
This update improves security and ensures compatibility between dependencies.

Changes walkthrough 📝
Relevant filesDependencies

Cargo.tomlUpdate sqlx and tempfile dependencies

Cargo.toml
Updated sqlx dependency from version 0.7.4 to 0.8.1  Bumped tempfile dependency in dev-dependencies from 3.10.0 to 3.10.1

+2/-2

💡 PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

This version is broken, waiting for SQLX to release a new patch version with this fixed.


Tag prefix

All tags used in this role should be prefixed by some role-specific prefix to avoid conflicts with other roles. I suggest to use rhel6stig_ prefix.

@jtyr Can you bring this up on the mailing list? I'm open to it, but want to make sure nobody is currently heavily dependent on the current tag naming convention.

At this stage in the game, I'd leave it as-is, and add this as a proposition for future roles down the road.  ansible-lockdown/CONTRIBUTING is probably the best place to propose such changes.  (And the above-referenced list.)


Update error message on spo navigation node add

When adding a navigation node, the option location is optional. However, when we are not mentioning a parentNodeId, the error message being returned to the user is: Error: undefined is not a valid value for the location option. Allowed values are QuickLaunch|TopNavigationBar. It might be better to add a more clearer description like:
'Location is required when not specifying a parentNodeId. The allowed values are QuickLaunch or TopNavigationBar'
Also it might be handy if we mention in the documentation file to specify either parentNodeId or location and also include the options in the initOptionSets method so that an error is thrown when both of the options are not used.

Looks like a good enhancement tot me 👍
Are you willing to work on this one?

This seems like a good problem for a new developer to start contributing to the CLI. Feel free to open this one up to the community!

Can I work on this?


judge whether a moving point is on a line

I am now using Leaflet.MovingMarker，and i want to know when the marker is moving，how to judge it whether on a given polyline.

Hi, great to hear that you find Leaflet useful!
However, this issue tracker is used for reporting bugs and discussing new features. For questions on using Leaflet, please use gis.stackexchange.com or stackoverflow.
If you are really sure that this is a bug in leaflet, or a feature request, please change the wording to make it look like a bug report.


Change google maps api key by google maps client id

This changes the way we set google maps key. As of today, google maps key is now google maps client id, and it will be set as in:
https://developers.google.com/maps/documentation/business/clientside/

Fixes #3589.
REVIEWER: @javisantana

Frontend tests were OK :+1: (details)

Take a look now @javisantana when you have time.

retest this please

Frontend tests were OK :+1: (details)

:dancer:

Frontend tests were OK :+1: (details)

bump!

Frontend tests were OK :+1: (details)

Frontend tests were OK :+1: (details)

@xavijam review it please

Frontend tests were OK :+1: (details)

Basically we should review where we load the google maps library and add the conditional if we need to add the new google maps query string.

Looks good.

Frontend tests were OK :+1: (details)


workshop feedback

Let's take people to the workshop.md, no need to take them to the readme.md
since the README.md will most likely only ve visited from github, let's change the newsletter HTML for a direct link: https://www.getrevue.co/profile/ploomber and just tell people "if you want to get updates, subscribe"
the top of the workshop.md looks pretty busy, I think let's remove the setup section (it's in the README.md anyway). If people get to this stage, we can assume they already configured their environment
when I open the workshop.md in binder, the %%bash magics do not appear:

hence, the cells wont run. this can be fixed by adding jupytext metadata at the top of the file. add this to the top of workshop.md
---
jupyter:
  jupytext:
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.3'
      jupytext_version: 1.13.6
  kernelspec:
    display_name: Python 3 (ipykernel)
    language: python
    name: python3
---

one more thing, workshop.md top cell: the newsletter cell has "sh" as the language but it should be "python":

Done in #3


Is it possible to get printer char width?

Is it possible to get printer total printable width in chars?
I can't seem to find that info anywhere.
I have been doing some research and I have noticed that in Epson's OPOS for .NET they are using this command:
int iRecLineCharsCount = m_Printer.RecLineCharsList.Length;

Where m_Printer is instanced this way:
//Create PosExplorer
PosExplorer posExplorer = new PosExplorer();

DeviceInfo deviceInfo = null;

try
{
	deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter,strLogicalName);
	m_Printer =(PosPrinter)posExplorer.CreateInstance(deviceInfo);
}
catch(Exception)
{
	ChangeButtonStatus();
	return;
}

You can find the program to install here:
https://download.epson-biz.com/modules/pos/index.php?page=soft&scat=39
If you only install the examples you can find the code in the "PrinterSample_Step7 in file FrameStep7.cs
Best Regards
Bjarne Pedersen

Hey @maximuss thanks for reaching out and providing this detail!
I haven't used OPOS for anything serious, but I will tell you how I think this works, and perhaps you can do some more research and let us know what you find.
My understanding is that OPOS (and UPOS) are operating at a level above the ESC/POS protocol.  They do ESC/POS when interacting with the devices, but they also provide a uniform interface to communicate with devices.  So when you install a device driver that has support for OPOS/UPOS, you are also registering a device with your OS within the OPOS/UPOS system.
So really when you query DeviceInfo what you are doing is extracting the information that the driver provider registered with OPOS.
ESCPOS_NET as a library operates directly via serial/TCP, so it doesn't have knowledge of the devices, drivers, or anything like that, it only knows that a device is or isn't listening on a given port or not.  This is one of the advantages of ESCPOS_NET - it is cross-platform to MacOS, Windows, and Linux, and works across USB, Bluetooth, WiFi, Ethernet, Serial, and Parallel - because it doesn't use device drivers and speaks ESC/POS directly.
If you are interested in taking this further, the way that we could accomplish this would be to use the Printer ID command to get the printer model, and then provide a lookup table of printer metadata within the ESC/POS library.  I bet we could find a table or some other information online that would help fill this table out.
https://www.b4x.com/android/forum/threads/how-to-find-out-paper-width-for-an-esc-pos-printer.123231/
@igorocampos do you happen to have any experience with OPOS?

Hi @lukevp this is actually the first time I actually heard of OPOS / UPOS ...
I don't think it's really used down here in Brazil, everyone I've came across just go for plain ESC/POS.

Hi @lukevp
I think you are right about your assumption about how it work. I had a hunch about it.
So I have tried to find some info about my Epson printer (TM-T20III) and I have found this:
"Column capacity receipt -  Paper width 80 mm, 48 / 64"
From this site:
https://www.epson.eu/products/sd/pos-printer/epson-tm-t20iii-series#specifications

FYI, one workaround that I've seen out there is to create a get only property on the instance class that set by a required parameter in the ctor which will determine the total of columns a line has.
And I believe it is that way because the paper roll can also vary, right?
So they set the columns based on the current paper roll.

Yeah, you can adjust the character width by changing the font, and the paper width can also vary (some printers can print to multiple paper widths and some printers have smaller rolls by default) so it's something that would have to be read from metadata.  Would be cool to have a lookup table of printers and their corresponding print widths (and other attributes).  If you're interested in starting this @maximuss  would love a PR.


[BUG] Typescript doesn't find the included types

Observed behavior
I tried to import OpenFeature in a Typescript project but encountered the following error:
Could not find a declaration file for module '@openfeature/js-sdk'. <EMAIL_ADDRESS>implicitly has an 'any' type..
Editing openfeature's package.json so that it references the types from the exports section resolves the problem:
"exports": {
  "import": "./dist/esm/index.js",
  "require": "./dist/cjs/index.js",
  "default": "./dist/cjs/index.js",
  "types": "./dist/types/index.d.ts"
},

Expected Behavior
Typescript should find the included types.
Steps to reproduce
Create a Typescript project and try to import @openfeature/js-sdk.
Typescript version: 4.9.4.
Node version: 16.18.1.
tsconfig:
{
  "compilerOptions": {
    "outDir": "build",
    "target": "ES2022",
    "strict": true,
    "module": "Node16"
  }
}

Hi @talzion12, thanks for reporting this issue. We'll look into it today.

@talzion12 https://github.com/open-feature/js-sdk/pull/355#pullrequestreview-1229313447 an unfortunate issue. Thanks for reporting.


GS Dosage/Dose issue

GS Dose tracker still reads "Dose" and not "Dosage", where it should read "Dosage".

Updated and pushed to server.


Touch Event displays cloned item

When trying to click on an element which has sortablejs applied, the click goes through but it is also, displaying the cloned item on touch of the element.
Using the dealy property from Sortablejs does not work on touch devices and there are issues related to the same on SortableJs library.
Version:
angular-sortablejs: ^1.3.2
sortablejs: ^1.4.2 (which is used internally by angular-sortablejs since I am using angular 2)
Browser tested on: Chrome (59.0.3071.125) (Android Tablet)
Please refer attached video from the zip file for the same.
touch-clone-error.zip

hi @ajinkyau
as long as this is an original library problem we can't do a lot here - this library just enables some angular 2 helpers for the original library, nothing more...

Closing as not related to this particular repository


The behavior or required tag with empty structures was changed

[x] I have looked at the documentation here first?
[x] I have looked at the examples provided that may showcase my question here?

Package version: v10.15.0
Issue:
The behavior or required tag with empty structures was changed. In v10.14.1 the code below passes validation just fine.
Starting from version  v10.15.0 it fails with error:
Key: 'OuterType.Component' Error:Field validation for 'Component' failed on the 'required' tag

It would be nice not to break backward compatibility. I know that this is a rare case, but we currently have problems with some autogenerated code. This is also a possible issue for some usecases of go generics.
Code sample, to showcase or reproduce:
func TestRequiredEmptyComponent(t *testing.T) {
	v := validator.New()
	type Component struct{}
	type OuterType struct {
		Component Component `validate:"required"`
		Other     int
	}
	var val OuterType = OuterType{
		Component: Component{},
		Other:     1,
	}
	if err := v.Struct(val); err != nil {
		t.Error(err)
	}
}

First off, sorry to hear that, I know how frustrating unexpected breaking changes can be.
Just to clarify a bit, the behavior you mentioned was previously undefined since it was not implemented.
As of v.10.15.0, changes were made to implement this functionality. I did not expect this to cause breaking changes.
I'm not sure how feasible it would be for you, but removing the validation tags altogether would replicate the behavior seen in the previous versions.

Yes sorry to hear that it has caused you issues.
The new logic though in this case has corrected the functionality previous to v10.15.0. It should have been failing before given the definition of required which validates if a value is not its default value which Component is in this case.
Along with @MysteriousPotato ‘s suggestion you could also make Component a pointer in this case if set which should also pass the validation.
Out of curiosity what value is Component the way it is defined? Or is it simply as you stated and issue with some code generation somewhere?

Example real production code which broken after updating to 10.15.x:
type CutOff1 struct {
	DaysBefore int
}

type DeliveryDay1 struct {
	CanDeliver bool
	CutOff     *CutOff1 `json:"cutOff,omitempty" validate:"omitempty,dive"`
}

type DeliveryDays1 struct {
	Monday DeliveryDay1 `json:"mon" validate:"required,dive"`
}

func TestRequiredEmptyComponent(t *testing.T) {
	v := validator.New()
	val := DeliveryDays1{
		Monday: DeliveryDay1{
			CanDeliver: false,
		},
	}
	if err := v.Struct(val); err != nil {
		t.Error(err)
	}
}

Because CanDeliver is false (empty value for golang type bool), validator thinks the whole structure is empty.

Hi guys, we're facing the same issue on v10.15.0. A lot of our code fails validation of http request bodies when body end up being equal to zero value. Here is our simplified example:
vdt := validator.New()
var req struct {
	UserID string `header:"X-User-Id" validate:"required"`
	Body   struct {
		BooleanUserProperty bool `json:"boolean_user_property,omitempty"`
	} `request:"body" validate:"required"`
}

// here we parse http request into struct
req.UserID = "asd"
req.Body.BooleanUserProperty = false

if err := vdt.StructCtx(ctx, req); err != nil {
	panic(err)
}

We use validation like this in all our services, so it will be a big lift for us to fix that on our side.

@deankarn I'm not sure if this alone warrants a major version upgrade, but we could revert #1122 and include it in the next version.
A few users have already encountered this issue and I fear this may just be the tip of the iceberg.
This might create a bit of confusion among the early adopters of the new feature, but it may be a better alternative than introducing a breaking change.
I'd be willing to tackle the task if you agree with the proposition.
This would include adding clarifications and examples on how to use tags with nested structs.
I believe the issue raised by @TelpeNight regarding generics can be illustrated as follows:
func main() {
	type Option[T any] struct {
		V T `validate:"required"`
	}

	v := validator.New()
	if err := v.Struct(Option[struct{}]{}); err != nil {
		// Did not return an error prior to v10.15.0
	}
}

Hi all, first off I want to say I'm sorry this is causing so many issues and all options are on the table.
I also think it's important to all be on the same page about the changes implemented in order to have an informed discussion before deciding on next actions.
let's start with the definition of required:
This validates that the value is not the data types default zero value. For numbers ensures value is not zero.
For strings ensures value is not "".
For slices, maps, pointers, interfaces, channels and functions ensures the value is not nil.
For structs ensures value is not the zero value.

So required checks if something is it's default value in Go is the raw takeaway.
The behaviour of required wasn't actually changed in https://github.com/go-playground/validator/pull/1122. Yes a couple of lines here and here were updated to be more succinct, but are a no-op change and do not change the behaviour.
Why are people having these issues now after https://github.com/go-playground/validator/pull/1122?
 Yes regrettably so, these validations were not even being attempted to be run and would reach this code here diving right into the structs fields not checking anything at the struct level.
To summarize so far
https://github.com/go-playground/validator/pull/1122 corrected the behaviour of the validator package and peoples expectations of how it worked.
For @asv 's, @phoenix2x's, @TelpeNight and @jonathan-innis' here examples are actually being applied as defined.
My hesitation in reverting this is that it hides some very nasty bugs in others code, whereby it appears to be working correctly but in fact is not working at all. An example of this is @jonathan-innis' issue which boils down to this line here where it's trying to validate a minimum 15 minute value of a custom duration type. Although it has caused it to start failing in a noticeable way, that's actually probably a good thing because the validation wasn't working at all before, likely causing undefined behaviour within the application/system itself potentially causing far worse issues.
options + pros & conns

I could revert that specific change and cut a new major version.

pro - less work for community to correct a bunch of code.
conn - continues to hide and not correctly evaluate struct validations.
conn - can break code people have written since merging the change.

Leave it in place as it is a correction of behaviour.

pro - corrects unexpected behaviour of this package
pro - now highlights issues in codebases where logic appears to be working but is in fact not working at all. Super inconvenient, however will lead to correct behaviour of applications.
conn - causes the community work to correct the incorrect validations defined that were not being applied before.

Which is the lesser of two evils? IMO undefined behaviour is far worse and I'd lean towards option 2 because of that.
Though experiments
For option 2 above, although not fun nor easy to correct all that logic, if they remain on version v10.14.1 then everything operates as before and have ample time to correct before upgrading to v10.15.x+
For option 1 above if I cut a new release, I then will put the v10 series into essentially archive mode in order to concentrate on v11+ series because along with the very generous help of some key people like @MysteriousPotato & @robinlieb (sorry if missing anybody) am the sole maintainer of this entire org and unfortunately demands on my time formidable.
As a result to get any new fixes or new functionality would have to be applied to the v11 series going forward causing at minimum just as much work as option 2, likely far more having to update all import paths also.
Final thoughts
Thank you for bearing with this long post and again all options still on the table for discussion but am clearly leaning today with keeping the changes as those nasty bugs being hidden are so bad.
I for one have had my code broken by Go STD library behavioural changes many many times and so understand and feel your pain.

Hi all, first of all, thank you for your work, go-validator is a wonderful library.
But I see a problem here:

Naming problem. I'm sure 99% of newbies expect that required means "absolutely necessary", so maybe in v11 rename it to notempty / notblank / etc?
Compatibility problem. It's not so much important whether required worked correctly or not before, it's more important that a very large number of projects relied on this wrong behavior. So the right thing to do was to release v11 in this case, if there is even the slightest possibility of breaking other people's programs.

I'm not aware of it, but what is the problem to implement "fair required"? Any tickets, documentation explaining the problem?

Hey @asv thanks you for discussing :)

Naming problem. I'm sure 99% of newbies expect that required means "absolutely necessary", so maybe in v11 rename it to notempty / notblank / etc?

Maybe that's true, naming is hard. But will also say in v8 there was an exists and it was changed to required because of the opposite argument and confusion. In either case this discussion really isn't about the name specifically.

Compatibility problem. It's not so much important whether required worked correctly or not before, it's more important that a very large number of projects relied on this wrong behavior.

I would take the opposite side of the argument and would say it is important for a few reasons:

There were other validations tags not correctly working prior to this change.
The behaviour of pointer structs and non-pointer structs was not consistent for required. One got validated, the other didn't, when it should have been.
a very large number of projects relied on this wrong behaviour. As shown this was very bad in @jonathan-innis' example, where it was assumed to be working, but in fact wasn't being validated at all.
Clearly a lot of people were adding validations to struct fields expecting it to work, whether they were correct validations defined or not, their expectations were not being met as they were not being run at all.

Yes the behaviour is different in this one specific way, but it comes in the form of a correction to validation behaviour and not an unintended change.

So the right thing to do was to release v11 in this case, if there is even the slightest possibility of breaking other people's programs.

I very much wish this statement was always true, unfortunately though corrections happen to code all the time which changes behaviour, in the form of a correction.
Just because behaviour could change in anyones code is not 100% cut and dry must make a major version bump, here's one example: https://github.com/go-playground/validator/pull/1146 which corrected how floats were parsed, which was a behavioural change which could cause some people programs to change behaviour and now fail validations, however they will now be correctly failing.
I see this correction to be very similar to the above because it's corrected calling the validations that were asked for, the difference is it's at a higher level and applies to more than just one validation.
Again still thinking about all of this and considering everything.

Hi guys,
Just want to add our opinion here.
The problem with Option 2 is that it introduces a significant risk of producing bugs in existing projects. The change is very subtle so it's not easy to catch it with tests, in our case it was not found by unit tests or integration tests. So the question is do we want to sneakily break a potentially large number of projects that were working before and fix some number of projects that never worked? Or do we want to cut a Major version with big patch notes that explain the behavior and allow people to be mindful about this upgrade? I personally don't see any drawbacks with a Major version except that it might take more time for some people to adopt it, which should be fine I suppose.
Thank you for maintaining the library:)

Hey all, been thinking and losing a lot of sleep over this and think we can meet in the middle with a compromise.
I've created this POC PR, still need to add back a few tests and docs but mostly there, which re-implements the struct level validations in a different way that supports more built-in tags.
The gist of it being I've added a special case which will ignore the required tag on non-pointer structs as before the change, however still run and fail on other validations.
Reasoning is I can understand and appreciate the misuse of the required tag, and don't want to break a ton of existing code. However, I also don't want to allow/hide failed validations on structs that were not being run before leading to undefined behaviour such as in @jonathan-innis' case which is a fix in my eyes.
I'd like to hear your thoughts on this compromise as I don't wish to release a new Major version at this time.

Hey all,
PR is now ready for review, tests, docs, etc.. all added back and even new way to opt-in to nee behaviour https://github.com/go-playground/validator/pull/1150
Going to leave the PR open for your, or anyones, comment for a few days but then will merge if there's no issue found.

Hi @deankarn I think I have a related issue - but may be stemming from same thing, not quite sure. I'm happy to write as separate issue if needed. It looks like the v10.15.2 update is not handling []byte type (or possibly just alias for that type) that doesn't even have validation tags on it. Check this out:
Describe("V10.15 bug", func() {
	type Thing struct {
		Name  string `validate:"required"`
		Token uuid.UUID
	}

	It("should not error on validation", func() {
		var err error
		Expect(func() {
			err = validate.Struct(Thing{Name: "test"})
		}).NotTo(Panic())
		Expect(err).To(BeNil())
	})
})

results in output:
V10.15 bug [It] should not error on validation
  [FAILED] Expected
      <func()>: 0x1053bc9b0
  not to panic, but panicked with
      <*reflect.ValueError | 0x1400000dbf0>:
      reflect: call of reflect.Value.Type on zero Value
      {
          Method: "reflect.Value.Type",
          Kind: 0,
      }
  In [It] at: /path/to/the_test.go:28 @ 08/29/23 16:42:47.511

I can work around this by explicitly using validate:"-" tag, but since there is no validate tag on this field at all, should it even try to delve into its type info?

@bradleygore I tried to reproduce it using both []byte and an alias and could not.
I think it's unlikely that this is related to the new changes. Maybe a new issue would be better.
Is it possible you're using RegisterCustomTypeFunc on uuid.UUID and the CustomTypeFunc somehow returns nil?

@MysteriousPotato I didn't even think of the custom TypeFunc registration. You're right, we do have one - and it does return nil in a specific scenario:
validCop.RegisterCustomTypeFunc(func(field reflect.Value) interface{} {
	if uid, ok := field.Interface().(uuid.UUID); ok {
		if uid == uuid.Nil {
			return nil // <--------
		}
		return uid.String()
	}
	return field
}, uuid.New())

It has been working with the nil value up until now, however if that was kind of an unintended usage I'm happy to adjust it. I should likely just return empty string for that case as an empty string would fail the required tag (I think that's the only tag we use on uuid fields). I'll do some more with this tomorrow within the codebase in question and see if anything pops up with the empty string approach.
Thanks for taking the time to help think this through! 😃

@bradleygore This is what I initially thought. But then I saw #1155, which mentions an example in the docs that does return nil.

@bradleygore this should be resolved thanks to @MysteriousPotato 's PR in release https://github.com/go-playground/validator/releases/tag/v10.15.3

Awesome - thanks to much @MysteriousPotato and @deankarn 🥳

Hello! Sorry being out of discussion. I think that from the practical point of view making this change optional is the best solution.
But I think that we will adopt latest version with WithRequiredStructEnabled. And will use custom tag that mimics older behavior in places where we really need it.

WHEW lads, just got bit hard by this.
So, @deankarn, when you say above:

I very much wish this statement was always true, unfortunately though corrections happen to code all the time which changes behaviour, in the form of a correction.

(re: this being a v11.x.x as opposed to v10.16.x)
Assuming validator follows SemVer (and it absolutely should if not; it's pretty much the commonly agreed-upon standard these days, and validator uses a three-level versioning number...)
For future reference, I want to refer you to this:

Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes
MINOR version when you add functionality in a backward compatible manner
PATCH version when you make backward compatible bug fixes
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

This versioning scheme is not only an industry standard, it's explicitly in Golang docs:

Modules codify this with semantic versioning and semantic import versioning. If a break in compatibility is required, release a module at a new major version. Modules at major version 2 and higher require a major version suffix as part of their path (like /v2). This preserves the import compatibility rule: packages in different major versions of a module have distinct paths.

Having predictable versioning, and what each level means, is incredibly important when releasing libraries. Please do keep this in mind for future releases, and I strongly encourage you to consider following this standard moving forward.


Default to using main as root actor

Why don't we just let the --root argument of actonc default to main, so it's simple to write a program that follows the convention of having a root actor called main?
It would still be possible to change it by explicitly supplying the --root argument.
@nordlander thoughts?

Our current default is an empty string (""). I tried just changing it to root which then fails when we try to compile __builtin__.act. I should have seen that coming! All libraries etc won't have a root actor.
We already have the concept of being in a project or not. If we are in a project, I think we can expect the project config file or the location of a source file to indicate whether a binary should be built or not. If we are not in a project, a.k.a. in script mode, then we should always build a binary, right? Thus, setting a default actor value like root makes sense, no?

But isn't the point having a default available in the cases where we quickly want to build a binary? That is, when we're outside a project. I think it's correct to assume we want to build a binary in those cases, and a default root actor main sounds better in my ears than root.
But apart from this I believe we'll also want to preserve the ability to run the compiler on a particular file, just to check its static correctness if nothing else. So if the --root option turns into a default behavior we should perhaps add a "check-only" option to cover the special case. Why not call that option --check, with -c as a short-hand?

Blargh, I meant to suggest we default to main as the root actor, not the value root... :)
So I think we agree. When not in a project, we want to default to main.
Yeah, we can do a --check option, or I guess you could just do --root "" to get the current behaviour?

@nordlander is there a way of parsing a file and inspecting the AST to determine whether there is an actor named main... or I mean, I presume that is possible, but how?

We previously wrote in this issue that we should only do this outside of a project... I think that was simply because we focused on the simpler case outside of a project... but really, it doesn't make sense to restrict this, on the contrary, detecting a main actor and using it as root makes sense in a project too I think. It's like a sensible default, which we can then override in the project config.

This is implemented by #726 (except for --check).


Explicit Annotations of the Source of the Conversations

Thank you for the great work, and for open-sourcing the dataset.
The paper mentions that QReCC contains 13,598 dialogues, out of which 9.3K dialogues are based on the questions from QuAC, 80 are from TREC CAsT, and 4.4K are from NQ.
Do you have the annotations of the source of conversations? Specifically, I am looking for where a conversation with a specific "Conversation_no" is from QuAC, TREC CAsT, or NQ.
According to my exploration, the first 80 conversations are from TREC CAsT, and I could match ~5k conversations from QuAC by exact match. However, I think many conversations have some corrections or are shorter than the original QuAC conversations. It will be very helpful to have an explicit mapping .

Hi - Yes, the first 80 are from TREC CAsT. We will add the source annotations soon. Thanks.

We added the conversation source information. You can use the field "Conversation_source".


Check annotations don't look right

Running the --format github formatter outputs warning/error messages like these:
::error file=app/lib/register/creates_user.rb,line=9,col=33::Lint/InterpolationCheck: Interpolation in single quoted string detected. Use double quoted strings if you need interpolation.

But these aren't resulting in the pretty inline annotations highlighted in the README's screenshots. Instead they just show up at the bottom of the build summary (and don't link directly to the code):

The screenshots from the readme for reference:

Relatedly, it would be nice if this action produced fewer annotations. Of these 4 that are generated only one of them contains anything useful:


Include links to documentation in all lint messages

It would be good to include a link to the documentation in all the lint errors. Currently, the text of the lint rules is very short, and users need to know to go to this repo to view the documentation. ESLint does this well, every lint rule has a page on their site (eg. http://eslint.org/docs/rules/no-self-compare) which makes it easy to link to them.

@Daniel15 I might not be looking in the right place, or I might not be running thins in the right way, but I don't see links to documentation on any ESLint errors when I run eslint in my terminal. Can you give us an example of the command you are running and the output you see?

This is something I think eslint itself should do (if it doesn't already), since eslint rules have a docs.url config item, and all of our rules populate that.

@ljharb - Good catch. I don't think ESLint had that at the time this issue was opened though :)

It surely didn't :-) but it does now!


Enhanced GPU discovery and multi-gpu support with concurrency

Carries (and obsoletes if we move this one forward first) #4266 and #4441
This refines our GPU discovery to split it into bootstrapping where we discover information about the GPUs once at startup, and then incrementally refresh just free space information, instead of fully rediscovering the GPUs over and over.
Fixes #3158
Fixes #4198
Fixes #3765

This works great when dealing with standard context size - when I load llama 3.1:70b it detects all 4 gpus, all 81 layers are offloaded and everything works blazing fast
But when I try to set context size to 128k
ollama show --modelfile llama3.1:70b > Modelfile3.1-70b
echo 'PARAMETER num_ctx 131072' >> Modelfile3.1-70b
ollama create llama3.1:70b-128k -f Modelfile3.1-70b

only 10 layers of 81 are offloaded
96Gb are sufficient for all layers and 128K context when running on CPU in LMStudio
I expect same 96Gb of vRam to be sufficient via ollama

Btw, I just tested ollama on 4xA100 160Gb total, and it still gives me 'CUDA error: out of memory' when trying to run 128k request, so something is really messed up here


[MWPW-155061] Secure transaction label is not center aligned with CTA

centre align "secure transactions" in footer
Resolves: MWPW-155061
Test URLs:
Before: https://main--milo--adobecom.hlx.page/drafts/rosahu/footeralignement
After: https://mwpw-155061--milo--rohitsahu.hlx.page/drafts/rosahu/footeralignement

In the test URL, the secure label does not appear center aligned or looking at sth else?

Looks aligned on chrome, what browser are you using @rahulgupta999.

@rohitsahu  / @Axelcureno Idea why the fix isn't works on https://mwpw-155061--milo--rohitsahu.hlx.live/docs/library/kitchen-sink/merch-card and not on https://main--milo--adobecom.hlx.live/docs/library/kitchen-sink/merch-card?milolibs=mwpw-155061--milo--rohitsahu
this needed for doing regressions on production pages across.

@rohitsahu / @Axelcureno Idea why the fix works on https://mwpw-155061--milo--rohitsahu.hlx.live/docs/library/kitchen-sink/merch-card and not on https://main--milo--adobecom.hlx.live/docs/library/kitchen-sink/merch-card?milolibs=mwpw-155061--milo--rohitsahu this needed for doing regressions on production pages across.
I don't see my changes on the later. @Axelcureno @3ch023 Any idea?

@rohitsahu / @Axelcureno Idea why the fix works on https://mwpw-155061--milo--rohitsahu.hlx.live/docs/library/kitchen-sink/merch-card and not on https://main--milo--adobecom.hlx.live/docs/library/kitchen-sink/merch-card?milolibs=mwpw-155061--milo--rohitsahu this needed for doing regressions on production pages across.

I don't see my changes on the later. @Axelcureno @3ch023 @npeltier Any idea?

@Roycethan milolibs parameter will not work on a milo page. It is intended to be used only on milo consumers i.e. dc, cc, bacom, etc.

https://main--milo--adobecom.hlx.live/docs/library/kitchen-sink/merch-card?milolibs=mwpw-155061--milo--rohitsahu

Ok @Axelcureno
@rohitsahu  I see an regression in this change: These below patterns , the third card CTA 's alignment with first two cards ( blue CTA) is disturbed.
https://main--cc--adobecom.hlx.live/pl/creativecloud?milolibs=mwpw-155061--milo--rohitsahu
https://main--cc--adobecom.hlx.live/ua/creativecloud?milolibs=mwpw-155061--milo--rohitsahu
https://main--cc--adobecom.hlx.live/bg/creativecloud?milolibs=mwpw-155061--milo--rohitsahu#

alternatively you can compare with https://main--cc--adobecom.hlx.live/pl/creativecloud

cc @npeltier @mirafedas

https://main--milo--adobecom.hlx.live/docs/library/kitchen-sink/merch-card?milolibs=mwpw-155061--milo--rohitsahu

Ok @Axelcureno @rohitsahu I see an regression in this change: These below patterns , the third card CTA 's alignment with first two cards ( blue CTA) is disturbed. https://main--cc--adobecom.hlx.live/pl/creativecloud?milolibs=mwpw-155061--milo--rohitsahu https://main--cc--adobecom.hlx.live/ua/creativecloud?milolibs=mwpw-155061--milo--rohitsahu https://main--cc--adobecom.hlx.live/bg/creativecloud?milolibs=mwpw-155061--milo--rohitsahu#  alternatively you can compare with https://main--cc--adobecom.hlx.live/pl/creativecloud
cc @npeltier @mirafedas

Fixed

https://mwpw-155061--milo--rohitsahu.hlx.page/drafts/rosahu/footeralignement

Thanks , Yes its fixed
and example for two cta's with label:
https://main--dc--adobecom.hlx.live/acrobat/features/modify-pdfs?milolibs=mwpw-155061--milo--rohitsahu


Insert single row gets array back in typings

I'm trying to insert a single row, but the typings are resulting in array.

Is there any way I can get a User instead of User[] back?
Even if I try to cast the result I get cast incompatibilities because of QueryBuilder.

I didn't have time yet to dig into this issue, but I just noticed the method insertAndFetch works like a charm.
It infers the right returning type depending if the param is an array or object.

If all you got to return is the correspondent object for the row you just inserted you chould simply omit the returning("*"), especially if you are returning all columns. This looks like expected behavior to me, as described in

Fixed in v2.0 branch.


Giant Comments history

I have to hand it to the Freeform Rdio room.
The problem is their chat and queue history is so long at this point that it takes a full 20 seconds to render the content on the page.

The only other annoying problem we have is that a song will start, play for 1-5 seconds and then the Now Playing panel will disappear. Refresh works to start it...after you wait and wait on the page load...lol.
Also, you can wait in silence until the current song has played out and the next one will start normally. Sometimes 10 or more songs will play and sometimes it will do it every 2-3 songs. It does seem to occur for all listeners at the same time.
Let me know if there is anything specific that you are looking for such as if songs don't trigger after a chat or if someone adds a song to the queue. I haven't noticed any particular pattern.
The ones on FreeForm are mostly old Grooveshark people. There have been a few others.
Once this site has the ability to add a playlist, I'll keep content on here 24/7. We are appreciative of what you have to offer and having this has resulted in a few of the GS people to sign up for the unlimited on rdio.
Thanks,
Alan

Since there aren't many people using the party area at the moment, can a temporary button be added where any of us could click to clear chat. Later on a method could be worked out to eliminate chat messages/songs played after "X" amount of time has elapsed.
Thanks,
Alan (FreeForm Radio)


JSON output issues

For some reason, I thought creating my own JSON serialiser was a good idea. It probably isn't:

9746f7a9a9b7fa6527a0f4d62d2b16185bc23d07 (commit message: "Make JSON output valid JSON". This was of course already the intention)
#143
undefined still isn't handled properly
It doesn't handle newer data types, like Sets, Maps, Symbols etc. correctly
There's a perfectly fine JSON.stringify() function available

The only issue is HTML (and arbitrary dict support) that won't work anymore, but I will have to find a different solution to that, possibly with a replacer function.

A replacer isn't an option unfortunately. New data types and cases like undefined have been addressed, and so has the abundance of comma's, so I guess this is fine for now. The warning is still included, but less visible due to less logging.


fix: Remove awkd printf %d with straight calculations

As on alpine there seems to be an overflow on 32bit.
See https://github.com/fabric8io-images/java/issues/16 for more details

@astefanutti fancy for a quick review ?

A test for ci_compiler count (and maybe other options, too) would be cool.


Can't find libpng .lib with vcpkg install of libpng

vcpkg creates a package with the file "libpng16.lib", this crate (or a dependency) searches for "png.lib" instead.

Let's close this for now. There's another issue generally for vcpkg things


CryptoProvider is not checking resources on startup

Current Implementation
Resource are loaded in the getPrivateKey and getCertificate methods. If the resources can't be loaded an exception is thrown at runtime.
Also the UnitTest CryptoProviderTest is not testing what the name 'constructorInitializesCryptoArtifacts' suggests.
Suggested Enhancement
Load the resources in a @PostConstruct method. If resources can't be loaded an exception is thrown at startup and the application will not start.
Expected Benefits
Configuration errors are detected on startup not during runtime. If the application is deployed in a blue/green fashion the error can be fixed before the user is affected.

Hi, I am new to the open-source project, but I would like to start making the contribution. This task seems simple enough for a beginner. Please assign this task to me, or any other low hanging fruit.  Thanks


License declaration?

Hi @kevinscaria, is this released under an open source license? Would you be able to add a license declaration?
Thanks!

Hey @brianwarner , It is released under the MIT open source license. Reopen this thread if you have any other issues.

That's great, thanks for the quick reply (and the easy-to-use license)!


text infilling cases

Thanks for your wonderful work!
I tried
bash scripts/generate_block.sh \
     config_tasks/model_blocklm_large.sh

with many context inputs, but got unsatisfied predictions (weird tokens or not consistently with local context), for example:
#1
Context: Ng is a good teacher at [MASK] .

GLM: [CLS] ng is a good teacher at [MASK] . [PAD] <|startofpiece|> are . e

#2
Context: Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a [MASK] in online education

GLM: [CLS] ng is an adjunct professor at [MASK] ( formerly associate professor and director of its stanford ai lab or sail ) . also a [MASK] in online education [PAD] <|startofpiece|> the university of arizona <|startofpiece|> researcher at the

#3
Context: Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a [MASK] in online education, Ng co-founded Coursera and deeplearning.ai.

GLM: [CLS] ng is an adjunct professor at [MASK] ( formerly associate professor and director of its stanford ai lab or sail ) . also a [MASK] in online education , ng co - founded coursera and deeplearning . ai . [PAD] <|startofpiece|> the university of michigan <|startofpiece|> senior associate at the university of

I want to generate multiple spans for a given context, I was wondering whether I have mistakes in using the scripts.

@qtli Hi,
Thanks for your interest in our work. I think there are two reasons accounted for this:

Model scale: the default model in your command is model_blocklm_large.sh, which is a model with only 335M parameters. Models at this scale should not be expected to generate consistent and very satisfying output without proper fine-tuning. Please try larger models like model_blocklm_1.5_generation.sh (515M), model_blocklm_2B.sh (2B), or model_blocklm_10B.sh (10B).
Default decoding strategy: the default strategy in the script you have run is based on top-k sampling, which is a random decoding strategy. In most cases, this strategy does not output the best scored output. You may try beam search (as stated in an example scripts of GLM-130B) for better and more consistent generation.

I hope my answers can help you. Feel free ask other questions if you need help.

Thanks for your prompt reply!
I have downloaded 2B model and change the generate_block.sh into:
#!/bin/bash
CHECKPOINT_PATH=/root/data/checkpoints

source $1

MPSIZE=1
MAXSEQLEN=512
MASTER_PORT=$(shuf -n 1 -i 10000-65535)

# BeamSearchStrategy args
NUM_BEAMS=4
LENGTH_PENALTY=1.0
NO_REPEAT_NGRAM=3

#SAMPLING ARGS
TEMP=0.9
#If TOPK/TOPP are 0 it defaults to greedy sampling, top-k will also override top-p
#TOPK=40
TOPK=1
TOPP=0

script_path=$(realpath $0)
script_dir=$(dirname $script_path)

config_json="$script_dir/ds_config.json"

python -m torch.distributed.launch --nproc_per_node=$MPSIZE --master_port $MASTER_PORT generate_samples.py \
       --DDP-impl none \
       --model-parallel-size $MPSIZE \
       $MODEL_ARGS \
       --fp16 \
       --cache-dir cache \
       --out-seq-length $MAXSEQLEN \
       --seq-length 512 \
       --num-beams $NUM_BEAMS \
       --length-penalty $LENGTH_PENALTY \
       --no-repeat-ngram-size $NO_REPEAT_NGRAM \
       --temperature $TEMP \
       --top_k $TOPK \
       --top_p $TOPP

and run:
bash scripts/generate_block.sh config_tasks/model_blocklm_2B.sh

However, it reports bug, like:
Context prompt (stop to exit) >>> Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a pioneer in online education, Ng co-founded Coursera and deeplearning.ai.
Traceback (most recent call last):
  File "generate_samples.py", line 348, in <module>
    main()
  File "generate_samples.py", line 344, in main
    generate_samples(model, tokenizer, args, torch.cuda.current_device())
  File "generate_samples.py", line 299, in generate_samples
    tokens, mems = sample_sequence(model, tokenizer, tokens, position,
  File "generate_samples.py", line 207, in sample_sequence
    tokens, mems = beam_scorer.finalize(tokens, beam_scores, next_tokens, next_indices, eos_token_id=args.eod_token,
  File "/GLM/generation_utils.py", line 308, in finalize
    decoded[i, : sent_lengths[i]] = hypo
RuntimeError: The expanded size of the tensor (512) must match the existing size (513) at non-singleton dimension 0.  Target sizes: [512].  Tensor sizes: [513]
Traceback (most recent call last):
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in <module>
    main()
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
    raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/root/anaconda3/envs/glm/bin/python', '-u', 'generate_samples.py', '--local_rank=0', '--DDP-impl', 'none', '--model-parallel-size', '1', '--block-lm', '--cloze-eval', '--task-mask', '--num-layers', '36', '--hidden-size', '2048', '--num-attention-heads', '32', '--max-position-embeddings', '1024', '--tokenizer-type', 'GPT2BPETokenizer', '--load-pretrained', '/GLM/blocklm-2b/blocklm-2b-512', '--fp16', '--cache-dir', 'cache', '--out-seq-length', '512', '--seq-length', '512', '--num-beams', '4', '--length-penalty', '1.0', '--no-repeat-ngram-size', '3', '--temperature', '0.9', '--top_k', '1', '--top_p', '0']' returned non-zero exit status 1.

Could you give me some hints about this bug? Thanks in advance.

Can you provide the prompt that causes the error?

--seq-length 512 \

@qtli Hi,
I think changing this to 513 will solve the problem. Maybe you can have a try.

Can you provide the prompt that causes the error?

@duzx16 hi, the prompt is Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a pioneer in online education, Ng co-founded Coursera and deeplearning.ai.

--seq-length 512 \

@qtli Hi,
I think changing this to 513 will solve the problem. Maybe you can have a try.

@Xiao9905 Hi, i try change it but it fails. I find the line 296 in generation_utils.py have some relation with the length bug:
sent_max_len = min(sent_lengths.max().item(), self.max_length)

But if I change min to max, it reports a new bug:
Context prompt (stop to exit) >>> Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a pioneer in online education, Ng co-founded Coursera and deeplearning.ai.
> /GLM/generation_utils.py(309)finalize()
-> decoded[i, : sent_lengths[i]] = hypo
(Pdb) c
Traceback (most recent call last):
  File "generate_samples.py", line 348, in <module>
    main()
  File "generate_samples.py", line 344, in main
    generate_samples(model, tokenizer, args, torch.cuda.current_device())
  File "generate_samples.py", line 299, in generate_samples
    tokens, mems = sample_sequence(model, tokenizer, tokens, position,
  File "generate_samples.py", line 207, in sample_sequence
    tokens, mems = beam_scorer.finalize(tokens, beam_scores, next_tokens, next_indices, eos_token_id=args.eod_token,
ValueError: too many values to unpack (expected 2)
Traceback (most recent call last):
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in <module>
    main()
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
    raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/root/anaconda3/envs/glm/bin/python', '-u', 'generate_samples.py', '--local_rank=0', '--DDP-impl', 'none', '--model-parallel-size', '1', '--block-lm', '--cloze-eval', '--task-mask', '--num-layers', '36', '--hidden-size', '2048', '--num-attention-heads', '32', '--max-position-embeddings', '1024', '--tokenizer-type', 'GPT2BPETokenizer', '--load-pretrained', '/GLM/blocklm-2b/blocklm-2b-512', '--fp16', '--cache-dir', 'cache', '--out-seq-length', '512', '--seq-length', '512', '--num-beams', '4', '--length-penalty', '1.0', '--no-repeat-ngram-size', '3', '--temperature', '0.9', '--top_k', '1', '--top_p', '0']' returned non-zero exit status 1

@qtli This bug has been fixed. Can you pull the latest code and retry?

@duzx16 Many thanks for your help. I pull the updated code and test again. It shows a warning (we need a latest_checkpointed_iteration.txt in blocklm-2b-512/) and I don't know if I could ignore it.
->0->-1/-1/-1 [22] -1/-1/-1->0->-1|-1->0->-1/-1/-1 [23] -1/-1/-1->0->-1|-1->0->-1/-1/-1 [24] -1/-1/-1->0->-1|-1->0->-1/-1/-1 [25] -1/-1/-1->0->-1|-1->0->-1/-1
ts-03fcc044fa9e464396bb976d1b07fb38-launcher:1004:1024 [0] NCCL INFO Setting affinity for GPU 0 to ff,ffff0000,00fffffc
ts-03fcc044fa9e464396bb976d1b07fb38-launcher:1004:1024 [0] NCCL INFO 32 coll channels, 32 p2p channels, 32 p2p channels per peer
ts-03fcc044fa9e464396bb976d1b07fb38-launcher:1004:1024 [0] NCCL INFO comm 0x7f91c4000e50 rank 0 nranks 1 cudaDev 0 busId 1a000 - Init COMPLETE
building GPT2 model ...
 > number of parameters on model parallel rank 0:<PHONE_NUMBER>
WARNING: could not find the metadata file /root/data/checkpoints/blocklm-2b-512/latest_checkpointed_iteration.txt
    will not load any checkpoints and will start from random

Context prompt (stop to exit) >>> Prompt should not be empty!

Context prompt (stop to exit) >>> Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a pioneer in online education, Ng co-founded Coursera and deeplearning.ai.

I still cannot use GLM_2B to generate spans via beam search. I do not whether I misuse the code. The error message is:
Context: Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a pioneer in online education, Ng co-founded Coursera and deeplearning.ai.
Traceback (most recent call last):
  File "generate_samples.py", line 348, in <module>
    main()
  File "generate_samples.py", line 344, in main
    generate_samples(model, tokenizer, args, torch.cuda.current_device())
  File "generate_samples.py", line 308, in generate_samples
    decode_tokens = tokenizer.DecodeIds(output_tokens_list.tolist())
  File "/GLM/data_utils/tokenization.py", line 1124, in DecodeIds
    return self.text_tokenizer.decode(Ids)
  File "/GLM/data_utils/tokenization_gpt2.py", line 273, in decode
    text = ''.join([self.decoder[token] for token in tokens])
  File "/GLM/data_utils/tokenization_gpt2.py", line 273, in <listcomp>
    text = ''.join([self.decoder[token] for token in tokens])
KeyError: 50287
Traceback (most recent call last):
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in <module>
    main()
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
    raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/root/anaconda3/envs/glm/bin/python', '-u', 'generate_samples.py', '--local_rank=0', '--DDP-impl', 'none', '--model-parallel-size', '1', '--block-lm', '--cloze-eval', '--task-mask', '--num-layers', '36', '--hidden-size', '2048', '--num-attention-heads', '32', '--max-position-embeddings', '1024', '--tokenizer-type', 'GPT2BPETokenizer', '--load-pretrained', '/root/data/checkpoints/blocklm-2b-512', '--fp16', '--cache-dir', 'cache', '--out-seq-length', '512', '--seq-length', '512', '--num-beams', '4', '--length-penalty', '1.0', '--no-repeat-ngram-size', '3', '--temperature', '0.9', '--top_k', '1', '--top_p', '0']' returned non-zero exit status 1.

Looking forward to your reply :)

@qtli You should unzip the downloaded checkpoint into /root/data/checkpoints/blocklm-2b-512. In other words there should be a mp_rank_00_model_states.pt under /root/data/checkpoints/blocklm-2b-512. The default folder name after unzipping is blocklm-2b instead of blocklm-2b-512. I will fix that.

Hi, I fix the checkpoint path in the code but it still not works:
Context: Ng is an adjunct professor at [MASK] (formerly associate professor and Director of its Stanford AI Lab or SAIL ). Also a pioneer in online education, Ng co-founded Coursera and deeplearning.ai.
Traceback (most recent call last):
  File "generate_samples.py", line 348, in <module>
    main()
  File "generate_samples.py", line 344, in main
    generate_samples(model, tokenizer, args, torch.cuda.current_device())
  File "generate_samples.py", line 308, in generate_samples
    decode_tokens = tokenizer.DecodeIds(output_tokens_list.tolist())
  File "/apdcephfs/share_916081/qintongli/Explanation_proj/GLM/data_utils/tokenization.py", line 1124, in DecodeIds
    return self.text_tokenizer.decode(Ids)
  File "/apdcephfs/share_916081/qintongli/Explanation_proj/GLM/data_utils/tokenization_gpt2.py", line 273, in decode
    text = ''.join([self.decoder[token] for token in tokens])
  File "/apdcephfs/share_916081/qintongli/Explanation_proj/GLM/data_utils/tokenization_gpt2.py", line 273, in <listcomp>
    text = ''.join([self.decoder[token] for token in tokens])
KeyError:<PHONE_NUMBER>117668420
Traceback (most recent call last):
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/root/anaconda3/envs/glm/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in <module>
    main()
  File "/root/anaconda3/envs/glm/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
    raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/root/anaconda3/envs/glm/bin/python', '-u', 'generate_samples.py', '--local_rank=0', '--DDP-impl', 'none', '--model-parallel-size', '1', '--block-lm', '--cloze-eval', '--task-mask', '--num-layers', '36', '--hidden-size', '2048', '--num-attention-heads', '32', '--max-position-embeddings', '1024', '--tokenizer-type', 'GPT2BPETokenizer', '--load-pretrained', '/apdcephfs/share_916081/qintongli/Explanation_proj/GLM//blocklm-2b', '--fp16', '--cache-dir', 'cache', '--out-seq-length', '512', '--seq-length', '512', '--num-beams', '4', '--length-penalty', '1.0', '--no-repeat-ngram-size', '3', '--temperature', '0.9', '--top_k', '1', '--top_p', '0']' returned non-zero exit status 1.

@qtli The error is caused by changing min to max in the line 296 in generation_utils.py. Can you please retry with the latest code?
Also, make sure you see successfully loaded /root/data/checkpoints/blocklm-2b-512/mp_rank_00_model_states.pt in the log.

Thanks for your reply. It works now!


Add function to menu stop button

Fixed issue #630 .
Clicking the stop button in the menu will stop the program for single and multi robot simulations.
The button will be disabled when the program is not running, and enabled when the program is running.

Thanks for the PR, we would have accepted it but decided against the menu as a whole, see #745. You might want to try that :)


Remove invalid additionalProperties usage

What this PR does / why we need it
Some packages belonging to the TCE repo have an invalid OpenAPI Schema. Particularly, they define additionalProperties: string while it should be either a boolean or another OpenAPI schema.
Details for the Release Notes (PLEASE PROVIDE)

Remove invalid additionalProperties usage

Which issue(s) this PR fixes

Fixes: #2772
Describe testing done for PR

Special notes for your reviewer

Created and pushed a new package repository containing these updates:
projects.registry.vmware.com/tce/main@sha256:aefb217b4065cae6b0b84a9b148947c8b6c8a02b058dc7c9e6421cc084d437ca


[Feature] Evict lake persistent index files if disk is full

Why I'm doing:
If disk is full and persistent index is enabled in cloud native table, load will fail because persistent index can not be written. Evict persistent index file if the free space of disk is lower than the given threshold.
What I'm doing:

Evict persistent index file if the free space of disk is lower than the given threshold.
Refactor some code.

Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.2
[x] 3.1
[ ] 3.0
[ ] 2.5

https://github.com/Mergifyio backport branch-3.1

https://github.com/Mergifyio backport branch-3.2


feat(nodes): Team Players

Introduce a node to fetch a list the players of a team in a given season.
Tasks

[x] Add node
[x] Add icon (and reference to authors)
[x] Add tests

Implemented in #10


improve search UX

 Here is an overview of what got changed by this pull request:

Issues
======
- Added 2

See the complete overview on Codacy


 See also e.g. https://github.com/jkitchin/org-ref/issues/561. AFAICS, https://github.com/seagle0128/.emacs.d/commit/605b86a52476a9c1c83a7944f67d453412536214 is a only a guard for your CI and not really a fix? In any case, I think this is not an elfeed issue, so please consider closing.

This issue is same as https://github.com/jkitchin/org-ref/issues/561. It only exists in fresh startup, and disappears after restarting. That's related to the org version and loading sequence of the packages.
Anyway I will only load it with org 9.0+. Close it.


Fix typo in comment

Nice catch, can you help solve the conflict since we have landed swift3 support.
Cheers


CloudTrail Logs - Update Dictionary

Update new event fields for versions 1.06, 1.07, 1.08
We might need to create new dictionary files, one per version
reference: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html

Hey @Cyb3rPandaH , let me know if you need volunteer for this one. I am doing related work this month so happy to do this alongside. I will chat with you about required changes and target to complete this by May-31.

Hey @ashwin-patil sorry for the late reply.
That would be awesome, thank you man. I'll add you to the assignees group.


added conditional to cover undefined response

Signed-off-by: randybrunopiverger<EMAIL_ADDRESS>
We should not reference array.filter on undefined response values.
Additional check for undefined value to avoid error

@Randy424 Do we want to just return empty data if we encounter a problem, or should we return an error code?
Also, did you hit this in normal operation, or did you have to tweak something to encounter it?

/retest

@KevinFCormier This issue does not really come up in ordinary use of the api. So I think we can hang up this PR for now.


Suggestions

Hello, is there anyway to use this in a regular view instead of view controller ? I'm trying to add it as a subview to another project and can't do this because of the container view

no sorry, you'll have to use a view controller.


[Question] How to check zuul is redirecting request to appropriate service

Hi,
Could you please help me with the code snippet which will help to determine whether zuul is redirecting request to appropriate service.
I am using spring boot & zuul 1.x.
RequestContext.getCurrentContext().getRequest().getRequestURI().toString(); gives me the url which is initiated by browser client, however I am not able to figure out how to make sure zuul is redirecting this request internally to proper service.
Thanks,
Shekhar

It's probably better to ask this on the Spring tracker, but in Zuul 1.x you would use this method: https://github.com/Netflix/zuul/blob/1.x/zuul-netflix/src/main/java/com/netflix/zuul/context/NFRequestContext.java#L74


Disallow str/float to int conversions #108

See individual commit messages for details.
Please note that I have no desire to test and apply analagous changes for Python 2.
If you chose to put this PR on hold for consistency that'd be unfortunate but understandable.

Codecov Report

Merging #112 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
+ Coverage   80.81%   80.85%   +0.03%
==========================================
  Files          81       81
  Lines        4899     4914      +15
==========================================
+ Hits         3959     3973      +14
- Misses        940      941       +1

Impacted Files
Coverage Δ

src/objects/floatob.rs
76.66% <ø> (ø)
:arrow_up:

src/objects/num3.rs
98.97% <100%> (+0.18%)
:arrow_up:

src/ffi3/longobject.rs
0% <0%> (-100%)
:arrow_down:

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 b4f7273...a5d3ed0. Read the comment docs.

i think this change makes sense.
it is ok to leave python2 in current state


[wip] test automatic colab link from doc-builder

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Include risk data in API responses returning a Temporary Accommodation application

See ticket #1120 on the CAS3 Trello board.

The frontend logic that was copied across from AP includes the RoSH/MAPPA risks widget. This information is stored in the database for a Temporary Accommodation application but is not returned by the API.
This should be returned for now as although we don’t know if we need it in the future, it’s fairly trivial to implement, compared to the effort involved in removing it from the frontend.

👍
It seems like we're reasonably following the steer from CAS1 on how to get and set the risk data. Do we understand in what scenarios we might not have any?
I presume everyone on probation has some form of risk rating whether that be high or low? Whenever we see no risk ratings on an application can we presume that they exist but there was a problem finding them upstream? It seems like an important bit of data to be optional.

One way is that the 'create application' endpoint can be called with the query string ?createWithRisks=false, which we've inherited from AP. I don't know the reason this query parameter exists, and it might be the case that we never want to be able to create an application without the risk information. If that's the case, we can throw an error or ignore it, but I didn't want to be too opinionated about what we do given that it seems like there's some unknowns regarding how Apply works in TA.