"token" parameter not in video info for unknown reason

Checklist

[?] I'm reporting a broken site support issue (what does this mean?)
[x] I've verified that I'm running youtube-dl version 2019.01.17
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar bug reports including closed ones
[x] I've read bugs section in FAQ

Verbose log

$ youtube-dl --version
2019.01.17

$ youtube-dl --verbose "https://www.youtube.com/watch?v=AMsoy2_ZJJg"
[debug] System config: ['--prefer-free-formats']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=AMsoy2_ZJJg']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.17
[debug] Python version 3.7.3 (CPython) - Linux-5.0.16-300.fc30.x86_64-x86_64-with-fedora-30-Thirty
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3
[debug] Proxy map: {}
[youtube] AMsoy2_ZJJg: Downloading webpage
[youtube] AMsoy2_ZJJg: Downloading video info webpage
ERROR: AMsoy2_ZJJg: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 793, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 508, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1689, in _real_extract
    video_id=video_id)
youtube_dl.utils.ExtractorError: AMsoy2_ZJJg: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

Youtube-dl is unable to dowload the youtube video (which is accessible and playable through my browser). It throws the error "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . and urges me to post this bug.

My apologies, apparently I had youtube-dl installed both via pip and the package manager and used the oldest of the 2. I should have seen it!
This may be deleted.


Adding VirtualSerialPort to existing VM

I am having trouble adding a serial port to an existing VM.  The code below seems to work since the port shows up in vm.config.hardware.device.  The issue occurs when I start the VM up and the connectable status shows 'unrecoverableError'.   I have tried several values for backing.serviceURI mostly from (https://www.vmware.com/support/developer/converter-sdk/conv50_apireference/vim.vm.device.VirtualSerialPort.URIBackingInfo.html) without success.
code:
def add_port(vm):
  spec = vim.vm.ConfigSpec()
  spec.deviceChange = []
  serial_spec = vim.vm.device.VirtualDeviceSpec()
  serial_spec.operation = 'add'
  serial_port = vim.vm.device.VirtualSerialPort()
  serial_port.yieldOnPoll = True
  backing = serial_port.URIBackingInfo()
  backing.serviceURI = 'tcp://5000'
  backing.direction = 'server'
  serial_port.backing = backing
  serial_spec.device = serial_port
  spec.deviceChange.append(serial_spec)
  vm.ReconfigVM_Task(spec=spec)

Then the device shows up in devices looking fine until the VM is booted.
After starting:
   connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
      dynamicType = <unset>,
      dynamicProperty = (vmodl.DynamicProperty) [],
      startConnected = true,
      allowGuestControl = true,
      connected = false,
      status = 'unrecoverableError'

Any help would be appreciated.  Thank you.

Try adding a : before the port number.
E.g.:
backing.serviceURI = 'tcp://:5000'
I think that is needed to distinguish from host "5000" to mean port "5000" with no host restriction

That was it!
   connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
      dynamicType = <unset>,
      dynamicProperty = (vmodl.DynamicProperty) [],
      startConnected = true,
      allowGuestControl = true,
      connected = true,
      status = 'ok'
   }

Thank you for your prompt replies and knowledge.  I have also tried with telnet://:<IP_ADDRESS>:5000 and although the status is ok, lsof -i does not show anything on port 5000.  Does telnet need to be reconfigured?

I've never tried telnet before and honestly I've never tried specifying a host/IP.
Do you have telnet://:<IP_ADDRESS>:5000 and not telnet://<IP_ADDRESS>:5000?
Also does telnet://:5000 work?

I was just using telnet because it seemed like an easy way to test the connection out.  I had this and it did not work:
serviceURI = 'telnet://:<IP_ADDRESS>:5000'

I also tried this with the same results:
serviceURI = 'telnet://:5000'

After a little more digging (https://kb.vmware.com/s/article/2004954) it almost looks like I need to do something like this:
serviceURI = 'telnet://:ESXIHostIP:5000'

Use the esx host that the VM is on.  I couldn't get that to work either but should have access to the firewall soon so I can rule that out as a problem.
Thank you again for all of your help.  If you have any other ideas please let me know.

Opening up the firewall will definitely be necessary.
I believe "VM serial port connected over network" is the rule (which opens a lot of ports ☹ ).
I've been able to use 'tcp://:5000' in the past and telnet to the ESX host at that port and have it work (after opening the firewall).

Has there been any update to this yet? About to try something similar but wanted to know if there are any other issues I should look out for.

Update: I was able to get a serial connection working. I did have to modify the firewall settings to allow Virtual Serial Ports over Network. As for the  serviceURI It will need to be like this:
serviceURI = 'telnet://ESXIHostIP:5000'
You will also have to make sure that the kernel is using the serial ports. (i.e on the pre-boot console line  console=ttyS0,1152000)


Bump cats dependency or split out

Current dependency of cats is set to 0.9.0 which is not binary compatible with latest release 1.1.0.
Two steps to fix this

Update the dependency and publish a new version
Split out the cats dependency which is only used  in Write.scala to its own fixed-length-cats module that separately published. That way, future binary incompatibilities are easily handled down stream by users without requiring maintainers of fixed-length to release another version.

What do we think?

Hm.
So strange that I would need to break it one way or the other (cats 0.9 vs 1.x).
Are you sure there is no other way?
For a quick fix, you could shade your dependency on cats 1.1 in your app.
But it seems strange to me that there is no way to separate those.

0.4 should be available shortly

Perhaps I spoke too soon. It seems okay using the Show instance (don't hold me to that) but there's the eviction notice in SBT that would ideally be avoided.
Now that cats is aiming for binary compatibility for 1.x.x this shouldn't be an issue for a while.


Missing package Mono.WebAssembly.Interop

When trying to update to build 10324, NuGet says: "Unable to find package Mono.WebAssembly.Interop. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, MyGet: Blazor-Dev, MyGet: Reactive Extensions, nuget.org

I am experiencing the same issue with any new project I try to make.

Below is a link to a Mega folder containing the NuGet packages relevant to Mono.WebAssembly.Interop. They are built from the latest source in release mode.
https://mega.nz/#F!f8NVCAYC!uiBp9vOq-NUv1vKEJkn4QQ

Thanks for reporting it! Now fixed.


@conda-forge-admin, please add user @batic

Additional comment:
@batic is maintainer of the eo-learn.

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added user @batic in conda-forge/eo-learn-coregistration-feedstock#30.


How do I get FEN from rank & file?

I need to get the FEN of a Square. I went digging but, sadly ended up with invalid namespaces.

The way I approached this problem is:
$"{(char)('a' + squarei % 8)}{squarei / 8 + 1}"

squarei?

oh sorry lol. squarei stands for square index, I forgot to change it to directly fit your need.

as in rank?

I updated my comment.

Thnx


MNT: default to not auto-monitoring

Be a bit more conservative about setting up monitors.
closes #246

@dchabot it definitely is. Things that use subscriptions rely on the monitor being in place. @tacaswell and I talked about making things always auto_monitor=False until someone subscribes to its value, but have yet to figure out a nice way to do it (re-create the epics.PV?).

Agreed - it is more simple, but it'll take expert discrimination as you say and could be more prone to mistakes.

That may help. Still, when you have a beamline config with 10k PVs and a single monitor callback thread - any amount of unnecessary monitoring is going to be costly.

Well, not quite. I'm suggesting only 'auto monitor' if the signal has been ophydobj.subscribe()'d to.
The way EpicsSignal.get() currently works is to ignore the monitored value. The reason for that is because the value returned can change depending on the kwargs you pass in -- with as_string, count, and as_numpy. So, (I think) the only place a monitored value becomes important is for subscriptions (monitor callbacks).


How to get token after authorization process?

Hi, how can I get token after
VK.autorize()

or in
VK.processURL(url, options: options)

in AppDelegate openUrl function. Can you help me with it, please?

You can get token from parameters in vkDidAutorize(parameters: Dictionary<String, String>) VKDelegate function.

Thanks!


Capability for profile name length

Some devices (e.g. HID++1.0) have a max length for the profile name. Clients (piper) should be aware of this limit.

I'm wondering: should we just rely on the user to notice the name was truncated?

IMO the clients should limit this. We can rely on the user but limiting this in the first place would provide a better experience.


Question:

Any chance we can have a Slack or IRC channel? Seems like there is some rapid development going on. I also just dropped Fabio into prod for two hours and have seen some very impressive numbers.
Cheers

Below I'll provide my reasoning for not doing this at this point but I'm interested to hear whether there is a pressing need for a different communication form.
Live chat
There is a gitter channel which I've abandoned and I've used Slack with one user but would have to opt for a paid option to make it open I guess. Maybe there was a free tier for open-source projects but TBH I didn't dig very deep.
The main concern I have with live chat (or a mailing list) at this point is that it splits the conversation into multiple parts which then have to be merged again. Everybody will have to look in multiple places and needs to make a decision on whether to start a new conversation on the chat, the mailing list or github. Rules have to be made, maintained and people reminded.
Live chat also interrupts the work flow. People may not want to respond at a given time or it may be inconvenient because of timezone. This can be frustrating since the expectation is that live chat is "live".
As imperfect as github is for this it centralizes the discussion in one place so everybody knows where to look and it eliminates this can of worms for now. It is searchable, people get notified if they want to and can opt out of certain discussions which is difficult in a global live chat. I'll try to respond as quick as possible and others can do the same. Depending on how active the community becomes this may not be sustainable, though. I'm open for suggestions.
If you want to discuss things that shouldn't be public then we can find something that works. Skype or Google Talk are fine with me. We can do that on a case-by-case basis.
Feel free to just ask what you'd like to know here.
Rapid development
I've come back from vacation and am catching up on issues. There is no real roadmap or plan. Critical bugs and simple questions always get addressed first. After that it is what has the highest demand (assuming I have an idea on how to implement it) and/or what I'm interested in myself. Please let me know what bugs you and how you would like to use fabio but cannot right now. In general, I like to mull over solutions for a bit until I've got a good idea.
Contributions are always welcome. Please start with a discussion instead of code or a PR unless it is a trivial change.
Your numbers
I am very curious to hear about them. If you want I can include you - and everybody else who wants to as well - on the front README. Just drop me a note or send a PR.
Thanks for your comments and the issues you've opened so far.


No default summary writer available when using tf.py_function with autograph

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): 3.6.8
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 10.15.5 Beta
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 2.1.0
Python version: 3.6.8
Bazel version (if compiling from source): n/a
GCC/Compiler version (if compiling from source): n/a
CUDA/cuDNN version: n/a
GPU model and memory: n/a

Describe the current behavior
Using tf.summary returns False inside a tf.py_function when using autograph.
Describe the expected behavior
tf.summary should return True.
Standalone code to reproduce the issue
import tensorflow as tf

@tf.function
def eager_pyfunc():
    def inner_func():
        bool_out = tf.summary.scalar('myscalar', tf.constant(32.9))
        tf.print(bool_out, name='log-myscalar-success')

    tf.py_function(inner_func, [], [], name='log-myscalar')

    bool_out2 = tf.summary.scalar('myscalar2', tf.constant(52.3))
    tf.print(bool_out2, name='log-myscalar2-success')

with tf.summary.create_file_writer('./logs').as_default():
    tf.summary.experimental.set_step(0)
    eager_pyfunc()

outputs:
0
1

Removing the tf.function outputs:
1
1

Other info / logs
Could be related to https://github.com/tensorflow/tensorflow/issues/26409.

I have tried on colab with TF version 2.1.0, 2.2.0-rc3 and was able to reproduce the issue.Please, find the gist here.Thanks!

Was able to reproduce the issue in TF 2.6.0-dev20210530,please find the gist here..Thanks !

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.

I re-ran my minimal reproduction sample and this issue still exists on the latest stable TensorFlow.


Add link to Keycloak Multi-Tenancy extension

Hi @abstractj, could you please tell me if there are any requirements that prevent the extension from being accepted?

I'm not familiar with any formal requirements we have to add extensions to the list / requirements about its maturity etc.
I'd be "+1" to add this extension, as it might help drive community members to this extension to use, discuss and enhance it.
Look it at the README of the extension, I my first two questions would be:

Which version of Keycloak does it support?
Explanation of the concept "Tenant" as different people could understand different things given the word "Tenant"
Some of the goals and non-goals of the solution. In other words, what it should be used for, and what it shouldn't be used for.
Maybe also the scenario (if it can be shared) where this solution was designed for initially, so people might know about the benefits it provides, and the limitations it might have

Still, those could be answers after it was added to the web page.

These are really good points @ahus1, I will try to improve them.


WIP: Wit sample tests, using DomainMap to change image tag

oracle.kubernetes.operator.ItImageTool testCustomImageUsed SUCCESS in Three Jenkins jobs:
http://wls-jenkins.us.oracle.com/job/weblogic-kubernetes-operator-javatest/3920/consoleFull
http://wls-jenkins.us.oracle.com/job/weblogic-kubernetes-operator-javatest/3926/consoleFull
http://wls-jenkins.us.oracle.com/job/weblogic-kubernetes-operator-javatest/3927/consoleFull

It passed on External Jenkins:
http://build.weblogick8s.org:8080/job/weblogic-kubernetes-operator-quicktest/948/consoleFull
http://build.weblogick8s.org:8080/job/weblogic-kubernetes-operator-quicktest/949/consoleFull
And on Internal Jenkins
http://wls-jenkins.us.oracle.com/job/weblogic-kubernetes-operator-javatest/4111/consoleFull
http://wls-jenkins.us.oracle.com/job/weblogic-kubernetes-operator-javatest/4118/console

242 files changed, are you sure you need to merge all changes including Ryan's ?

Thanks Marina to pointing out that. I didn't notice it :( I guess I need to start a new PR with latest develop branch


Support for multiple inputs

Hi I'm having a little difficulty on a regression example and wondered if you could help me a bit. The structure of the network is such that it has two inputs, only one of which is fed into convolutional layers before they are ultimatly joined at dense layers, ultimately outputting into a single neuron which was trained to minimize mean squared error loss. I'm trying to load a pre-trained Keras model and my code looks like this:
import os, h5py
from keras.models import load_model, Model
from deepexplain.tensorflow import DeepExplain

    model = load_model(data_file) #load h5 file w/ graph and pre-trained weights
    with DeepExplain(session=K.get_session()) as de:
        input_tensor = [model.layers[0].input, model.layers[6].input] #the 6th index is where the 2nd input is
        fModel = Model(inputs = input_tensor, outputs = model.layers[-1].output) #assuming -1 as this is a regression problem

        xs = data[0:1,:,:] #grab first test example
        xs2 = data2[0:1,:] #grab first test example of input type 2
        gradinput = de.explain('grad*input', fModel(input_tensor), input_tensor, [xs, xs2])

This leads to the following output/error:
DeepExplain: running "gradinput" explanation method (2)
Traceback (most recent call last):
File "deep_explain.py", line 51, in
main()
File "deep_explain.py", line 39, in main
gradinput = de.explain('gradinput', fModel(input_tensor), input_tensor, [xs, xs2])
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 414, in explain
result = method.run()
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 91, in run
attributions = self.get_symbolic_attribution()
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 156, in get_symbolic_attribution
return tf.gradients(self.T, self.X)[0] * self.X
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 793, in binary_op_wrapper
y = ops.convert_to_tensor(y, dtype=x.dtype.base_dtype, name="y")
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 637, in convert_to_tensor
as_ref=False)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 702, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 905, in _autopacking_conversion_function
return _autopacking_helper(v, inferred_dtype, name or "packed")
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 868, in _autopacking_helper
return gen_array_ops._pack(elems_as_tensors, name=scope)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2041, in _pack
result = _op_def_lib.apply_op("Pack", values=values, axis=axis, name=name)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2329, in create_op
set_shapes_for_outputs(ret)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1717, in set_shapes_for_outputs
shapes = shape_func(op)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1667, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "/home/vagarwal/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 676, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Shapes must be equal rank, but are 3 and 2
From merging shape 0 with other shapes. for 'mul_53/y' (op: 'Pack') with input shapes: [?,10500,4], [?,6].
Is there something simple wrong w/ my syntax or method? I'm using Keras 2.0.2 w/ Tensorflow 1.0.1 backend. Thank you for your help and package development!

