Why batch reward standarization works?

Hello again, and this time I have another question about batch reward standarization: why it works?
        if self.args.standardise_rewards:             rewards = (rewards - rewards.mean()) / (rewards.std() + 1e-5)
This normalizes rewards per batch sampled from the buffer. But if an episode is sampled by different batches, the normalized rewards of that episode will be different(for different episodes sampled by different policies are not i.i.d.). I think it would break the reward of the environment and cause some instability, but it indeed improves the performance of my MARL algorithms. So could you give me more explanations on why using batch reward standarization and why it works? Thanks!

Hello,
we found that reward standardisation works quite well in practice. We believe that the batch has a good approximation of the reward's mean and std. Additionally, using the reward standardisation is just a hyperparameter that we tuned. For all combinations of algorithms and environments, we executed the algorithms both with and without reward standardisation. And we present results for the hyperparameter combinations that achieve the highest returns.


Eliminate LoadOps.FROMCPU

new LazyBuffer.fromCPU method to create from ndarray + changing the __init__ method to have optional LazyOp/RawBuffer
~new EmptyBuffer class to handle~ comment out test for buffers with 0 size - failure happened when attempting Tensor([]). Note that this was already broken if you tried to do Tensor([]).realize() - openCL errored for 0-sized buffers, and metal returns None, causing issues for copyin/copyout. ~I can also remove and comment out test if we want to handle this differently~
Add int32 support for RawMallocBuffer

Changes made in tinygrad/:
------------------------------------------------------------
files                             insertions       deletions
------------------------------------------------------------
tinygrad/lazy.py                          20              17
tinygrad/ops.py                            1               1
tinygrad/runtime/lib.py                    7               1
tinygrad/tensor.py                         1               2
------------------------------------------------------------
total                                     29              21
------------------------------------------------------------
lines added in the tinygrad folder: 8

This is +8 lines. It should be -10 lines.

Were you thinking of a different overall approach? Or is there other code that can be also removed now that this capability is available? I didn't really see one that could actually reduce the line count by 10 - if I remove the bugfix for empty tensors, inline the LazyBuffer construction method to tensor __init__ (requires ShapeTracker import), and remove the assertion, it is still only -2 on the net, didn't really see a way to get to -10

Nice. What about that TODO?

Nice. What about that TODO?

In the original implementation, I added a new EmptyBuffer class to handle buffers with 0 size, I reverted that to reduce the lines added. It is contained in this diff here: https://github.com/geohot/tinygrad/pull/920/commits/bbdcdc8713f60725012d9f1602e18de4bdd3a4ed, does that solution make sense to you? Note that this type of tensor is already broken in master if you try to call .realize() on it.

Hmm, I don't think a buffer should ever be 0 size, just 0 dim.

I see, since the loading for non-cpu devices is deferred again, it won't hit the issue, so I will restore that test

Nice work!

