[SPARK-31450][SQL] Make ExpressionEncoder thread-safe

What changes were proposed in this pull request?
This PR moves the ExpressionEncoder.toRow and ExpressionEncoder.fromRow functions into their own function objects(ExpressionEncoder.Serializer & ExpressionEncoder.Deserializer). This effectively makes the ExpressionEncoder stateless, thread-safe and (more) reusable. The function objects are not thread safe, however they are documented as such and should be used in a more limited scope (making it easier to reason about thread safety).
Why are the changes needed?
ExpressionEncoders are not thread-safe. We had various (nasty) bugs because of this.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/25997/
Test PASSed.

Reviewers please first take a look at the ExpressionEncoder class and specifically the naming of the function objects.

Test build #121313 has started for PR 28223 at commit e6c3391.

Test build #121316 has started for PR 28223 at commit b7699a2.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26000/
Test PASSed.

Test build #121319 has started for PR 28223 at commit a7f948c.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26003/
Test PASSed.

Test build #121320 has started for PR 28223 at commit cc8400c.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26004/
Test PASSed.

Test build #121320 has finished for PR 28223 at commit cc8400c.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121320/
Test FAILed.

Test build #121319 has finished for PR 28223 at commit a7f948c.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121319/
Test FAILed.

Test build #121313 has finished for PR 28223 at commit e6c3391.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
  abstract class Deserializer[T] extends (InternalRow => T)
  abstract class Serializer[T] extends (T => InternalRow)

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121313/
Test FAILed.

Test build #121316 has finished for PR 28223 at commit b7699a2.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121316/
Test FAILed.

Test build #121327 has started for PR 28223 at commit 2c402f9.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26010/
Test PASSed.

Test build #121327 has finished for PR 28223 at commit 2c402f9.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
  abstract class Deserializer[T] extends (InternalRow => T) with Serializable
  abstract class Serializer[T] extends (T => InternalRow) with Serializable

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121327/
Test PASSed.

Thank you, @hvanhovell . Do we need a benchmark about this change?

@dongjoon-hyun it should be a bit of a lateral move performance wise. The expensive bit is generating the code and compiling it, and we are definitely not avoiding that. It might be a bit quicker because it does not excessively copy the expression encoder (which is not for free because of the work which is done in the constructor). What would you like to see benchmarked?

@dongjoon-hyun it should be a bit of a lateral move performance wise. The expensive bit is generating the code and compiling it, and we are definitely not avoiding that. It might be a bit quicker because it does not excessively copy the expression encoder (which is not for free because of the work which is done in the constructor). What would you like to see benchmarked?

Got it. Thank you for confirmation, @hvanhovell .

cc also @JoshRosen

Test build #121361 has started for PR 28223 at commit 5bcff74.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26045/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26048/
Test PASSed.

Test build #121364 has started for PR 28223 at commit bef4d8d.

I feel like @JoshRosen looked at this too a while ago

Test build #121361 has finished for PR 28223 at commit 5bcff74.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121361/
Test PASSed.

Test build #121364 has finished for PR 28223 at commit bef4d8d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121364/
Test PASSed.

Test build #121376 has started for PR 28223 at commit ced396f.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26059/
Test PASSed.

Test build #121376 has finished for PR 28223 at commit ced396f.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121376/
Test PASSed.

Thank you, @hvanhovell and all.
Merged to master/3.0.

Late LGTM.


Uncaught ReferenceError: path is not defined

[Enter steps to reproduce below:]

Open Package config

Atom Version: 0.200.0
System: Mac OS X 10.10.3
Thrown From: grunt-runner package, v0.9.1
Stack Trace
Uncaught ReferenceError: path is not defined
At /Users/superandrew/.atom/packages/grunt-runner/lib/grunt-runner-view.coffee:70

ReferenceError: path is not defined
  at ResultsView.module.exports.ResultsView.parseGruntFile (/Users/superandrew/.atom/packages/grunt-runner/lib/grunt-runner-view.coffee:70:44)
  at /Users/superandrew/.atom/packages/grunt-runner/lib/grunt-runner-view.coffee:42:47
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at Project.module.exports.Project.addPath (/Applications/Atom.app/Contents/Resources/app.asar/src/project.js:274:29)
  at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:37:32)
  at emitTwo (events.js:87:13)
  at EventEmitter.emit (events.js:169:7)

Commands
     -1:29.1.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
  6x -1:21.2.0 core:move-left (atom-text-editor.editor.mini.is-focused)
     -1:19.7.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -1:18.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:51.8.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -0:49.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:02.3.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Config
{
  "core": {
    "disabledPackages": [
      "grunt-runner"
    ]
  }
}

Installed Packages
# User
angularjs, v0.1.0
atom-jshint, v1.5.0
jsformat, v0.8.1
react, v0.11.8
terminal-panel, v1.14.1
terminal-status, v1.6.7

# Dev
No dev packages

This is a duplicate of #54 and fixed in master from https://github.com/nickclaw/atom-grunt-runner/commit/f70872d843affd71e3b2dd2c23d60b1291bdd431.
Just waiting for @nickclaw to publish.
In the meantime you can download the package from here ( you only need to replace lib/grunt-runner-view.coffee ).

Published!


ITEM rp-radio

Hi ! I want create item with you rp-radio did you have an tips for create this ^^ ?

Hey! You can create the item with this form:
server-side:
ESX.RegisterUsableItem('radio', function(source)
	local xPlayer = ESX.GetPlayerFromId(source)
	TriggerClientEvent('Radio.Set', source, true)
end)

But rp-radio doesn't have an server file. Where should i put the code ?

You can register on esx_basicneeds, or another scripts with server-side!
Or you can create one script apart with this (you can call with the name like you want):
fxmanifest.lua:
fx_version 'adamant'
game 'gta5'

server_script 'server.lua'

server.lua:
ESX.RegisterUsableItem('radio', function(source)
	local xPlayer = ESX.GetPlayerFromId(source)
	TriggerClientEvent('Radio.Set', source, true)
end)

when i remove the radio item in my inventory i can still use radio

@mindiw01 it's clearly not like that, your exemple it's for make the item radio usable and your exemple it's wrong.
If u want make the item usable use that in server.lua from esx_basicneeds :
local statusradio = false  ESX.RegisterUsableItem('rp-radio', function(source) 	local xPlayer = ESX.GetPlayerFromId(source) 	if statusradio == false then 	TriggerClientEvent('Radio.Toggle', source) 	print('open') 	statusradio = true 	else 	TriggerClientEvent('Radio.Toggle', source) 	print('off') 	statusradio = false 	end end)

Figured it out. (New user to Mumble)
In Client.lua put this at the top
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Then at the radio command Replace it with mine
	Enabled = true, -- Add a command to be able to open/close the radio
	Name = "radio", -- Command name
	Help = "Toggle hand radio", -- Command help shown in chatbox when typing the command
	Params = {},
	Handler = function(src, args, raw)
		ESX.TriggerServerCallback('rp-radio:getItemAmount', function(quantity)
			if quantity > 0 then
		local playerPed = PlayerPedId()
		local isFalling = IsPedFalling(playerPed)
		local isDead = IsEntityDead(playerPed)

		if not isFalling and Radio.Enabled and Radio.Has and not isDead then
			Radio:Toggle(not Radio.Open)
		elseif (Radio.Open or Radio.On) and ((not Radio.Enabled) or (not Radio.Has) or isDead) then
			Radio:Toggle(false)
			Radio.On = false
			Radio:Remove()
			exports["mumble-voip"]:SetMumbleProperty("radioEnabled", false)
		elseif Radio.Open and isFalling then
			Radio:Toggle(false)
		end
	else
		Radio:Toggle(false)
		Radio.On = false
		Radio:Remove()
		exports["mumble-voip"]:SetMumbleProperty("radioEnabled", false)
	end
end, 'radio')
	end,

Server.lua put this
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
ESX.RegisterServerCallback('rp-radio:getItemAmount', function(source, cb, item)
local xPlayer = ESX.GetPlayerFromId(source)
local quantity = xPlayer.getInventoryItem(item).count
cb(quantity)

end)

when i remove the radio item in my inventory i can still use radio

Did you restart the server after doing what i said?

Yep

Hmm, i mean its a start im getting that as well but If anyone else can help contribute? We have it so it works if you use but if you remove radio you can still use

I put server.lua one to esx_basicneeds, is that bad?

I made the server.lua in the radio file. Its already in the manifest so all you do is make the file and call it server.lua

And this will fix my issue?

Possibly? I cant use the radio when i don't have it but if im on a radio channel it stays but i haven't coded that in yet as i haven't looked at mumble for long

Its not taking radio even out, but when i add radio to registable item its taking radio out but when i drop it its still usable

I got a solution at server.lua add this
`ESX = nil
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
ESX.RegisterServerCallback('rp-radio:getItemamount', function(source, cb, item)
local xPlayer = ESX.GetPlayerFromId(source)
local qtty = xPlayer.getInventoryItem(item).count
cb(qtty)
end)
`
At the client.lua add this
`Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(1, 170) then
ESX.TriggerServerCallback('rp-radio:getItemamount', function(qtty)
if qtty > 0 then
SetRadio(true)
else
SetRadio(false)
ClearPedTasks(GetPlayerPed(-1))
TriggerEvent("pNotify:SendNotification", {
text = "Sul puudub raadio",
type = "error",
timeout = math.random(1000, 1000),
layout = "centerRight",
queue = "right"
})
end
end, 'radio')
end
end
end)`

So anyone got the script?

i use the basic rp-radio from frazzle and works perfectly

i use the basic rp-radio from frazzle and works perfectly

Thanks for the quite pointless message. The issue is about using a radio item.

So anyone got the script?

Yes its here in the github

i use the basic rp-radio from frazzle and works perfectly

Thanks for the quite pointless message. The issue is about using a radio item.

In the type of message, no need you are at the top .. to criticize and give no solutions
We have already given solutions in passing;)