Right, DeepExplain did not support multiple inputs but I just pushed a fix to make it happen. See this minimal example. Let me know if it works for you now.

Glad the error was fixed and appreciate the code update -- looks like everything is working smoothly in my hands too. Closing issue.

Sorry to reopen issue but just wanted to let you know about a few more errors I encountered.
When I run the sample code you give on my data, everything works fine for: grad*input, elrp, and deeplift techniques.
However, for the saliency map, I receive back a matrix of 0s (with no error reported), and for integrated gradients I receive an error that doesn't finish the computation. Is it difficult to fix these methods to allow multiple inputs as well, or is there any plan to fix these in the future?
Thanks in advance!

Hi,
These methods should be already supported. I will have to look into it to see where the problem is. It would be very useful if you could provide a minimal example were these methods fail.
For integrated gradients, you can try to use a batch size of 1 and pass the parameter steps=10 to the explain method to check if with fewer steps it works. Also, can you report the exact error/stacktrace you get here?

Ok, please find attached a minimal example of 10 samples (running with batch size = 1) to reproduce the error, and relevant code,
dummydata.zip
I think I fixed the saliency problem...it was my fault. For the intgrad problem, batch size = 1 and steps=10 did not fix the problem. I run:
python deep_explain2.py model.h5 testdummy.h5
the output of this is:
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "gradinput" explanation method (2)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "saliency" explanation method (1)
DeepExplain: running "intgrad" explanation method (3)
Traceback (most recent call last):
File "deep_explain2.py", line 40, in
main()
File "deep_explain2.py", line 35, in main
map = de.explain(method, fModel(input_tensor), input_tensor, [xs, xs2])
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 451, in explain
result = method.run()
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 214, in run
xs_mod = (np.array(self.xs) * alpha).tolist()
ValueError: could not broadcast input array from shape (10500,4) into shape (1)
Best wishes

About the second issue, according to the README

When provided, baseline must be a numpy array with the size of the input, without the batch dimension (default: zero).

The baseline has no batch dimension because the same baseline is used for all the inputs both with Integrated Gradient and DeepLIFT. I will look into the issue with Integrated Gradients.

The problem with integrated gradients was caused by lack of support for multiple inputs of different shape. Now this is fixed.
Thanks for the code example. It now works, except for the perturbation methods that does not support multiple inputs.
If one of your input is binary (ie. boolean), it might be a problem for Int Grad because it is supposed to gradually vary the input from a baseline value to its actually provided value.

"Are you passing a baseline with batch dimension?"
From the example I've given, the input is [xs, xs2], where the dimension of xs is 1 x 10500 x 4, and dimension of xs2 is 1 x 6, and the 1 is the batch dimension. Therefore I was thinking that the correct dimension for the baseline (after having read your README) should be [bl1, bl2], where bl1 is 10500 x 4 and bl2 is 6 (which removes the batch dimension). Please let me know if this is not the case. Adding the line to my above script:
baseline = [np.repeat(np.array([[0.2,0.2,0.3,0.3]]), 10500, axis=0), np.zeros(6)]
map = de.explain(method, fModel(input_tensor), input_tensor, [xs, xs2], baseline = baseline)
should reproduce the error.
"The problem with integrated gradients was caused by lack of support for multiple inputs of different shape. Now this is fixed."  Thanks, glad to hear! Regarding Boolean input, I'll switch this to floating point during training to see if it changes the outcome. It could be that Tensorflow automatically treats Boolean as a 0/1 floating point matrix.

Yes, your understanding of the baseline is correct.  But I just realized that in the stacktrace you posted above you are using the following line:
map = de.explain(method, fModel(input_tensor), input_tensor, [xs, xs2], baseline = [xs, xs2])

where the baseline is actually identical to the input. This is causing the problem.

I accidentally posted the wrong stacktrace...but I figured out the source of my error, it was just a strange Python error. When I run this:
import os, h5py
from optparse import OptionParser
from keras.models import load_model, Model
import numpy as np
from keras import backend as K
from deepexplain.tensorflow import DeepExplain