Hmm, this broke docs/abstractions.py (which isn't tested in CI)
Want to fix and add to tests?

Hmm, this broke docs/abstractions.py (which isn't tested in CI)
Want to fix and add to tests?

Yes, I can do that

Done!

Note that without a bump to the pip release, running (now updated) abstractions.py in colab gives me
LazyOp(op=<LoadOps.FROMCPU: 1>, src=(), arg=<tinygrad.helpers.LazyNumpyArray object at 0x7fd0e8112140>)
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
[<ipython-input-7-7442bbed48f4>](https://localhost:8080/#) in <cell line: 3>()
      1 print(lazyop.src[0].op)
      2 assert lazyop.src[0].op.op == LoadOps.FROMCPU
----> 3 assert lazyop.src[0].op.src[0].realized.toCPU()[0] == 2, "the arg of the FROM LazyOP is a LazyBuffer holding [2.]"
      4 assert result.lazydata.realized is None, "the LazyBuffer is not realized yet"

IndexError: tuple index out of range

Might be worth adding some sort of version check in abstractions.py


Doesn't start on jekyll 2.5.3

When I try to serve this on Jekyll 2.5.3 with Ruby 1.9.3 I get the following error message:
nimblex:~/jekyll-incorporated-master# jekyll serve
/usr/lib64/ruby/gems/1.9.1/gems/psych-2.0.15/lib/psych.rb:226: warning: already initialized constant VERSION
/usr/lib64/ruby/gems/1.9.1/gems/psych-2.0.15/lib/psych.rb:229: warning: already initialized constant LIBYAML_VERSION
Configuration file: /root/jekyll-incorporated-master/_config.yml
/usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- jekyll-assets (LoadError)
        from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /root/jekyll-incorporated-master/_plugins/_ext.rb:1:in `<top (required)>'
        from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:74:in `block (2 levels) in require_plugin_files'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `each'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `block in require_plugin_files'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `each'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `require_plugin_files'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:79:in `setup'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:41:in `initialize'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `new'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `process'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
        from /usr/lib64/ruby/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
        from /usr/lib64/ruby/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
        from /usr/lib64/ruby/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
        from /usr/lib64/ruby/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
        from /usr/lib64/ruby/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
        from /usr/lib64/ruby/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
        from /usr/lib64/ruby/gems/1.9.1/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
        from /usr/bin/jekyll:23:in `load'
        from /usr/bin/jekyll:23:in `<main>'

The fix for that error is:
gem install jekyll-assets rake sass uglifier github-pages maruku


PR: Improve how Matplotlib backend is set in the IPython console

Fixes #5718
Fixes #5541
TODO

[ ] Tests

I tested your pull request (* Spyder Version: 3.2.5.dev0 afeb58173) and at startup of spyder I get the following message:
Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: The following error appeared when setting your Matplotlib backend

Traceback (most recent call last):
  File "/home/ich/Kram/spyder/spyder/utils/ipython/spyder_kernel.py", line 439, in _set_mpl_backend
    get_ipython().run_line_magic('matplotlib', backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2095, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-107>", line 2, in matplotlib
  File "/usr/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/usr/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2983, in enable_matplotlib
    self.enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 482, in enable_gui
    real_enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/eventloops.py", line 284, in enable_gui
    raise RuntimeError("Cannot activate multiple GUI eventloops")
RuntimeError: Cannot activate multiple GUI eventloops

After that error I can use the IPython console but the attempt to plot still results in an empty canvas that does not react on mouse clicks.

Right, this means things are working as expected. I mean, at least we are able to catch that error and show it to users.
This means you need to deactivate the Activate support option in
Preferences > IPython console > Graphics

so that Matplotlib sets its backend by itself (i.e. without Spyder interference). That should fix your problem.
Could you verify it? Thanks!

If the Activate support is deactivated and matplotlib sets its backend by itself the plotting works. But under these conditions the plotting worked also before your pull request I have to admit.
Strangely however the installed backends have an influence on the behaviour of Spyder but I guess that I will discuss this with the Fedora mantainers.

If the Activate support is deactivated and matplotlib sets its backend by itself the plotting works. But under these conditions the plotting worked also before your pull request I have to admit.

Yeah, that's right. But after this PR we will be able to tell users that they need to deactivate our Graphics support, so that Matplotlib can do its job without us interfering on it.
For that, I'll catch the RuntimeError you posted and print a new message saying that instead.

If I choose any other backend than TkAgg Spyder shows me the following message

That's part of this PR and just informs users that Spyder can't set a new backend if there's one in matplotlibrc. It's simply impossible because of the way Matplotlib is designed, and that was what I rant about on issue #5541.

The installed backends have an influence on the plotting/importing of matplotlib in Spyder. But I will discuss that with the Fedora mantainers.

I think it's not exactly that, it's the fact that there's a default backend in /etc/matplotlibrc.
Could you comment the backend line in your /etc/matplotlibrc and see if Spyder can set your backend without problems?

Well there is a short and a long answer.
Short answer

Could you comment the backend line in your /etc/matplotlibrc and see if Spyder can set your backend without problems?

The short answer is: yes, Spyder can set the backend but you obviously have set the interactive backend manually if you call matplotlib outside of spyder. The long answer follows at the bottom.
Given the scenario you write your plotting script in spyder and you commented your backend in /etc/matplotlibrc , you either don't set the graphics backend (as spyder does it for you) in your plotting script or you choose the one spyder uses (as otherwise you will run into problems). If you now switch to python3 console without the spyder context you have to insert the line matplotlib.use("XY") into your script. What would possibly break you compatibility if you switch to the spyder IDE again.
So I wouldn't take it as the most elegant solution to adapt your python scripts to each interpreter/IDE.
Long answer

The installed backends have an influence on the plotting/importing of matplotlib in Spyder. But I will discuss that with the Fedora mantainers.

I think it's not exactly that, it's the fact that there's a default backend in /etc/matplotlibrc.

Well, I think we have a bit of a misunderstanding here as I meant some different behaviour of Spyder. I have two test cases:
Test case A
I commented the TkAgg backend in /etc/matplotlibrc and have the following backends installed:
$ dnf list *matplotlib*
python-matplotlib-data.noarch                   2.0.0-3.fc27             @fedora
python-matplotlib-data-fonts.noarch             2.0.0-3.fc27             @fedora
python2-matplotlib.x86_64                       2.0.0-3.fc27             @fedora
python2-matplotlib-doc.x86_64                   2.0.0-3.fc27             @fedora
python2-matplotlib-tk.x86_64                    2.0.0-3.fc27             @fedora
python3-matplotlib.x86_64                       2.0.0-3.fc27             @fedora
python3-matplotlib-gtk3.x86_64                  2.0.0-3.fc27             @fedora
python3-matplotlib-tk.x86_64                    2.0.0-3.fc27             @fedora

Testing only the different installed backends gives the following results:

Inline: works without problems
GTK3: works
TkInter: works

Test case B
I commented the TkAgg backend in /etc/matplotlibrc and have the following backends installed:
$dnf list *matplotlib*
python-matplotlib-data.noarch                   2.0.0-3.fc27             @fedora
python-matplotlib-data-fonts.noarch             2.0.0-3.fc27             @fedora
python3-matplotlib.x86_64                       2.0.0-3.fc27             @fedora
python3-matplotlib-gtk3.x86_64                  2.0.0-3.fc27             @fedora
python3-matplotlib-qt4.x86_64                   2.0.0-3.fc27             @fedora
python3-matplotlib-qt5.x86_64                   2.0.0-3.fc27             @fedora
python3-matplotlib-tk.x86_64                    2.0.0-3.fc27             @fedora

Testing only the different installed backends gives the following results:

Inline: works
Automatic:

Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: The following error appeared when setting your Matplotlib backend

Traceback (most recent call last):
  File "/home/ich/Kram/spyder/spyder/utils/ipython/spyder_kernel.py", line 439, in _set_mpl_backend
    get_ipython().run_line_magic('matplotlib', backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2095, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-107>", line 2, in matplotlib
  File "/usr/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/usr/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2978, in enable_matplotlib
    pt.activate_matplotlib(backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/pylabtools.py", line 307, in activate_matplotlib
    import matplotlib.pyplot
  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in <module>
    from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 16, in <module>
    from .backend_qt5 import QtCore
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 26, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 56, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 127, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class

In [1]:

Qt5:

Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: The following error appeared when setting your Matplotlib backend

Traceback (most recent call last):
  File "/home/ich/Kram/spyder/spyder/utils/ipython/spyder_kernel.py", line 439, in _set_mpl_backend
    get_ipython().run_line_magic('matplotlib', backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2095, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-107>", line 2, in matplotlib
  File "/usr/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/usr/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2983, in enable_matplotlib
    self.enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 482, in enable_gui
    real_enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/eventloops.py", line 284, in enable_gui
    raise RuntimeError("Cannot activate multiple GUI eventloops")
RuntimeError: Cannot activate multiple GUI eventloops

In [1]:

QT4: Shows no graphic windows. (As running the plot files does nothing?)

In [1]: runfile('/home/ich/.config/spyder-py3/temp.py', wdir='/home/ich/.config/spyder-py3')

In [2]:

Gtk3: It takes forever to connect to the IPython console, actually I never made it that far.
TkInter:

Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: The following error appeared when setting your Matplotlib backend

Traceback (most recent call last):
  File "/home/ich/Kram/spyder/spyder/utils/ipython/spyder_kernel.py", line 439, in _set_mpl_backend
    get_ipython().run_line_magic('matplotlib', backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2095, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-107>", line 2, in matplotlib
  File "/usr/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/usr/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2983, in enable_matplotlib
    self.enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 482, in enable_gui
    real_enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/eventloops.py", line 284, in enable_gui
    raise RuntimeError("Cannot activate multiple GUI eventloops")
RuntimeError: Cannot activate multiple GUI eventloops

In [1]

So what I meant was that the behaviour of Tkinter differs from test case A to test case B even though only the number of installed backends (and the included dependencies) is different in the two cases.
But from my point of view backend X shouldn't interfere with backend Y and that is what I meant when I said:

The installed backends have an influence on the plotting/importing of matplotlib in Spyder. But I will discuss that with the Fedora mantainers.

Regards

I didn't fully look into this but it seem it might be useful here:
https://github.com/matplotlib/matplotlib/pull/9795

@JakobJakobson, I think the problem is that you have both the PyQt4 and PyQt5 backends installed and you're using Spyder with PyQt4 (at least that's what you reported on issue #5718).
What happens if you remove the PyQt4 backend and use Spyder with PyQt5 instead?

Removing the PyQt4 backend and keeping the PyQt5 backend leaves me at the following situation:
[ich@localhost spyder]$ python3 bootstrap.py
Executing Spyder from source checkout
WARNING: 3rd party Python exception hook is active: '<lambda>'
Revision afeb58173, Branch: test-pl5758
01. Patched sys.path with /home/ich/Kram/spyder
02. PyQt5 is detected, selecting
03. Imported Spyder 3.2.5.dev0
    [Python 3.6.2 64bits, Qt 5.9.1, PyQt5 5.9 on Linux]
04. Running Spyder

Choosing either the Automatic or the Qt5 backend gives me the following message at startup
Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: The following error appeared when setting your Matplotlib backend

Traceback (most recent call last):
  File "/home/ich/Kram/spyder/spyder/utils/ipython/spyder_kernel.py", line 439, in _set_mpl_backend
    get_ipython().run_line_magic('matplotlib', backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2095, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-107>", line 2, in matplotlib
  File "/usr/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/usr/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2983, in enable_matplotlib
    self.enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 482, in enable_gui
    real_enable_gui(gui)
  File "/usr/lib/python3.6/site-packages/ipykernel/eventloops.py", line 284, in enable_gui
    raise RuntimeError("Cannot activate multiple GUI eventloops")
RuntimeError: Cannot activate multiple GUI eventloops

@JakobJakobson, please try your Test Case B again. I changed this PR's approach in my last commit to better inform users about this problem and what Matplotlib backend is going to be used in Spyder's consoles if one is already set.

Recapping the Test Case B:
The backend in /etc/matplotlibrc is commented, the ~/.config/matplotlib/ folder is empty, the following backends are installed
python-matplotlib-data.noarch                   2.0.0-3.fc27             @fedora
python-matplotlib-data-fonts.noarch             2.0.0-3.fc27             @fedora
python3-matplotlib.x86_64                       2.0.0-3.fc27             @fedora
python3-matplotlib-gtk3.x86_64                  2.0.0-3.fc27             @fedora
python3-matplotlib-qt4.x86_64                   2.0.0-3.fc27             @fedora
python3-matplotlib-qt5.x86_64                   2.0.0-3.fc27

and I'm using the following Spyder configuration:
[ich@localhost spyder]$ python3 bootstrap.py
Executing Spyder from source checkout
WARNING: 3rd party Python exception hook is active: '<lambda>'
Revision 8c6c7bf8c, Branch: test-pl5758
01. Patched sys.path with /home/ich/Kram/spyder
02. PyQt5 is detected, selecting
03. Imported Spyder 3.2.5.dev0
    [Python 3.6.2 64bits, Qt 5.9.1, PyQt5 5.9 on Linux]
04. Running Spyder
Bootstrap completed in 00:00:00.9894

and the following plotting file temp.py

# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

import matplotlib.pyplot
matplotlib.pyplot.plot([1, 2, 3])

Using this configuration leads to the startup/plotting behaviour with the following backends:

Automatic

Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: The following error appeared when setting your Matplotlib backend

Traceback (most recent call last):
  File "/home/ich/Kram/spyder/spyder/utils/ipython/spyder_kernel.py", line 436, in _set_mpl_backend
    get_ipython().run_line_magic('matplotlib', backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2095, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-107>", line 2, in matplotlib
  File "/usr/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/usr/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)
  File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2978, in enable_matplotlib
    pt.activate_matplotlib(backend)
  File "/usr/lib/python3.6/site-packages/IPython/core/pylabtools.py", line 307, in activate_matplotlib
    import matplotlib.pyplot
  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in <module>
    from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 16, in <module>
    from .backend_qt5 import QtCore
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 26, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 56, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 127, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class

In [1]: runfile('/home/ich/.config/spyder-py3/temp.py', wdir='/home/ich/.config/spyder-py3')
Traceback (most recent call last):

  File "<ipython-input-1-70108edc084d>", line 1, in <module>
    runfile('/home/ich/.config/spyder-py3/temp.py', wdir='/home/ich/.config/spyder-py3')

  File "/home/ich/Kram/spyder/spyder/utils/site/sitecustomize.py", line 716, in runfile
    execfile(filename, namespace)

  File "/home/ich/Kram/spyder/spyder/utils/site/sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/ich/.config/spyder-py3/temp.py", line 8, in <module>
    import matplotlib.pyplot

  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in <module>
    from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 16, in <module>
    from .backend_qt5 import QtCore

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 26, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 56, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 127, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets

RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class

In [2]:

In [2]:

Qt5:

Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: Spyder *can't* set your selected Matplotlib backend because there is a previous backend already in use.

Your backend will be Qt5Agg

In [1]: runfile('/home/ich/.config/spyder-py3/temp.py', wdir='/home/ich/.config/spyder-py3')
Traceback (most recent call last):

  File "<ipython-input-1-70108edc084d>", line 1, in <module>
    runfile('/home/ich/.config/spyder-py3/temp.py', wdir='/home/ich/.config/spyder-py3')

  File "/home/ich/Kram/spyder/spyder/utils/site/sitecustomize.py", line 716, in runfile
    execfile(filename, namespace)

  File "/home/ich/Kram/spyder/spyder/utils/site/sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/ich/.config/spyder-py3/temp.py", line 9, in <module>
    matplotlib.pyplot.plot([1, 2, 3])

  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 3307, in plot
    ax = gca()

  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 950, in gca
    return gcf().gca(**kwargs)

  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 586, in gcf
    return figure()

  File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 535, in figure
    **kwargs)

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 44, in new_figure_manager
    return new_figure_manager_given_figure(num, thisFig)

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 51, in new_figure_manager_given_figure
    canvas = FigureCanvasQTAgg(figure)

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 242, in __init__
    super(FigureCanvasQTAgg, self).__init__(figure=figure)

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 66, in __init__
    super(FigureCanvasQTAggBase, self).__init__(figure=figure)

  File "/usr/lib64/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 240, in __init__
    super(FigureCanvasQT, self).__init__(figure=figure)

TypeError: 'figure' is an unknown keyword argument

In [2]:

In [2]:

Qt4: shows no plotting window

Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

In [1]: runfile('/home/ich/.config/spyder-py3/temp.py', wdir='/home/ich/.config/spyder-py3')

In [2]:

Gtk3: Takes forever to connect
Gtk: some further dependencies are not installed
Tkinter: shows an unresponsive blank canvas

Python 3.6.2 (default, Sep  1 2017, 12:03:48)
Type "copyright", "credits" or "license" for more information.

IPython 6.2.1 -- An enhanced Interactive Python.

NOTE: Spyder *can't* set your selected Matplotlib backend because there is a previous backend already in use.

Your backend will be TkAgg

In [1]: runfile('/home/ich/.config/spyder-py3/temp.py', wdir='/home/ich/.config/spyder-py3')

In [2]:

@JakobJakobson, I'm going to merge this one because it's an improvement and I'm not seeing the errors you reported in Ubuntu 17.04, so I think it's an issue exclusive to Fedora (as you already pointed out).


Youtube Playlist RSS Detection

It seems like the RSS detection feature has an issue with Youtube playlists which contain an underscore within the feed URL. For example, when detecting the feed for the following playlist, the portion at the end starting with the underscore is excluded when choosing "Subscribe > Current playlist feed".
https://www.youtube.com/playlist?list=PL6pOqn4K529Kw0KSfKS9FO487fpiXx_6H
Results in:
https://www.youtube.com/feeds/videos.xml?playlist_id=PL6pOqn4K529Kw0KSfKS9FO487fpiXx

Should be an easy fix for this particular issue, though I'll have to spend some more time to get the full list of characters used in playlist IDs

This post may help you out: https://webapps.stackexchange.com/questions/54443/format-for-id-of-youtube-video/101153#101153
The character set for videos, channels and playlists seems to be:
0-9
A-Z
a-z
_-

Thank you for looking into it, that's a pretty interesting read!

I don't why the Smart-RSS detects feed for every Youtube video I'm watching, when I try to subscribe the feed, no article is loaded into the middle panel, only the link is added into the left pane of the Smart-RSS page.


Removing Azure AD DS from steps

After email from Daniel Arias (Tek Experts), removing Azure AD DS suggestion since it doesn't work with S2D.

@lizap @Heidilohr : Making a pull request to remove some info from this doc after hearing from Azure AD DS team and support testing this scenario and say it's not supported.

Hey, Christian - you'll see the change live on Monday, June 4. Thanks!


[ag] improve compile-time"-ness"

[ag] improve compile-time"-ness"
Currently, values obtained using get (or structured-binding) can't be use in constexpr nor static_assert expressions.
Examples
Considering the following aggregate definition :
struct type_0{ int i = 0; char c = 'a'; };

Then we have :
// assert compiles, static_assert don't
/*static_*/assert(csl::ag::get<0>(value) == 42);
/*static_*/assert(csl::ag::get<1>(value) == 'A');

auto value = type_0{ 42, 'A' }; // NOLINT
/*constexpr*/ auto as_tuple = csl::ag::as_tuple(value); // can't be constexpr-qualified yet

https://godbolt.org/z/vW8d3Ta5e


Error deleting an entity after adding it

Current build does not allow you to create an entity and then with another mutation delete that entity.
Steps to reproduce:

Create Add Mutation
Create Delete Mutation
Add item

mutation ($day: DayInput!)  {
  createDay(day:$day){
    id
    agendaDay
  }
}

mutation ($day: DayInput!)  {
  createDay(day:$day){
    id
    agendaDay
  }
}

Immediately try and delete

mutation ($dayId: Int!)  {
  deleteDay(dayId:$dayId){
    id
    agendaDay
  }
}

{

	"dayId" : "7004"

}

I get the following error
{
 "data": {
   "deleteDay": null
 },
 "errors": [
   {
     "message": "There was an error deleting 7004: The instance of entity type 'Day' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values.",
     "locations": [
       {
         "line": 2,
         "column": 3
       }
     ],
     "path": [
       "deleteDay"
     ]
   }
 ]
}

I believe this line is the reason
var sp = services.BuildServiceProvider();
services.AddSingleton<ISchema>(new MITSSchema(new FuncDependencyResolver(type =>sp.GetService(type))));

I replaced it with below and it works as expected.
services.AddScoped<IDependencyResolver>(s => new FuncDependencyResolver(s.GetRequiredService));

services.AddScoped(s => new FuncDependencyResolver(s.GetRequiredService));

this generated errors on graphiql for me

Hi @omar84  - do you see the same error @jcsilvers reported?  I fixed an issue a couple of weeks ago with the scoping of the repository dependencies that I believe were the root cause of @jcsilvers issue but if you're still seeing it perhaps there is still something lingering.

@mmacneil I didn't try his scenario to be honest, I just thought, if there is an issue, I would want to fix it :)
if you believe its already fixed, then this should probably be closed

ok thanks..so do you get an error (in any scenario) in graphiql?
On Mon, Apr 1, 2019, 5:37 PM Omar M<EMAIL_ADDRESS>wrote:

@mmacneil https://github.com/mmacneil I didn't try his scenario to be
honest, I just thought, if there is an issue, I would want to fix it :)
if you believe its already fixed, then this should probably be closed
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mmacneil/ASPNetCoreGraphQL/issues/2#issuecomment-478737890,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXRu2bgFRD1AnM4wNTyXnT_D4XnzYxiks5vcm4BgaJpZM4ZLtkR
.

not with your code, but with what @jcsilvers suggested


Name Colors in Palette

Naming individual colors in the palette view would be very helpful when creating artwork with lots of reused colors.

@shawnfelix that sounds interesting, can you give a bit more details about how the color names would be used by the user. In which situations would it appear?
(sorry for not answering earlier, had a few busy weeks :))

Imagine the user had 4 different shades of a red color that were very similar and are reused very often. It's difficult to keep track of the different shades when working with many colors - so the user might have to keep using the color picker to match the right shade of a color (if they cant remember which one to use from the palette just by looking at it).
So my idea is that when the user adds a color to a palette, they would have the option of giving that color a name. When they hover over the color in the palette side view, a custom tooltip with the name appears. When they edit a palette they can select colors and change each of the individual color names.

Hey this sounds like a cool feature to add. I'm kind of new to programming. I used piskel to create sprites for a unity project. Do you think this would be a good issue for me to work on? If so, where should I start?


Be able to reboot host from infrastructure tab

Would be great to reboot the host machine from the Rancher interface.
Rancher Version:
1.0.1
OS and where are the hosts located? (cloud, bare metal, etc):
AWS

Are you expecting this to happen for the hosts that are created through the UI or just any hosts that are added to Rancher using a custom command.
For the custom command, this would not be possible as we don't have a way to access it.
For the docker-machine created entries, I think you are looking for something similar to this: https://github.com/rancher/rancher/issues/1858

The agent is privileged so it could call reboot to do a software reboot.  Hardware pulling the plug would require cloud provider integration (through docker-machine) and credentials for the particular VM.

https://github.com/rancher/rancher/issues/1858


Misleading link to DockerHub in Readme

The link in the Readme of the repo points to a 4-year-old docker image of a different repo :v:
Link

Thanks for the report, fixed! We will update it in the future with new images.


Is it possible to read the endpointkeys using an ARM template?

I would like to store the QnA Maker Endpointkeys in an Azure KeyVault and I would like to automate that using an ARM template.
I found that there is a REST API to fetch the endpointkeys, but I do not see how to call that from an ARM template (like using listKeys).
Could you please explain the best way to automate this?

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

ID: 0f2e7ee3-6793-f550-7e0a-815a38b1d783
Version Independent ID: 3618dbe0-6dc5-ae16-91f3-61112679d0c0
Content: Resource and key management - QnA Maker - Azure Cognitive Services
Content Source: articles/cognitive-services/QnAMaker/How-To/key-management.md
Service: cognitive-services
Sub-service: qna-maker
GitHub Login: @diberry
Microsoft Alias: diberry

@hansmbakker Hi Hans, we don't have any official document can help you. But I find a blog and some related documents may help.
https://peterbozso.github.io/2018/06/11/qna-maker-provisioning.html
https://docs.microsoft.com/en-us/azure/azure-resource-manager/
https://docs.microsoft.com/en-us/azure/azure-resource-manager/manage-resources-portal

@YutongTie-MSFT that is not what I meant. I am already using ARM to provision the QnA maker components themselves. This is what is also discussed in the documents you sent.
However, to call the QnA Maker answering endpoint from a bot application, you need the endpointKey (not the subscriptionKey) and this is the point that I cannot find whether it is supported.
I want to automate the process of adding the QnA Maker endpointKey and I would preferably do that as a part of my ARM template provisioning process.

@hansmbakker - I don't think there is an arm template provisioning process currently. Can you use another automated mechanism?
@yutongtie-msft - please assign this issue to me.

@diberry thank you for your reply.
Probably I can automate it as a separate PowerShell step (using the REST API I mentioned) in my Azure DevOps pipeline, but actually I was wondering what Microsoft recommends here, whether you have a better workaround than my PowerShell idea and whether it is planned to integrate this into ARM?

That’s a pity, but at least it is a clear statement.
Please note that I did not intend to ask for generateAnswer in ARM (your statement sounds like you interpreted it that way), I just wanted to do proper key management, and that includes the endpointKeys of the QnA Maker service.

@hansmbakker
Thanks for sharing the feedback. Storing endpoint key is like storing any other secret in KeyVault. Also if you update the keys (using Refresh Endpoint Keys API), those keys need to be synced in KeyVault.
Hope that helps.

@prabansa the issue is not how to get a secret into KeyVault.
The issue is how to get the endpointKey out of a QnA Maker instance using an ARM template.

I think this issue is solved in that it isn't currently supported.
#please-close


Fix KubeVirt e2e Os images http server

Signed-off-by: Helene Durand<EMAIL_ADDRESS>What this PR does / why we need it:

Created a service for os images instead of Pod Ip (subject to changes)
OS images are now in /usr/share/nginx/html/images (mounted from a PVC), so not lost when the pod is restarted.

Which issue(s) this PR fixes (optional, in fixes #<issue number> format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Optional Release Note:

NONE

/test pull-machine-controller-e2e-kubevirt

/restest

/retest

/hold
Let's avoid retries.

GCE is failing because we reached the quota limits for IN_USE_ADDRESSES
Hetzner is failing because its API is either too slow or unresponsive.

/retest

/unhold
@xrstf can you please override pull-machine-controller-e2e-hetzner for this PR?


Fix test failure on Windows (due to git newline conversions)

Test seems to pass now. Also no need for stripMargin.

Closing this, hopefully finding time to fix sat-header soon.


change: cache source IDs

I used pyinstrument to try to find easy performance wins, reducing the amount of queries from 153 to 95 and shaved a half second off query performance time by caching this property.
Profile before:

Profile after:

Addresses #531

Codecov Report

Merging #558 into master will increase coverage by 0.08%.
The diff coverage is 95.45%.

@@            Coverage Diff             @@
##           master     #558      +/-   ##
==========================================
+ Coverage   91.33%   91.42%   +0.08%
==========================================
  Files          71       71
  Lines        2540     2600      +60
==========================================
+ Hits         2320     2377      +57
- Misses        220      223       +3

Impacted Files
Coverage Δ

CreeDictionary/utils/fst_analysis_parser.py
93.28% <88.88%> (-0.29%)
:arrow_down:

CreeDictionary/API/search.py
94.84% <94.59%> (-0.08%)
:arrow_down:

CreeDictionary/API/models.py
82.11% <100.00%> (+0.86%)
:arrow_up:

CreeDictionary/API/schema.py
100.00% <100.00%> (ø)

...eeDictionary/tests/utils_tests/relabelling_test.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bed1053...e80e91a. Read the comment docs.


Add BufferedPacket

I use this for sending cached packets

Cleaned up BufferedPacket additions and added optimization to PacketProtocol.getOutgoingId(Class)

Just checking, is there a reason you can't just cache the packet instance instead of raw bytes?

The idea is to not have to reencode the packet every time, espically for expensive packets like ServerChunkDataPacket.


Connecting to SickRage

My sysem have HTPC Manager and SickRage installed locally with a Nginx reverse proxy set up. I have I am connecting to HTPC Manager with SickRage set up like:

Enabled: Checked
Menu name: TV
IP/HOST: localhost
Port: 8081
Basepath: /backend/tv
API key: (copied from SickRage but omitted from this post)
Use SSL: Unchecked
Reverse proxy link: http://localhost:8008/backend/tv

When i test the configuration it fails. In the logs it shows this:

modules.sickrage	ERROR	Unable to contact sickrage via http://localhost:8081/backend/tvapi/********************************/?cmd=sb.ping

HTPC Manager does nto place a / at the end of the path - it should be http://localhost:8081/backend/tv/api. I fixed the test failure by adding the / to the end of the basepath in the setting (Basepath: /backend/tv/).
But all that does not resolve the underlying issue. When i open the SickRage page it is stuck loading the shows. When I look at the logs I see this:

modules.sickrage	ERROR	http://localhost:8081/backendtv/api/********************************/?cmd=future

As you can see from the log it is changing the path from http://localhost:8081/backend/tv/ to http://localhost:8081/backendtv/.

You have a unnormal basepath. Ill fix this later today inntil that, you can use any basepath that doent contain / as its auto removed to help formatering to correctly. Fx /tv/ or tv will work fine :)

I know, I am just being 'organized' with my structure on my webserver. all the frontend stuff gets a url right off the hostname. All the backend stuff is nested in the /backend/ path.
Thanks

Fixed in the latest commit.

andI just finished editing my nginx settings... damn your fast

Yeah, but did it from my phone :P it was a easy fix. I did forgot about the test button, im gonna fix that now.

I cant see there is any wrong with the ping now, can you test it again please?

I think it was old data, sickrage is fine since I swithced it to the /tv. I will try switching to the /backend/tv shortly.


[Bug] Add supported_hiding_bounds parameter to sonic_pc

🐛 Bug Report
We hotfixed with #430 a change in interface that needs to be implemented.
This should be a simple fix, and will require introducing its use for polynomial commitments.

Closed by https://github.com/AleoHQ/snarkOS/pull/432.


Create RoutingTableInfo type

Not sure why, but we use a simple Value as the data type for the type alias RoutingTableInfo. We should implement an actual RoutingTableInfo struct, that serializes & deserializes according to the specified return type.

Hello. I'd like to take this one


"Too many redirects" message error in axel command

There is an error in the line 55 of the install-script https://github.com/aws-samples/amazon-sagemaker-spark-ui/blob/v0.1.0/install-scripts/install-history-server.sh#L55. I am getting "Too many redirects" when I run this line from the terminal in sagemaker removing the -q option of the line to get the stdout. There are at least 2 issues in the axel repository where this problem is reported. https://github.com/axel-download-accelerator/axel/issues/175, https://github.com/axel-download-accelerator/axel/issues/339. Same line appears in the v0.2.0 in the studio-classic folder https://github.com/aws-samples/amazon-sagemaker-spark-ui/blob/v0.2.0/install-scripts/studio-classic/install-history-server.sh#L56.
This started to happen just some days ago, like 1 week ago it worked. Please check it and let me know whatever could be useful. Thank you

Getting the same error. For now I am using WGET instead in install-history-server.sh, although slower.
Current line (axel):
axel -q --output ./spark-$SPARK_VERSION-bin-without-hadoop.tgz --num-connection 10 https://archive.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-without-hadoop.tgz

Replaced by (wget):
wget -O ./spark-$SPARK_VERSION-bin-without-hadoop.tgz https://archive.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-without-hadoop.tgz

Hello @redwolf1410 , @elmehdibelgasmi . Thanks for sharing your feedback. We are going to review and update the solution. If you want to contribute, the repository it's open-source and you can follow the guidelines CONTRIBUTING.md, by opening a pull-request that will be reviewed by the team. Really thank you for sharing your feedbacks!

Thanks @elmehdibelgasmi for your contribution. install script for studio-classic tested and updated


add a langchain demo

A demo building your own Model Service with Awadb and langchain

Please specify the example of a specific LLM model, thanks!


fix(statutory): only filter on participant type when allowed to export all

Forgot this one

:tada: This PR is included in version 1.33.17 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Explain the Protocol () instance

This is for the default protocol. Unix sockets for example don't specify a transport protocol.

Will be removed in favour of a Default protocol type.


License specifications - Reference to undeclared resource

Description
I cannot use the license_specifications block of this module, and receive an error that says Reference to undeclared resource. It could be that I'm using the wrong format for the input. If I am, then maybe I'll reuse this code to provide an example in the examples directory.

[X] ✋ I have searched the open/closed issues and my issue is not listed.

Versions

Module version [Required]: 5.2.0

Terraform version:

Terraform v1.0.11
on darwin_amd64
+ provider registry.terraform.io/hashicorp/archive v2.2.0
+ provider registry.terraform.io/hashicorp/aws v3.75.2
+ provider registry.terraform.io/hashicorp/external v2.2.2
+ provider registry.terraform.io/hashicorp/local v2.2.3
+ provider registry.terraform.io/hashicorp/null v3.1.1
+ provider registry.terraform.io/hashicorp/random v3.3.1
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/hashicorp/vault v3.7.0

Reproduction Code [Required]

Steps to reproduce the behavior:
Using a clean copy of this repository as a basis, do the following:

Checkout v5.2.0 of the module (git checkout v5.2.0)
Go into the examples directory, and create a new folder called license
Copy the main.tf and versions.tf files from the collapsible sections below, and place them in the license folder.
Run terraform init, and then terraform plan.
Observe the same error as from the above description.

main.tf
provider "aws" {
  region = local.region

  default_tags {
    tags = {
      Project = "terraform-aws-autoscaling"
    }
  }

  # Make it faster by skipping something
  skip_get_ec2_platforms      = true
  skip_metadata_api_check     = true
  skip_region_validation      = true
  skip_credentials_validation = true
  skip_requesting_account_id  = true
}

locals {
  name   = "ex-asg-complete"
  region = "us-east-1"
  tags = {
    Owner       = "user"
    Environment = "dev"
  }

  user_data = <<-EOT
  #!/bin/bash
  echo "Hello Terraform!"
  EOT
}

################################################################################
# Supporting Resources
################################################################################

module "vpc" {
  source  = "terraform-aws-modules/vpc/aws"
  version = "~> 3.0"

  name = local.name
  cidr = "<IP_ADDRESS>/18"

  azs             = ["${local.region}a", "${local.region}b", "${local.region}c"]
  public_subnets  = ["<IP_ADDRESS>/24", "<IP_ADDRESS>/24", "<IP_ADDRESS>/24"]
  private_subnets = ["<IP_ADDRESS>/24", "<IP_ADDRESS>/24", "<IP_ADDRESS>/24"]

  enable_dns_hostnames = true
  enable_dns_support   = true

  tags = local.tags
}

data "aws_ami" "amazon_linux" {
  most_recent = true
  owners      = ["amazon"]

  filter {
    name = "name"

    values = [
      "amzn-ami-hvm-*-x86_64-gp2",
    ]
  }
}

################################################################################
# Launch template only
################################################################################

resource "aws_licensemanager_license_configuration" "test" {
  license_count            = 1
  license_count_hard_limit = true
  license_counting_type    = "Socket"
  name                     = "test-license"

  license_rules = [
    "#allowedTenancy=EC2-DedicatedHost",
    "#maximumSockets=2",
    "#minimumSockets=2",
  ]
}

module "launch_template_only" {
  source = "../../"

  create              = false
  desired_capacity    = 1
  image_id            = data.aws_ami.amazon_linux.id
  instance_type       = "t3.micro"
  max_size            = 1
  min_size            = 0
  name                = "launch-template-only-${local.name}"
  tags                = local.tags
  vpc_zone_identifier = module.vpc.private_subnets

  license_specifications = {
    license_configuration_arn = aws_licensemanager_license_configuration.test.arn
  }
}

versions.tf
terraform {
  required_version = ">= 0.13.1"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = ">= 3.72"
    }
  }
}

Expected behavior
I am following the pattern of several other inputs of this module. I would expect that license_specifications accepts a mapping like the following:
license_specifications = {
  license_configuration_arn = aws_licensemanager_license_configuration.test.arn
}

I could be wrong though.
Actual behavior
The actual error that appears is the following:
╷
│ Error: Reference to undeclared resource
│
│   on .terraform/modules/my_asg_module/main.tf line 152, in resource "aws_launch_template" "this":
│  152:       license_configuration_arn = license_specifications.value.license_configuration_arn
│
│ A managed resource "license_specifications" "value" has not been declared in module.my_asg_module.
╵

Terminal Output Screenshot(s)
This basically shows the same as the error above.

Additional context
If this issue leads to a fix version, would it be possible to cut a version v5.3.0 version of this module to support the AWS provider 3.x version in addition to the normal v6.6.0 version please?

As a followup, I think I found the issue:
https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/v5.2.0/main.tf#L149-L154
Basically, the underlying aws_launch_template resource uses the key license_specification. In the code above, the dynamic block is correctly named license_specification. However, in line https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/v5.2.0/main.tf#L152, the license_configuration_arn key points to license_specifications.value.license_configuration_arn (Notice the extra s.
The fix would be:
  dynamic "license_specification" {
    for_each = var.license_specifications != null ? [var.license_specifications] : []
    content {
-      license_configuration_arn = license_specifications.value.license_configuration_arn
+      license_configuration_arn = license_specification.value.license_configuration_arn
    }
  }

This issue has been resolved in version 6.5.1 :tada:


Track upstream proc_macro changes

Rename Term to Ident
Rename Punct to Op
Remove Term::as_str
Rename Op::op to Punct::as_char
Term::new no longer accepts lifetimes or raw idents
Lifetimes are lexed as a Joint ' character followed by an Ident
Ident::new_raw is a new procmacro2_semver_exempt API for creating raw
identifiers.
{Eq,PartialEq,Ord,PartialOrd,Hash} for Ident
Remove Copy for Term
Remove Copy for Op
Add Extend<TokenTree> for TokenStream

cc @dtolnay
The upstream changes (https://github.com/rust-lang/rust/pull/50473) just landed and this shouldn't be published until there's a new nightly

Ok I've now also added a bunch of impls for Ident, inherited from syn, which purely compares to_string output

These changes have now landed in nightly. New versions should be released.


Redirecting MsBuildExtensionsPath causes incorrect double-load warnings

We have an isolation system in place that doesn't depend on MsBuild installation.  As such, we alter $(MsBuildExtensionsPath) early in our project load order.  This has worked fine since MsBuild 4 and earlier, but as of v15 we get load warnings in VisualStudio.  Unclear if this is an MsBuild fault or a VisualStudio fault.
VS gives this warning
	"D:\CorextCache\.A\MsBuild.Corext.sE2FwIuT0zUvdE9g6wU5UA\Extensions\Plugin\Props\MsBuild.Tasks.Corext.props" cannot be imported again. It was already imported at "D:\CorextCache\.A\MsBuild.Corext.sE2FwIuT0zUvdE9g6wU5UA\Environment.props (36,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\code\CorextExe\src\Common\Common.csproj]	Common	D:\CorextCache\.A\MsBuild.Corext.sE2FwIuT0zUvdE9g6wU5UA\Environment.props	36
Where the code loading that task is essentially:
  <Import Project="$(MsBuildExtensionsPath)\Plugin\Props\*" />
There is only one file in the Props folder, and if I remove the wildcard and import only that file it works fine.  More interesting is that changing the property used to root it to something else, or using a hardcoded path at the beginning lets it work fine with wildcards.  For instance
  <Import Project="$(AnyOtherProperty)\Extensions\Plugin\Props\*" />
It seems there is special logic around the variable MsBuildExtensionsPath causing msbuild/VS to get confused over wildcard imports such that it thinks it has to import twice from this specific line.

I suspect this is related to extension path fallback (https://github.com/Microsoft/msbuild/pull/586 among others). @AndyGerlicher anything spring to mind?

This is likely because the import with the fallback are unioned together. The fallback paths should be removed from the app.config in CoreXT distribution.


Tests should probably use .toEqual() instead of .toMatchObject()

For example, in this test:
https://github.com/t3-oss/t3-env/blob/63a7fed1cb85e05d59c1c3c87e5b434cc8a353cc/packages/core/test/smoke.test.ts#L371-L382
It seems the intent of this test is to ensure that server-only vars aren't available in the env object on the client, but Vitest's toMatchObject checks if the expected object is a subset of the actual object. If we change this to toEqual, we see that the server-only environment variable is present:
 FAIL  test/smoke.test.ts > shared can be accessed on both server and client > client
AssertionError: expected { BAR: 'bar', …(2) } to deeply equal { NODE_ENV: 'development', …(1) }
 ❯ test/smoke.test.ts:376:17
    374|     globalThis.window = {} as any;
    375|
    376|     expect(env).toEqual({
       |                 ^
    377|       NODE_ENV: "development",
    378|       FOO_BAR: "foo",

  - Expected  - 1
  + Received  + 0

    {
  +   BAR: 'bar',
      FOO_BAR: 'foo',
      NODE_ENV: 'development',
    }

Oh I didn't know about that, nice catch!
However, in this particular test case shared can be accessed on both server and client, the globalThis.window = {} as any doesn't really work, plus the createEnv is being called in "server-side". We should do global.window = {} as any to simulate client, before calling createEnv.
Will apply the fix when I have time, but feel free to submit a PR.

Interesting, I actually didn't know that🤔 But I don't think we have to change toEqual to toMatchObject for every test cases, except for this particular test case shared can be accessed on both server and client > client.
The reason why when you change the toMatchObject to toEqual will fail this test case is that, we actually called createEnv before globalThis.window = {} as any, which mean the env was created in server mode and the  globalThis.window = {} as any is pretty much doing nothing here.

But I don't think we have to change toEqual to toMatchObject for every test cases

Even in the other test cases, is there a reason it's preferable to only check for a subset versus full equality? I feel like this could lead to other edge cases slipping through.

Edit: I actually do see one reason not to switch everything to toEqual: it seems Vitest tries to access a nodeType property on the object when using toEqual which triggers the Proxy to throw an error if isServer is false.

Exactly, I do agree using toEqual is preferable for t3-env, but because of the proxy we can't use it for isServer: false. However, we can workaround by expecting an error if client try to access server env prop https://github.com/t3-oss/t3-env/pull/157/files#r1432191490.
For isServer: true, both toEqual and toMatchObject are fine, but there are some cases where I personally think we might want to avoid using toEqual, as some compiler might include props like __esModule (https://github.com/t3-oss/t3-env/blob/63a7fed1cb85e05d59c1c3c87e5b434cc8a353cc/packages/core/index.ts#L237C11-L237C11) as part of the env object, but so far I didn't notice such thing happen in Vitest🤷


fix: support gitlab subgroups at url

Gitlab can have multiple subgroups, these subgroups are represented as path segments like
https://gitlab.com/owner/group/subgroup/repo.git

So the repository, in this case, should be group/subgroup/repo
Signed-off-by: Victor Godoy<EMAIL_ADDRESS>

I quickly wrote some test and this fails with:
thread 'conventional::config::tests::test_host_info_from_url' panicked at 'assertion failed: `(left == right)`
  left: `(Some("https://gitlab.com"), Some("group"), Some("subgroup/repo"))`,
 right: `(Some("https://gitlab.com"), Some("group/subgroup"), Some("convco"))`', src/conventional/config.rs:259:13

So it looks like it puts the group as owner and not group/subgroup.
This is the patch:
diff --git a/src/conventional/config.rs b/src/conventional/config.rs
index 4c33293..b0f3b74 100644
--- a/src/conventional/config.rs
+++ b/src/conventional/config.rs
@@ -199,23 +199,29 @@ pub(crate) fn host_info(git: &GitHelper) -> Result<HostOwnerRepo, Error> {
             }
         }
         let url = Url::parse(url.as_str())?;
-        let host = url.host().map(|h| format!("https://{}", h));
-        let mut owner = None;
-        if let Some(mut segments) = url.path_segments() {
-            owner = segments.next().map(|s| s.to_string());
-        }
-        let remove = format!("/{}/", owner.as_ref().unwrap());
-        let repository = Some(url.path()
-            .trim_start_matches(&remove)
-            .trim_end_matches(".git")
-            .to_string());
-
-        Ok((host, owner, repository))
+        host_info_from_url(url)
     } else {
         Ok((None, None, None))
     }
 }

+fn host_info_from_url(url: Url) -> Result<HostOwnerRepo, Error> {
+    let host = url.host().map(|h| format!("https://{}", h));
+    let mut owner = None;
+    if let Some(mut segments) = url.path_segments() {
+        owner = segments.next().map(|s| s.to_string());
+    }
+    let remove = format!("/{}/", owner.as_ref().unwrap());
+    let repository = Some(
+        url.path()
+            .trim_start_matches(&remove)
+            .trim_end_matches(".git")
+            .to_string(),
+    );
+
+    Ok((host, owner, repository))
+}
+
 pub(crate) fn make_cl_config(git: &GitHelper, path: impl AsRef<Path>) -> Config {
     let mut config: Config = (std::fs::read(path))
         .ok()
@@ -241,6 +247,31 @@ pub(crate) fn make_cl_config(git: &GitHelper, path: impl AsRef<Path>) -> Config
 mod tests {
     use super::*;

+    #[test]
+    fn test_host_info_from_url() {
+        fn assert_all(url: &str, host: &str, owner: &str, repo: &str) {
+            let expected: HostOwnerRepo = (
+                Some(host.to_string()),
+                Some(owner.to_string()),
+                Some(repo.to_string()),
+            );
+            let result = host_info_from_url(url.parse().unwrap()).unwrap();
+            assert_eq!(result, expected);
+        }
+        assert_all(
+            "https://github.com/convco/convco.git",
+            "https://github.com",
+            "convco",
+            "convco",
+        );
+        assert_all(
+            "https://gitlab.com/group/subgroup/repo.git",
+            "https://gitlab.com",
+            "group/subgroup",
+            "convco",
+        );
+    }
+
     #[test]
     fn test() {
         let json = r#"{

I quickly wrote some test and this fails with:
thread 'conventional::config::tests::test_host_info_from_url' panicked at 'assertion failed: `(left == right)`
  left: `(Some("https://gitlab.com"), Some("group"), Some("subgroup/repo"))`,
 right: `(Some("https://gitlab.com"), Some("group/subgroup"), Some("convco"))`', src/conventional/config.rs:259:13

So it looks like it puts the group as owner and not group/subgroup.
This is the patch:
diff --git a/src/conventional/config.rs b/src/conventional/config.rs
index 4c33293..b0f3b74 100644
--- a/src/conventional/config.rs
+++ b/src/conventional/config.rs
@@ -199,23 +199,29 @@ pub(crate) fn host_info(git: &GitHelper) -> Result<HostOwnerRepo, Error> {
             }
         }
         let url = Url::parse(url.as_str())?;
-        let host = url.host().map(|h| format!("https://{}", h));
-        let mut owner = None;
-        if let Some(mut segments) = url.path_segments() {
-            owner = segments.next().map(|s| s.to_string());
-        }
-        let remove = format!("/{}/", owner.as_ref().unwrap());
-        let repository = Some(url.path()
-            .trim_start_matches(&remove)
-            .trim_end_matches(".git")
-            .to_string());
-
-        Ok((host, owner, repository))
+        host_info_from_url(url)
     } else {
         Ok((None, None, None))
     }
 }

+fn host_info_from_url(url: Url) -> Result<HostOwnerRepo, Error> {
+    let host = url.host().map(|h| format!("https://{}", h));
+    let mut owner = None;
+    if let Some(mut segments) = url.path_segments() {
+        owner = segments.next().map(|s| s.to_string());
+    }
+    let remove = format!("/{}/", owner.as_ref().unwrap());
+    let repository = Some(
+        url.path()
+            .trim_start_matches(&remove)
+            .trim_end_matches(".git")
+            .to_string(),
+    );
+
+    Ok((host, owner, repository))
+}
+
 pub(crate) fn make_cl_config(git: &GitHelper, path: impl AsRef<Path>) -> Config {
     let mut config: Config = (std::fs::read(path))
         .ok()
@@ -241,6 +247,31 @@ pub(crate) fn make_cl_config(git: &GitHelper, path: impl AsRef<Path>) -> Config
 mod tests {
     use super::*;

+    #[test]
+    fn test_host_info_from_url() {
+        fn assert_all(url: &str, host: &str, owner: &str, repo: &str) {
+            let expected: HostOwnerRepo = (
+                Some(host.to_string()),
+                Some(owner.to_string()),
+                Some(repo.to_string()),
+            );
+            let result = host_info_from_url(url.parse().unwrap()).unwrap();
+            assert_eq!(result, expected);
+        }
+        assert_all(
+            "https://github.com/convco/convco.git",
+            "https://github.com",
+            "convco",
+            "convco",
+        );
+        assert_all(
+            "https://gitlab.com/group/subgroup/repo.git",
+            "https://gitlab.com",
+            "group/subgroup",
+            "repo",
+        );
+    }
+
     #[test]
     fn test() {
         let json = r#"{

@hdevalke thanks!!! I did add the test and fix the owner and repository parts

Looks good. I added a suggeston and I'll enable the workflow.

Looks good. I added a suggeston and I'll enable the workflow.

Nice! thanks!


Whitespace not trimmed correctly

With the following Avalonia XAML:
<Window xmlns="https://github.com/avaloniaui">
    <TextBlock>
        Whitespace is trimmed.
    </TextBlock>
</Window>

The TextBlock's Text is set to \n        Whitespace is trimmed.\n (with 8 spaces between the first \n and the text which markdown is removing). This seems to be in incorrect according to the XAML Specification which says:

Whitespace Normalization
By default the following whitespace normalization occurs when a XAML processor processes a XAML file:

Linefeed characters between East Asian characters are removed. See the "East Asian Characters" section later in this topic for a definition of this term.
All whitespace characters (space, linefeed, tab) are converted into spaces.
All consecutive spaces are deleted and replaced by one space.
A space immediately following the start tag is deleted.
A space immediately before the end tag is deleted.

"Default" corresponds to the state denoted by the default value of the xml:space attribute.

This seems to be a Portable.Xaml bug: https://github.com/cwensley/Portable.Xaml/issues/76

I created a Portable.Xaml PR to fix this: https://github.com/cwensley/Portable.Xaml/pull/77


Make the whole 'Selected Node' section (below) only appear when node actually selected.

In the current prototype, the area under 'Selected Node' is always present.  One idea to simplify for the user would be to use javascript to only show the 'Selected Node' UI once a node was actually selected.  So then the user would have a que that they needed to select a node first (before they could respond, get details, chat, etc).

A guess is that this calls for breaking the template up into two parts, with the second part injected during the AJAX action in the method Conversation.show


Retaining permission with copy and template module

Executable files in the folders being copied to another host won't retain it's original permissions.

This has to be done when the files are being create in process_template.


fix(cloud_functions]): convert HttpsCallableResult to Map<String, dynamic> so that json is interpreted the same on Mobile & Web

Description
If I return json from a Cloud Function the objects in the data property don't have a type of Map<String, dynamic> as you'd expect with json in Dart, but a type of _InternalLinkedHashMap<dynamic, dynamic>. However this only happens on mobile (Android, I could not test iOS) but throughs the following exception: Unhandled Exception: type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, dynamic>' in type cast. So this PR aims to fix that.
Please note that this is my first PR. If I did something wrong please tell me and I will avoid it next time.
Related Issues
https://github.com/FirebaseExtended/flutterfire/issues/4059
https://github.com/FirebaseExtended/flutterfire/issues/2548
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[ ] All existing and new tests are passing.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide.
[ ] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

@googlebot I signed it!

@googlebot I signed it!


fusion api client.GetQuote() response unmarshalJson failed

I call fusion api swap ETH to USDC on the ETH chain , but the interface call failed when EnableEstimate is true
response, err := client.GetQuote(ctx, fusion.QuoterControllerGetQuoteParamsFixed{
    FromTokenAddress: fromTokenAddress,
    ToTokenAddress:   toTokenAddress,
    Amount:           amount,
    WalletAddress:    publicAddress,
    EnableEstimate:   true, // false is ok, true will unmarshal failed
})

failed to request: processing response failed: json: cannot unmarshal string into Go struct field PresetClass.presets.fast.exclusiveResolver of type map[string]interface {}
I found the response body exclusiveResolver is string or null, but struct is map[string]interface {}
api doc:  https://portal.1inch.dev/documentation/apis/swap/intent-swap/swagger/quoter?method=get&path=%2Fv2.0%2F1%2Fquote%2Freceive
example: https://github.com/1inch/1inch-sdk-go/blob/main/sdk-clients/fusion/examples/place_order/main.go#L50

Testing with local addresses does not give me this error.
If you are able to recreate the error with non-sensitive addresses, please post them here.
If you are able to share the exact request that caused this privately, please send the data here<EMAIL_ADDRESS>

you can try with replace const part of example: https://github.com/1inch/1inch-sdk-go/blob/main/sdk-clients/fusion/examples/place_order/main.go#L19 like this:
const (
	usdc    = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" // eth contract addr
	wmatic  = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" // usdc contract addr on eth
	amount  = "100000000000000000" // 0.01 eth
	chainId = constants.EthereumChainId // 1
)

What version of Go are you using? Are you running these examples on a locally cloned main branch on your machine?

What version of Go are you using?
go version go1.23.1 darwin/arm64
Are you running these examples on a locally cloned main branch on your machine?
yes
https://github.com/1inch/1inch-sdk-go/blob/main/sdk-clients/fusion/fusion_quoter_types.gen.go#L78
I guess the response body is the result of the server. The exclusiveResolver field is defined string cannot be parsed using map of any version of go. Both the main branch and the fusionplus branch use map type.

I tried again and was able to reproduce it. This is a fix built off of the main branch. Pull this and use it for now: fix/fusion-quote-exclusive-resolvers

Thank you for your help.

#90 merged


Admin Zone

A page or site that allows EVIZ administrators to view site usage and grant / remove IEA access.

Used Django's base admin page and added custom IEA access grant / revoke actions

Which users have admin access?

@rpruim eviz_admin is a superuser created for this purpose and is the only one with access right now. When the changes with the admin page go live, we can upgrade our user accounts.


Refresh translation with params after param value changes

Hi, I'm trying to know if its possible to reload a certain translation which holds a parameter when the param value changes.
json
{
    "HELLO": "hello {{value}}"
}

html
<button (click)="change()">{{ 'HELLO' | translate:param }}</button>
component
constructor(private translate: TranslateService) {
     ...
}
param = {value: 'world'};

change(){
       this.param.value = 'earth';
       //this.translate.use(this.translate.currentLang);
       //this.translate.resetLang(this.translate.currentLang);
      //this.translate.reloadLang(this.translate.currentLang);
}

I've tryed to force the translation to re-translate again when clicking the button by calling the methods from the translate service commented above but it didn't work. Is this something possible to do? Thanks in advance, the library is great!
I'm Using library version 9 since this is from an Angular 5 project

@rmartin94 Did you find a solution? This is driving me crazy right now and it seems nobody is posting a good workaround

Good day, I find solution
param = {value: 'world'};
to
param = {param: 'world'};
try again!!
Good luck

Why not add two-way binding for translation params ?

+1

+1

I could refresh the params, but you I had to replace the whole object with a new object, instead of replacing each property.

I could refresh the params, but I had to replace the whole object with a new object, instead of replacing each property in the old params object.

Thanks, @cesar2064. Refreshing the whole object did the trick.

I could refresh the params, but I had to replace the whole object with a new object, instead of replacing each property in the old params object.

Thnaks


Automated Package Upgrade

:tada: This PR is included in version 12.4.81 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Development

Type of Change

[x] Bug fix (non-breaking change, fixes #)
[ ] New feature (non-breaking change, adds functionality)
[ ] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[x] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose

Approach

Commands to test

Screenshots

Learning

Find right library for $wmi

Thank you for the PR, @pkotov87! This is one of our essential commands, and we're always looking for ways to improve our core commands.
What is the issue you encountered that you are looking to solve? Please particular approach leads to failure in a majority of our SQLWMI tests. Please take a closer look at appveyor https://ci.appveyor.com/project/sqlcollaborative/dbatools/builds/22276595 and let me know what you think 👍

We have several servers MS SQL 2014. Wenn I run:
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SqlWmiManagement') $wmi = New-Object Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer "." $null = $wmi.Initialize()
sometimes I get:
Exception calling "Initialize" with "0" argument(s): "SQL Server WMI provider is not available on ServerName."
I found, that on this servers this command "[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SqlWmiManagement')" load this dll "C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.SqlWmiManagement\<IP_ADDRESS>__89845dcd8080cc91\Microsoft.SqlServer.SqlWmiManagement.dll", but this not working! For this server work "C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.SqlWmiManagement\<IP_ADDRESS>__89845dcd8080cc91\Microsoft.SqlServer.SqlWmiManagement.dll".
In my code I get all dll-s and verify this. Then I load right dll.


cocoapods integration error: undefined local variable or method `min_supported_versions'

Description
Followed instructions in React Native's official document - Environment Setup - Integration with existing apps, installed react native 0.74.0 and react 18.2.0, then add some react native's pod to my Podfile, error occurred after pod install command.
Steps to reproduce

As instructed in official document, I create a package.json with content:

{
  "name": "MyReactNativeApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "yarn react-native start"
  }
}

execute command: npm install<EMAIL_ADDRESS>&& npm install<EMAIL_ADDRESS>go to my Podfile, copy/paste pods listed in the document (paths already changed to the real path correctly):

  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

execute command: pod install
got the error:

Fetching podspec for `DoubleConversion` from `./RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[!] Failed to load 'DoubleConversion' podspec:
[!] Invalid `DoubleConversion.podspec` file: undefined local variable or method `min_supported_versions' for Pod:Module.

 #  from /Users/ziggzhang/Workspace/AlexInputMethod/RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec:28
 #  -------------------------------------------
 #    # Pinning to the same version as React.podspec.
 >    spec.platforms = min_supported_versions
 #
 #  -------------------------------------------

React Native Version
0.74.0
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
  OS: macOS 14.4.1
  CPU: (12) arm64 Apple M2 Pro
  Memory: 89.52 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 16.20.2
    path: ~/.nvm/versions/node/v16.20.2/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 7.1.0
    path: ~/node_modules/.bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.12.0
    path: /Users/ziggzhang/.rvm/gems/ruby-2.6.8/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 15.0.1/15A507
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.8
    path: /Users/ziggzhang/.rvm/rubies/ruby-2.6.8/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: ^18.2.0
  react-native:
    installed: 0.74.4
    wanted: ^0.74.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs
-> % pod install
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `./RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[!] Failed to load 'DoubleConversion' podspec:
[!] Invalid `DoubleConversion.podspec` file: undefined local variable or method `min_supported_versions' for Pod:Module.

 #  from /Users/ziggzhang/Workspace/AlexInputMethod/RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec:28
 #  -------------------------------------------
 #    # Pinning to the same version as React.podspec.
 >    spec.platforms = min_supported_versions
 #
 #  -------------------------------------------

Reproducer
https://github.com/ziggear/ZiggearRNReproducer/tree/main
Screenshots and Videos
No response

Hi @ziggear can you share your full Podfile?
From what I can see you have a lot of pod explicitly defined that you should not have.
Also, I guess that you are calling those pod dependency before calling use_react_native!. That's the problem: that constant is defined only after the use_react_native! function is invoked.

Hi @ziggear can you share your full Podfile? From what I can see you have a lot of pod explicitly defined that you should not have. Also, I guess that you are calling those pod dependency before calling use_react_native!. That's the problem: that constant is defined only after the use_react_native! function is invoked.

Thanks cipolleschi! My Podfile is really simple because I just started a new project and tried to use the newest React Native other than the version 0.64.2 I successfully integrated before.
Thank you very much for your reminder about the use_react_native!. I apologize if I may not have fully understood the documentation. Based on the Objective-C version of the documentation, I have added pods explicitly in the Podfile. While I did find some information about use_react_native! in the Swift version's documentation, I do not have sufficient information to confirm how to use it.
Here is the full version of my project's Podfile:
platform :ios, "13.0"

target :iOSKeyboardDemo do
    pod 'CocoaAsyncSocket'
    pod 'LocalSocket', :path => './LocalSocket/'

    pod 'FBLazyVector', :path => "./RN/node_modules/react-native/Libraries/FBLazyVector"
    pod 'FBReactNativeSpec', :path => "./RN/node_modules/react-native/Libraries/FBReactNativeSpec"
    pod 'RCTRequired', :path => "./RN/node_modules/react-native/Libraries/RCTRequired"
    pod 'RCTTypeSafety', :path => "./RN/node_modules/react-native/Libraries/TypeSafety"
    pod 'React', :path => './RN/node_modules/react-native/'
    pod 'React-Core', :path => './RN/node_modules/react-native/'
    pod 'React-CoreModules', :path => './RN/node_modules/react-native/React/CoreModules'
    pod 'React-Core/DevSupport', :path => './RN/node_modules/react-native/'
    pod 'React-RCTActionSheet', :path => './RN/node_modules/react-native/Libraries/ActionSheetIOS'
    pod 'React-RCTAnimation', :path => './RN/node_modules/react-native/Libraries/NativeAnimation'
    pod 'React-RCTBlob', :path => './RN/node_modules/react-native/Libraries/Blob'
    pod 'React-RCTImage', :path => './RN/node_modules/react-native/Libraries/Image'
    pod 'React-RCTLinking', :path => './RN/node_modules/react-native/Libraries/LinkingIOS'
    pod 'React-RCTNetwork', :path => './RN/node_modules/react-native/Libraries/Network'
    pod 'React-RCTSettings', :path => './RN/node_modules/react-native/Libraries/Settings'
    pod 'React-RCTText', :path => './RN/node_modules/react-native/Libraries/Text'
    pod 'React-RCTVibration', :path => './RN/node_modules/react-native/Libraries/Vibration'
    pod 'React-Core/RCTWebSocket', :path => './RN/node_modules/react-native/'

    pod 'React-cxxreact', :path => './RN/node_modules/react-native/ReactCommon/cxxreact'
    pod 'React-jsi', :path => './RN/node_modules/react-native/ReactCommon/jsi'
    pod 'React-jsiexecutor', :path => './RN/node_modules/react-native/ReactCommon/jsiexecutor'
    pod 'React-jsinspector', :path => './RN/node_modules/react-native/ReactCommon/jsinspector'
    pod 'ReactCommon/callinvoker', :path => "./RN/node_modules/react-native/ReactCommon"
    pod 'ReactCommon/turbomodule/core', :path => "./RN/node_modules/react-native/ReactCommon"
    pod 'Yoga', :path => './RN/node_modules/react-native/ReactCommon/yoga'

    pod 'DoubleConversion', :podspec => './RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
    pod 'glog', :podspec => './RN/node_modules/react-native/third-party-podspecs/glog.podspec'
    pod 'Folly', :podspec => './RN/node_modules/react-native/third-party-podspecs/Folly.podspec'
end

target :KeyboardExtension do
    pod 'CocoaAsyncSocket'
    pod 'LocalSocket', :path => './LocalSocket/'
end

@ziggear Your Podfile should look something like this:
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'NativeExample' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    :app_path => "#{Pod::Config.instance.installation_root}/../.."
  )

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/ react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

You can check out an example of brownfield integration for both Swift and Objective-C in this repo: https://github.com/callstack/react-native-brownfield/tree/master/example/objc

@ziggear Your Podfile should look something like this:
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'NativeExample' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    :app_path => "#{Pod::Config.instance.installation_root}/../.."
  )

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/ react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