i am not sure but the solution there is showing
Figured it out. (New user to Mumble)
In Client.lua put this at the top
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Then at the radio command Replace it with mine
	Enabled = true, -- Add a command to be able to open/close the radio
	Name = "radio", -- Command name
	Help = "Toggle hand radio", -- Command help shown in chatbox when typing the command
	Params = {},
	Handler = function(src, args, raw)
		ESX.TriggerServerCallback('rp-radio:getItemAmount', function(quantity)
			if quantity > 0 then
		local playerPed = PlayerPedId()
		local isFalling = IsPedFalling(playerPed)
		local isDead = IsEntityDead(playerPed)

		if not isFalling and Radio.Enabled and Radio.Has and not isDead then
			Radio:Toggle(not Radio.Open)
		elseif (Radio.Open or Radio.On) and ((not Radio.Enabled) or (not Radio.Has) or isDead) then
			Radio:Toggle(false)
			Radio.On = false
			Radio:Remove()
			exports["mumble-voip"]:SetMumbleProperty("radioEnabled", false)
		elseif Radio.Open and isFalling then
			Radio:Toggle(false)
		end
	else
		Radio:Toggle(false)
		Radio.On = false
		Radio:Remove()
		exports["mumble-voip"]:SetMumbleProperty("radioEnabled", false)
	end
end, 'radio')
	end,

Server.lua put this
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
ESX.RegisterServerCallback('rp-radio:getItemAmount', function(source, cb, item)
local xPlayer = ESX.GetPlayerFromId(source)
local quantity = xPlayer.getInventoryItem(item).count
cb(quantity)

end)
is it not missing the part that is telling what item there is needed ????

i am not sure but the solution there is showing
Figured it out. (New user to Mumble)
In Client.lua put this at the top
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Then at the radio command Replace it with mine
	Enabled = true, -- Add a command to be able to open/close the radio
	Name = "radio", -- Command name
	Help = "Toggle hand radio", -- Command help shown in chatbox when typing the command
	Params = {},
	Handler = function(src, args, raw)
		ESX.TriggerServerCallback('rp-radio:getItemAmount', function(quantity)
			if quantity > 0 then
		local playerPed = PlayerPedId()
		local isFalling = IsPedFalling(playerPed)
		local isDead = IsEntityDead(playerPed)

		if not isFalling and Radio.Enabled and Radio.Has and not isDead then
			Radio:Toggle(not Radio.Open)
		elseif (Radio.Open or Radio.On) and ((not Radio.Enabled) or (not Radio.Has) or isDead) then
			Radio:Toggle(false)
			Radio.On = false
			Radio:Remove()
			exports["mumble-voip"]:SetMumbleProperty("radioEnabled", false)
		elseif Radio.Open and isFalling then
			Radio:Toggle(false)
		end
	else
		Radio:Toggle(false)
		Radio.On = false
		Radio:Remove()
		exports["mumble-voip"]:SetMumbleProperty("radioEnabled", false)
	end
end, 'radio')
	end,

Server.lua put this
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
ESX.RegisterServerCallback('rp-radio:getItemAmount', function(source, cb, item)
local xPlayer = ESX.GetPlayerFromId(source)
local quantity = xPlayer.getInventoryItem(item).count
cb(quantity)

end)
is it not missing the part that is telling what item there is needed ????

no its here

okay is just it dont works for me
i have too set it, so u can use radio without having the radio
and there is no errors in the console or F8 menu

Tomorrow i can upload whole radio script. So u can just download it

Tomorrow i can upload whole radio script. So u can just download it

I would be very grateful

i want the radio as a item too :/

@Kahvlibanaan0

Tomorrow i can upload whole radio script. So u can just download it

I would be very grateful

that would help a lot :) thanks

Tomorrow i can upload whole radio script. So u can just download it

when will u uploade the script ???

If you have the item stuff fixed and you guys want to solve the issue players can still hear you even they dont have an radio add this:
AddEventHandler('nkrp:loadingScreenOff', function() 	exports["mumble-voip"]:SetRadioChannel(0) end)

If you have the item stuff fixed and you guys want to solve the issue players can still hear you even they dont have an radio add this: (in client)
AddEventHandler('nkrp:loadingScreenOff', function() exports["mumble-voip"]:SetRadioChannel(0) end)

what do u mean this event do ???
cuz for me its dont sound like the problem we are having
can be me there is wrong

I found a way too make it work
ESX.RegisterUsableItem('radio', function(source) local xPlayer = ESX.GetPlayerFromId(source) TriggerClientEvent('Radio.Set', source, true) TriggerClientEvent('Radio.Toggle', source) end)
past that in ur server.lua

Does anyone have a pre written script for it?

Does anyone have a pre written script for it?

i have show the script part there is need right over ur comment

Does anyone have a pre written script for it?

here u go
https://github.com/DNDdjay/RP_radio/tree/main

Doesnt work normaly cuz i have the item i can use it but when i drop it i can still open it with Shift + F3

its not working as toko voip for that u need u rewhite the whole item system in the script

Does anyone have a pre written script for it?

here u go
https://github.com/DNDdjay/RP_radio

I tried using this, using my hotkeys to bring it up. shift and f10
however nothing happens.

do have radio in inventory
restart script in game, unsure if i need a server restart
item is in inventory.

anything else i would need to do?

u have to go in ur inventory and say use radio before u can use it

if i open my inventory i cant open the chat box
also dragging item over to use doesnt show its a useable item
also tried commands /radio /useradio /radiouse, also reverted back to original commands
wonder if i should restart server.. thank you for quick reply been trying to do this

okay what framework are u using ???

esx 1.1 up to date

okay u can add me on discord Littledog#4285 and then i can maybe help u in 30 mins

ty ty

Does anyone have a pre written script for it?

here u go
https://github.com/DNDdjay/RP_radio

hi! so i tried using this modified script but i cannot get the radio item added to the shop
thanks in advance!

Does anyone have a pre written script for it?

here u go
https://github.com/DNDdjay/RP_radio

Hi! so i installed this remade script and it is loaded and i even have the radio in my inventory, but for some reason i cannot get it to work, ive tried the keybind and the command
thanks in advance

Add this to the top of client.lua
ESX =  nil
Then below the local radio part add this:
Citizen.CreateThread(function()
    while true do
        TriggerServerEvent("checkradio")
        Citizen.Wait(200)
    end
end)

RegisterNetEvent("doeshaveradio")
AddEventHandler("doeshaveradio",function()
    Radio.Has = true
end)

RegisterNetEvent("doesnthaveradio")
AddEventHandler("doesnthaveradio",function()

	Radio.Has = false
end)

Add this to server.lua (you can create a server.lua file in rp-radio and it will work right away)
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterNetEvent("checkradio")
AddEventHandler("checkradio", function()
	local xPlayer = ESX.GetPlayerFromId(source)
	if xPlayer ~= nil then
		local item_radio = xPlayer.getInventoryItem('radio').count
		if item_radio > 0 then
			xPlayer.triggerEvent("doeshaveradio")
		else
			xPlayer.triggerEvent("doesnthaveradio")
		end
	end
end)

I coded this and it worked. This was using ESX v1 Final, so you should use that

Does anyone have a pre written script for it?

here u go
https://github.com/DNDdjay/RP_radio

hey, would you be able to fix an issue where you need to restart the script every time you load into the server? i know the issue, just not how to fix it. its calling the radio or something before the character is even loaded in, so it needs a restart to work. i had the same issue with my dispatch. i had to TriggerEvent in my multichar script after the character has fully loaded. but im not sure what to trigger in this radio script.

Does anyone have a pre written script for it?

here u go
https://github.com/DNDdjay/RP_radio

hey, would you be able to fix an issue where you need to restart the script every time you load into the server? i know the issue, just not how to fix it. its calling the radio or something before the character is even loaded in, so it needs a restart to work. i had the same issue with my dispatch. i had to TriggerEvent in my multichar script after the character has fully loaded. but im not sure what to trigger in this radio script.

Try mine https://github.com/pablordgez/rp-radio and tell me if it works

Add this to the top of client.lua
ESX = nil
Then below the local radio part add this:
Citizen.CreateThread(function()
    while true do
        TriggerServerEvent("checkradio")
        Citizen.Wait(200)
    end
end)

RegisterNetEvent("doeshaveradio")
AddEventHandler("doeshaveradio",function()
    Radio.Has = true
end)

RegisterNetEvent("doesnthaveradio")
AddEventHandler("doesnthaveradio",function()

	Radio.Has = false
end)

Add this to server.lua (you can create a server.lua file in rp-radio and it will work right away)
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterNetEvent("checkradio")
AddEventHandler("checkradio", function()
	local xPlayer = ESX.GetPlayerFromId(source)
	if xPlayer ~= nil then
		local item_radio = xPlayer.getInventoryItem('radio').count
		if item_radio > 0 then
			xPlayer.triggerEvent("doeshaveradio")
		else
			xPlayer.triggerEvent("doesnthaveradio")
		end
	end
end)

I coded this and it worked. This was using ESX v1 Final, so you should use that

this works very well :) TY

Hi i have this error : SCRIPT ERROR: @rp-radio/server.lua:10: attempt to call a nil value (field 'triggerEvent')

Just use this code. Add this in the server.lua:
ESX.RegisterUsableItem('radio', function(source)

	local xPlayer = ESX.GetPlayerFromId(source)
      xPlayer.removeInventoryItem('radio', 1)
       TriggerClientEvent('Radio.Set', source, true)
	TriggerClientEvent('Radio.Toggle', source)

end)


Avoid installing dependencies on every run

It looks like the install.py is imported from __init__.py, which means every time this plugin is loaded, it'll trigger a bunch of pip installs because ensure_package is called from the module's top level. At best, it just slows down ComfyUI start, at worst it messes up some dependencies.
This PR wraps the call to ensure_package() into Python's idiomatic way of making sure it's being executed as a script (vs required as a module). Alternatively, we could remove the from .install import * line from __init__.py.
Another option is to remove install.py altogether — ComfyUI-Manager already supports requirements.txt and it doesn't seem like this install.py does anything different.

Please merge that, this node is unsable without

Pleaseee !

This operation significantly slows down the startup time of ComfyUI.

Hey @storyicon, could you please let us know if you'd consider merging this in?

lgtm, thanks for your PR

Let's GO !


Missing Org setting in configuration location

In
Step 2: Enable privileged access
In the Microsoft 365 Admin Center
Sign into the Microsoft 365 Admin Center using credentials for an admin account in your organization.
In the Admin Center, go to Settings > Settings > Security & Privacy > Privileged access.
Should be
Step 2: Enable privileged access
In the Microsoft 365 Admin Center
Sign into the Microsoft 365 Admin Center using credentials for an admin account in your organization.
In the Admin Center, go to Settings > Org Settings > Security & Privacy > Privileged access.
In all other instructions the Org Settings address is also missing.

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

ID: 0bf337ec-3242-44b9-328b-7ca6381a2bcf
Version Independent ID: eda3540f-7049-ad17-a259-7952e5665983
Content: Get started with privileged access management - Microsoft 365 Compliance
Content Source: microsoft-365/compliance/privileged-access-management-configuration.md
Service: o365-seccomp
GitHub Login: @robmazz
Microsoft Alias: robmazz