batchsize = 1
baseline2 = [np.repeat(np.array([[0.2, 0.2, 0.3, 0.3]]), 10500, axis=0), np.zeros(6)]

def main():
    usage = 'usage: %prog [options] <data_file> <testfile>'
    parser = OptionParser(usage)
    (options,args) = parser.parse_args()

    if len(args) != 2:
        print args
        parser.error('Must provide data file and output directory')
    else:
        data_file = args[0]
        testfile = args[1]

    testfile = h5py.File(testfile, 'r')
    Xin1, Xin2, y_test = testfile['data'], testfile['data2'], testfile['label']
    model = load_model(data_file)

    with DeepExplain(session=K.get_session()) as de:
        input_tensor = model.inputs
        fModel = Model(inputs = input_tensor, outputs = model.outputs)

        for method in ['deeplift', 'elrp', 'occlusion']: #'grad*input',
            for i in range(0,10):
                xs = Xin2[i*batchsize:(i*batchsize+batchsize),3000:13500,:]
                xs2 = Xin1[i*batchsize:(i*batchsize+batchsize),:]
                ys = y_test[i*batchsize:(i*batchsize+batchsize)]
                map = de.explain(method, fModel(input_tensor), input_tensor, [xs, xs2], baseline = baseline2)
                X, X2 = map[0], map[1]
                np.savetxt(method.replace("*", "")+str(i)+'.txt', np.column_stack((ys, 10**4 * np.sum(X, 2), X2)), fmt='%.3f')

if __name__ == '__main__':
    main()

it results in the following stacktrace:

File "deep_explain2.py", line 41, in
main()
File "deep_explain2.py", line 36, in main
map = de.explain(method, fModel(input_tensor), input_tensor, [xs, xs2], baseline = baseline2)
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 452, in explain
result = method.run()
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 285, in run
self._set_check_baseline()
File "/mnt/c/Users/vagar/Downloads/keras3/src/deepexplain/deepexplain/tensorflow/methods.py", line 107, in _set_check_baseline
% (self.baseline[i].shape, self.xs[i].shape[1:]))
RuntimeError: Baseline shape (1, 10500, 4) does not match expected shape (10500, 4)

However when I define baseline2 within the scope of the main function, everything mysteriously runs fine, I tend to use other languages more than Python so this is somewhat strange behavior to me in handling global vs local scope...in any case, thank you for your patience in helping me and I'll close out the issue again.


Code padding

Some examples have strange alignment in the online version:
http://haxe.org/manual/lf-pattern-matching-variable-capture.html

Up ! that makes examples quite hard to read
http://haxe.org/manual/macro-enum-building.html

sigh, I'll revert all the code example changes that I made so it looks good on kindle. I thought they looked okay in the PDF output but I agree the web version looks really bad.

Is this something that can be solved on the website markdown->html or css end?
I find the alignment in the raw markdown confusing too so I think something in the generation will have to change.  But if you can see a way to make changes at the markdown->html level that will help let me know.

It's alright, I'll just have to think of something different for the e-book versions which nobody reads anyway.

This is mostly because we take snapshots out of the code that is part of a complete class, right? Why not just put it in place?

No the code itself is wrapped in a weird way because I thought I could make it work for both e-book and online versions.

http://haxe.org/manual/types.html I found this one has still some weird alignment.

Yeah there might be some inline-code which I didn't change.


If I have a long list of worklogs, I sometimes see the wrong entry

Expected Behavior
I should always see the correct list of worklogs. The list should also be pageed. This may reduce the number of requests to the Jira server.
Actual Behavior
Currently you get all worklogs as a long list. Sometimes this list is not correct and shows worklogs twice. Or a worklog content is in the wrong place to the wrong timestamp.
Steps to Reproduce the Problem

Long list of worklogs (about 50 or more worklogs)
Scrolling in the worklog list
Content is sometimes displayed incorrectly

Specifications

Chronos-timetracker version: 2.4.6
OS: MacOS

Fixed(develop branch). Will be in the next release.

Fixed, nice, THX!


[Task]: Fix export backup in settings gives success with any password if stronghold is unlocked

Task description
In settings > export backup, you can enter any password and that will give a succesful export, if stronghold is unlocked. We should always check the password before to avoid this as stronghold will fail after choosing the destination file
Requirements
Only allowed to export if the password is correct
Creation checklist

[ ] I have assigned this task to the correct people
[X] I have added the most appropriate labels
[X] I have linked the correct milestone and/or project

Cant reproduce this anymore 🤔

This needs to be fixed in iota-sdk as this is related to the "sendMessage" function error handling

Being fixed in https://github.com/iotaledger/iota-sdk/tree/fix/capacitor-reject-promise-on-error

https://github.com/iotaledger/iota-sdk/pull/298 merged


could not download all labels if the shipment contains multiple packages "multi_piece_shipment"

Hi
I am following this example https://github.com/goshippo/shippo-python-client/blob/master/examples/multi_piece_shipment.py
The parcel contains multiple packages/pieces and wants to print the label of all the pieces but API returns only the first label.
In web interface there is also one label to download but when I click on the tracking link there tracking code for all packages

@rga-odoo Have you ensured you are viewing all the labels in this specific line we're essentially doing a GET (passing a rate object_id):
    for num,label in enumerate(transactions.results)
Feel free to comment here if you need any additional help on this.  Apologies this issue was left up so long with a proper response.


DRAFT: feat(examples): Add RAGAS evaluation to RAG chain

This PR add RAGAS evaluation to the GenAI Multimodal example.
It also adds steps on the README that instruct the user how to deploy using the infra pipeline (cloud build).
IMPORTANT: provider version that fixes https://github.com/hashicorp/terraform-provider-google/issues/17904 is not available yet, after the release we will fix this version in examples/genai-rag-multimodal/versions.tf file.

Update: Release 5.34.0 is out and was fixed on versions.tf: https://github.com/hashicorp/terraform-provider-google/releases/tag/v5.34.0

I was able to test the new provider version, the terraform version (5.34.0) fixes the issue we were having, this PR is ready to review/merge


Leverage vscode "Piece Tree" string buffer in TextDocument representation