You can check out an example of brownfield integration for both Swift and Objective-C in this repo: https://github.com/callstack/react-native-brownfield/tree/master/example/objc

Thanks @okwasniewski it works for me!
By the way I believe this could be a documentation issue for the Objective-C developer to integrate initially newest react native to their project: the documentation still suggest to add pods explicitly:


Change the precedence of await so it's the same as other unary expressions

Fixes #384
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence

@michaelficarra, would be nice with a new npm release :heart:

@papandreou Published 1.11.1. Thanks for the contribution and sorry for the delay.


CCP inconsistently fails to load

I'm not including any of my code, because this is a problem even on the demo site (connectdemo.com).
When I load a page embedding the CCP, it doesn't work on some of my computers.  Sometimes it will cause the login popup, but even then not load the softphone, and sometimes it won't even load the popup.  This comes along with the usual "Refused to display.../ccp#/ in a frame because it set 'X-Frame-Options' to 'sameorigin'.  That error comes from the actual page (callAttributes.html in this case, on the demo site).
But I've noticed something new here: I'm also receiving an error from connectCCP.js (or amazon-connect....js, if you're using your own build).  It comes first from line 20398, and then from 20472 after the login is popped.
GET https://DOMAIN.awsapps.com/connect/ccp net::ERR_BLOCKED_BY_RESPONSE
Note that there is no '#/' at the end of that.  Whatever the '#/' is for, is it something that some of my computers are able to overlook, and others are not?
Here's the code from Streams that triggers the error before the login popup:
      // Create the CCP iframe and append it to the container div.
      var iframe = document.createElement('iframe');
      iframe.src = params.ccpUrl;
      iframe.style = "width: 100%; height: 100%";
      iframe.allow = "microphone";
      containerDiv.appendChild(iframe); // This is line 20398

And here is after the login:
         if (connect.core.iframeRefreshInterval == null) {
            connect.core.iframeRefreshInterval = window.setInterval(function() {
               iframe.src = params.ccpUrl; // This is line 20472
            }, CCP_IFRAME_REFRESH_INTERVAL);

            conduit.onUpstream(connect.EventType.ACKNOWLEDGE, function() {
               this.unsubscribe();
               global.clearInterval(connect.core.iframeRefreshInterval);
               connect.core.iframeRefreshInterval = null;
               connect.core.getPopupManager().clear(connect.MasterTopics.LOGIN_POPUP);
            });
         }

And here is where that params.ccpUrl is set:
      var params = {};
      if (typeof(paramsIn) === 'string') {
         params.ccpUrl = paramsIn;
      } else {
         params = paramsIn;
      }

I'm not sure where paramsIn is being set, but that might be the issue.

I may have found the issue.  Apparently, the browsers on my laptop don't attempt a secure connection by default.  Adding 'https://' before addresses fixed this.


TypeError: backend must be a string or a BaseBackend instance.

When I run the function_fitting.py & fraud_detection.py, there was a same error
TypeError: backend must be a string or a BaseBackend instance.
When the code runs to this line
eng, q = sf.Engine(1)
btw, the version of tensorflow and strawberryfields in my environment are 1.3.0 and 0.13.0

Hi @LiuNingtao
The development of strawberryfields has been continuing over the past couple years. As a consequence, this older repo uses a somewhat older version of strawberryfields (mentioned in the readme, but perhaps you missed it). Can you try installing sf version 0.10 and let us know if that does the trick?

Hey there,
I assume that the higher version of sf will be compatible with the lower version, I am very sorry for this.
Your answer is very helpful. Actually, after my test, the sf’s version for script function_fitting.py and tetrominos_learning.py should be 0.10.0, but which should be 0.11.0 for script fraud_detection.py.
Thank for your answer and your work is so cool!

2020年4月29日 下午11:54，Nathan Killoran<EMAIL_ADDRESS>写道：
Hi @LiuNingtao https://github.com/LiuNingtao
The development of strawberryfields has been continuing over the past couple years. As a consequence, this older repo uses a somewhat older version of strawberryfields (mentioned in the readme, but perhaps you missed it). Can you try installing sf version 0.10 and let us know if that does the trick?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/XanaduAI/quantum-neural-networks/issues/9#issuecomment-621302204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAVX2QNVENPJVWKH43JMYDRPBEUNANCNFSM4MTYYJFQ.

Sorry about that, there were some breaking changes needed to the SF api in order to make it easier to access remote quantum hardware. At the same time, we're updating SF to be compatible with tensorflow 2, so we've been holding off on updating this older code.

@trbromley @josh146 do you know what version is best for fraud_detection.py? Is it different from function_fitting.py and tetrominos_learning.py?

@co9olguy I can confirm that the fraud detection scripts use version 0.11 whereas the other scripts use 0.10. This would be fixed with https://github.com/XanaduAI/quantum-neural-networks/pull/10.
Thanks a lot @LiuNingtao for looking at this!


Ensure approval tests actually run despite using decorators

Maybe it would still good to merge this for now to get rid of the pipeline failures? Just because I don't know how long it'll take me to refactor this using a pytest fixute. I was already glad to make it work using decorators in general.


Changing passwords and permissions

This resolves #326.
Not sure if I need to test password changing feature, because it relies upon Django forms.

I decided to add tests for person_password view. After all, we have some additional logic in there.

@wking and @gvwilson, can you comment on this PR?

Minor comments, but otherwise :+1: (warning: I don't know enough about
Django password management to spot subtle glitches)

@gvwilson we actually use Django default password management system. I changed code according to your suggestions, please feel free to merge if you don't find any other obstructions in it.


Require Ruby 2.3

Ensure .travis.yml is testing Ruby 2.3, 2.4, and 2.5 now, please! 😄

@parkr It is 😄
@jekyllbot: merge +dev


Makefile support on macOS

Compiling automation by using GNUMake.
On windows maybe try GNUWin32/Cygwin/Mingw.

By using Makefile we can hide the patch stuff in fast deployment.
The text insertion can be carried out by a shell script, which is to be called later in Makefile.
(But this is not an urgent feature to support.)

使用对C#友好的Cake自动构建系统，支持macOS