@chaguile - thanks for the feedback, topic updated - give it 15 minutes or so to render live. Thanks!


select2 not working in version 3.2.0

Describe the bug
Select2 is not working in the expected manner
Screenshots

Gemfile
arctic_admin (3.2.0)
rails (<IP_ADDRESS>)

select2 is not installed with arctic_admin


refactor: Refactor workspace and add pg_analytics module

Ticket(s) Closed

Closes #147

What
Why
How
Tests

I thought of an easier way to do this without moving the src

I thought of an easier way to do this without moving the src

Thank you!!


Botkit changes type of my incoming message to "reconnect"

Hi there,
I have a reconnect mechanism on client-side, which tries to reconnect for several times if server is down or if user has some network issues. Whenever I try to reconnect, a new websocket is opened and the same payload is sent:
{"type": "hello", ... (app relevant info)}
If I debug the incoming messages, I can see that raw_message is the same I'm sending, but the actual type of message is changed to "reconnect", which breaks my app logic, as my controller is listening on "hello"
Is the type modification an expected behavior?
P.S. found this in Web.js

        bot.findConversation({
            user: message.user,
            channel: message.channel
        }, function(convo) {
            if (convo) {
                if (bot.ws) {
                    // replace the websocket connection
                    convo.task.bot.ws = bot.ws;
                    convo.task.bot.connected = true;
                    if (message.type == 'hello' || message.type == 'welcome_back') {
                        message.type = 'reconnect';
                    }
                } else {

                    // replace the reply channel in the active conversation
                    // this is the one that gets used to send the actual reply
                    convo.task.bot.http_response = bot.http_response;
                }
            }
            next();
        });
    });

Yes, this is the expected behavior. This allows Botkit to resume conversations that were already in progress but associated with the previous socket connection.
You should amend your code to also listen for reconnect events.  If you want to treat them the same way as hello or welcome_back events, that should be fine.


follow to #948 drop CPP from the best simulator class name

What is the expected enhancement?
I don't want it showing cpp I would like it cpp to be the default and py added only if there is no cpp.

I want to call out something related to this. I've run into an issue where I was setting my backend to "local_statevector_simulator" and did not realize that the simulator was failing gracefully to the python simulator because the cpp was not compiled correctly. It took me several days to figure out why my code was executing so slowly. Now I only set my backend to "local_statevector_simulator_cpp" so the backend will fail explicitly if there is an issue. I think other new users could run into this issue. I'm not sure what the solution is - maybe we execute your change above, but don't fail gracefully to the python simulator if the circuit volume is sufficiently large that the python simulator will be noticeably slower (>1000 gates?)?

In Aer, we should tell the user that is using a slow one or something. I would rather not even have the python if the cpp always works. The Python should slowly go away as it does not have all the features.
For now i want the default name to be without an extension.

@ajavadia are you going to do this

@jaygambetta Yeah. I'll push a patch soon.
@dongreenberg I think a version of #383 will be included in Aer, to determine rough runtime constraints based on user's local hardware. It is a good idea to provide a message based on user fallback as well.


Crash on 2.4.3

E/TAPDAQ: Something went wrong while getting advertisement id!
java.lang.NoClassDefFoundError: com.google.android.gms.ads.identifier.AdvertisingIdClient
at com.tapdaq.sdk.TapdaqHelper.getAdvertisementId(TapdaqHelper.java:165)
at com.tapdaq.sdk.TapdaqInitializerRunnable.run(TapdaqInitializerRunnable.java:35)
at java.lang.Thread.run(Thread.java:841)

I found that for fixing this needed add to build.gradle
dependencies {
    compile 'com.android.support:support-v4:24.0.0'
    compile 'com.google.android.gms:play-services:9.0.2'
}

Check is this real fix or maybe this is no needed and need some little fixe in lib. If it needed please add this to help page.
Thanks.

Hi,
Correct, this was missing from the documentation, I've added it to the QuickStart page along with some other minor prerequisites.
You can also do a little better, to use the SDK you will only need the Google Play Services Ads component, so rather than including all services you can slim it down to just this:
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.gms:play-services-ads:9.2.0'
}

If you need any further help with TapDaq integration, please let us know.
Thanks,
Dominic


add ckadner to Kubeflow org

contributing to kfp-tekton work

This change is

@ckadner could you please LGTM this PR so we have a record of you wanting to be added to the org.

LGTM

Thanks @jlewi -- I added my LGTM

/lgtm

/lgtm
/approve


3d rotation of tshirt

Stickers And 3d rotation of tshirt should be there

here three.js developer needed so I can personally help in this .

Hello @amanjaiman1 Sir,
I worked on Blender and Unity. Can you please assign this issue to me. I would like to work on this issue under GSSOC'23.

You can join our team and start working on the project - https://discord.gg/qbBP6zHx


this.$set('someData', data)

what is someData??the data which is in my .jsonfile? or the data which is in my Vue instance? i am new at this.

someData is the name of the property of the vue instance you want to store your results on.
data is the response from the request.
new Vue({
  el: 'body',
  data: {
    someData: []
  }
}

new Vue({
    el:'body',
    data:{
        someData:[]
    },
    ready:function(){
        this.$http.jsonp('url',function(data,staus,request){
			this.$set('someData',data)
		}).error(function(data,staus,request){
		})
	}
}

this is my code
but when i use the browserify
it's wrong :(


Lost UX niceness for questions in master branch

Colour that broke up questions in no longer in the master branch like shown in above image

fixed


Bug: 'spo file add' submitting $null or blank values as 'true'

Description:
When adding a file and attempting to set a field using a variable, if the variable is $null or empty the value passed through is the string 'true'.
Steps to reproduce:
$path = 'C:\MS365.jpg'

Scenario A)
Variable set to $null
$nullTitle = $null

o365 spo file add --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --path $path --FileLeafRef 'Null Title.jpg' --Title $nullTitle

Expected
New file added to destination with Title attribute of '' (empty string)

Actual
New file added to destination with Title attribute of 'true'

Scenario B)
Variable set to '' (empty string)
$emptyTitle = ''

o365 spo file add --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --path $path --FileLeafRef 'Empty String Title.jpg' --Title $emptyTitle

Expected
New file added to destination with Title attribute of '' (empty string)

Actual
New file added to destination with Title attribute of 'true'

Scenario C) [Working as Expected]
Variable set to 'not null or empty'
$stringTitle = 'not null or empty'

o365 spo file add --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --path $path --FileLeafRef 'String Title.jpg' --Title $stringTitle

Expected/Actual
New file added to destination with Title attribute of 'not null or empty'

Additional notes:
This bug is particularly nasty when trying to pass an empty or null variable into a Date/Time, Number, or Lookup field as it will result in an incorrect type error.

Thank you for the detailed repro steps. I'll have a look at it. Am I correct to assume that you've spotted the issue in PowerShell?

You're very welcome. Your assumption is correct, this issue has been spotted in PowerShell using non-immersive mode. Apologies for not including it in the original issue report.
Looking forward to your fix, in the meantime I'm working out how to dynamically build the parameters passed to 'spo file add' to only include non-null attributes.
Best regards,
Ramiro

Looking forward to your fix, in the meantime I'm working out how to dynamically build the parameters passed to 'spo file add' to only include non-null attributes.

Just to check if I'm getting it correctly: you're passing a set of options to the spo file add command and would like the command to only submit those to SharePoint, which are not-null?

Looking forward to your fix, in the meantime I'm working out how to dynamically build the parameters passed to 'spo file add' to only include non-null attributes.

Just to check if I'm getting it correctly: you're passing a set of options to the spo file add command and would like the command to only submit those to SharePoint, which are not-null?

To clarify, in my case I'm querying a SQL Database to get all the files in a given table and their information (filepath, filename, and other metadata) - from there, I'm iterating over each object and using the 'spo file add' command to send it up to SharePoint. There's about 30 different pieces of metadata, but not all of them are populated for each item.
In my initial script (which is how I stumbled upon this bug), I simply 'hardcoded' the 'spo file add' command with all of the options set to a given property of the object. So it looked something like this:
$documents = <Invoke-Sqlcmd>

foreach ($doc in $documents)
{
o365 spo file add --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --path $doc.filepath --column1 $doc.column1 --column2 $doc.column2 --column3 $doc.column3
}

As mentioned above, if any of the optional properties (column1, column2, etc.) were null or blank, 'spo file add' would try to send them over as 'true' instead of $null or blank.
My workaround for the time being is to simply look at the object ahead of time and filter out any null or empty properties like so:
$documentAttributes = $doc.PSObject.Properties | ?{!([string]::IsNullOrEmpty($_.Value))} | Select Name, Value

And then build a 'options' string based off of those properties:
$optionalAttributes = ''

foreach($attr in $documentAttributes)
    {
    $commandOptions = ($commandOptions + ' --' + $attr.Name + " '" + $attr.Value + "'")
    }

Once that's built, I simply append those to the 'base' command and execute it:
$executeO365SPOFileAdd = ("o365 spo file add o365 spo file add --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents --path $doc.filepath" + $commandOptions)

iex $executeO365SPOFileAdd

Thankfully, the column names in SharePoint have been setup to match exactly the names provided from the SQL Table, so this works well-enough.
It's probably more than you were wanting or needing to know, and I did simplify it a bit for brevity, but I hope that explains what I meant by my comment.
I'll be the first to admit that I am no expert in PowerShell (or any other scripting language for that matter), so there's probably a much more efficient way of accomplishing this task that I'm not aware of but unfortunately time is tight on this one.

This is great info! Thanks for the details on the use case and  the workaround. I bet others will find it helpful should they come across a similar problem 👏

I had a look into it, and it seems that the problem might be beyond our reach. When you pass a PowerShell $null as an option value, it gets removed from the list of arguments passed into Node.js. So running a command like o365 spo web get -u $a (where $a is $null) passes an array of arguments such as o365, spo, web, get, -u. Nothing is passed in place of the $null argument, which makes the given option behave like a switch parameter (basically like --debug) which explains the true value you're seeing. I don't think there is much we can do here without changing how parameters are parsed and trying to change default values for parameters that aren't meant as a switch, which could be tricky. I wish I had better news.