@rebornix recently made a post w.r.t. text buffering in the main vscode project.  See this code.
It would be awesome if FullTextDocument, TextDocument implementation used by things such TextDocuments (document manager bundled in the server package), used this buffering under the hood, rather than a plain string / lazy-loaded offset mapping.
This buffered approach, combined with a supporting incremental sync in TextDocuments API (something I want to put a PR up for, and mentioned in #473) would afford language server / client developers a much more performant API for dealing with text documents.
Could we move this text buffer implementation into this repo?  Make it a separate npm module?  Open to peoples' thoughts on this?
cc: @dbaeumer @jrieken

Additionally, totally understand the dependencies the vscode piece tree implementation has on other code that is exclusively in the vscode repo.  I guess I hoped my creation of this issue would also spur a discussion of efficient ways of buffering document text in text document implementations in this repo, as they are the default implementations developers inherit when leveraging the tooling in this package to create language servers.

Technically we can move the pieceTreeBase code into a separate npm module then Monaco or vscode-languageserver-node can have its own implementation of applyEdits (Monaco's a bit more complex as it handles markers and whitespaces trimming). The only code change I need to make is moving searching related code out as all other vscode code dependencies are just types.
Moreover, we can leverage TextBuferSnapshot for snapshot and incremental update.

@rebornix that sounds great.  Is this something that would take a great deal of time?  Is this something you're interested in doing?
Happy to help where I can.

Publishing PieceTreeBase should be simple.
It doesn't mean that we have to use that in vscode-languageserver-node as a line based text buffer can work great for small to medium files. The discussion came back to If we want to support incremental content sync in the document manager, as mentioned in https://github.com/Microsoft/vscode-languageserver-node/issues/473#issuecomment-476549177 .

By a line-based text buffer, do you mean an array of lines?
As it stands today, I don't think this library uses a representation like that.  I am specifically looking at FullTextDocument and TextDocument.applyEdits (which actually uses repeated string concatenation.
From what I can see, the document contents are always stored as a plain string.
I plan on writing up a PR to add Incremental document sync support to TextDocuments, leveraging things like TextDocument.applyEdits to achieve a logically correct synchronization mechanism.  I guess I wanted to kick off this discussion as the actual efficiency of applyEdits could be improved.

@Jma353 a PR is highly appreciated.

@Jma353 I extracted PieceTree from vscode to a separate repository https://github.com/rebornix/PieceTree, so you can play with it for now for the incremental feature. You may also want to read how we handle applyEdits in vscode.
Once you have something working (say a PR), we can look into publishing PieceTree to NPM and write some scripts to automate the publishing (we probably don't need to as PieceTree is stable).

Thanks for the super-fast turnaround time @rebornix!
I'll be putting out a PR next week!

@rebornix thanks again for separating out your tree-based text buffer.
Here's how I'm envisioning we introduce this:

I introduce a PR with incremental doc sync added to TextDocuments document manager, using functions like TextDocument.update and TextDocument.applyEdits as black-boxes.  These functions will be swapped out for more efficient variants in the future, using underlying piece-tree text buffer.
You publish https://github.com/rebornix/PieceTree as an NPM module.
You or me put out a PR adding that npm module as a dependency of this project.
I swap out the TextDocument.applyEdits function and FullTextDocument implementations for ones that are more efficient, and use the tree-based text buffer in a PR.  Once this is in place, incremental doc-sync with efficient text buffering will be available out-of-the-box when using TextDocuments doc manager in an LSP server.

I am working on 1. from this list right now.  Does this plan sound good to you?

#478

You publish https://github.com/rebornix/PieceTree as an NPM module

I published https://www.npmjs.com/package/vscode-piece-tree directly from the repository now.

You or me put out a PR adding that npm module as a dependency of this project.
I swap out the TextDocument.applyEdits function and FullTextDocument implementations for ones that are more efficient, and use the tree-based text buffer in a PR. Once this is in place, incremental doc-sync with efficient text buffering will be available out-of-the-box when using TextDocuments doc manager in an LSP server.

I'm not sure if we want to separate the incremental document sync support into two PRs. If leveraging piece tree or a line based (an array of lines) text buffer improve the performance noticeably, we may want to do them directly but it's up to you and @dbaeumer to decide .

I am happy to directly follow up #478 with a PR adding your npm module as a dependency + refactor the text modification logic of FullTextDocument and TextDocument namespace.  Or I can rebase #478 onto the PR adding and using your npm module. Whatever is easiest.

Can you add the change (adding npm dependency, and refactor) directly to #478? I'm not confident with the performance of how applyEdits is being executed in the incremental sync. As I mentioned in https://github.com/Microsoft/vscode-languageserver-node/pull/478/files#r273749432 , every content change will lead to a re-scan of the whole document.

@Jma353 and @rebornix thanks a lot for doing this.
I would like to ask for one thing: can we still keep the old full text sync in and allow users to actively decide what they want to do. I am not a fan of swapping this out without server implementors actively deciding on it. Reason is that a full document sync works even if the client doesn't correctly provide character offsets in UTF-16 encoding. If we incrementally update a client needs to ensure this.

I saw in https://github.com/Microsoft/vscode-languageserver-node/pull/478 that this is a constructor option which is good.

@rebornix - I can definitely add the dependency in the PR!
Sounds good @dbaeumer, I'll keep this in mind.  Yea, figured I'd have the constructor option w/default to Full for that reason.

@rebornix as a heads up, I got a EISGIT error when npm install-ing your module:
npm ERR! code EISGIT
npm ERR! git <path/to/project/root>/node_modules/vscode-piece-tree: Appears to be a git repo or submodule.
npm ERR! git     <path/to/project/root>/node_modules/vscode-piece-tree
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

I unblocked myself to perform npm install updates by deleting the .git folder in the installed vscode-piece-tree module.  This might be something you need to update though, in order for this not to error out during travis-ci checks in the PR.

@Jma353 the error should be gone with<EMAIL_ADDRESS>

Updated the PR yesterday to use the Piece Tree, in a new TextDocument representation called IncrementalTextDocument (decided to go with that name, as there was a FullTextDocument built for Full text sync).
Feel free to give it a look!

Wanted to ping here to get additional feedback on my PR.  There's some comments w.r.t. updating documentation of parameters, but wanted to get additional feedback as well, so I can check this change in.

Published server version 5.3.0-next.7


[FR] Add authorization with an API KEY token

Use case:
I am trying to scrape an endpoint with an API KEY аuthorization using Prometheus with json-exporter ( prom/prometheus:main and prometheuscommunity/json-exporter:v0.3.0 docker images):
docker run -d --network=host --name=prometheus -v /path/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus:main --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:9095
docker run -d --name=json-exporter --network=host -v /path/jsonexporter/config.yml:/config.yml prometheuscommunity/json-exporter:v0.3.0 --config.file=/config.yml
with the following Prometheus prometheus.yml configuration file:
global:
  evaluation_interval: 15s
  scrape_interval: 15s
  scrape_timeout: 10s
  external_labels:
    environment: prometheus_in_docker

scrape_configs:

  - job_name: json_exporter_self
    static_configs:
      - targets:
        - <host>:7979 ## Location of the json exporter's real <hostname>:<port>

  ## gather the metrics from third party json sources, via the json exporter
  - job_name: json_exporter_data
    metrics_path: /probe
    authorization:
      credentials: '{my_secret_token}'
      type: apikey
    static_configs:
      - targets:
        - http://<endpoint_host>:<port>/api/v1/data
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: <host>:7979 ## Location of the json exporter's real <hostname>:<port>

and the following json-exporter config.yml configuration file:
metrics:
- name: example_metric
  path: "{ .data }"
  help: Example
  labels:
    environment: testdata # static label

prom/prometheus:main and prometheuscommunity/json-exporter:v0.3.0  are up and running, self scraping works fine (http://:7979/metrics), but a json scraping doesn't work (http://:7979/probe), the error is the following:
Failed to fetch JSON response. TARGET: http://<endpoint_host>:/api/v1/data, ERROR: 401 Unauthorized
The endpoint itself is available:
curl -X GET 'http://<endpoint_host>:/api/v1/data' -H 'Authorization: {my_secret_token}'
Feature request:
Could you please implement authorization with API KEY token?
(please see link  with additional discussion in the Prometheus repository)

Does anyone know if this has been implemented?

Does anyone know if this has been implemented?

I have a similar issue.
Trying to scrape json path via api url like http://MyHost/platform_api/GetSomeStuff/?account_id=123456&api_key=11112222233334444
It returns json in browser or curl just fine.
But i have no success probing that url with json_exporter
http://<IP_ADDRESS>:7979/probe?target=http://MyHost/platform_api/GetSomeStuff/?account_id=123456&api_key=11112222233334444
It seems to pass an account id but no api_key, so i'm getting authorization error.

I have a similar issue. If you run json_exporter locally and use Wireshark, you can see that the exporter only forwards the first get argument.

Sorry I didn't wait with my last comment until I knew the solution:
Solution
Replace & with %26 because you have to escape your &.
Root cause
If you request http://exporter.local/probe?target=someurl&apiKey=abcd then apiKey is delivered as GET parameter to probe and is not read as part of the string intended for target.
Therefore, request http://exporter.local/probe?target=someurl%26apiKey=abcd
Code location
https://github.com/prometheus-community/json_exporter/blob/d1456b89177b93ed15ef6fc43dc0b4c529599c3c/cmd/main.go#L110

I think this is already supporter with the http_client_config. Look at the example provided in https://github.com/prometheus-community/json_exporter/blob/master/examples/config.yml
I needed something similar in a Kubernetes environment and my config looks like
          http_client_config:
            authorization:
              type: Key
              credentials_file: /tmp/api-key.txt

Translated to curl this would be something like
curl -H "Authorization: Key MySecretApiKey" "exporter:7979/probe?target=http://mytarget"

For other options see https://pkg.go.dev/github.com/prometheus/common/config#Authorization

We need to have ability to add custom headers and hide it. For example gitlab api provide to use header field - token to authentificate. Yes, maybe gitlab team made bad solution, but, for now, I don't ability to use secure.

Authorization with the standardized HTTP Authorization methods is possible as @acondrat described in https://github.com/prometheus-community/json_exporter/issues/87#issuecomment-1305469450.
For example, the following module configuration sets the header Authorization: Bearer 123456 when the file /credentials/some_app.txt contains the string 123456.
modules:
  some_application:
    http_client_config:
      authorization:
        credentials_file: /credentials/some_app.txt

I don't think json_exporter should support non-standard-conformant authentication methods since this would add maintenance overhead that is not rectifiable - any application should support at least one of the standardized methods of Bearer tokens, Basic auth, or OAuth2.

Hi @morremeyer,
I hope you can help me out.
I have deployed Json-Exporter and Prometheus as a Helm chart in my Kubernetes cluster.
I have an API query that I can successfully submit in the terminal and get a return:
curl -X GET https://api.viessmann.com/iot/v2/features/installations/ID/gateways/ID/devices/ID/features -H "Authorization: Bearer <token>“

If I go by the http_client_config documentation (https://pkg.go.dev/github.com/prometheus/common/config#HTTPClientConfig) bearer_token or authorization.credentials must be of type Secret.
Unfortunately, I can't get the bearer token to work properly as a Kubernetes secret.
This is what my json exporter config looks like:
configuration:
  config: |
    ---
    modules:
      some_application:
        metrics:
        - name: viessmann
          type: object
          path: '{ .data.0 }'
          help: viessmann
          labels:
            id: "viessmann"
            name: "viessmann"
          values:
            apiVersion: '{.apiVersion}'
        http_client_config:
          bearer_token: 'viessmann-secret'
or
        http_client_config:
          authorization:
            credentials: 'viessmann-secret'

The Kubernetes-secret I create like:
apiVersion: v1
kind: Secret
metadata:
  name: viessmann-secret
  namespace: monitoring
type: Opaque
data:
  bearer_token: BASE64_ENCODED_TOKEN_VALUE_HERE

I hope you or someone else can help me :/
Thanks in advance

Hey @schoen2, let me post the full configuration that we use.
The http_client_config.bearer_token or http_client_config.authorization.credentials need to be the literal token, not a reference to a secret with the token.
If you want to read the token from a secret, which I would recommend, you'll need to mount the secret as a file and reference that with http_client_config.authorization.credentials_file.
To illustrate, let me add the config we have deployed currently.
Deploying with helm for renovate-ce
We're using https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-json-exporter in version 0.11.0 to deploy.

The values we have configured in the values file
serviceMonitor:
  enabled: true
  targets:
    - name: renovate-ce
      url: http://the-endpoint-for-renovate
      module: renovate

configuration:
  config: |
    ---
    modules:
      renovate:
        http_client_config:
          authorization:
            credentials_file: /credentials/renovate/renovate-ce.txt

        metrics:
          - name: renovate_organization_count
            valuetype: gauge
            path: "{ .app.organizationCount }"
            help: The number of organizations known to renovate

          - name: renovate_repository_count
            valuetype: gauge
            path: "{ .app.repositoryCount }"
            help: The number of repositories known to renovate

          - name: renovate_jobs_processed
            valuetype: counter
            path: "{ .jobs.history.processed }"
            help: The number of jobs processed since the instance has started

          - name: renovate_queue_size
            valuetype: gauge
            path: "{ .jobs.queue.size }"
            help: The number of jobs currently in the queue

additionalVolumes:
  - name: credentials-renovate-ce
    secret:
      secretName: credentials-renovate-ce

additionalVolumeMounts:
  - name: credentials-renovate-ce
    mountPath: /credentials/renovate/renovate-ce.txt
    subPath: mendRnvServerApiSecret

The secret
apiVersion: v1
kind: Secret
metadata:
  name: credentials-renovate-ce
  namespace: kube-prometheus-stack
type: Opaque
data:
  mendRnvServerApiSecret: Tm8gY2hhbmNlLCBJIHJlcGxhY2VkIHRoaXMgYmVmb3JlIHBhc3RpbmcgaXQ=

Great!! Thanks a lot!
I don't know the difference between credentials_file and credentials about the reference to a secret.

@morremeyer can you help ? running into a small issue while trying to use json-exporter with an api endpoint that uses an api_key, no matter what i try i end up with 401 Unauthorized.
This is the working format in curl:
curl -X GET https://example.com/v1/core/images -H 'api_key: xxxxxxxxxxxxxxxxxxx'
When using it over the json-exporter http://<IP_ADDRESS>:7979/probe?module=default&target=https%3A%2F%2Fexample.com%2Fv1%2Fcore%2Fimages
Failed to fetch JSON response. TARGET: https://example.com/v1/core/images, ERROR: 401 Unauthorized
This is my config file, am i missing something?
modules:
  default:
  http_client_config:
    follow_redirects: true
    enable_http2: true
    tls_config:
      insecure_skip_verify: true
    http_headers:
      api_key: 'xxxxxxxxxxxxxxxxxxx'
    metrics:
      - type: gauge
        name: image_name
        help: "Image Names"
        path: $.images[*].images[*].name
        labels:
          image_name: $.name

Ref:
https://pkg.go.dev/github.com/prometheus/common/config#HTTPClientConfig

@luis15pt Can you link to the API documentation? If not, are you sure the api key has to be sent this way? That is not a standardized HTTP header.
I would expect something like „Authorization: Bearer xxxx“

I will double check but currently its documented only as api_key, just
noticed maybe i need to add the  "accept: application/json" ?
curl -X GET "https://infrahub-api.nexgencloud.com/v1/pricebook"
-H "accept: application/json"
-H "api_key: YOUR API KEY"
https://infrahub-doc.nexgencloud.com/docs/api-reference/pricebook-resources/pricebook
On Mon, Jun 24, 2024 at 10:01 PM morre @.***> wrote:

@luis15pt https://github.com/luis15pt Can you link to the API
documentation? If not, are you sure the api key has to be sent this way?
That is not a standardized HTTP header.
I would expect something like „Authorization: Bearer xxxx“
—
Reply to this email directly, view it on GitHub
https://github.com/prometheus-community/json_exporter/issues/87#issuecomment-2187394880,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYCEIF5MVAHWUBEAV5HIWM3ZJCCLBAVCNFSM4YO5L3QKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJYG4ZTSNBYHAYA
.
You are receiving this because you were mentioned.Message ID:
@.***>


Add default constructor to DisplayInput to fix compile with Clang and libc++

The lack of a default constructor for the DisplayInput class causes a compile error at https://github.com/OSVR/OSVR-Core/blob/master/src/osvr/Client/DisplayConfig.cpp#L150 . This is because resize( size_type count ) requires a default constructor, in case the vector is being enlarged. Obviously the vector is not being enlarged in this instance, but this does trip up Clang when using libc++.

Wow, thanks for being so quick on the pull request! I actually saw the error on the CI last night and fixed it this morning before I saw your pull, but thanks for contributing to OSVR! Please do stick around and contribute again - and if you're not already on the dev list, please join: http://lists.getosvr.org/listinfo.cgi/osvr-devel-getosvr.org

Sure, thanks! I'll join the list.
I did send you a direct email regarding Mac OS X support; did you receive it?

Ah, good to "meet" you! I did receive that, thank you very much! Forwarded it to my "work" email last night and was planning on replying today - again, you beat me to it :)  Very happy to see you got it working. Would be happy to have that re-posted on the mailing list. No need to wait for the full thing to send pull requests, bits and pieces are fine, and no need to actually test with an HDK, rift, or other supported hardware yet - there are lots in the community who'd be more than happy to try :)

(and I'm glad we, mainly I, didn't break too much stuff on the Mac in the meantime...)

Can you see if the latest master still needs this patch to build? I think my fix should have solved the problem in a different way, but wanted to double check before I closed the pull.

It builds fine — we can close this.


Improved read/write supported concepts

The read_json_supported, write_json_supported, and corresponding binary concepts now simply check for the existence of a template specialization for the underlying to/from functor. This simplifies the concepts, makes them more understandable, and reduces compile time. If we were to use simpler concepts that tried to invoke op, then we would be asking the compiler to see if it can instantiate versions of templates that we weren't even using, which is a bad idea from a compilation standpoint (both for performance and potential obscure issues in differences).
This update also adds concepts to the core read/write functions that take in configuration options. This allows us to reduce the depth of the template errors and make the output more manageable.

@arturbac, I'm tagging you here because I'm updating how read_json_supported and write_json_supported work. They are more general now, and they have been applied to the top level read/write functions as well as the core read/write functions.
They now only check for the existence of a template specialization for the underlying to/from functor. This simplifies the concepts and makes everything more straightforward.
Let me know if you expect these changes to affect your use case in a detrimental way, or if you think they look good. Thanks!

Checking

I've checked fast to json/from json/schema and rpc calls after removing from simple_enum specialization of all enums leaving only partial for bounded_enum.
IMHO looks good, names are handled by simple_enum for bounded enums and rest is handled by glaze with integrals, including rpc schema
enum class Color : int8_t
  {
  Green,
  Blue,
  Red = -1
  };

consteval auto adl_enum_bounds(Color)
  {
  using enum Color;
  return simple_enum::adl_info{Red, Blue};
  }
enum class ColorUnbounded: int8_t
  {
  Green,
  Blue,
  Red = -1
  };

{
  "type": [
    "object"
  ],
  "properties": {
    "color": {
      "$ref": "#/$defs/Color"
    },
    "color2": {
      "$ref": "#/$defs/ColorUnbounded"
    },
    "value": {
      "$ref": "#/$defs/int32_t"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Color": {
      "type": [
        "string"
      ],
      "oneOf": [
        {
          "const": "Red"
        },
        {
          "const": "Green"
        },
        {
          "const": "Blue"
        }
      ]
    },
    "ColorUnbounded": {
      "type": [
        "number",
        "string",
        "boolean",
        "object",
        "array",
        "null"
      ]
    },
    "int32_t": {
      "type": [
        "integer"
      ]
    }
  }
}

Great, thanks for checking! I'll merge this in.


zendesk_flutter_support does not support iOS.

This package does not support iOS, in version 0.0.1 and also there is no such Swift code as well in iOS files for handling zendesk task

@MuhammadMusa22 use this one https://github.com/DennisMuchiri/zendesk_flutter_combination

Thank you @DennisMuchiri , Will look into this.


Port blocked

Good morning,
I has a problem in my network, my company firewall does not allow ports, only 80 and 443, so we can not use Cloudport. How can we overcome this obstacle? Thanks!

Hi,
yes... firewall at some orgs may not like our port choice. This was a matter of time whet it :boom:
I will think how could I escape this. Maybe we should failback to ports 443 or 80 somehow.

Hey @MelisRaimans
added failover port 443 functionality to CloudPort and p.t.u.
now the braindead firewall will not stop you that easy!
Deployed on production :sunglasses:

@ivanilves thank you, just saw you made a new CloudPort release. Sorry, I have not notified you before, but it works fine with failover.


How to query on a date object?

hi, I have a working mongo connection, and queries on strings are working fine, when entered in the filter section.
when querying a specific date, I could not figure out a syntax for specifying a date, the usual .js approach does not seem to work:
created_at: {
$gte: ISODate("2010-04-29T00:00:00.000Z"),
$lt: ISODate("2010-05-01T00:00:00.000Z")
}
How can this be done? maybe you can add some more samples to the main page.
thanks!

Hi,
please look at the post #86
You right. I should add some query samples in the doc.
Regards,
David.


update vsize when lsmt stack files if needed

What this PR does / why we need it:
update vsize and rewrite header for lsmt rw layer with zero vsize, which means inherit the vsize of lower, when lstm stack files.
After this change, the result of lsmt committed files remain consistent with the previous version.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Please check the following list:

[ ]  Does the affected code have corresponding tests, e.g. unit test, E2E test?
[ ]  Does this change require a documentation update?
[ ]  Does this introduce breaking changes that would require an announcement or bumping the major version?
[ ]  Do all new files have an appropriate license header?

LGTM


Multiple checkboxes bound to the same array triggers VueDX/TS17001

Describe the bug
The example "Multiple checkboxes, bound to the same array" from https://v3.vuejs.org/guide/forms.html#checkbox triggers VueDX/TS17001: JSX elements cannot have multiple attributes with the same name.
To Reproduce
Run vuedx-typecheck on the following snippet distilled from https://v3.vuejs.org/guide/forms.html#checkbox
<template>

    <input type="checkbox" id="jack" value="Jack" v-model="checkedNames" />
    Jack
    <input type="checkbox" id="john" value="John" v-model="checkedNames" />
    John
    <input type="checkbox" id="mike" value="Mike" v-model="checkedNames" />
    Mike

    Checked names: {{ checkedNames }}

</template>

Expected behavior
The snippet should not trigger VueDX/TS17001: JSX elements cannot have multiple attributes with the same name.
Info (please complete the following information):
Vue.js 3.0.5

I get this as well, with a radio switch.

If it helps with debugging, I posted a question to SO with my markup and a list of errors: https://stackoverflow.com/questions/66723391/how-do-i-use-v-model-with-an-object-using-vue-and-typescript

This bug has been around for a while, too: https://github.com/znck/vue-developer-experience/issues/142


Tasks run after diff when updating

I'm using tasks to do some clean up after generating a project.
I noticed that updating the project will compare the new version pre-tasks with the current version post-tasks.
Shouldn't we compare both versions post-tasks? i.e. run tasks in the temporary directory (the new version), and then only compare both projects?
Each time I update my project, files that were previously deleted by a task get re-created during the diff, and then re-deleted by the same task.
I also symlink some files using another task, and when updating, symlinking fails because the links already exist. So I have to handle that in my task. It's not so complicated to do (my tasks are written in a single Python script, so I can easily silence exceptions), but it could become difficult to handle with more complex tasks and migrations.
What do you think :slightly_smiling_face:?
Maybe users should have control over when the task is executed. My use-case would ask for pre-diff and post-diff tasks actually :smile:
EDIT: I think I can implement that with an initial migration. Will try and report back!
UPDATE: hmm nope doesn't work. When first generating the project, migrations do not run, so files are not symlinked and the task fails.
Question: what's the difference between before and after in a migration?
UPDATE:

get diff
run migrations before
apply diff
run migrations after

So I'm lost at the order of execution of tasks and migrations haha

I guess what I need is an initial migration. Something that runs only once, after generating a project the first time.

Shouldn't we compare both versions post-tasks? i.e. run tasks in the temporary directory (the new version), and then only compare both projects?

Makes sense.

Maybe users should have control over when the task is executed. My use-case would ask for pre-diff and post-diff tasks actually

Indeed this would be the best.

Possibly also easier to fix after #110.

Shouldn't we compare both versions post-tasks?

As seen in https://github.com/copier-org/copier/issues/239#issuecomment-677426694 it seems this is how it's really working, so I'm closing here. Please reopen later if you find the reproducible bug :blush:


update some deprecated calls

updating a couple of things I found testing out https://github.com/MarcoGorelli/polars-upgrade

Thanks! Is this for polars 0.19.9 or a newer version?

0.19.19, the latest one


delete empty clusters file

Is this file something that can be deleted or is it a placeholder for something coming? https://github.com/hytest-org/hytest/blob/main/environment_set_up/clusters.md

delete.


Add Change Language option under file preferences menu

VSCode Version: 1.1.0-alpha
OS Version: Windows 10

I think it would make sense to add the language option under the File > Preferences list.

Closing as there has been no further interest expressed in this feature


Readme example

🐛 Bug Report
Reducer Example
Here is a simple example of the difference that Immer could make in practice.

// Redux reducer
// Shortened, based on: https://github.com/reactjs/redux/blob/master/examples/shopping-cart/src/reducers/products.js
const byId = (state, action) => {
	switch (action.type) {
		case RECEIVE_PRODUCTS:
			return {
				...state,
				...action.products.reduce((obj, product) => {
					obj[product.id] = product
					return obj
				}, {})
			}
		default:
			return state
	}
}

To Reproduce
Expected behavior
Should this reduce be a map in the example?
Environment

**Immer version: v3.2.0

My mistake


Fix typos

This change is

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Improve building on other platforms

[x] add version to third-part, e.g. argtable3-v.3.3.2
[x] remove c_std=99 and/or add appropriate macros?
[ ] ~add c standard library as dependency?~

Taken care of in #31 and 064ec31604f77204be92709da0e328f6e2435d87


Man page

This PR adds a man page for git-switch. The idea is to install the man page using the Homebrew formula for now.

[x] Write man page
[x] Update README text using man page texts
[x] Update LICENSE to add 2015 to the copyright notice

@marpo60 can you review the man page?
To preview the man page you can do $ man ./git-switch.man. The format we're using is groff :cat:, more info here http://www.linuxjournal.com/article/1158?page=0,0

@san650 will do.


[BUG] Rancher cli kubectl defaults to "Default" project.

What kind of request is this (question/bug/enhancement/feature request): Bug
Steps to reproduce (least amount of steps as possible):

Create a custom project other than Default/System. For ex: "lab"
Run the following:

rancher login
rancher context switch lab
rancher kubectl create -f install.yaml

Result:

Workloads get deployed to Default/default.

Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): 2.2.0
Installation option (single install/HA): Single install

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported): Custom
Machine type (cloud/VM/metal) and specifications (CPU/memory): Metal
Kubernetes version (use kubectl version): Latest supported
Docker version (use docker version): Latest stable
Rancher version: 2.2.0

Other bugs and issues with Rancher CLI:

I'm trying to automate deployments and management of resources through Rancher CLI and it's been impossible.

It's a pain to handle projects using the CLI, there's no way to specify a project using the name, it requires the unique ID which makes automation a pain.

Running: rancher kubectl create -f namespace.yml results in the namespace not having a Project attached.

Summary of problems:

Provide --context flag for: rancher kubectl
Provide ability of specifying project by Name instead of the weird unique id's.
Provide way of having a default project where EVERYWHERE gets installed to if no project is specify.
Provide way to run: rancher login --context ProjNameHere instead of unique id.

@gabrielcalderon rancher kubectl is a direct passthrough to kubectl using the required kubeconfig to access the cluster. We don't do any extra processing around those commands so if you want things to install to a specific namespace that would need to be in the install.yaml or kubectl will use it's default. A project is a collection of namespaces so specify the namespace for things and they will end up under the associated project.
When creating a namespace it does need to be associated with a project, this can be automated using the cli through rancher namespace move which does accept a project name or ID.
Almost all commands will use the project name if passed in, but if there are duplicates the command will fail. login is the exception to this but could be updated to use a name as well.

@dramich Thanks for the explanation, I will make the necessary changes on my deployments to support this.
Note: I think this kind of stuff should be added to the documentation for Rancher CLI. Maybe also include an examples sections with different commands and how they related to Rancher usage, Rancher+Kubectl usage.


Unable to run simplenlg.jar locally

Hi Roman,
I tried using simplenlg.jar to run the realizer locally. I have changed the path which was hard coded , but then I am getting the below error. Though lexAccess2013.data is downloaded from simplenlg . Pease suggest the steps how you had  run it locally or if I am doing some mistake
(base) C02Q49E6FVH5:simplenlg_jar_to extract pjain188$ java -jar simplenlg.jar
Port Number used by Server is: 50007
Server is using the following lexicon: /Users/pjain188/Documents/simplenlg_jar_to extract/lexAccess2013.data
[Fatal Error] lexAccess2013.data:1:1: Content is not allowed in prolog.
org.xml.sax.SAXParseException; systemId: file:/Users/pjain188/Documents/simplenlg_jar_to%20extract/lexAccess2013.data; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
:>Waiting for client on port 50007...
Thanks and Regards,
Priyanka

Hello Priyanka,
I had another look at this and I don't think simplenlg (server) will run under the new java versions. It is using some java-internal API which was removed in java 11 (https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j). It results in exception like this:
    [java] :>Waiting for client on port 50007...      [java] simplenlg.xmlrealiser.XMLRealiserException: XML unmarshal error      [java]     at simplenlg.xmlrealiser.UnWrapper.getNLGSpec(Unknown Source)      [java]     at simplenlg.xmlrealiser.XMLRealiser.getRequest(Unknown Source)      [java]     at simplenlg.server.RealisationRequest.doRealisation(Unknown Source)      [java]     at simplenlg.server.RealisationRequest.run(Unknown Source)      [java]     at java.base/java.lang.Thread.run(Thread.java:844)      [java] Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext      [java]     ... 5 more      [java] Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext      [java]     at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)      [java]     at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)      [java]     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)      [java]     ... 5 more