I had a look into it, and it seems that the problem might be beyond our reach. When you pass a PowerShell $null as an option value, it gets removed from the list of arguments passed into Node.js. So running a command like o365 spo web get -u $a (where $a is $null) passes an array of arguments such as o365, spo, web, get, -u. Nothing is passed in place of the $null argument, which makes the given option behave like a switch parameter (basically like --debug) which explains the true value you're seeing. I don't think there is much we can do here without changing how parameters are parsed and trying to change default values for parameters that aren't meant as a switch, which could be tricky. I wish I had better news.

That's a bummer. Thanks for looking into it all the same!
On a related note:
The workaround I described above seemed way too inefficient, as it was iterating n number of times for each n number of objects to build a unique string, so I went back to the drawing board to come up with something cleaner.
Since iex worked just fine, I simply turned my existing 'hardcoded' command from earlier and set that as a string. Using a regular expression, I was able to match and remove options that had $null or empty values. I'll post it here in case anyone could use it in the future:
### for example of this regular expression visit https://regexr.com/44vuq ###
$NullorEmptyPattern = '((-|--)\w+\s{2}|(-|--)\w+\s{1}$)'

$path = "C:\MS365.jpg"

$notNull = 'Not Null'
$Title = "$null"
$Value = "$notNull"

$execute = "o365 spo file add --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --path $path --FileLeafRef 'MS365.jpg' --NotNullValue $Value --Title $Title"

Write-Host String With Null or Empty Values Included -F DarkYellow
Write-Host $execute
Write-Host

### use regular expression pattern to match and remove any null or empty options ###
$executeO365SPOFileAdd = ($execute -replace $NullorEmptyPattern, '')

Write-Host String With Null or Empty Values Excluded -F DarkGreen
Write-Host ($executeO365SPOFileAdd)

### execute o365 file add with $null or empty options removed ###
iex $executeO365SPOFileAdd

Some items to consider and known limitations of this implementation:

The RegEx will match '--Help', '--Verbose', and '--Debug'; if you require these options you'll want to append it to your execution string (eg: iex ($executeO365SPOFileAdd + ' --Debug'))
The RegEx is looking for a command option (whose beginning is defined by '-' or '--'), followed by any number of characters (the option name) which are then followed by 2 empty spaces. There is also special consideration for options that only have 1 empty space and occur at the end of the string. As a result, if you are encapsulating your $null or empty variable with quotes (eg: "'$null'"), it will not be matched.

Feel free to let me know if you have any questions or recommendations on how to make this even cleaner!
Thank you again for taking a look at this Waldek, I really appreciate your efforts! ⭐


Fixed two variable name typos under the section "Logistic Regression, using low-level code"

Thank you!


Fix TemurinSignSBOM build failures due to upstream pki jar changes

openkeystore updates to change their jar name
and fix TemurinSignSBOM.java incorrect exception handling
Fixes https://github.com/adoptium/temurin-build/issues/3364

maybe we can consider to use their release tag e.g https://github.com/cyberphone/openkeystore/releases/tag/1.0.0  instead only clone repo on default branch?

maybe later, we can consider to use their release tag e.g https://github.com/cyberphone/openkeystore/releases/tag/1.0.0 instead only clone repo on default branch?

ah good spot, that's new, they weren't providing release previously

@zdtsw So they have tagged a release 1.0.0 level, I have updated this PR to clone that specific tag which is far safer.


Error in CuDNN: CUDNN_STATUS_NOT_SUPPORTED (cudnnBatchNormalizationForwardInference)

Hi,
I am getting this error while training a residual Net-18 for image classification. This error happens whenever I set the batch size > 128. I am currently running the program on an NVidia GeForce GTX 1080. Any suggestions as to why this happens and possible solutions to try? This error does not occur for batch size <= 128.
Thanks in advance.

Inference mode for cudnn implementation of batch normalization has a limit for the batchsize (1024, IIRC)  - I'm not sure why you would be hitting it for smaller batch sizes. Anyway, this limit is no longer present in cudnn v6 rc. Also, you can use cunn implementation of batch norm that does not have this limitation.

Thanks. I made the following change :
cudnn.convert(net, cudnn, function(module)
return torch.type(module):find('SpatialBatchNormalization')
end)
net = net:cuda()
In this case, every other module except for nn.SpatialBatchNormalization will be converted to cudnn. This works for a specific batch size ( batch_size = 128). Testing on different batch sizes and see if any other error comes up.

A different error crops up now when i use batch size > 128. I will re-open the issue in another thread. Closing this one.


Footer

Redesign footer

May I work under this issue?

can i work on this issue?

@SamikshaSankar Assigned.

I would like to work on this issue under LGMSOC'21 if no one is working .Thank You!

@RituCs I am working on this..may be Today or tomorrow I will make PR


[Internal] [Feature] Draw bandage plots

What is the Feature Related To? Please Provide a Description.
Place an :x: in a Box that Best Matches the Feature's Importance:

[] 1 - Most important (absolutely integral and will not use codebase at all without it)
[] 2-4 - Moderate (still using codebase for other functions but is serving as a blocker for future use-cases)
[x] 5 - Least important (would like to see but there are no stringent expectations nor urgency for current/future use-cases)

Any Additional Context or Information? Has There Been Any Progress Made So Far Towards this Request? Any Helpful Resources to Reference? Screenshots or Links?
Parameter option to automatically produce bandage plot png images for all unicycler assemblies that cannot be closed via graph reconstruction for faster review.
https://nf-co.re/modules/bandage_image

Add param option to produce this for all samples.


The provided API doesn't work.

Describe the bug
The provided API doesn't work. It throws a 502 error
Expected behavior
To give information about a profile.
Screenshots
Image
Desktop (please complete the following information):

OS: Windows 11
Browser: Brave
Version API v2.

Additional context
I want to use the API to create something for me. But, it's not working.

Heya, thanks for information. Website is currently down, we're trying to get it back up as fast as possible, thanks for the patience

Thank you very much. Please let me know as soon as you guys fix the issue


include worker files in requirejs optimizer build

Hi, how are you?
Thank you for providing this plugin.
I am using requirejs optimizer to build a production javascript file from all individual files. I found out that my worker file is not included in the built file. I use your worker plugin.
Could you tell me how can I include my work files that I use worker plugin with to the requirejs optimizer output, please?
Thank you in advance.

I'm not sure why it would not be including the built files in the optimizer build. I don't really use this plugin anymore and don't have much time to look into it.
If you manage to figure it out, please submit a PR to fix it.


This breaks the dotnet/cli package

Microsoft uses cs1.wpc.v0cdn.net for nuget.org, and due to the dotnet package's reliance on nuget for just about everything the end result is you cannot execute run or restore commands if that host is blocked.  I propose simply commenting it out (as I've done in my fork, below) with a note as to why it's still there.
More details: https://github.com/yegcollective/hosts/pull/1
Admittedly, not a big issue for most users (I think).

Sorry for the delay Ryan @aapis.
@tyzbit what do you think?  This host entry comes from your package.  Worth considering?

For the record; v0cdn.net is part of Verizon's Edge Cast CDN.  I don't have the justification documented why cs1.wpc was included, but to compare, there are multiple instances where Akamai's CDN is listed elsewhere.
I think a case can be made to keep the host blocked, but maybe list nuget as software affected by default blocking.  The only other instance I can think of that this line might affect is perhaps any on-demand streaming provided by Verizon, but that could use a different hostname and thus be unaffected.
Do we want to err on the side of more blocking, or not breaking things?

I'm ok with that too.  I think the overlap from users of this package and of .NET Core is probably pretty limited anyways.  Verizon doesn't operate in my country so it didn't affect anything else for me, but it may for Americans.

Thanks for your input everybody! @aapis @tyzbit
Closing.


Add option to copy to clipboard

When viewing or right clicking on a screenshot, add an option to copy the screenshot to keyboard.
Currently, to copy to clipboard, you have to open the screenshot with an external photo editor first, and then copy. It would be nice if it were streamlined.

Might add this in the next version of the mod. Thanks for the suggestion!

Fixed in the latest version of the mod (1.1.5 on mc 1.19.4 for fabric only). Will port this to 1.19.3


SOLR-16650, SOLR-16532: OTEL tracer additional tags

https://issues.apache.org/jira/browse/SOLR-16650
https://issues.apache.org/jira/browse/SOLR-16532
Testing solr 9.2.0-SNAPSHOT at a client and missing hostname/port from traces. So this PR will add those by default, following the otel semantic conventions, both local logical host name as seen on the request, and peer host/port. Not yet tested in the wild.

Not adding CHANGES line since none of this is yet released.

Not adding CHANGES line since none of this is yet released.

But this change isn't restricted to OTEL; any tracer plugin would get these new tags.  Any way, it's fine with me.

Not adding CHANGES line since none of this is yet released.

But this change isn't restricted to OTEL; any tracer plugin would get these new tags. Any way, it's fine with me.

Yes, since this is on the OT Tracer level, that is true, so perhaps it deserves a line.

Going to merge this on Friday if no more comments from @risdenk , @dsmiley or @gus-asf


[SPARK-20787][PYTHON] PySpark can't handle datetimes before 1900

time.mktime can't handle dates from 1899-100, according to the documentation by design. calendar.timegm is equivalent in shared cases, but can handle those years.
What changes were proposed in this pull request?
Change time.mktime for the more able calendar.timegm to adress cases like:
import datetime as dt
sqlContext.createDataFrame(sc.parallelize([[dt.datetime(1899,12,31)]])).count()

failing due to internal conversion failure when there is no timezone information in the time object. In the case there is information, calendar was used instead.
How was this patch tested?
The existing test cases cover this change, since it does not change any existing functionality. Added a test to confirm it working in the problematic range.
This PR is original work from me and I license this work to the Spark project

Can one of the admins verify this patch?

The range that mktime will accept is platform-dependent. I am on a Mac, and it looks like mktime can't handle 1900 and 1901:
Python 2.7.13 (default, Dec 18 2016, 07:03:39)
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import time

In [2]: import datetime as dt

In [3]: time.mktime(dt.datetime(1900, 1, 1).timetuple())
---------------------------------------------------------------------------
OverflowError                             Traceback (most recent call last)
<ipython-input-3-0332545829df> in <module>()
----> 1 time.mktime(dt.datetime(1900, 1, 1).timetuple())

OverflowError: mktime argument out of range

In [4]: time.mktime(dt.datetime(1901, 1, 1).timetuple())
---------------------------------------------------------------------------
OverflowError                             Traceback (most recent call last)
<ipython-input-4-fb80b633a52b> in <module>()
----> 1 time.mktime(dt.datetime(1901, 1, 1).timetuple())

OverflowError: mktime argument out of range

In [5]: time.mktime(dt.datetime(1902, 1, 1).timetuple())
Out[5]: -2145888000.0

I would suggest, to be on the safe side, to only call mktime for years 1902 and up.

cc @ueshin

@j-bennet I'm not sure about that change. My suggested approach is just fixing what the Python API offers (as in, mktime has known limitations, from Python's point of view, independent of what mktime might do). I guess a better way would be to have some platform depending check for the 1900-1901-1902 problem (which I suspect should be as a separate issue from this one, though, even if they might touch the same area of the code)

ok to test

Test build #77641 has started for PR 18139 at commit 4a6f77d.

Test build #77641 has finished for PR 18139 at commit 4a6f77d.

This patch fails Python style tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77641/
Test FAILed.

Test build #77642 has started for PR 18139 at commit aeef87f.

Thanks @ueshin , forgot to run dev/lint-python on the tests (still getting used to which speed tricks are useful to avoid running a full test suite run locally, which takes more than an hour on my machine)

Test build #77642 has finished for PR 18139 at commit aeef87f.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77642/
Test PASSed.

One option, which wouldn't be super efficient at border cases, but would allow for general case is just falling back on OverflowError (on top of avoiding it in the known to cause error range according to Python docs).

cc @ueshin

@holdenk @ueshin Digging a bit into other solutions to this problem (since it's not specifically Spark related, when you dig deeper, so other libraries have to find its way to fix it) and maybe adding this dependency might be the best way to fix it forever (while also not reinventing wheels that are already in the python ecosystem)

I'm not sure if we can use external libraries here. Do you have any ideas? @holdenk
I'd cc @HyukjinKwon @viirya for more opinions.

More ideas welcome indeed. We could just replicate what others are doing to fix the problem, if we can't introduce external dependencies.

For instance, matplotlib handles strftime as a special case for pre-1900

Thank you for cc'ing me. I am actually .. quite against adding an external Python package to fix a specific problem, in particular, if it is a Python package as a hard dependency - up to my knowledge, PySpark case is a bit complicated (e.g., cloudpickle and py4j).
Looking at virtualtime repo, it looks not quite big. Would it require many changes to resemble what they do?
I haven't looked into the discussion, change and JIRA closely yet but just want to quickly check if you wouldn't mind.

@HyukjinKwon I would definitely not mind, I'm actually curious to see how they do it. I also saw it's not that big (and we don't need all the functionality). I'll extract the pieces we need for our case

Thanks for cc'ing me too. This seems a very specific problem. If we can introduce similar and small fix to solve it in PySpark, it should be better for me.
I'm not sure if virtualtime solves this, maybe I miss it, in a rough scan I didn't find it put an overlayed form for time.mktime as other functions, but it patches time.strftime.

Yes, most solutions are concerned only with strftime (virtualtime and matplotlib above).  Since calendar.gmtime can handle this better (or at least for pre-1900) it is just a matter to... not messing up horribly with how dates work (It’s also problematic in Java after all)

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

@rberenguel is this still on your radar?
Also jenkins ok to test.

Hi @holdenk yup, I still have a to-do to address it in a clean way, I got sidetracked with other things. Helping Python since the 18th century!

Gentle follow up, if you have some time to update this @rberenguel :)


Usecase: Product Manger

How can we enable Product Managers to automate their workflows?
This task involves creating recordings involving one or more relevant applications, and implementing tests for corresponding completions:

Asana
Google docs
Figma
Hubspot
others?

Here is a video to explain the use cases I want to automate. Also what do you mean by "implementing tests for corresponding completions?"

Amazing thank you! The next step is to install PuterBot and create a recording as per the instructions at openadapt.ai.
Please give it a shot and leave a comment here describing your experience!


[BUG] release note builder script does not retrieve PR opened before last release

There is a severe bug in the release note building script build_tools/changelog.py:
it does not retrieve merged PR that were opened before the last release.
More precisely, it seems the condition for retrieval of a PR seems to be: (a) merged since the last release and (b) opened since the last release (!).
The condition should be: (a) merged since the last release, and (b) opened at any time.
FYI @lmmentel

If anyone was missing their PR and/or credit given, kindly let me and @lmmentel know.
Happy to add these retroactively to earlier release notes as well.

the bug also affects the overall list of contributors, see https://github.com/alan-turing-institute/sktime/pull/2803


[SPARK-43323][SQL][PYTHON] Fix DataFrame.toPandas with Arrow enabled to handle exceptions properly

What changes were proposed in this pull request?
Fixes DataFrame.toPandas with Arrow enabled to handle exceptions properly.
>>> spark.conf.set("spark.sql.ansi.enabled", True)
>>> spark.conf.set('spark.sql.execution.arrow.pyspark.enabled', True)
>>> spark.sql("select 1/0").toPandas()
...
Traceback (most recent call last):
...
pyspark.errors.exceptions.captured.ArithmeticException: [DIVIDE_BY_ZERO] Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error.
== SQL(line 1, position 8) ==
select 1/0
       ^^^

Why are the changes needed?
Currently DataFrame.toPandas doesn't capture exceptions happened in Spark properly.
>>> spark.conf.set("spark.sql.ansi.enabled", True)
>>> spark.conf.set('spark.sql.execution.arrow.pyspark.enabled', True)
>>> spark.sql("select 1/0").toPandas()
...
  An error occurred while calling o53.getResult.
: org.apache.spark.SparkException: Exception thrown in awaitResult:
	at org.apache.spark.util.ThreadUtils$.awaitResult(ThreadUtils.scala:322)
...

because jsocket_auth_server.getResult() always wraps the thrown exceptions with SparkException that won't be captured.
Whereas without Arrow:
>>> spark.conf.set("spark.sql.ansi.enabled", True)
>>> spark.conf.set('spark.sql.execution.arrow.pyspark.enabled', False)
>>> spark.sql("select 1/0").toPandas()
Traceback (most recent call last):
...
pyspark.errors.exceptions.captured.ArithmeticException: [DIVIDE_BY_ZERO] Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error.
== SQL(line 1, position 8) ==
select 1/0
       ^^^

Does this PR introduce any user-facing change?
DataFrame.toPandas with Arrow enabled will show a proper exception.
How was this patch tested?
Added the related test.

Merged to master.


'WSGIRequest' object has no attribute 'LANGUAGE_CODE'

i have django-trunk e django-cms-2.0 trunk.
When i removed django locale middleware I had this error:
Traceback (most recent call last):
   File "/home/marco/src/siti/thunder/office.mentasti.it/site-packages/django-
   trunk/django/core/servers/basehttp.py", line 280, in run
    self.result = application(self.environ, self.start_response)
  File "/home/marco/src/siti/thunder/office.mentasti.it/site-packages/django-
  trunk/django/core/servers/basehttp.py", line 674, in __call__
    return self.application(environ, start_response)
  File "/home/marco/src/siti/thunder/office.mentasti.it/site-packages/django-
  trunk/django/core/handlers/wsgi.py", line 245, in __call__
    response = middleware_method(request, response)
  File "/home/marco/src/siti/thunder/office.mentasti.it/site-packages/django-cms-2.0-
   trunk/cms/middleware/multilingual.py", line 125, in process_response
    response.set_cookie("django_language", request.LANGUAGE_CODE)
AttributeError: 'WSGIRequest' object has no attribute 'LANGUAGE_CODE'

I noticed that this error raised on every static file call.
From django docs:
Unlike the process_request() and process_view() methods, the process_response()
method is always called, even if the process_request() and process_view()
methods of the same middleware class were skipped because an earlier
middleware method returned an  HttpResponse

In the source code, in multilingual.py seem that you suppose process_request will always call, because you use request.LANGUAGE_CODE which is defined by process_request method.
I try to put this line:
self.process_request(request)

in the process_response method and solve the problem, but it isn't the best solution (it's only a test).
Bye,
Marco

Django Version: 	1.8.2
Python Version: 	3.4.3
django-cms version: 3.1.2
Happening again.

@garncarz Added in #4262


Handle failure in recompiling gracefully

If recompiling due enabling/disabling a plugin fails alert the user (with fault code?).
https://github.com/ThomasTJdev/nim_websitecreator/blob/c37a01370aaa80780c3dbe14c1ae323f6f9f2bbf/nimwcpkg/resources/web/routes.nim#L80-L101
https://github.com/ThomasTJdev/nim_websitecreator/blob/master/nimwcpkg/nimwc_main.nim#L331-L334

This is kinda handled by the Log Viewer, I can easily see the errors on the Logs. Fixed :grey_question:
:smile:

The log function is perfect


[FEATURE] Support Python 3.12

Describe the solution you'd like
... in both seed-farmer and codeseeder.

We will assess...


Double workflow watch

We should never need two watches in the controller = 2x memory usage.
 controller | time="2021-02-25T09:24:01.824Z" level=info msg="List cronworkflows 200"
 controller | time="2021-02-25T09:24:01.824Z" level=info msg="List workflows 200"
 controller | time="2021-02-25T09:24:01.825Z" level=info msg="List workflows 200"
...
 controller | time="2021-02-25T09:24:01.831Z" level=info msg="Watch workflows 200"
 controller | time="2021-02-25T09:24:01.831Z" level=info msg="Watch cronworkflows 200"
...
 controller | time="2021-02-25T09:24:01.833Z" level=info msg="Watch workflows 200"

The second informer is used by cron and limited to cron workflows, but is not filtered by instance ID. We could resue just one.


[examples] Rename nextjs typescript theme from tsx to ts

[x] I have followed (at least) the PR section of the contributing guide.

File has no JSX or anything React.

Couldn't quite get my head as to how to apply this to the next branch.
I don't seem to have it on my fork.


Lint

Currently can only get linter to run without returning results or errors via PR #1. Not sure how to fix here. Pipeline uses standard golangci lint pipeline via docker container in a manner similar to what is being done for tests here which works and is tested.
https://github.com/TimothyStiles/buster/blob/0132ba1a39996cab8aad227704dcb77701ce1bc9/tester/tester.go#L8-L31
Anyone know what could be going on here?

For fixing style autolinter I'd like the following automatic fixers
stutters
for example fold.FoldEnergy is correctly found by my local golangci-lint setup and should automatically submit a PR suggesting that it be renamed fold.Energy.
transform underscore case to camel case
under_case -> underCase (probably should default to unexported)

advanced feature: create PR that renames all instance of variable based on comment.

Also convert capitalized constants like DNA_COMPLEMNT to DNAComplement

magic number check needed.