On older java versions of java (java 7 and possibly 8) you should only need to install the java tool ant and run ant run in the simplenlg folder (my fork). Ant will compile and start the simplenlg server with some default parameters.
Other options are to use a different realiser. There is a basic string realiser that does a little inflection and there are some bindings to pynlg (although that project is also no longer maintained and it currently only has French grammar).
If I ever have time, I will look into merging pynlg into this repo and use custom realiser instead of simplenlg but that is on my "if I ever have time" list so don't hold your breath.
Sorry to disappoint.
Best,
Roman


Is koalas still being worked on? or is the project on pause at the moment?

As written in the title above, I want to know a bit more on what is the current status of the koalas package? the project my team is working is looking for to transition to spark, but since most of the people have pandas experience, koalas seemed the perfect thing to fit in. However, other than the simple data manipulations, I have noticed that there are still big differences where sometime what works in pandas does not work in koalas instead.
Is it a good idea to continue using koalas? or would it be better to convert towards Spark's Pandas package?

It's encouraged to migrate to PySpark itself since PySpark has it now. Releases might happen per security issues or critical issues. Otherwise, nothing much will be updated.

Thank you very much for the fast reply. I will see to switching to pyspark pandas. I have tried it before but somehow I always have some difficulties with importing the package for the pandas package. I mainly work on data bricks, do you happen to know what to do when it does not recognise the pandas package that I want to import?
Sincerely,
Pierre Nanquette
On 5 Jan 2023 at 03:46 -0500, Hyukjin Kwon @.***>, wrote:

It's encouraged to migrate to PySpark itself since PySpark has it now. Releases might happen per security issues or critical issues. Otherwise, nothing much will be updated.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


Feature request: image ( file ) upload

Hi ,
It would be a great to be able to upload a file.
However I'm not sure how to implement it.
In javascript, <input type="file"..> return directly a File object. This won't be possible with shacl-form, but maybe the form can return some primitive that allow to create the javascript file object afterward ?

Hi, there are a couple of options for that:

Version 1.4.1 now supports the datatype xsd:base64Binary and renders an <input type="file"> element for that. So if you define a SHACL property with that datatype in the shapes graph, you will get the base64 encoded data URL in the data graph. I have tested that successfully with files up to ~500 kB, larger files will lead to an error during validation due to too much recursion (within the library that I use for that).
Create a plugin for that. You could register your plugin for the RDF predicate that you use in your shapes graph for the file. Your plugin could then handle the file upload itself in any way you prefer.
Modify the form with JavaScript at runtime,  basically inserting an <input type="file"> element at the position you desire.

Plugin has been merged


⚠ Samsung has degraded performance

In d61bfe9, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2385 ms

Resolved: Samsung performance has improved in e5cc640.


{{label}} and {{schema.label}} similar but not equivalent

{{label}} makes a call to the simple-schema function that generates a label, hence returning a label even if the user hasn't set one explicitly.
{{schema.label}} returns the label field of the schema, hence returning undefined if the user hasn't set one explicitly.
I think this is confusing.
My opinion is that neither a schema package nor a form package should include a label-generation feature. However, because you support simple-schema, people will probably expect you to support it (same problem you have with clean()).
Until you can get rid of simple-schema, I suggest you rename {{label}} into {{generateLabel}} and explain in the doc what it does.
As far as I'm concerned, I will stop using {{label}} and replace it with {{#if schema.label}}{{schema.label}}{{else}}{{field}}{{/if}}.