Substitute of goto command in new Teams

In new Teams, there's a workaround to use the functionality of /goto command. Use case is to 1. just see a list of channels that match the keyword and then to 2. directly jump to the channel with as few clicks/key presses as possible.
For now, we mention in docs that goto doesn't exist any longer. I opine that we must document the workarounds too.
In new Teams, users can type the partial/complete name of a channel and (using a keyboard or pointer) select the option highlighted in the below screenshot. Doing this displays a list of channels only, which is exactly what /goto does.

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

ID: 442f8c6b-95ba-a09e-639d-b9dd141198f6
Version Independent ID: 442f8c6b-95ba-a09e-639d-b9dd141198f6
Content: Known issues in the new Microsoft Teams desktop client - Microsoft Teams
Content Source: Teams/new-teams-known-issues.md
Service: msteams
GitHub Login: @JoanneHendrickson
Microsoft Alias: jhendr

Hello @ashishguptaiitb how are you?
It's true that following those steps you can achieve the same as with /goto but I checked and in Teams Classic that alternative steps also worked, so I'm not sure if adding a reference to something that was already working like that in Teams Classic.
Please let me know if I understood you correctly.

Thanks for checking, Andres. This is interesting. I never tried in the older client as the /goto command worked :-)
Here's a thought about making the experience better for the readers. What if we don't give the above method as a replacement but as a related documentation on the scenario/use case. Example:
User need/scenario: "As a user, I want to quickly and directly open a channel from anywhere I am in Teams"
What's deprecated in new Teams: /goto command is removed.
How to still achieve this: As before, you can continue to use search field without /goto... (and what I shared above).
I don't mean that we document for all end-user scenarios but only the topics that are talked above in this article. For now, the article may give an impression that a functionality is removed without substitute. Let's present it in a way that, it is removed to improve UX. Eg. instead of saying that goto command is gone, consider presenting something like, "users no longer have to type a command to quickly open a channel. Just typing its name suffices."
The way it is structured in the table or otherwise, and how it is presented, are the writer's decision.
@get-itips , @JoanneHendrickson

Between, many of the documented items in this article are not exactly "issues". These are UX changes + upcoming features :-) So the title itself should be revisited.

To make it easier for you to submit feedback on articles on learn.microsoft.com, we're transitioning our feedback system from GitHub Issues to a new experience.
As part of the transition, this GitHub Issue will be moved to a private repository. We're moving Issues to another repository so we can continue working on Issues that were open at the time of the transition. When this Issue is moved, you'll no longer be able to access it.
If you want to provide additional information before this Issue is moved, please update this Issue before December 15th, 2023.
With the new experience, you no longer need to sign in to GitHub to enter and submit your feedback. Instead, you can choose directly on each article's page whether the article was helpful. Then you can then choose one or more reasons for your feedback and optionally provide additional context before you select Submit.
Here's what the new experience looks like.
Note: The new experience is being rolled out across learn.microsoft.com in phases. If you don't see the new experience on an article, please check back later.
First, select whether the article was helpful:

Then, choose at least one reason for your feedback and optionally provide additional details about your feedback:

Article was helpful
Article was unhelpful

Finally, select Submit and you're done!


Sftp object store

@ravi-mosaicml Thanks for the review. About the tests: Had written a bunch of tests today with the mock-ssh-server package. Unfortunately, I got a unsatisfiable dependency error so I removed them. Without a compatible mock server, unsure what the tests should actually do since I only really want to test the Paramiko implemented functions.

@ravi-mosaicml Thanks for the review. About the tests: Had written a bunch of tests today with the mock-ssh-server package. Unfortunately, I got a unsatisfiable dependency error so I removed them. Without a compatible mock server, unsure what the tests should actually do since I only really want to test the Paramiko implemented functions.

(Resolved offline, but I think this should be installable via pip):
(composer) ravi@dolphin:~/ravi-composer$ pip install mock-ssh-server
Collecting mock-ssh-server
  Downloading mock_ssh_server-0.9.1-py3-none-any.whl (14 kB)
Collecting paramiko
  Downloading paramiko-2.11.0-py2.py3-none-any.whl (212 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 212.9/212.9 kB 3.8 MB/s eta 0:00:00
Requirement already satisfied: cryptography>=2.5 in /home/ravi/venvs/composer/lib/python3.10/site-packages (from paramiko->mock-ssh-server) (37.0.2)
Collecting pynacl>=1.0.1
  Downloading PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 856.7/856.7 kB 15.5 MB/s eta 0:00:00
Collecting bcrypt>=3.1.3
  Downloading bcrypt-3.2.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.3/62.3 kB 4.7 MB/s eta 0:00:00
Requirement already satisfied: six in /home/ravi/venvs/composer/lib/python3.10/site-packages (from paramiko->mock-ssh-server) (1.16.0)
Requirement already satisfied: cffi>=1.1 in /home/ravi/venvs/composer/lib/python3.10/site-packages (from bcrypt>=3.1.3->paramiko->mock-ssh-server) (1.15.0)
Requirement already satisfied: pycparser in /home/ravi/venvs/composer/lib/python3.10/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko->mock-ssh-server) (2.21)
Installing collected packages: pynacl, bcrypt, paramiko, mock-ssh-server
Successfully installed bcrypt-3.2.2 mock-ssh-server-0.9.1 paramiko-2.11.0 pynacl-1.5.0


Add more classifier

What should we add?
we should include more classifiers:

[ ] Quantum K-NN has already been done, but only fit the old version.
https://github.com/GroenteLepel/qiskit-quantum-knn
[ ] Quantum Random Forest Classifier
https://arxiv.org/pdf/2210.02355.pdf
https://github.com/maiyuren/Quantum-Random-Forest

Maybe we should add these also:

[ ] Quantum GaussianNB
[ ] Quantum DecisionTreeClassifier

There's this project implementing other quantum classification and regression methods : https://github.com/mspronesti/qlearnkit

Yeah, include K-NN classification, regression, dataset, encoding map, swaptest circuit, but it's not fit the latest version.

Why not ? It seems it does to me.

Why not ? It seems it does to me.
It still uses the base backend

Why not ? It seems it does to me.

I just see that it fit with the sources code, not the latest release version.

For example, quantum KNN requires either access to quantum memory to keep the states handy or re-creation of states every time when a distance is evaluated. Thus, the quantum version of the algorithm does not bring any advantages over the classical version. I can't say the above mentioned algorithms suffer from the same problem, they have to be studied and evaluated if they can bring value for this package. If you want to develop one of them, and possibly to contribute them, we can discuss in more details.

Hi @poig @chin-jey, have there been recent developments on this discussion? Feel free to post a simple example here, as it might be useful for others. Once we've seen an implementation, we can evaluate together if it's worth turning it into a PR.


Differentiate between the "extension provided tasks" and "user tasks in tasks.json file"

Configure Task Command shows a list of "extension provided tasks" and "user tasks in tasks.json file".
When a user creates a task, the name will be the same as what extension suggests for the provided tasks. As a result, "extension provided tasks" and "user tasks in tasks.json file" will end up having the same names, unless the user changes the names.
For example, this is a list of extension provided tasks:

and this is the result if the user creates the provided tasks and doesn't change the template names in tasks.json file:

It would be good if there could be a difference between these two tasks.
I could think of two approaches.

The extensions could have the following ability: the extension shows the name "C/C++ extension provided task X" in quick-pick, and if the user chooses this template, the name that is written in the tasks.json file will be "Task X". As a result, the user will see this (this approach is similar to creating MSBuild, Maven, and .Net Core template tasks):

Or the extension could have this ability to change the details of the user tasks while showing them in the dropdown menu (the tasks.json file will not be modified).

Or, the extension can have both abilities :)

A lot of work was done recently to remove all calls to the extension when showing the task quick pick to improve performance, and option 2 directly contradicts that.
Why can't the user just give the task a new label in the tasks.json?

How about option one? Most probably it won't affect the performance, and it has already been implemented for MSBuild, Maven, and .Net Core template tasks.

The user could go back and give the task a new name, but we also create a launch configuration that takes a dependency on the generated task and they'd have to update that too.

I think letting the extension change the label of the task when a user tries to configure it can cause a lot of confusion. The user has chosen to configure "Task XYZ". If the task suddenly has a new name that would be unexpected.
How is the launch configuration created? I'm wondering where you're getting the name for prelaunch task currently.
Regarding the templates for MSBuild, Maven, and .Net Core: those are just static templates that we write into the tasks.json. There is a feature request to allow those static templates to be contributed by extensions, but they would still be static.

the process of choosing the names for prelaunch task is similar to those of build tasks. The best we can do is to set a different detail for them, to create a difference between the build tasks that the user generates and the prelaunch tasks that are generated during the debugging.


Extract TimetableItemDetailContent section and create UiState for it

Idea Description
The title says everything. Please refer to the link to see the implementation
Reference images and links
https://github.com/DroidKaigi/conference-app-2023/pull/652/files#diff-56fac00aca9688edbb218b72743e3ef63d925bfa243b61b3d2f7b59f3debb79cR140
https://github.com/DroidKaigi/conference-app-2023#section

I want to try it.

@matsumo0922
Good! Assigned!


POST urls give a 404 error

Hi, thanks for this!
The api urls produced (as shown on curl localhost:34054) are all GET, no POST's, no PUT, DELETE, etc.
node -v: 10.15.2
( xmysql requires node >= 7.6.0 )
npm -v: 5.8.0
mysql --version: mysql  Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
xmysql --version:undefined

Provide steps to reproduce this issue
$ curl --request POST   --data '{"username":"xyz","password":"xyz"}'   https://www.example.com/shop/customers
$ tail -f mysql_rest_api.log
      Database              :    shop
      Number of Tables      :    8

      REST APIs Generated   :    108

      Xmysql took           :    0.1 seconds
      API's base URL        :    localhost:34054

POST /api/customers 404 153 - 3.015 ms

Mark issue with suitable label if it is clear what this issue is.

See your cli usage. May be you have enabled only get apis

that was it .. thanks


cannot import name 'PILLOW_VERSION'

retinanet infer retinanet_rn50fpn.pth --images /coco/images/val2017/ --annotations /coco/annotations/instances_val2017.json
Traceback (most recent call last):
File "/opt/conda/bin/retinanet", line 6, in
from retinanet.main import main
File "/opt/conda/lib/python3.6/site-packages/retinanet/main.py", line 10, in
from retinanet import infer, train, utils
File "/opt/conda/lib/python3.6/site-packages/retinanet/infer.py", line 13, in
from .model import Model
File "/opt/conda/lib/python3.6/site-packages/retinanet/model.py", line 7, in
from . import backbones as backbones_mod
File "/opt/conda/lib/python3.6/site-packages/retinanet/backbones/init.py", line 3, in
from .resnet import *
File "/opt/conda/lib/python3.6/site-packages/retinanet/backbones/resnet.py", line 1, in
import torchvision
File "/opt/conda/lib/python3.6/site-packages/torchvision/init.py", line 2, in
from torchvision import datasets
File "/opt/conda/lib/python3.6/site-packages/torchvision/datasets/init.py", line 9, in
from .fakedata import FakeData
File "/opt/conda/lib/python3.6/site-packages/torchvision/datasets/fakedata.py", line 3, in
from .. import transforms
File "/opt/conda/lib/python3.6/site-packages/torchvision/transforms/init.py", line 1, in
from .transforms import *
File "/opt/conda/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 17, in
from . import functional as F
File "/opt/conda/lib/python3.6/site-packages/torchvision/transforms/functional.py", line 5, in
from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION
ImportError: cannot import name 'PILLOW_VERSION'

Same as #105. Closing.


make LocalFileStorage work end-to-end for dev environment

fixes #4197

One edge case for this that I didn't consider: if a developer uploads a file, then makes some change which causes the containers to be rebuilt, there will still be an entry for the filename in the database, but the files service will 404. I could see this being pretty confusing to someone doing local testing.
Maybe the packages volume should be shared with the host OS?

@di the volume should persist across container builds, since it is defined independently of a single container.

confirmed this behavior! the volume will persist until the volume is deleted directly, make purge, or make stop is called.
docker-compose creates the volume as a docker volume, which will hang around until explicitly deleted.

Ah, I think I was getting confused by an upload I did prior to switching to this branch, my bad!
I think the fact that this would happen with a make stop is probably less of an issue.

make stop will also clear the DB volume, so at least the state will be consistent.


How to create orange

I am looking to display console message in orange, but I am having difficulty finding orange?

Currently chalk only supports the basic ANSI colors (as those are the ones most terminals supports), which doesn't include orange. We are discussing how to bring in support for 256 colors and true color which will get you orange and lots of other colors: https://github.com/chalk/chalk/issues/73

When #140 is merged, you'll be able to use chalk.keyword('orange').


.NET : Is there a way to disable the final response that the AI generates and return the value of the invoked plugin

I want to use the AI to invoke the plugin and return exactly the value of it, but the AI always generate the final response. I don't know how to turn it off, please help me!
Here is how I use it :
`
public async Task GetImageCakes(string userRequest, ChatHistory chat)
{
ChatCompletionAgent agent =
    new()
    {
        Name = "Seller",
        Instructions = "You are a seller of a bakery, talk to customer",
        Kernel = this.CreateKernelWithChatCompletion(),
        ExecutionSettings = new OpenAIPromptExecutionSettings() { ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions },
    };

KernelPlugin plugin = KernelPluginFactory.CreateFromType<NposPlugin>();
agent.Kernel.Plugins.Add(plugin);

// Respond to user input
await InvokeAgentAsync(userRequest);

return chat;

// Local function to invoke agent and display the conversation messages.
async Task InvokeAgentAsync(string input)
{
    chat.Add(new ChatMessageContent(AuthorRole.User, input));

    Console.WriteLine($"# {AuthorRole.User}: '{input}'");

    await foreach (ChatMessageContent content in agent.InvokeAsync(chat))
    {
        chat.Add(content);

        Console.WriteLine(value: $"# {content.Role} - {content.Content}");

    }
}

}
`
And this is my plugin. My goal is to return an array containing the image URLs and no other information.
`
[KernelFunction("get_list_cake_image"), Description("Provide a list of images of specific cakes in store")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1024:Use properties where appropriate", Justification = "Too smart")]
public async Task<List> GetListImageAsync(
[Description("The type of cake.")]
string typeOfCake
)
{
List listImage = [];
 //Console.WriteLine($"Your type of cake : {typeOfCake}");

 var options = new RestClientOptions("https://mba.dotnets.org");

 var client = new RestClient(options);
 var request = new RestRequest($"/api/Attachment/get-list-image/{this.shopId}?pageSize={this.pageSize}&pageNumber={this.pageNumber}&text={typeOfCake}", Method.Get);

 request.AddParameter("text/plain", ParameterType.RequestBody);
 RestResponse response = await client.ExecuteAsync(request);

 List<ImageResponse> listResponse = JsonConvert.DeserializeObject<List<ImageResponse>>(response.Content);

 listResponse.ForEach(image =>
 {
     listImage.Add(image.Url);
 });

 return listImage;

}
`
Here is an example :

@minhquangkid Thanks for reporting this issue!
I would recommend trying IAutoFunctionInvocationFilter, where you can terminate auto function calling process earlier with this flag:
https://github.com/microsoft/semantic-kernel/blob/7997e79bb9dd352c6dafbbd1a92a3634f43500de/dotnet/samples/Concepts/Filtering/AutoFunctionInvocationFiltering.cs#L144
This should help you to avoid sending additional request to LLM to generate final response and instead return the value of the invoked plugin. Let us know if this helps to handle your scenario. Thanks!

@dmytrostruk  thank you so much! That's exactly what I need

@dmytrostruk  I found the new Bug, When I used IAutoFunctionInvocationFilter for the first time, I worked. But when I continue to run it again, It returns the error :
"Invalid parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'"
Here is my filter :
`
#pragma warning disable SKEXP0001 // Disable the specific experimental feature warning
public class CustomFilterNpos : IAutoFunctionInvocationFilter
{
public CustomFilterNpos() {}
        public async Task OnAutoFunctionInvocationAsync(AutoFunctionInvocationContext context, Func<AutoFunctionInvocationContext, Task> next)
        {
            if (context.Function.PluginName == "NposPlugin" && context.Function.Name == "get_list_cake_image")
            {

                    context.Kernel.Plugins.TryGetPlugin("NposPlugin", out KernelPlugin _nposPlugin);
                    _nposPlugin.TryGetFunction("get_list_cake_image", out KernelFunction _getListImageAsyncFunc);
                    context.Result = await _getListImageAsyncFunc.InvokeAsync(context.Kernel, context.Arguments); // return the list of image's URLs

                   context.Terminate = true;

                   return;

            }
        }
    }
    #pragma warning restore SKEXP0001 // Re-enable the warning

`
And here are the results :

Please help me!

But when I continued to run it again, It returned the error :
"Invalid parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'"

@minhquangkid This error message means that ChatHistory object contains messages in invalid order or missing some required pieces. When LLM responds with function calling (i.e. tool_calls), in chat history this message should be followed by function result (i.e. message with author role tool). If this requirement is not completed, OpenAI API will respond with this error.
So, chat history should look like this:

Message with AuthorRole User
Message with AuthorRole Assistant with ToolCalls
Message with AuthorRole Tool.
Message with AuthorRole Asisstant.
and so on.

Before you send a request, check ChatHistory object if this requirement is respected. If not, then we will need to find a root cause why this is happening based on your code. Thanks!

@minhquangkid:
For the original code you shared, can you please try this when using Terminate = true:
Original:
    await foreach (ChatMessageContent content in agent.InvokeAsync(chat))
    {
        chat.Add(content);

        Console.WriteLine(value: $"# {content.Role} - {content.Content}");

    }

Updated:
    await foreach (ChatMessageContent content in agent.InvokeAsync(chat))
    {
          if (!content.Items.Any(i => i is FunctionCallContent || i is FunctionResultContent))
          {
              chat.Add(content);
          }

        Console.WriteLine(value: $"# {content.Role} - {content.Content}");

    }

When using Terminate=true using using IAutoFunctionInvocationFilter or any pattern that yields a message with Items collection that contains FunctionCallContent or FunctionResultContent as part of the content returned by Agent.InvokeAsync...this message is already present in the ChatHistory.  Re-adding such a message results in duplication and can violate the expected structure of ChatHistory.
This is the case when using IChatCompletionService directly (outside of the Agent Framework) and also applies when using ChatCompletionAgent (which, in turn, invokes a IChatCompletionService instance).
If you are still experiencing the same issue after attempting this change, can you please:

Share the model name and version you are targeting
Examine Items collection in the assistant message that contains the FunctionCallContent and share how many items are present?

Thank you.  Looking forward to your feedback.

Hi @crickman
Thanks for your guide:
if (!content.Items.Any(i => i is FunctionCallContent || i is FunctionResultContent))
{
chat.Add(content);
}

It really solved my problem! I will close this issue here, thanks again


Possible DOM update issue with input type="range"

Version
3.0.0
Reproduction link
https://codesandbox.io/s/range-slider-issue-2hmjd
Steps to reproduce

click “Show Modal” button
type something into input
see range slider jumping = correcting itself

What is expected?
Render/first tick displays range value correctly.
What is actually happening?
Range slider is jumping = correcting itself when onMounted produces the next tick.

See https://forum.vuejs.org/t/range-input-virtual-dom-update-sequence/104705 for further details and assumptions that could be hepful.

We fixed this problem on Vue 2, so it makes sense to have it as well. I suppose min, max, and step have to be set before the value


README.md: has_many pair with current implementation?

Hi! 👋
On the documentation it states the following:

Contrary to what you'd expect, association information is always contained on the object specifying the association, even if it seems like the association has a foreign key. This is a side effect of DynamoDB's structure: it's very difficult to find foreign keys without an index. Usually you won't find this to be a problem, but it does mean that association methods that build new models will not work correctly - for example, user.addresses.new returns an address that is not associated to the user. We'll be correcting this soon maybe someday, if we get a pull request.

👨💻 On the code, I decided to give it a try and it seems to work. E.g:
irb(main):006:0> LeadUrls.first.short_urls.create(slug: 'test', token: 'test', room: 'test', role: 'test')
=> #<ShortUrl:0x000055689bf02fe0 @new_record=false, @attributes={:slug=>"test", :token=>"test", :room=>"test", :role=>"test", :created_at=>Thu, 30 Apr 2020 07:26:43 +0000, :updated_at=>Thu, 30 Apr 2020 07:26:43 +0000}, @associations={}, @attributes_before_type_cast={:slug=>"test", :token=>"test", :room=>"test", :role=>"test", :created_at=>Thu, 30 Apr 2020 07:26:43 UTC +00:00, :updated_at=>Thu, 30 Apr 2020 07:26:43 UTC +00:00}, @changed_attributes={}, @previously_changed={"slug"=>[nil, "test"], "token"=>[nil, "test"], "room"=>[nil, "test"], "role"=>[nil, "test"], "created_at"=>[nil, Thu, 30 Apr 2020 07:26:43 +0000], "updated_at"=>[nil, Thu, 30 Apr 2020 07:26:43 +0000]}, @validation_context=nil, @errors=#<ActiveModel::Errors:0x000055689beeb548 @base=#<ShortUrl:0x000055689bf02fe0 ...>, @messages={}, @details={}>, @_touch_record=nil>