I think you're right. The label field could easily be replaced by a helper, like {{capitalize field}}, and it could be up to the user how they want to convert field names to labels in the template.
There are some cool features in simple-schema, but I think the default validation in the package should probably be focused on making sure data is valid, not providing content to templates.
One interesting case is using the allowedValues from simple-schema to determine what values to show in a select element. I think it makes sense in that case to get the options from the schema itself, rather than just checking that the value is within the allowed on validation.
That seems like one area where coupling is actually necessary. Although perhaps (as you've mentioned) all of those types of things could be generated using a separate generate lib that accepts a schema and returns the values--rather than having that functionality baked into the schema library or the form library. And perhaps I could build that as a sort of facade between simple-schema and forms, or between the check lib and forms:
Generate.config({
  labels: {
    transform: 'camelToCapitalized',
    wrapperTag: 'label',
    overrides: {
      'awesomeName': 'AWESOME! Name'
    }
  }
});

var content = Generate.gen(mySchema); // if (mySchema instanceof SimpleSchema) ... else ...

I don't have full visibility on this, but I have the feeling this is another trap.
You are talking about using allowedValues to get options, but what about internationalization?
If users want complex label generation from schema, they can already do this (I guess):
MySchema = new SimpleSchema({
  firstName: {
    type: String,
    label: function () {
      return Session.get("lang") == "de" ? "Vorname" : "first name";
    }
  }
});

Alternatively, if users want to decouple label generation from the schema, they can write an external module by themselves. I think your package should only ensure this module can be easily plugged in.

steph643 said: "I don't have full visibility on this, but I have the feeling this is another trap."
One of the greatest comments ever!

I think there could be an abstraction boundary here somewhere. Looking at things from within the 'action' method, what are the sets of expectations that would make sense there? I see two possibilities:

You are given an object that may not be structured like your db schema, but that may have undergone some validation. It's up to you to finish the validation, if necessary, and convert the object into something that your db likes. Where you specified the rules for validation could have been several places, such as the template itself or a schema object of some kind. This 'form schema' may not have anything to do with your db schema, and may not even be written in the same format.

OR

You are given an object who's structure matches the structure of your db. This object has usually been fully validated by this point. The structure of the data object has been gleaned from a detailed schema associated with the db. The mapping between the form and the data is guided by both the schema and hints contained within the template, such as composite field names ("name.favoriteColors.color").

Maybe the library could be structured such that #1 is the core functionality, and #2 is an add-on feature that comes along later? Seems like Forms is pretty much already doing #1 now. But reading forums, people are tired of always having to close the impedance gap between their forms and db, and would love #2.

Currently it's somewhere between the two--in practice, I think it already plays out well.
Form blocks can be used with or without a schema. But the package assumes that if a schema exists, it's a complete schema for the form. A form can't be submitted unless all data from elements is valid.
If you don't use a schema, the form block will still run the action function when the form is submitted, and you can still get data manually from the DOM if you want that way using the els argument.
I'm not really trying to offer automatic transformation based on somebody's SimpleSchema in this package. I expect users of the package to share what they've created (via component packages or on a dedicated website) so that it's easy for others to create the proper elements, and I'd be happy to write some examples in the docs.
In fact, SimpleSchema support might be moved into a separate package in version 2.0.0, opening up support for other types of schema validation using an API from the core package. In that case, support for some type of automatic transformation may be offered, although it's still dubious because I don't want to have to write logic to cover a bunch of different DOM configurations in elements--that would lead me into the same type of rabbit hole you mentioned AutoForm being in.
Currently, I wouldn't encourage using schemas that match any type of complex DB structure for your forms. I've been using schemas designed around how I want to validate data from user inputs, and they're all single-level schemas, because the package hasn't yet implemented support for the dot-notation format used by SimpleSchema.

I think your approach is right on. Given what you just said, I think a simple way to declare form schema that's not tied to another library might be best. Keep the focus on the building of reusable components. Offer lots of examples, and maybe some built in components that lack much style-related markup but add useful behaviors. Then users could wrap those with their own templates. Encourage component libraries to really separate the behavior tags and code from the look and feel tags. This is another area where autoform has failed.

Currently, I wouldn't encourage using schemas that match any type of complex DB structure for your forms.

I use schemas from my not-so-basic DB structure and it works pretty well so far.
I think the reason is that templates:forms allows, very naturally, to use only a few fields from a complex schema. This is not so easy with autoForm. What I like about templates:forms is that it doesn't try to "understand" the full schema, but only "sees" the fields I want it to use.
I would like templates:forms to remain transparent, to not make any assumption, to not transform anything, to just allow me, from the action callback and the element helpers, to pull, from the schema, things I previously put in there myself.

:+1:

You have just closed this, but I see no change in the doc. What did you decide?

I'm working on a new version of the docs (based off your suggested changes) and I have something about this in those. I meant to push out the docs last night when I closed this but I was just too tired. Should have it all up by later today.

Great, thanks!

Thank you for all your help. Also, let me know if nested schemas work out for you!


Yabai commands don't work for Spark email client

# move floating window
shift + alt - h : yabai -m window --move rel:-20:0
shift + alt - l : yabai -m window --move rel:20:0
shift + alt - k : yabai -m window --move rel:0:-20
shift + alt - j : yabai -m window --move rel:0:20

# increase window size
shift + alt + cmd - h : yabai -m window --resize left:-20:0
shift + alt + cmd - l : yabai -m window --resize right:20:20
shift + alt + cmd - k : yabai -m window --resize top:0:-20
shift + alt + cmd - j : yabai -m window --resize bottom:0:20

# decrease window size
alt + cmd - h : yabai -m window --resize right:-20:0
alt + cmd - l : yabai -m window --resize left:20:20
alt + cmd - k : yabai -m window --resize bottom:0:-20
alt + cmd - j : yabai -m window --resize top:0:20

These shortcuts work with all the apps I've tried them with except for Spark.app

Maybe check if you didn't disable it in the config file

Spark doesn't play nice with Yabai for me as  well, but I've also seen it with Amythest ... not sure what's Spark's doing differently ...

I also have hiccups with spark, especially with auto tiling. I like to have spark alongside Slack and most of the time, Spark overflows out side of the screen, either that or they overlaps. I tried with Firefox and Sparks do the same, I'm sometime able to have it fit by playing with the size of the window and at some point it snaps for good

If it still misbehaves in the latest yabai version then there is not much else I can do.


Fix sendable warnings

Because the MacroExpansionError implements the DiagnosticMessage protocol, which requires the type to be sendable, we are getting sendable warnings for cases with associated values in the MacroExpansionError enum.

@swift-ci Please test


Added reminder to use the .fetch() in the reduce() when using NumberF…

Small update for the documentation. This should help beginners avoid the confusion I found myself in.

@siliconsorcery Thanks for taking the time to PR! I think that code is already taken care of here, though:
https://github.com/pointfreeco/swift-composable-architecture/blob/a658e25bee0eb6d463c14dfce370d564f6dfc3b3/README.md?plain=1#L385-L399
Luckily, switching from holding onto a dependency explicitly as a property vs. implicitly through a property wrapper means the call site in reduce doesn't need to change!

@stephencelis Thanks for your response.
Unless I missed a step, we are using a variable to hold our function to fetch a number fact. The default definition is set in:
extension NumberFactClient: DependencyKey {
  static let liveValue = Self(
    fetch: ..
 )
}

It can be overridden for testing
let store = TestStore(
  initialState: Feature.State(),
  reducer: Feature()
) {
  $0.numberFact.fetch = { "\($0) is a good number Brent" }
}

Note we are referencing the fetch function we are replacing.
Now for usage we need to call the fetch function.
        case .numberFactButtonTapped:
            return .task { [count = state.count] in
                await .numberFactResponse(
                    TaskResult {
                        try await self.numberFact.fetch(count)
                    }
                )
            }

If I omit the fetch function
  try await self.numberFact(count)

Xcode throws an error: Cannot call value of non-function type 'NumberFactClient'
This had me very confused until I studied the code.
Again, unless I missed something, I think the correct function access for all uses (production, development and testing) in this case is to call the fetch function.
  try await self.numberFact.fetch(count)

Thanks four your great work.

@siliconsorcery Rather than add another step and more prose, what do you think of folding the required change into this code block:
https://github.com/pointfreeco/swift-composable-architecture/blob/d73a3494bfadfec7ccbadf2f295ff4a1156153ec/README.md?plain=1#L497-L504
Basically change it to this diff instead?
 struct Feature: ReducerProtocol {
   …
-  let numberFact: (Int) async throws -> String
+  @Dependency(\.numberFact) var numberFact
   …
-  try await self.numberFact(count)
+  try await self.numberFact.fetch(count)
   …
 }

Hi @siliconsorcery, I have made the changes that @stephencelis mentioned and think it reads better now. Will merge this and hopefully it helps people in the future.
Thanks for bringing this up!


fix: when service type = clusterIP set the address to service.clusterIP

What type of PR is this?
fix:  when service type = clusterIP set the address to service.clusterIP
What this PR does / why we need it:
This commit solves the problem that when setting Service Type=ClusterIP and customizing the address for Gateway.spec.addresses, the address is incorrectly set to externalIPs.
I fixed it so that it can be correctly set to the ClusterIP
Which issue(s) this PR fixes:
Fixes #2166

we'll also need to update the logic in https://github.com/envoyproxy/gateway/blob/d44f4be1d60b778b8acefc2b67008a8947fa62a5/internal/status/gateway.go#L30 to make sure that the ClusterIP is updated in the status
the if/else will need to be refactored a bit

we'll also need to update the logic in
https://github.com/envoyproxy/gateway/blob/d44f4be1d60b778b8acefc2b67008a8947fa62a5/internal/status/gateway.go#L30
to make sure that the ClusterIP is updated in the status
the if/else will need to be refactored a bit

Yes, I've made changes

/retest


Fixing some basic typos in README

typos, tenses, and some cleanup

I signed it

I signed it!

/assign @yujioshima

/lgtm
Thanks for your contribution!


[BUG] [Matter1.4 TE#2] TC-OPSTATE-2.5 test failure with python script in step 2

Reproduction steps
For TC-OPSTATE-2.5, UI-python test seems not work right, and if I run test in Python inside docker mode, test failed quite early at step2.
Test commands and parameters are as follows (found from Matter_V_1_4_TestPlanVerification document in Python Script Command sheet):
python3 TC_OPSTATE_2_5.py --commissioning-method ble-wifi --wifi-ssid ORBI32 --wifi-passphrase slowballoon575 --discriminator 3840 --passcode 20202021 --storage-path admin_storage.json --PICS /var/tmp/ --int-arg PIXIT_ENDPOINT:1 PIXIT.WAITTIME.REBOOT:100 --paa-trust-store-path /credentials/development/paa-root-certs/
Bug prevalence
everytime
GitHub hash of the SDK that was being used
304df86c9300ecfdfb1e6424565867d9dc6ad359
Platform
freeRTOS, other
Platform Version(s)
No response
Anything else?
This issue was found during Matter 1.4 TE#2, see attached the test log
failed-TC-OPSTATE-2.5.log

@antonio-amjr please take a look.

@antonio-amjr please take a look.
I'll see what I can do here

Hi @OliverFan1,
I was investigating this issue and I'm a bit confused here with your results.
Let me know if I'm following correctly.
According to your manual logs, three events are received in sequence and one of them would trigger the error you mentioned above: The total operation time shall be at least 30.0.
When analyzing the TH UI log as well, there are two events, the first one being:
[MatterTest] 08-29 21:54:54.964 INFO Got subscription report for event 1 on cluster 96: OperationalState.Events.OperationCompletion(completionErrorCode=0, totalOperationalTime=0, pausedTime=0)
So I believe that the test is resulting in that error for an operation event not correct or expected.
Can you verify those details? Let me know if I misunderstood anything or if I can help with any test.

PS: There are some step logs in the latest version of TH that may help like the below I ran here:
[MatterTest] 12-26 14:01:06.609 INFO Got subscription report for event 1 on cluster 96: OperationalState.Events.OperationCompletion(completionErrorCode=0, totalOperationalTime=30, pausedTime=0)
[MatterTest] 12-26 14:01:06.610 INFO ***** Test Step 10 : TH reads from the DUT the OperationalState attribute

Hi @antonio-amjr,
Thanks for investigating this issue, and sorry for the late response.
This issue was originally found during TE#2, and then in the 1.4 SVE, this TC was PASS on my dut, so I think we can close this since issue is gone.
Thank you.

Hi @OliverFan1,
No problem at all and that's great news. Thanks for the quick response.
I'll close this up. Thanks.


Computer resource and len error while running stochastic_muzero_2048_config

While running
python3 ./zoo/game_2048/config/stochastic_muzero_2048_config.py
It will pop out some error in GameSegment at line 171:
assert len(next_segment_observations) <= self.num_unroll_steps
assert len(next_segment_child_visits) <= self.num_unroll_steps
assert len(next_segment_root_values) <= self.num_unroll_steps + self.num_unroll_steps
assert len(next_segment_rewards) <= self.num_unroll_steps + self.num_unroll_steps - 1
where sometimes the len of these segments will be larger than the number you set.
But this error seems to pop out randomly, so I'm curious that whether you have encounter this problem?
Besides, I'm trying to prepare for the computing resource for doing these kind of RL project. Currently using single CPU and single GPU on my own computer (i5 13th 13600k, GTX-1070)  and a single (3090) in my school computer. Both of them seems running so slow, it takes a hour to train iter 4200, envstep 786 when running stochastic_muzero_2048_config.py.
By my calculation, if it take 1000000 steps to finish the process, it take 100 days to run this process, which seems not practical...
So may I ask how long it takes for you to run this process? or what do I missed? or I just should update my computer.
Very appreciate your works! And thank you for reading my question!

Hello,

We used a machine equipped with an Nvidia A100 GPU to run the default configuration of LightZero's StochasticMuZero algo. on 2048 (mcts_ctree=True). It took us approximately two days to complete 1M environment steps. If you're aiming to reduce the run time, consider adjusting the related hyperparameters. For instance, moderately decreasing the value of num_simulations can still ensure satisfactory performance.

If you find the program running slower than expected, it's likely due to differences in the GPU hardware of your runtime environment compared to ours.

Regarding the "len error" issue you mentioned, we currently do not encounter this problem under the default configuration. Could you confirm whether the program you ran adopted the default settings? If yes, we may need more detailed error information from you to accurately identify the problem and find a solution.

Best wishes.

Yeah, I tried it under default configuration, but the length error get popping out. It seems that the num_unroll_steps is set to 5, but  len(next_segment_root_values)=15. And the amount of this error increase while training gets longer. And the weired point is, even I set the num_unroll_steps = 10 for all num_unroll_steps in the folder, this error still pop out with num_unroll_steps=5.
[11-04 18:20:24] WARNING  Exception in collector.collect: len(next_segment_root_values) : 15, self.num_unroll_steps + self.num_unroll_steps : 10                                                                      train_muzero.py:171
[11-04 18:20:28] WARNING  Exception in collector.collect: len(next_segment_root_values) : 15, self.num_unroll_steps + self.num_unroll_steps : 10                                                                      train_muzero.py:171
[11-04 18:20:34] WARNING  Exception in collector.collect: len(next_segment_root_values) : 15, self.num_unroll_steps + self.num_unroll_steps : 10                                                                      train_muzero.py:171
[11-04 18:20:38] WARNING  Exception in collector.collect: len(next_segment_root_values) : 15, self.num_unroll_steps + self.num_unroll_steps : 10                                                                      train_muzero.py:171
[11-04 18:20:43] WARNING  Exception in collector.collect: len(next_segment_root_values) : 15, self.num_unroll_steps + self.num_unroll_steps : 10                                                                      train_muzero.py:171
[11-04 18:20:48] WARNING  Exception in collector.collect: len(next_segment_root_values) : 15, self.num_unroll_steps + self.num_unroll_steps : 10

Sorry for accidentally press the closeed button.

Hello, thank you for your feedback. We have identified that this is indeed a bug. However, this bug does not affect the performance of the previous algorithm. We have already fixed it in this PR.  Thanks for your valuable contribution! If you have any suggestions for improvement, please feel free to provide them. Best wishes!


Dates recognized as String types

Dates are analysed as String types.

Have you tested this with Test B.csv?
I'm still getting dates detected as strings (Test Date (column 11) & End Date (column 22)).
While Start Date (column 21) is now detected as Integers (previously was undetected.

That is because those dates don't match the 2 formats we're currently accounting for, i.e. dd/mm/yyyy, and dd/mm/yy.

thats acceptable, we will have to just put in the documentations that we only support date analysis if they are given in those formats we support

If we have time it may not be a bad idea to support the formats excel does by default

thats funny, by default my version of excel only uses dashes. Thats why test B has mosty dashes. It would be good to support at least dd-mm-yy and dd-mm-yyyy. It shouldnt be too hard to add to ur regex, just make it accept '' or '-'

Mmm the variations on /-\ is easy enough, the main problem would be swapping to mm/dd/yyyy or anything involving text months

Don't do mm/dd. That would cause issues like: is "1/2" 1 Feb or 2 Jan.


Emergency dev.s.libraries.android.kits.maps:maps-google:2.3.0

hi
Could not find dev.s.libraries.android.kits.maps:maps-google:2.3.0.
doesnt exist anymore.

Sorry. i accidentally deleted the supasin hence the package is incorrect.


Why not define Rounding: Decimal Places at BigNumber.config?

First, thanks for this excellent library, much appreciated. I am using it in a financial application and it works great to far. I have the following issue, this is how I use BigNumber.config:
BigNumber.config({ DECIMAL_PLACES: 10 });
BigNumber.config(null, BigNumber.ROUND_HALF_UP):
var ROUNDING_DP = 8

This is how I instantiate:
value = new BigNumber value;
value.toFixed(ROUNDING_DP);

From my understanding the toFixed method takes only the ROUND_HALF_UPproperty from the .config. Wouldn't it be convenient to be able to also do:
BigNumber.config(null, BigNumber.ROUND_HALF_UP, BigNumber.ROUNDING_DP)

and then just:
value.toFixed()

Rather than
BigNumber.config({ DECIMAL_PLACES: 10 });
BigNumber.config(null, BigNumber.ROUND_HALF_UP):

you can use
BigNumber.config({ DECIMAL_PLACES: 10, ROUNDING_MODE: BigNumber.ROUND_HALF_UP });

or
BigNumber.config(10, BigNumber.ROUND_HALF_UP);

or just
 BigNumber.config(10, 4);

Anyway, #22 discusses the behaviour of toFixed(), and I don't see much to be gained from having a ROUNDING_DP setting that applies to it and also presumably to toExponential and toPrecision.
Incidentally, you can also pass a rounding mode to those methods, for example
value.toFixed(8, BigNumber.ROUND_DOWN);

or
value.toFixed(8, 1);
Thanks for the feedback.

My application is huge and it would be very convenient for me to change dp centrally like you like the convenience of changing rm globally.
See in my opinion

if dp is omitted, or is null or undefined, the return value is n rounded to a whole number.
if rm is omitted, or is null or undefined, ROUNDING_MODE is used.

it should say the same for dp. if dp is omitted or is null or undefined, ROUNDING_DP is used, if not set, the return value is n rounded to a whole number.
In addition to being more streamlined and coherent this way, I just dont see much financial nor science application that would want to use BigNumber for the sake of using integers without floating point (whole numbers) which by default is handled pretty well by binary arithmetics last time I checked.
Also to conclude my rambling about coherence, why did you introduce syntax like .config(10,4)? In my opinion the entropy of such syntax converges towards zero.
Hope you can stand critisism, don't mistake it for a lack of gratitude for your work, which it isn't. :-)

I apologise if you were offended my my quick closing.
The methods which could use a global ROUNDING_DP setting if no arguments were passed, already have default behaviour that I think is useful.
If, as you suggest, the round method used ROUNDING_DP if no argument was passed, then that would break compatibility with JavaScript's Math.round which rounds to an integer.
Similarly, the link I posted above explains that calling toFixed without any arguments is useful for when toString returns exponential notation and the user wants fixed-point notation but no rounding.
The config(10, 4) syntax was kept in for backwards compatibility, and it's a lot less verbose.
Criticism of the library and its API is encouraged, and you are welcome to explain or justify your position further.