irb(main):007:0> LeadUrls.first.short_urls
=> #<Dynamoid::Associations::HasMany:0x000055689b7a9d20 @query={}, @name=:short_urls, @options={:class=>ShortUrl}, @source=#<LeadUrls:0x000055689b7f8ba0 @new_record=false, @attributes={:created_at=>Fri, 24 Apr 2020 06:59:51 +0000, :updated_at=>Thu, 30 Apr 2020 07:26:43 +0000, :lead_id=>1, :short_urls_ids=>#<Set: {"test"}>}, @associations={:short_urls_ids=>#<Dynamoid::Associations::HasMany:0x000055689b7a9d20 ...>}, @attributes_before_type_cast={:created_at=>Fri, 24 Apr 2020 06:59:51 +0000, :updated_at=>Thu, 30 Apr 2020 07:26:43 +0000, :lead_id=>1, :short_urls_ids=>#<Set: {"test"}>}, @changed_attributes={}, @previously_changed={}>, @loaded=false>

irb(main):008:0> LeadUrls.first.short_urls.count
=> 1

Model:
class LeadUrls
  include Dynamoid::Document

  table name: :lead_urls, key: :lead_id

  field :lead_id, :integer

  has_many :short_urls, class: ShortUrl
...
end

Hmm. First of all thank you for the question.
I believe the issue still exists and it's related to association between persisted model and not persisted yet one. In your examples all the models are persisted. It works well.
Actually the documentation isn't accurate and there is no new method for has_many association so the example user.addresses.new doesn't work. There is a method << which adds a model to an association but it looks like it cannot add a not-persisted model.
Let's sum up. The mentioned issue exists and warning in documentation still actual but the documentation is not accurate.


Prevent bare metal machine config references from changing to existing machine configs

Closes #6633.
In bare metal clusters users shouldn't be able to change machine configs. However, EKS-A incorrectly allowed users to change the machine config references to existing machine configs.

/approve

/cherry-pick release-0.17

/cherry-pick release-0.17


Don't open browser when doBrowser flag is set to false

@nf the problem is that openBrowser called in both cases. so even if user sets doBrowser to  false it still tries to launch a browser.

@nogoegst Did you observe this in practice? I'm confused as to how can openBrowser be called if doBrowser is false.
The behavior of || in Go is to short-circuit the evaluation if the left hand expression evaluates true. In this code, functionCall is never called:
if true || functionCall() {
  ...
}

Try changing doBrowser from false to true in this example: https://play.golang.org/p/EvbgV7Cegws

@nf, hahaha of course there is a short-circuit for this and yes, it raised my eyebrows when it kept on launching browser. It seems that I ran it with -browser false (*doBrowser is true here and this is not obvious!) and after I made this change at some point I switched to -browser=false... :man_facepalming: :laughing:

yadi-yadi-ya, read the docs...
-flag x  // non-boolean flags only
:+1:

@nf personally I think it's clearer to use boolean flags that default to false. this way one can just specify -flag to set them to true. like -no-browser here :wink:


HAWQ-1398. Fixing invalid references in log statements.

elog statements attribute errors to wrong function.

Maybe you could use func, instead of hard coding so that in case the function name is changed again......

That's a good idea. Didn't know if that capability existed in our logging infrastructure. Maybe we'll make converting all of them into a __func__ a separate JIRA?

elog supports formatting just like standard c function printf, etc. When I fixed a QD bug I modified some QD logs to use func. I think it will be a huge work to modify all, so I suggest we modify them when seeing them given this kind of bug is not functionality bug.

+1

+1

Looks like my Apache user kdunn926 does not have write permissions to this repo. @edespino
$ git push<EMAIL_ADDRESS>Password for<EMAIL_ADDRESS>remote: Permission to apache/incubator-hawq.git denied to kdunn926.
fatal: unable to access<EMAIL_ADDRESS>The requested URL returned error: 403

You should check into the apache repo. github repo is just a mirror which
will keep sync-ed with the apache repo.
See
https://cwiki.apache.org/confluence/display/HAWQ/Contributing+to+HAWQ
2017-05-16 23:13 GMT+08:00 Kyle Dunn<EMAIL_ADDRESS>
Looks like my Apache user kdunn926 does not have write permissions to
this repo. @edespino https://github.com/edespino
$ git push<EMAIL_ADDRESS>Password for<EMAIL_ADDRESS>remote: Permission to apache/incubator-hawq.git denied to kdunn926.
fatal: unable to access<EMAIL_ADDRESS>The requested URL returned error: 403
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-hawq/pull/1181#issuecomment-301814544,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHI5jODWSoKIWQvnqIa0L4hlLEu0mj6bks5r6b03gaJpZM4MkFvI
.


crashes in 1.19.1

shulker-dupe_1.19.x_1.2.0
fabric loader version 0.14.8
fabric-api-0.58.5+1.19.
crash-2022-07-29_10.43.32-client.txt
1

I also had this problem. It seems to be no individual case.

i am also having this issue. will this be getting fix?

fixing this soon, side note I would not really recommend playing 1.19.1 lol

update: it does not actually work in 1.19.1+ it is not a problem with the mod rather the dupe has been fixed.


Question: is it possible to retrieve PID list order in PMT?

PMT describes service and component info.
The list of components (given by TSDuck output) seems to be sorted by numerical order of PID.
Is there a way to get the actual order defined by PMT in the stream?
PS: TSDuck version is 3.16-1110

Hi @apallier,
If you mean using TSDuck commands such as tstables or tstabdump, the answer is yes. They dump the content of tables and sections as they are. So, here, you can see the order of PIDs and descriptors. If you see PIDs in numerical order, this is because the original equipment generated the table this way.
If you mean in a programatic way, the answer is no at high level and yes at low-level. C++ classes such as ts::PMT describe objects which can be serialized and deserialized in a number of ways. The abstract representation of the object is independent of the many ways it can be serialized. If you need to analyze this programatically, then you should collect binary tables or sections, (class ts::Section) and analyze the section payload yourself.

Hi @lelegard Thank you for you quick feedback.
First case:
I use this command line:
tsp -I ip <IP_ADDRESS>:5000 -P tables --pid 1360 -P until -s 2 -O drop
Result is good, order is preserved in the output (actually it's exactly what I expect [1369, 1364, 1368, 1367, 1366]):
...
Elementary stream: type 0x1B (AVC video), PID: 1369 (0x0559)
Elementary stream: type 0x06 (MPEG-2 PES private data), PID: 1364 (0x0554)
Elementary stream: type 0x11 (MPEG-4 AAC Audio), PID: 1368 (0x0558)
Elementary stream: type 0x06 (MPEG-2 PES private data), PID: 1367 (0x0557)
Elementary stream: type 0x11 (MPEG-4 AAC Audio), PID: 1366 (0x0556)
...

Second case:
But with this command line:
tsp -I ip <IP_ADDRESS>:5000 -P tables --pid 1360 --xml-ouput output_pmt.xml -P until -s 2 -O drop
Result is bad. Component list seems to be ordered by elementary_PID:
<tsduck>
  <PMT version="1" current="true" service_id="0x0550" PCR_PID="0x0559">
    <!-- PID 0x0550 (1360) -->
    <registration_descriptor format_identifier="0x43554549"/>
    <component elementary_PID="0x0554" stream_type="0x06">
      <teletext_descriptor>
        <teletext language_code="swe" teletext_type="0x01" page_number="100"/>
        <teletext language_code="swe" teletext_type="0x02" page_number="799"/>
        <teletext language_code="swe" teletext_type="0x05" page_number="199"/>
        <teletext language_code="dan" teletext_type="0x02" page_number="591"/>
      </teletext_descriptor>
    </component>
    <component elementary_PID="0x0556" stream_type="0x11">
      <ISO_639_language_descriptor>
        <language code="swe" audio_type="0x03"/>
      </ISO_639_language_descriptor>
      <supplementary_audio_descriptor mix_type="0" editorial_classification="0x03"/>
      <AAC_descriptor profile_and_level="0x58" SAOC_DE="false">
        <additional_info>
          42
        </additional_info>
      </AAC_descriptor>
      <MPEG4_audio_descriptor MPEG4_audio_profile_and_level="0x58"/>
    </component>
    <component elementary_PID="0x0557" stream_type="0x06">
      <ISO_639_language_descriptor>
        <language code="swe" audio_type="0x00"/>
      </ISO_639_language_descriptor>
      <AC3_descriptor component_type="0x44"/>
      <AC3_descriptor component_type="0x42"/>
    </component>
    <component elementary_PID="0x0558" stream_type="0x11">
      <ISO_639_language_descriptor>
        <language code="swe" audio_type="0x00"/>
      </ISO_639_language_descriptor>
      <AAC_descriptor profile_and_level="0x58" SAOC_DE="false">
        <additional_info>
          03
        </additional_info>
      </AAC_descriptor>
      <MPEG4_audio_descriptor MPEG4_audio_profile_and_level="0x58"/>
    </component>
    <component elementary_PID="0x0559" stream_type="0x1B"/>
  </PMT>
</tsduck>

I may missed an option to have the right order.

OK, you have two cases here.
The first case is a dump of a section and you see the actual order of PID's in this section.
The second case is an XML object which is similar to the C++ object I mentioned. It is an abstract representation of a table. The semantics is the same as the section. But the order is not necessarily the same. In fact, the C++ classes are the central pivot format for all tables and descriptors. Binary tables are serialized and deserialized from and to C++ objects. The same applied to XML tables.
The real question is : does it matter ?
If you want to analyze the actual structure of an existing transmission, use the textual dump format.
If you want to modify a table, use the XML format. Then, I agree that the re-serialized PMT section will have its components in a possibly different order as the original one. But does it matter? All conforming receivers shall equally treat a PMT, regardless of the order of PID's.

Yes it matters for me because I build a tool based on the XML output and I especially check components order in PMT :)
I assumed that XML output was as reliable as Text output.
Thank you for your answer. I close the issue.