Missing Twisted dependency

My long-running copy of torbrowser-launch recently stopped working (404 after wanting to update from tbb 5.0.3 to a 5.5 hardened copy, along with funny messages about mirrors).
After building the latest version from git, I get this:
pde@damoclid:~$ torbrowser-launcher
Traceback (most recent call last):
  File "/usr/bin/torbrowser-launcher", line 29, in <module>
    import torbrowser_launcher
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/__init__.py", line 33, in <module>
    from launcher import Launcher
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/launcher.py", line 33, in <module>
    from twisted.web.iweb import IPolicyForHTTPS
ImportError: cannot import name IPolicyForHTTPS

dpkg -l python-twisted-web
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name            Version      Architecture Description
+++-===============-============-============-===================================
ii  python-twisted- 13.2.0-1     all          HTTP protocol implementation togeth

After updating python-twisted-web, the launcher runs but I get an error about signature checks failing (maybe I'm under attack, it says) and then:
torbrowser-launcher
Tor Browser Launcher
By Micah Lee, licensed under MIT
version 0.2.1
https://github.com/micahflee/torbrowser-launcher
Updating over Tor
Checked for update within 24 hours, skipping
Verifying signature
Starting download over again
Downloading https://dist.torproject.org/torbrowser/5.5a4-hardened/tor-browser-linux64-5.5a4-hardened_en-US.tar.xz
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/launcher.py", line 313, in start
    self.run_task()
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/launcher.py", line 358, in run_task
    self.start_over()
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/launcher.py", line 644, in start_over
    self.start(None)
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/launcher.py", line 313, in start
    self.run_task()
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/launcher.py", line 342, in run_task
    self.download('tarball', self.common.paths['tarball_url'], self.common.paths['tarball_file'])
  File "/usr/lib/python2.7/dist-packages/torbrowser_launcher/launcher.py", line 485, in download
    None)
  File "/usr/lib/python2.7/dist-packages/twisted/web/client.py", line 1926, in request
    deferred = self._agent.request(method, uri, headers, bodyProducer)
  File "/usr/lib/python2.7/dist-packages/twisted/web/client.py", line 1557, in request
    parsedURI = URI.fromBytes(uri)
  File "/usr/lib/python2.7/dist-packages/twisted/web/client.py", line 606, in fromBytes
    scheme, netloc, path, params, query, fragment = http.urlparse(uri)
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 160, in urlparse
    raise TypeError("url must be bytes, not unicode")
TypeError: url must be bytes, not unicode

(I guess that's another bug)

Yesterday Tor released a hardened version of Tor Browser:
https://blog.torproject.org/blog/tor-browser-55a4-hardened-released
And they changed their RecommendedTBBVersions file to include it:
https://www.torproject.org/projects/torbrowser/RecommendedTBBVersions
So now Tor Browser Launcher gets confused with the new format and thinks that 5.5a4-hardened-Linux is the latest stable version, rather than 5.0.4-Linux. I just fixed this and made a release last night. Specifically, this commit now checks the "release" channel XML file for the current version, which should be we more stable than RecommendedTBBVersions: https://github.com/boklm/torbrowser-launcher/commit/e07beac325b7bd716b7a053dcd5664c113e67458
Version 0.2.1 isn't in Debian yet, but you can fix it by building it from source.

What's in your ~/.config/torbrowser/settings.json? I bet you can edit that file and changed latest_version to 5.0.4 and then re-run it, and it will fix itself.
But I wonder where that unicode error came from. I'll take a look.

I'll say this is a duplicate of #205.

cat ~/.config/torbrowser/settings.json
{"accept_links": false, "modem_sound": false, "latest_version": "5.5a4-hardened", "installed_version": "5.0.4", "check_for_updates": false, "mirror": "https://dist.torproject.org/", "tbl_version": "0.2.1", "update_over_tor": true, "last_update_check_timestamp":<PHONE_NUMBER>}

I'm also experiencing the original reported problem.  I had installed torbrowser-launcher via apt-get, but I've removed that, built from source and am still getting the same error.  The torbrowser-launcher deb is is labeled torbrowser-launcher_0.2.2-1_all.deb.
I'm not sure if there's anything else I need to do, like manually update twisted_web.


Cavepilot

Add CavePilot PWA ( https://cave-pilot.appspot.com/ )
Thanks a lot !

This game is fun on my laptop! but it doesn't work fine on my mobile or add a home banner.

Hi
I know that it doesn't work well with firefox on android ... But should be
OK with chrome...
What is your phone ? Can you provide a screenshot ?
What is wrong ?
Le jeu. 9 févr. 2017 à 13:53, edouardbrasier<EMAIL_ADDRESS>a
écrit :
This game is fun on my laptop! but it doesn't work fine on my mobile or add
a home banner.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pwarocks/pwa.rocks/pull/173#issuecomment-278632371,
or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAJMwr7ARcAPkpQjEA7uB2rpBInMqpmHks5rawxVgaJpZM4L2ken
.

I am using Chrome on a samsung galaxy s6. So I don't get any trigger to install the home banner. I have just tried to clear my history and visit your app many times but no luck. The issue I have on mobile is that I can't control the triangle. On my laptop I use the keyboard arrow and went to level 3 but on touch screen I can't control it. I am not saying it is harder it seems just impossible

The controls are done with the gyroscope, and you must touch the screen to
boost ...
Strange .. i will try to find a s6 to test
Le jeu. 9 févr. 2017 à 14:09, edouardbrasier<EMAIL_ADDRESS>a
écrit :

I am using Chrome on a samsung galaxy s6. So I don't get any trigger to
install the home banner. I have just tried to clear my history and visit
your app many times but no luck. The issue I have on mobile is that I can't
control the triangle. On my laptop I use the keyboard arrow and went to
level 3 but on touch screen I can't control it. I am not saying it is
harder it seems just impossible
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pwarocks/pwa.rocks/pull/173#issuecomment-278635688,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJMwna9sw_X_6bIeAncDTX05NRUU5YZks5raw_6gaJpZM4L2ken
.

ah yes this makes sense hahah It is working. Sorry I guess I don't play
enough games on my mobile.
In regard to the home banner it could from me but I have just tried again
without success. My PWA https://reduxmortgage.firebaseapp.com/ installed
the home banner also the ali express.
On Thu, Feb 9, 2017 at 1:23 PM, manatlan<EMAIL_ADDRESS>wrote:

The controls are done with the gyroscope, and you must touch the screen to
boost ...
Strange .. i will try to find a s6 to test
Le jeu. 9 févr. 2017 à 14:09, edouardbrasier<EMAIL_ADDRESS>a
écrit :

I am using Chrome on a samsung galaxy s6. So I don't get any trigger to
install the home banner. I have just tried to clear my history and visit
your app many times but no luck. The issue I have on mobile is that I
can't
control the triangle. On my laptop I use the keyboard arrow and went to
level 3 but on touch screen I can't control it. I am not saying it is
harder it seems just impossible
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pwarocks/pwa.rocks/pull/173#issuecomment-278635688,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJMwna9sw_X_
6bIeAncDTX05NRUU5YZks5raw_6gaJpZM4L2ken>

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pwarocks/pwa.rocks/pull/173#issuecomment-278638950,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS4njvGAWM-ADHo2lA4a9C3JUzAdvaPoks5raxM7gaJpZM4L2ken
.

Hello! We have built an app store or PWA's. We would love to have your game! Can we chat<EMAIL_ADDRESS>

yes we can
On Wed, Jun 13, 2018 at 12:33 AM Tim Wickey<EMAIL_ADDRESS>wrote:

Hello! We have built an app store or PWA's. We would love to have your
game! Can we chat<EMAIL_ADDRESS>—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pwarocks/pwa.rocks/pull/173#issuecomment-396755761,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJMwko5pDNdPAYnrNZkNe-AvDCICLS4ks5t8EGggaJpZM4L2ken
.

@manatlan can you email me<EMAIL_ADDRESS>or msg me on twitter https://twitter.com/WickeyAppStore


docs: Add more plugins & tools

What kind of changes does this PR include?

Changes or translations of Starlight docs site content

Description
Following the release of Starlight v0.19.0, starlight-blog and starlight-openapi have now been refactored to Starlight plugins. This PR moves them to the appropriate section in the docs site.
The PR also adds starlight-obsidian to the plugin list and starlight-i18n to the tools list.

LGTM 👍


Added warning if you not run the command in production

You should run this command with the --env=prod. This will:

Backup the correct database
Enable logging/alert

It is really a command that you want to know if it fails or not. This is why I think there should be a reminder if you not running the command in production.

:+1: Thanks for the PR

No problem. I've just pushed the dev-master version of this bundle to my application's master branch =)


Emit tumbling window based on size immediately when full.

Pull request

Description
Emit tumbling window based on size immediately when full, do not wait for the next event.
Related

Related Issues: fixes #728

Checklist

[x] The RFC, if required, has been submitted and approved
[x] Any user-facing impact of the changes is reflected in docs.tremor.rs
[x] The code is tested
[x] Use of unsafe code is reasoned about in a comment
[x] Update CHANGELOG.md appropriately, recording any changes, bug fixes or other observable changes in behavior

Coverage decreased (-0.3%) to 81.027% when pulling fb738c5f8bc35922a6a439ecb1c315e246c96447 on windowing-emit into 32eea0ee518bca3b9b76cd4da8505d108ffe96a5 on main.


[WIP] change command to update schema and data separately

Build Failed with Spark 1.6, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/436/

Build Failed  with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/3024/

Build Failed with Spark 1.6, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/453/

Build Failed  with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/3041/

Build Failed with Spark 1.6, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/456/

Build Failed  with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/3045/

LGTM


Can't get simple test case to work

Seems straightforward, but for the life of me, can't get this to work. Keep getting ca_test.go:19: Expected no errors. Got: undefined: beliefs:
func TestExpr(t *testing.T) {
	expression := "beliefs['temp'] > 60 and beliefs['temp'] < 76"
	env := map[string]interface{}{
		`beliefs`: map[string]interface{}{
			`temp`: 58.6,
		},
	}
	out, err := expr.Eval(expression, expr.Env(env))
	if err != nil {
		t.Errorf("Expected no errors. Got: %v", err)
	}
	if out != false {
		t.Errorf("Expecte `false`, got: %v", out)
	}
}

Hi,
Try this fix:
	expression := "beliefs['temp'] > 60 and beliefs['temp'] < 76"
	env := map[string]interface{}{
		`beliefs`: map[string]interface{}{
			`temp`: 58.6,
		},
	}
-	out, err := expr.Eval(expression, expr.Env(env))
+	out, err := expr.Eval(expression, env)
	if err != nil {
		t.Errorf("Expected no errors. Got: %v", err)
	}
	if out != false {
		t.Errorf("Expecte `false`, got: %v", out)
	}

Also, I've added check what in future this misused will be notified 4d40254bf70e2ba6f90dea9cc5d36e96336bbe84

Yes... I've been working it today without the Env wrapper and it works fine. What is the point of the Env wrapper then? It creates a type table of some sort?

Yes, expr.Env creates type tables for type checker. Take a look at this example: https://godoc.org/github.com/antonmedv/expr#example-Compile
Compile ahead of time will allow faster execution and type checking of expression before going to production.

I see... so I only use it with Compile, and not with Eval.
P.
On Thu, Sep 26, 2019 at 3:36 PM Anton Medvedev<EMAIL_ADDRESS>wrote:

Yes, expr.Env creates type tables for type checker. Take a look at this
example: https://godoc.org/github.com/antonmedv/expr#example-Compile
Compile ahead of time will allow faster execution and type checking of
expression before going to production.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/antonmedv/expr/issues/69?email_source=notifications&email_token=AAIGJP4T2ZO3SJTQCCSBF6DQLU2PNA5CNFSM4I24NUK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7XE6QQ#issuecomment-535711554,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIGJPZEPBZ3QTST6XWRBLTQLU2PNANCNFSM4I24NUKQ
.


Addition of Vue3.0 example (Pull V2)

@LeeWannacott  I have made this request as per the instructions you prescribed in the previous and now closed pull request. Hopefully, I have done it right this time! Cheers

Cool! ,Looks good to me!


az iot edge deployment create leaks the server stacktrace

Describe the bug
Command Name
az iot edge deployment create
Extension Name: azure-iot.
Version: 0.10.9.
Errors:
See the stacktrace here.
To Reproduce:
Try to create a deployment with the name that already exists:

az iot edge deployment create --content {} --deployment-id {} --hub-name {} --target-condition {}

Expected Behavior
No error
Environment Summary
macOS-11.2-x86_64-i386-64bit
Python 3.8.8
Installer: HOMEBREW

azure-cli 2.20.0

Extensions:
kusto 0.2.0
azure-iot 0.10.9
interactive 0.4.4

Additional Context

iot

Hi @gukoff,
I cannot reproduce the stack trace leak. Can you update your version of azure-iot and check if you still see the stack trace leak?

Closing the issue due to no response. If you still need help with this issue, please re-open.


Debezium 2.x native integration test failures

Camel has upgraded to Debezium 2.x, so I did likewise in CQ. JVM mode seems to be working ok, but there's some native test failures in DebeziumMongodbIT and DebeziumPostgresIT.
Console logs didn't reveal anything obvious as to what the root cause could be.
I am disabling the native tests for now.

Upgrading to 2.2.0.Final brings more native runtime failures with no clear reason as to the root cause. The only real clue is:
ERROR [io.deb.emb.EmbeddedEngine] (Camel (camel-1) thread #1 - DebeziumConsumer) null

The test suite and the native support need a complete revisit. Thus disabling DebeziumMysqlIT & DebeziumSqlserverIT for now.


Fix grammar mistakes in UG

sorry @wendy0107. my bad
i'll migrate to japan instead, as im too ashame of my engrish skills


hevcenc: fix B frame can't be decoded bug.

Set sps_max_num_reorder_pics and vps_max_num_reorder_pics.
They will impact decoder DPB cached surface numbers.
Sort forward reflist as descending order to make current P frame
can refer nearest P frame, just like H264 is doing.

+1

@wudping , Please help to verfiy,
we should check encode pattern for I only, IP only,  IPB  only clips,

okay, @xuguangxin

lgtm :+1:

verify +１

merged as 56a012928f333c3cc22fd93f0f3fbdb18075b750


[Model] Add support for OLMo architecture

This PR add support for OLMo architecture.
Additional support: add support for clip-qkv.
Test: already tested on android(pixel 4) and cuda(setting tensor_parallel_shrads=2)
Test model: amd/AMD-OLMo-1B(without clip_qkv) and allenai/OLMo-1B-0724-hf(with clip_qkv).
However, generation quality of  the latter one is not so good as expected even though I've tried different implementation of the clip_qkv mechanism, e.g. te.compute and nn.maximum/minimum.
And finally, I checked the doc and following one is the most simplified:
if self.clip_qkv is not None:
        qkv = qkv.maximum(-self.clip_qkv).minimum(self.clip_qkv)

But still the result isn't good enough.
This is output from CLI:
/AMD-OLMo-1B-SFT-q4f16_1-cuda.so --device cuda --overrides "tensor_parallel_shards=2"
[2024-11-24 09:24:04] INFO auto_device.py:79: Found device: cuda:0
[2024-11-24 09:24:04] INFO engine_base.py:143: Using library model: ./dist/libs/AMD-OLMo-1B-SFT-q4f16_1-cuda.so
[09:24:04] /workspace/mlc-llm/cpp/serve/config.cc:688: Under mode "local", max batch size will be set to 4, max KV cache token capacity will be set to 2048, prefill chunk size will be set to 2048.
[09:24:04] /workspace/mlc-llm/cpp/serve/config.cc:688: Under mode "interactive", max batch size will be set to 1, max KV cache token capacity will be set to 2048, prefill chunk size will be set to 2048.
[09:24:04] /workspace/mlc-llm/cpp/serve/config.cc:688: Under mode "server", max batch size will be set to 128, max KV cache token capacity will be set to 11593, prefill chunk size will be set to 2048.
[09:24:04] /workspace/mlc-llm/cpp/serve/config.cc:769: The actual engine mode is "interactive". So max batch size is 1, max KV cache token capacity is 2048, prefill chunk size is 2048.
[09:24:04] /workspace/mlc-llm/cpp/serve/config.cc:774: Estimated total single GPU memory usage: 2026.319 MB (Parameters: 631.266 MB. KVCache: 336.268 MB. Temporary buffer: 1058.785 MB). The actual usage might be slightly larger than the estimated number.
You can use the following special commands:
  /help               print the special commands
  /exit               quit the cli
  /stats              print out stats of last request (token/sec)
  /metrics            print out full engine metrics
  /reset              restart a fresh chat
  /set [overrides]    override settings in the generation config. For example,
                      `/set temperature=0.5;top_p=0.8;seed=23;max_tokens=100;stop=str1,str2`
                      Note: Separate stop words in the `stop` option with commas (,).
  Multi-line input: Use escape+enter to start a new line.

>>> what is the result of 1 + 1?
The result is 2.
>>>

And this is the output from Andorid(pixel 4):

Please note that this is my first PR. If I got something missed, please point it out. Thanks!

Hi, I have a question.
I've been "black" the files locally, and the output is as follows:
All done! ✨ 🍰 ✨
4 files left unchanged.

But I failed the "black" check in CI. Why is that?

@Lanssi Thanks for your contribution! I’ll take a look at your code once it passes CI.

@Lanssi Thanks for your contribution! I’ll take a look at your code once it passes CI.

Yes! Thanks!

@tlopex The following content is for supplement.
I'm curious about the reason for the low generation quality problem(happens in allenai/OLMo-1B-0724-hf. the AMD one looks fine). And the following are my guess:

quality of the model itself
quantization degraded the generation quality
some went wrong when converting the weight
wrong in the model script, specifically the clip_qkv mechanism
bad conv-template

And I did some tests.

Concerning the first point, I use the official demo in https://huggingface.co/allenai/OLMo-1B-0724-hf.
input What is the answer of 1+1? and output A: 2\n\nQ: What is the answer to 2+2+2+
input <|endoftext|>What is the answer of 1+1?<|endoftext|> and output Premise: "The man is wearing a black shirt and is holding a guitar." If this premise

Concerning the forth point, I tested the nn.Tensor.maximum/minimum. This is the script:

import tvm
from tvm import relax
from tvm.relax.frontend import nn
import numpy as np

class MyModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.clip_qkv = 0.5

    def forward(self, a: nn.Tensor):
        return a.maximum(-self.clip_qkv).minimum(self.clip_qkv)

MySpec = {
    "forward": {
        "a": nn.spec.Tensor([10, 10], dtype="float32"),
    }
}

mod, _ = MyModule().export_tvm(spec=MySpec)

target = tvm.target.Target("llvm")
ex = relax.build(mod, target)
device = tvm.cpu()
vm = relax.VirtualMachine(ex, device)

# input data
input = np.random.randn(10, 10).astype("float32")
tvm_input = tvm.nd.array(input, device=device)

output = vm["forward"](tvm_input).numpy()

print(input)
print('\n')
print(output)

And this is the result:
[[ 0.8002662   1.3287255   0.6966691   0.01359426  1.4751362  -2.1837575
   0.31622827  0.29916984  1.6361551  -0.5623241 ]
 [-0.06786224  0.7354883  -1.1480126   1.5657566   0.70848846 -1.8228586
   1.6091303  -0.49641845 -1.9719931   0.03000641]
 [ 0.24146347 -0.37006825  0.6260457  -0.650811    2.9995894   0.01520522
   0.37607008  2.2640219  -0.15675819 -1.4302232 ]
 [ 1.277718   -0.25887656  1.8693565   1.3728012  -1.1130005   0.57336384
  -0.6806153   1.4629978  -0.06308465  1.2775687 ]
 [ 1.1519296   1.1705179   0.5521642   0.5356738  -0.02438113 -3.465944
   1.1917357   0.85313046 -0.41413978 -1.0877508 ]
 [ 0.584423    1.5158817  -0.20225888 -0.50226486 -0.8140207  -0.8861371
  -1.6989475  -0.44207108  0.9688998   1.9392946 ]
 [ 0.2277535  -1.3662196   0.34696814 -0.48505998  0.09624723  1.2511327
  -0.7616591   1.414671    0.5722716   0.67328775]
 [-0.8591674   0.81546694  0.8905721   0.8360764   0.22661494 -0.591125
   1.121892   -0.50307155 -0.6415272  -0.21494472]
 [-0.3014515   2.2457047   0.53163207 -2.7661052   1.279993    0.3640672
   0.9343894  -1.8342396   1.0801686   0.14708626]
 [ 1.0259734   0.63859665  1.3871721  -0.27964365  2.4129944   0.54449517
  -0.3690681  -1.0342233   0.9981198   0.7621166 ]]

[[ 0.5         0.5         0.5         0.01359426  0.5        -0.5
   0.31622827  0.29916984  0.5        -0.5       ]
 [-0.06786224  0.5        -0.5         0.5         0.5        -0.5
   0.5        -0.49641845 -0.5         0.03000641]
 [ 0.24146347 -0.37006825  0.5        -0.5         0.5         0.01520522
   0.37607008  0.5        -0.15675819 -0.5       ]
 [ 0.5        -0.25887656  0.5         0.5        -0.5         0.5
  -0.5         0.5        -0.06308465  0.5       ]
 [ 0.5         0.5         0.5         0.5        -0.02438113 -0.5
   0.5         0.5        -0.41413978 -0.5       ]
 [ 0.5         0.5        -0.20225888 -0.5        -0.5        -0.5
  -0.5        -0.44207108  0.5         0.5       ]
 [ 0.2277535  -0.5         0.34696814 -0.48505998  0.09624723  0.5
  -0.5         0.5         0.5         0.5       ]
 [-0.5         0.5         0.5         0.5         0.22661494 -0.5
   0.5        -0.5        -0.5        -0.21494472]
 [-0.3014515   0.5         0.5        -0.5         0.5         0.3640672
   0.5        -0.5         0.5         0.14708626]
 [ 0.5         0.5         0.5        -0.27964365  0.5         0.5
  -0.3690681  -0.5         0.5         0.5       ]]

It seems to be running well.

Concerning the fifth point, I tried to modified the conv-template in "mlc_chat_config.json" by removing the system_prefix_token_ids or setting add_role_after_system_message to false, respectively. But the generation quality is not good.

Maybe we can further test the 7B variant(link: https://huggingface.co/allenai/OLMo-7B-0724-hf). But for the moment I can't meet the hardware requirement to test it.

@Lanssi  Thank your so much for your additional supplement and testing!
First, about your fourth point , the implement of clip-qkv, I think using nn.Tensor.maximum/minimum is a great way. So I don't consider that the bad quality is caused by it.
Second, could you please tell me which way you chose to quantize the model?
Besides, I can help test the 7B variant if needed.
and cc @MasterJH5574

@Lanssi Thank your so much for your additional supplement and testing!
First, about your fourth point , the implement of clip-qkv, I think using nn.Tensor.maximum/minimum is a great way. So I don't consider that the bad quality is caused by it.
Second, could you please tell me which way you chose to quantize the model?
Besides, I can help test the 7B variant if needed. and cc @MasterJH5574

Sure. I tested q0f16 merely on android, q4f16_1 and q4f32_1 both on android and cuda. And, thanks for your help!

Overall it looks great to me! I tested it on my CUDA device with q4f16_1 and it worked well.
But I am not sure whether we can support awqquant and per_tensor_quant for this model.
Please have a look at it.@MasterJH5574


Add Instana Agent as collector to the registry

Create new registry entry for the Instana Agent as collector

Could you sign the CLA?

Done

@chalin any idea what's going on with the checks here? getting weird timeouts on netlify

@austinlparker - restarted the build. Let's see if we still get timeouts.

weird, wonder why it timed out when i tried it? ah, well, technology.


improvement: allow header auth extension to specify auth prefix

up to add a snapshot test, maybe to x-fern-headers ? And then can we document this here https://buildwithfern.com/learn/overview/define-your-api/openapi/extensions#authentication-overrides


Turn ModificationDateTimeField name changeable

PR related to issue #1322
This PR removes the hardcoded 'modified' on the ModificationDateTimeField and implements some basic tests to the field.

Coverage remained the same at ?% when pulling e046bb2e21adc0154bcb22571c96b1cc9a033890 on karranb:karran/feat/turn-modificationfield-name-customizable into 434b90351113d4705d85ff68dfaf800faa047019 on django-extensions:master.

Thanks !

@karranb Nice catch!


ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE

Describe the bug
let's assume that we want to type ls -lha ~/Desktop
if I type the whole command then everything works as expected, but if I type "ls -lh" and then accept the suggestion, everything after "ls -lh" is going to have the suggestions color (Greyed out or whatever color I choose).
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=4'

Desktop
MacOS Sonoma

Yup same thing here, if anyone has a workaround that'd be great

Also happens on Arch

I have this set:
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=8"

This is what happens to me in neovim+tmux:

This is what happens when using only tmux

I'm not sure if this issue is related but it's really hard to use the plugin 😢.

setting export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#f1d687" in my ~/.zshrc worked for me, it is a similar colour to the default.

I had the same problem with
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#aaa"

It works with full color hex
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#aaaaaa"

Problem seems to be that when fg=7 (or anything below 8, at least in my terminal) is added to region_highlight (which is doing the highlighting), it is implicitly replaced by the color name. When undoing the highlighting, this plugin searches for fg=7 exactly to replace it, which then fails.
It's likely more robust to use the memo property for this


Share operation

Coverage increased (+0.2%) to 89.276% when pulling a0f2556f7295371736f8ba2c7e008a425caf8a37 on share_operation into 7b4d4645b1dd403cfef423a68b8dbac56423e6b3 on master.

Coverage increased (+0.2%) to 89.276% when pulling a0f2556f7295371736f8ba2c7e008a425caf8a37 on share_operation into 7b4d4645b1dd403cfef423a68b8dbac56423e6b3 on master.


Agents with streaming executing twice!

I have an issue with the agents. I'm using agents + streaming with the web browser.
Let's say I ask the following prompt: Summarize: https://js.langchain.com/docs/guides/deployment/
The agents will start executing with "arguments": "{"input": "https://js.langchain.com/docs/guides/deployment/,/"%7D" } then stream the answer, but also run a second time with the following argument:  "arguments": "{"input": "https://js.langchain.com/docs/guides/deployment/,summary/"%7D"}.
Meaning I end up with 2 summaries. Any ideas, please?
This is my implementation:
const agents = [...]

agents.push(
    new WebBrowser({
        model: LLM,
        embeddings: new OpenAIEmbeddings({
            verbose: debug,
            openAIApiKey: Env.get('OPENAI_API_KEY'),
            modelName: 'text-embedding-ada-002',
            timeout: 60,
        }),
    })
)

const customPrompt = ChatPromptTemplate.fromMessages([
    new SystemMessage(computedSystemPrompt),
    ...pastMessages,
    new MessagesPlaceholder('chat_history'),
    ...(agents.length > 0 ? [new MessagesPlaceholder('agent_scratchpad')] : []),
    ['human', '{input}'],
])

if (agents.length) {
    const agent = await createOpenAIToolsAgent({
    // @ts-ignore
    llm: LLM,
    tools: agents,
    prompt: customPrompt,
})

const agentExecutor = new AgentExecutor({
    agent,
    tools: agents,
    verbose: debug,
    returnIntermediateSteps: false,
    maxIterations: 1 + agents.length * 2,
})

agentExecutor.invoke({
    input: computedContextPrompt,
    chat_history: pastMessages,
    verbose: debug,
})

By the way, I'm using callbacks, so handleLLMEnd gets called twice with each web-browser call!

It looks like the first tool response isn't enough to answer the query, so it is trying again.

@jacoblee93 But it's actually enough and it's streaming the first answer, then the second. Any ideas? Do you need more logs? Thank you

@zakariamehbi Did you figure this out? I'm having a similar issue. For me, it happens only when chat history is provided.


Reduce ensure methods

@ustits attempt 2 🙈
I think we've defined some duplicate APIs, but I am not entirely sure I am missing something. I am raising this PR instead of rolling back the commit. What do you think?
All the existing code still compiles, but perhaps a corner case was not covered.

Closed in favour of #28


Nwis client refactor / urllib quote_treatment, safe, and quote_overide_map feature addition

Refactor NWIS Client to use latest version of _restclient. Admittedly, this PR is not limited in scope, I got carried away updating code in hydrotools._restclient to support my needs in the nwis refactor. As such the below change log has been split to distinguish between the two scopes.
The nwis client implementation is now more modular and general. I implemented a factory like pattern that should be easy to extend and maintain in the future. I may refactor the factory to use a enum in the future, but for now this is a good working implementation.
nwis client now uses asyncio on the backend via _restclient and as such, all multiprocessing code has now been removed.
The client now supports getting multiple of any "major filter" (sites, states, hucs, counties, bounding boxes) -- meaning you can start to ask for a whole lot of data more easily. All major filters support using strings and lists as inputs or common scientific data structures (np.array, pd.Series).
closes #70
makes #50 pretty easy to implement
Nwis Client Changes log
Additions
-IVDataService parameters: enable_cache and cache_expire_after allowing control over cache usage.
Removals

IVDataService parameters: process and retry removed.
All code using multiprocessing removed
IVDataService method following pattern get_raw_ and get_json removed
U.S. State constants removed and no longer checked
procs property removed

Changes

IVDataService now uses aiohttp via _restclient to do asynchronous retrieval of data.
documentation updated with examples
IVDataService::get now accepts multiple states, hucs, counties, bounding boxes
The default splitting factor for sites is now 20 instead of the previous 100.

_restclient Change log
Additions

Url keyword arguments quote_treatment, safe, and quote_overide_map added to support flexibility in quoted url representation. Urls are still comparable using the == operator however urls can differ in their quote_url representation.
RestClient.mget now accepts a collection of query parameters and/or headers. It is not required to provide urls to mget if base url is set. Thus, a collection of query's can be passed in a collection and the will be built into requests as parameters of the base url.

Removals

Changes

Update Url docstring to reflect new kwarg additions

Testing

The overwhelming  majority of added features are tested in this PR. Previous unit tests have been modified to test changed implimentation.

Notes

Todos

[ ] regen sphinx docs
[x] ~Verify~ that major filters undergoing splitting are sorted for caching purposes.

Checklist

[x] PR has an informative and human-readable title
[x] PR is well outlined and documented. See #12 for an example
[ ] Changes are limited to a single goal (no scope creep)
[x] Code can be automatically merged (no conflicts)
[x] Code follows project standards (see CONTRIBUTING.md)
[ ] Passes all existing automated tests
[x] Any change in functionality is tested
[x] New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
[x] Placeholder code is flagged / future todos are captured in comments
[x] Reviewers requested with the Reviewers tool :arrow_right:

Edit:

fix typos
add _restclient related changes to log that didn't make the first cut.

This is an awesome amount of work and an important improvement in functionality. I am thoroughly impressed! I found some issues, but I'm not sure if it's because I don't know what I'm doing or they are real bugs.

Thanks! Im pretty pleased with how it has turned out so far. Having looked into the things that you found below, rest assured I made the problems haha.

I was unable to run the tests locally. pytest had some issues with how the parameterized fixtures are setup. This was in Python 3.8.5. I was able to get the code installed and run, but not tested.

Yeah this is related to #79. I need to include the pytest-aiohttp as a development dep for the package. Note that to install the package in "development mode" you will now do pip install -e "python/nwis_client[develop]".

I ran the code below in an attempt to get data without using a cache, but the cache was still created.
# Import the NWIS IV Client
from hydrotools.nwis_client.iv import IVDataService

# Instantiate service
obs_service = IVDataService(enable_cache=False)

# Retrieve data from a single site
observations_data = obs_service.get(
    sites='01646500',
    startDT='2019-08-01',
    endDT='2020-08-01'
    )

# Look at the data
print(observations_data.head())

Great catch, the culprite seems to be IVDataService::get's implementation as a class method. get is creating its own instance of the class which by default will cache things. We have two options to get around this:

Make IVDataService::get a regular instance method. Meaning you would have to use it the way shown above.
or, add the arguments in the constructor to IVDataService::get. So, you would have to pass enable_cache=False too IVDataService::get to disable the cache.

Im not really satisfied with either option, but I think the first is probably the better of the two IMO. Thoughts?

What would be great is if IVDataService::get had @classmethod and instance method versions that were callable in either situation, but i'm not sure exactly how to accomplish that. Im thinking about it though.

Great catch, the culprite seems to be IVDataService::get's implementation as a class method. get is creating its own instance of the class which by default will cache things. We have two options to get around this:

Make IVDataService::get a regular instance method. Meaning you would have to use it the way shown above.
or, add the arguments in the constructor to IVDataService::get. So, you would have to pass enable_cache=False too IVDataService::get to disable the cache.

Im not really satisfied with either option, but I think the first is probably the better of the two IMO. Thoughts?

I can see arguments for both and both of them match design patterns we've employed on other tools. The first choice seems nice because advanced users that don't want caching may prefer to set enable_cache once. On the other hand hdf_cache works at the get level like the second option. I don't really have any strong feelings. I'm partial to the second option as it seems a bit less "stateless" and easier to manage if for some reason you want to switch between caching and not caching in the same process.
It's your baby, so I'll yield to your judgement. I just want it to work.

I can see arguments for both and both of them match design patterns we've employed on other tools. The first choice seems nice because advanced users that don't want caching may prefer to set enable_cache once. On the other hand hdf_cache works at the get level like the second option. I don't really have any strong feelings. I'm partial to the second option as it seems a bit less "stateless" and easier to manage if for some reason you want to switch between caching and not caching in the same process.
It's your baby, so I'll yield to your judgement. I just want it to work.

I agree with both your points. As a user, I think both are valid use cases. As a developer, to your point, I think the second will be easier to maintain and avoid having a giant state machine. Below I drafted up a potential solution to overload get. It works, but it places a lot of assumptions on this code and any code that would be added.
import pytest

class a:
    def __init__(self, some_bool=False) -> None:
        self.some_bool = some_bool

    def bar(*self, some_bool=False):
        if len(self) > 1:
            ValueError("too many variadic args")

        if self:
            print("im an instance method")
            inst = self[0]

            # handle state machine

        else:
            print("im a class method")
            inst = a(some_bool=False)

        print(f"\ninst: {id(inst)}")
        print(f"inst: {type(inst)}")
        print(f"inst: {inst}\n")

def test_a():
    inst = a()
    inst.bar()

    a.bar()

>>> im an instance method
>>> inst:<PHONE_NUMBER>
>>> inst: <class 'test_delete_soon.a'>
>>> inst: <test_delete_soon.a object at 0x104d672b0>
>>>
>>> im a class method
>>> inst:<PHONE_NUMBER>
>>> inst: <class 'test_delete_soon.a'>
>>> inst: <test_delete_soon.a object at 0x104d67310>

After an morning of deliberation, I have decided to go with option 1, make get an instance method. This means that you can no longer do: IVDataService.get(...), it is required to create an instance of the class -> IVDataService().get(...). I think it's also appropriate to expose a cache_enabled property to the user that can be checked to determine if an instance of IVDataService has cache enabled or not.
For historical purposes, below is a potential decorator that will treat an instance method as an instance method or like class method. It is pretty hacky and has a lot of assumptions baked in, but ill leave it here for thought anyway:
import inspect
from inspect import _ParameterKind as ParameterKind
from inspect import _empty as Empty
from functools import wraps

def wrap(o, implicit_callable):
    def outer(func):
        @wraps(func)
        def inner(*args, **kwargs):
            klass = globals()[o]
            signature = inspect.signature(klass.__init__)
            inst_args = signature.parameters

            accepted_kinds = [
                ParameterKind.POSITIONAL_ONLY,
                ParameterKind.VAR_POSITIONAL,
                ParameterKind.VAR_KEYWORD,
            ]

            error_message = f"Object constructor's with {' or '.join(map(lambda x: x.name, accepted_kinds))} args not supported by decorator."
            for parameter in inst_args.values():
                if isinstance(parameter.default, Empty) and parameter.name != "self":
                    raise ValueError(
                        "All non-`self` constructor args must have default values to use this decorator."
                    )
                if parameter.kind in accepted_kinds:
                    raise ValueError(error_message)

            # handle state machine
            if args:
                inst = args[0]

                # case: inst assumes role of `self`
                if isinstance(inst, klass):
                    args = args[1:]

                    # Assume `None` is sentinel value.
                    # replace `None` values with instance attribute reference
                    # note: a new instance of klass is created even if one is passed in.
                    # properties in the passed class that are present in the constructor
                    # are assumed to have the same name (i.e. no leading underscore).
                    # if those criteria are met, properties/entities provided in kwargs
                    # are passed to the constructor in place of default or prior present
                    # values
                    constructor_kwargs = {
                        k: getattr(inst, k) if kwargs.get(k) is None else kwargs.get(k)
                        for k in inst_args.keys()
                        if k != "self"
                    }

                # case: inst is not `self`
                else:
                    constructor_kwargs = {
                        k: v.default if kwargs.get(k) is None else kwargs.get(k)
                        for k, v in inst_args.items()
                        if k != "self"
                    }

                inst = klass(**constructor_kwargs)

            # guaranteed no args
            else:
                inst = klass(**kwargs)

            f = getattr(inst, implicit_callable, None)

            return f(*args, **kwargs)

        return inner

    return outer

class a:
    def __init__(self, some_bool=False) -> None:
        self.some_bool = some_bool

    @wrap("a", "boo")
    def bar(self, *, some_bool=False):
        ...

    def boo(self, *args, **kwargs):
        print(self.some_bool)

I've confirmed it is indeed significantly faster. The example below decreased from 2m43s to 0m44s. Retrieving all cached data took 0m16s. This was ~500,000 values from NWIS. In both cases, the gcp data was already cached and took less than 1s to load and process. So, raw retrieval from NWIS was taking ~28 seconds which in this case was ~70% decrease in retrieval time. Nice!

Wow! That's better than I would have expected! It might be worth adding that to the hydrotools readme just for advertising purposes. Thanks for doing some testing with it! Im stoked to see that result.

Successfully installed, ran the above example, and passed all tests on my end.


One zone activated, all zones active.

…would it be possible to show the actual zone which has been activated?
If I "switch on" zone A, the Home-App shows all zones (A, B, C, D). (as shown here in homebridge)

I know I know. Guess I should put in the readme. I'll look into it, I always use my voice so it never bothered me.

no huge issue, but if I schedule a cleaning I would like to know where the vaccum is working at the moment, when I peek into the HomeApp.

It is because you created multiple instances for the device, all listen to "cleaning: true/false" message. I'm looking into the code and trying to see if I can do zone clean with one device. I believe the only way to do it is to maintain the zone clean state in code.

ya you just need to store the name of the zone being cleaned and compare it to find the status of each zone. But then you run into issues with what if you start to clean another zone, it will think it can so it needs to check the true and false value still.

ya you just need to store the name of the zone being cleaned and compare it to find the status of each zone. But then you run into issues with what if you start to clean another zone, it will think it can so it needs to check the true and false value still.

Guess this would work:

When zone clean is instructed, record the name of the zone to var cleaningZone.
Keep getting state update, if the cleaningZone exist, only update the switch for that zone.
When receiving command to turn on clean for other zones, check if the vaccum is cleaning, if yes then do nothing (or disallow the action, not sure how to)
When the fan for the cleaningZone is turned off, go back to charge and reset cleaningZone to undefined
One thing I need to know more about is the "stateChanged" message, right now it only tells me if the device is cleaning or not. But I know in the "state" object you can also see if the device is doing zone cleaning, is there a way to listen to that instead?

Well I don't have access to a house to test this (on a long trip, could be a while before I have a house) so I made a beta npm repository if anyone wants to be my test dummy https://www.npmjs.com/package/homebridge-xiaomi-roborock-vacuum-zones-beta

Hi,
I tried your Beta-Branch, but my Homebridge-Instance crashed instanly. "Module not registered, or something likely...".
Bummer.

Sorry about that, I'll have a space to test my vacuum soon. Will try and debug it myself then :)

Hi,
Any news of the beta to show the actual zone that is cleaning? Looks great to me as well (-:
Sent with GitHawk

Sorry been absolutely hectic last few months. I won't be able to support this for at least the next few months as I am living the #vanlife and the vacuum won't fit :)
If anyone wants to give it a shot I'm more then happy to approve PR's and publish new packages.

any progress on the zone tracking?


Documentation: backup and restore section should mention that backing up needs tsm1 engine.

The documentation is not mentioning that backing up only works in certain specific database engines. Reading through search engine hits suggest using 'tsm1': #3923
Proper place for this information would be at least the backup/restore section1, possibly also upgrading2.
Currently the upgrading does mention how to transform the databases for tsm1 engine but does not tell you that backing up does not work with bz1.

@temmihoo As of the 0.11 release candidate, and all future releases, the b1 and bz1 storage engines will not be supported. That being said, we should probably update the 0.10 documentation to make it clear that TSM is required for backup/restore functionality. I went ahead and created a ticket in the documentation repo for this: https://github.com/influxdata/docs.influxdata.com/issues/331


[testing] We need to test GWT code

Out client module should have a GWT module for testing, where we can execute test against our GWT code, with mocked out services.

oops sorry, wrong repo


Leandro Teixeira Test

Added Feature File Collection

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@a66a013). Click here to learn what that means.
The diff coverage is 90.24%.

@@          Coverage Diff           @@
##             master    #2   +/-   ##
======================================
  Coverage          ?   92%
  Complexity        ?    22
======================================
  Files             ?     2
  Lines             ?    50
  Branches          ?     0
======================================
  Hits              ?    46
  Misses            ?     4
  Partials          ?     0

Impacted Files
Coverage Δ
Complexity Δ

src/FileCollection.php
100% <100%> (ø)
7 <7> (?)

src/MemoryCollection.php
88.57% <84.61%> (ø)
15 <8> (?)

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 a66a013...c34aa09. Read the comment docs.


login jitter fix, #123

#123 fix. Add ng-cloak inline style and ng-cloak the Repeat Password
field and Sign Up button on the login form

Old annoying issue. Thank you for this fix! :+1:


No network access from WSL/Ubuntu

Microsoft Windows [Version 10.0.19043.1081]
Ubuntu 20.04.2 LTS
I worked through the instructions for installing wsl for windows 10, from:
https://docs.microsoft.com/en-us/windows/wsl/install-win10
However, I cannot connect to the internet from Ubuntu. I switched off the firewall as suggested here:
https://docs.microsoft.com/en-us/windows/wsl/faq#why-do-i-not-have-internet-access-from-wsl-
But still could not connect.
There are a few things I have tried already but they did not resolve the problem (see below).
As in the FAQ page:
https://docs.microsoft.com/en-us/windows/wsl/faq#where-can-i-provide-feedback-
I raised this through the issues tracker but did not get any response.
Can someone help with this, please? I don't know why my previous request was closed without any response.
Thanks!
From Ubuntu terminal I tried to install:
curl https://get.volta.sh | bash
(6) Could not resolve host: get.volta.sh
so I tried:
ping <IP_ADDRESS>
ping: connect: Network is unreachable
Some of the troubleshooting steps I have tried (which did not work)

Disabled the firewall.

Re-installed ubuntu.

BT (my internet provider), port forwarding: https://www.bt.com/help/broadband/learn-about-broadband/how-do-i-set-up-port-forwarding-on-my-bt-hub-

Checked Network Connection settings
Ethernet Properties
vEthernet Properties (WSL)
Hyper-V Virtual Ethernet Adapter
Internet Protocol Version 4 (TCP/IPv4) -checked
Internet Protocol Version 6 (TCP/IPv6) -checked
Hyper-V Extensible Virtual Switch -unchecked

Checked Device Manager (View Hidden)
Network adapters > Hyper-V Virtual Ethernet Adapter Properties
Device status - This device is working properly.

Turn Windows features on and off
Uncheck Windows Subsystem for Linux
Windows needs to reboot your PC to finish the requested changes
Recheck Windows Subsystem for Linux
Windows needs to reboot

Change the nameserver
sudo nano /etc/resolv.conf
'# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/resolv.conf
'# [network]
'# generateResolvConf = false
nameserver xxx.xx.xx
Change the name server to <IP_ADDRESS> and save the file. You should now be able to connect to the internet.
-even restarted ubuntu, same error after restarting and the nameserver seems to be reset to default

https://github.com/microsoft/WSL/issues/5336#issuecomment-653881695
Open Powershell or Cmd as Administrator
and run each of these commands:
wsl --shutdown
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
Hit the Windows Key,
type Network Reset,
hit enter.
You should see this window.
Click "Reset now".
Restart Windows

Change the nameserver
sudo nano /etc/resolv.conf
'# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/resolv.conf
'# [network]
'# generateResolvConf = false
nameserver xxx.xx.xx
Change the name server to <IP_ADDRESS> and save the file. You should now be able to connect to the internet.
-even restarted ubuntu, same error after restarting and the nameserver seems to be reset to default

As you can see from the comment, you should edit the /etc/wsl.conf to include the following:
[network]
generateResolvConf = false

to prevent /etc/resolv.conf to be reset.

I'm not an expert, but I think resolv.conf does not play a role here, since resolv.conf is used only for resolving DNS names.
If pinging <IP_ADDRESS> (Google DNS server) directly does not work, then the issue is elsewhere.
Do you use a VPN? I think there is an ongoing issue with VPN vs WSL2

Thank you, @patrick330602 and @markko1-pro for getting back to me.
So should I edit the /etc/wsl.conf file?
I do not use VPN. I'm using wsl2.

So should I edit the /etc/wsl.conf file?

Yep

Thank you, @patrick330602.
I edited /etc/wsl.conf to add the lines:

[network]
generateResolvConf = false

I then edited the /etc/resolv.conf
to change the name server from the default :

nameserver <IP_ADDRESS>

Closed Ubuntu, reopened it tried:

ping <IP_ADDRESS>

and got:

ping: connect: Network is unreachable

As I understand Ubuntu should be ready to go once you install it and you should not have to edit config files. However, for me, it has not and I don't know why. And also, despite editing the config files, I still cannot connect to the internet from the WSL.

One other thing you could try - disable your antivirus for a while and see whether it helps. I had a similar problem with Kaspersky antivirus. Thankfully our IT allowed me to remove this curse from my PC :)

Thank you, @markko1-pro. I did try that already as it seemed the most likely problem. However, it didn't make a difference.
I had just previously installed Ubuntu and did have connection to the internet in order to download and install packages. However, my computer crashed and I had to do a factory reset. It's after this that I have not been able to connect to the internet from the wsl. I reinstalled, then uninstalled and reinstalled Ubuntu but the problem remains.
My first thought was that it might be the firewall, my computer seems to come with a preinstalled (temporary licence) antivirus software. It had previously expired and I had removed it but with resetting the computer, it got reinstalled.
Regardless of that, I did try the steps I listed above several times, in different orders in case that made a difference. But it doesn't.

By the way, while this problem relates to an Ubuntu installation, I did also try a different wsl distribution, Kali. Which when you download and install from the Microsoft Store comes without any packages.
When I tried:
sudo apt update
I got a network error there as well.

Until 2 days ago it worked normally, but from one moment to another the internet connection in wsl2 was blocked and I no longer have an internet connection. However, I connected the internet to my pc from another provider and if I can have an internet connection in ubuntu. But with the other internet provider I have no connection in ubuntu.

@grovertb All networking utilities, including ping from systemd based distros (Ubuntu, Debian,Fedora,Suse) assume that the network stack is built around 2 services systemd-networkd for links configuration and systemd-resolved for name resolution. If these services failed to start or don't function correctly there is no chance to have networking functional. Could you try networkctl and resolvectl in both cases as a networking "smoke test"?  Both services have very flexible configurations and autoconfiguration mechanisms to ensure stable networking via any infrastructure but leave resolve.conf out-of-the-game.

If you're seeing this issue, could you please collect networking logs and post them here in this thread?
Instructions here on how to collect these. Thanks!

I suppose that WSL provides eth0 interface to the distro in the way that is independent from Internet provider. But every ISP use its own hardware and software to connect end-machine to the global infrastructure. If network interface is swon as routable by the networkctl and resolved has sufficient DNS configuration - designated DNS is reachable then WSL does its job well but some Linux configuration is missed or can't be autoconfigured. The issues on the ISP side are also possible. MTR utility helps to know how far your can reach through the WSL VM-Host-Router-... Service provider chain.

@craigloewen-msft, is that directed at me or to @PavelSosin-320 / @grovertb?
Can you help with the issue I have raised?
Thanks.

@sbhatti534602210 that comment is to anyone who is seeing this issue where you've upgraded your Windows version and your network stops working in WSL. Collecting those logs will help us resolve this issue!
To my understanding your issue is the same as the above, so collecting logs and posting them here is the best way for us to look into this.

Thank you @craigloewen-msft
I followed the instructions from Step 8, Collect WSL logs.
There is no log file. It just collected a screenshot of what I did. I guess the information is automatically sent via the Feedback Hub.
Or  do I need to run wpr -start wsl.wprp -filemode?

@sbhatti534602210 The network stack of Ubuntu and other "mature" Linux distros is built around the 2 systemd driven services: systemd-networkd and systemd-resolved. Both services have self-documented configuration files in /etc/systemd/ folder and use the autoconfiguration mechanism. The networkctl and resolvectl allow interactive configuration and testing networking and name resolution instantly. If networkctl sees eth0 (internet) interface as "routable" then WSL provides a network to WSL VM  and the internet is accessible. Otherwise, either there is a bug in the WSL Network switch or internet access is blocked by security or eth0 provisioning takes too long and ends with a timeout. In the case of routing via VPN, some additional WSL Kernel features (TUP/TAN support) may be needed or only additional configuration to make the Linux networking stack working.

@benhillis The prove that WSL networking is OK and the root cause is outside WSL:
systemctl status NetworkManager
● NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-07-07 07:55:50 IDT; 5h 34min ago
Docs: man:NetworkManager(8)
Main PID: 101 (NetworkManager)
Tasks: 3 (limit: 9543)
Memory: 7.8M
CGroup: /system.slice/NetworkManager.service
└─101 /usr/sbin/NetworkManager --no-daemon
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.6964] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: >
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.6967] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'exter>
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.6982] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'ext>
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.6985] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'e>
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.7414] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: >
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.7416] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state:>
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.7419] manager: NetworkManager state is now CONNECTED_LOCAL
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.7425] device (eth0): Activation: successful, device activated.
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.7429] manager: NetworkManager state is now CONNECTED_GLOBAL
Jul 07 07:55:50 MSI-wsl NetworkManager[101]:   [1625633750.7431] manager: startup complete
Context:

systemd-genie is used as an init system

no VPN

Norton internet security is on

Broadband WiFi router

Fedora remix distro

Thank you @PavelSosin-320. I'm sorry, from your message I did not understand what I need to do that I have not done already. Can you specify?
Thanks

Hello, same issue here.  WSL2 reinstalled from scratch, Ubuntu (tried ArchLinux as well) freshly installed, run wsl and I get

weird nameserver IP inserted into /etc/resolv.conf
ip address shows that eth0as down.

roberto@WoT:~$ ip address 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000     link/ether 86:e6:ce:f6:ac:34 brd ff:ff:ff:ff:ff:ff 3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000     link/ether 1e:fe:2b:f1:3e:4a brd ff:ff:ff:ff:ff:ff 4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000     link/ether 00:15:5d:ca:74:7f brd ff:ff:ff:ff:ff:ff 5: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000     link/ipip <IP_ADDRESS> brd <IP_ADDRESS> 6: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000     link/sit <IP_ADDRESS> brd <IP_ADDRESS>
and /etc/resolv.conf shows:
`# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
[network]
generateResolvConf = false
nameserver <IP_ADDRESS>
`
It used to work with 1903 and 1909 if I remember correctly.

Hi Saira. 1). You may use WiFi router running OpenWRT Linux OS that can
work as a proxy DNS service by itself but has its own flexible and
effective configuration. Its IP 192 .168.1.1 can be used as a primary DNS
with under 2ms response time. 2). If you run WSL distro with enabled
systemd its resolved service has its own very flexible configuration and
autoconfiguration features that allow improvement in security and
performance via negotiation with global DNS services and smart,
quality-based caching of results. 3. Every Global DNS service <IP_ADDRESS>,
<IP_ADDRESS> offers different privacy agreements and secure protocol support.
The nearest deployed instance is just a few miles from your location, i.e.
"over the street" response time. Systemd's resolvectl util provides quality
info about "probed" DNS's.
On Tue, Jul 6, 2021 at 8:45 PM Saira @.***> wrote:

@craigloewen-msft https://github.com/craigloewen-msft, is that directed
at me or to @PavelSosin-320 https://github.com/PavelSosin-320 /
@grovertb https://github.com/grovertb?
Can you help with the issue I have raised?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/7141#issuecomment-874958745, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AM7YVKABHMQQZHQN33RW3JTTWM6K5ANCNFSM47W7CJIA
.

@PavelSosin-320 (and a few others), this issue is about ping <IP_ADDRESS> (and most likely, any other IP) not working - this will most likely not be solved by changing DNS servers. (If ping <IP_ADDRESS> did work, but name resolution did not, then DNS server mights help, but that would be #4275 or #5256.)

The "secret" place of Windows 10 configuration in the registry you can see
in the attachment. It is the partial analog of the Linux resolved.conf I
suppose that Chrome and Chromium-based Edge use it. I have no idea whether
WSL without systemd can use it. It can contradict the Company's security
policy!!!
On Sat, Jul 31, 2021 at 9:47 PM bersbersbers @.***>
wrote:

@PavelSosin-320 https://github.com/PavelSosin-320 (and a few others),
this issue is about ping <IP_ADDRESS> (and most likely, any other IP) not
working - this will most likely not be solved by changing DNS servers. (If ping
<IP_ADDRESS> did work, but name resolution did not, then DNS server mights
help, but that would be #4275
https://github.com/microsoft/WSL/issues/4275 or #5256
https://github.com/microsoft/WSL/issues/5256.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/7141#issuecomment-890389156, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AM7YVKHBTM2VMMQVWIBQFOLT2RALLANCNFSM47W7CJIA
.

Addendum: if I set WSL to use version 1 (wsl --set-default-version 1) and download Ubuntu 18.04, it works fine, I have the network.  Trying 20.04, it does not even install from the Store.

@keltia WSL1 uses Windows network stack, WSL2 has its own network stack - this is the difference. You don't need another init because all WSL distro based on mature Linux distros either use special scripts (Ubuntu) installed with the distro or have the corresponding systemd-genie package that boots and login system using systemd. Not all WSL distros in the MS Store are of the same quality. Ubuntu 20.04 is not more valuable than 18.04 because the current maintained Ubuntu version is 20.10. Almost all valuable Ubuntu packages are in the 20.10 repository today. I have no idea why MS keeps 18.04. Maybe, because it is LTS and still supported by Canonical.

@PavelSosin-320 my point is that I don't understand why it makes such a difference, it was definitely working in WSL2 a few months ago now it doesnt.  Switching to WSL1 (which I didn't run before) makes it work, I'm puzzled.

@keltia WSL1 and WSL2 use different networking stack because WSL2 VM uses its own Linux Kernel. Linux networking is provided by the Linux Kernel (keep it updated using wsl --update!!!) and several Linux services heavily dependent on the Kernel version capability and distro's version. These Linux packages are the most frequently updated part of Linux in our days due to fast infrastructure changes and security requirements. Windows 11 is a good example of poor reaction on Internet infrastructure changes. WSL1 has no own Linux Kernel and uses Windows networking stack. It changes very slow and today it lags many years behind the current Internet infrastructure state of technology.

I just did the same as keltia and the results were very poor: I got my ISP's DNS - the rust piece of iron maintained occasionally with regular long downtimes and hours long synchronisation lag. It doesn't support the basic security features except "antivirus" for extra money. The communication cost of using GoogleDNS, Cloudfare or Quad9 is neglectable for me.

In addition: I just configure my Win 11 to use Quad9 IPV6 as primary IPV6 DNS and Cloudfare IPV6 DNS as alternative IPV6 DNS. My browsers are cruising!
The current WSL Kernel passes IPV6 OK:
test -f /proc/net/if_inet6 && echo "Running kernel is IPv6 ready"
Running kernel is IPv6 ready -no work is needed here.

@PavelSosin-320, I am not using Wifi on my computer, it's ethernet.
@keltia, I also do not understand this. It should just work after installation without having to specifically configure and reconfigure files.

@sbhatti534602210 Did you check that your local network is IPV6 enabled and capable? The are several Web sites that check it, only put https://ipv6-test.com/speedtest/ in your browser. This site checks all aspects of IPV6 connectivity and gives the score. The score must be as close as possible to 20. If some features are shown as unsupported you have no chance to use IPV6. You also shall choose DNS a good DNS service: <IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS> that supports all IPV6 DNS features. Anyway, consult in the DNS provider portal about IPV6 support in your region. The DNS provided by ISP's or the company's infrastructure may support IPV6 name resolution or name resolution via secure IPV6-based protocol partially. Check that IPV6 is enabled for the LAN adapter in use.
The basic test that ensures IPV6 functionality is execution nslookup Azure.Microsoft.com . It must return both IPV4 and IPV6 addresses.   Otherwise, you can miss servers and sites that serve only IP4 or IPV6. Successful ping these addresses from the Windows command line and Linux prompt shows that both IPV6 name resolution, IPV6, and IPV4 networking are fully enabled.
IPV6 can be blocked by the Windows network adapter, router, Local network infrastructure, ISP, or DNS.
Nothing "just working" in networking today because it is a content delivery channel including content streaming - Netflix, Youtube, Zoom, TVoverIP,  Microsoft365!

It may be IPV6 issue if IPV6 is fully enabled in the Networking stack, like in Win 11 & Broadband internet. The simple search in Google shows that IPV6 via Hyper-V NIC is a well-known Microsoft issue that was never solved.  It works in the Host-> Hyper-V VM direction but not in the opposite direction. The answer was always "Disable IPV6 - it is never needed in the small networks!"Maybe, it is the option for some users but not for me.

I just tested it on the Laptop upgraded a few days ago to Win 11 using Ubuntu 20.04 distro and it definitely works with IPV4 and doesn't work with IPV6. The Network configuration is the same and the network capabilities are the same too: IPV6 router + IPV6 enabled by ISP for all customers infrastructure. Windows and router both use IPV6 capable DNS.
Hey Microsoft! How long is needed to solve the Hyper-V issue reported years ago?

Simply connect to a VPN service like windscribe.
Then do sudo apt-get update && sudo apt-get upgrade
(Especially those having issues after connection to different ISP or network provider)
Check IP online  activity as well (maybe blacklisted or so) or contact  your ISP to have the static IP changed
Good luck 🤞

Ok. This is annoying. I've futzed about with this on-and-off the last few days and still can't get anything to work. It worked perfectly fine on my old system, but after upgrading MB & CPU and fresh install of W11, I get no connection. I believe I have tried everything mentioned here and a few other places with no change. No VPN. This is clean install of W11

Install drivers
Windows Update cycle
Grab App Installer from MS Store
WinGet to upgrade Windows Terminal & PowerShell
Enable Windows Optional Components: Containers, HypervisorPlatform, Microsoft-Hyper-V-All, Microsoft-Windows-Subsystem-Linux, VirtualMachinePlatform
WSL2 install mantra (WSL --update, WSL --set-default-version 2, WSL --install -d Ubuntu

That's it. Clean. It works on my old board. The new board is an ASUS Strix Z690-A with an i7-12700KF. The old board is an ASUS Strix Z390-E with an i9-9900K. I put the old board in a rackmount case for an NVR did the same clean install above and everything works perfectly. Why? I did a second reinstall on the new system to verify my steps, but that didn't change anything. The new system will not connect. Side-by-side one works and the other don't, using virtually the same install procedure. What is causing the failure? Hardware? I haven't gotten around to trying Docker yet, is that going to be broken?

I got it working by not using ethernet adapter and using wifi adapter. It was mentioned in one of these billion Issues logged on the subject, but I couldn't get it working the first time I tried. I uninstalled all the virtualization features & wsl. I then installed only Hyper-V. Created my wifi v switch and made sure it was working. (Here, I also tried creating an ethernet v switch, but it would not connect: Unidentified network. I wish I had a different ethernet card to plug in and test. I think the problem is tied to the ethernet card in use or it's driver.) Then I installed Sandbox & WSL + Ubuntu. Now it is all working. Not correctly.  I don't want to use wifi for this, and prefer to have my wifi disabled on the computer. The ethernet adapter on the other computer sitting next to me works just fine, out of the box. Why not this one?

I updated the /ect/wsl.conf with
[network]
generateResolvConf = false
then closed the wsl window and ran wsl --shutdown in powershell. Now the /etc/resolv.conf is not being created on opening wsl. But I cant update the namespace <IP_ADDRESS> because the file does not exist :(

finally got it working :)
I did the following to get it running. Open wsl and run the following commands:

sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameservers <IP_ADDRESS>" > /etc/resolv.conf'
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf=false" >> /etc/wsl.conf'
sudo chattr +i /etc/resolv.conf
close wsl. Open powershell and run wsl --shutdown
Open wsl and try ping www.google.com or sudo cat /etc/resolv.conf. To check network and values of .conf

My probably related report: https://github.com/microsoft/WSL/issues/8299
My current workaround: open a new WSLv1 tab and ping google.com in it, then the old WSLv1 bash processes start to work somehow, but maybe it's a coincidence

I have the same problem. Tried all steps above. I found out that if I switched to Wifi that my problem is resolved.. I still don't know why the ubuntu doesnt have internet on cable internet.. it's only the cable internet that has the problem.

I have the same problem but I fixed it by changing the Program Files\Windows Apps folder ownership.

hello i have some  problem my network manager not enable  and my network manager not detect any wifi  i tried every method to make network manager detect my windows wifi but is fail    im  using kali linux version  2022.2 and wsl 2 version  <IP_ADDRESS>-microsoft-standard-WSL2        please help me i want using kali linux for test spring4shell but docker need connection to wifi

maybe you want look the screenshot

i have enable systemctl but the problem come after systemctl enable  please help me

Some other network driver is blocking WSL network. Uninstalling my VPN app solved the problem

I had the same exact problem as the OP @sbhatti534602210, and even tried all of the things they tried. What finally worked for me was suggested in this thread: https://superuser.com/a/1733426/1725434 . They suggest decompressing the files in %TEMP%. I did that, and WSL2 networking works again! The only modification I made was to run cmd.exe as Admin.
My system was running low on hard drive space so I think Windows 10 started to compress files automatically to save space.
You can stop Windows from doing this for a folder by following this: https://answers.microsoft.com/en-us/windows/forum/all/files-in-windows-10-automatically-compressing/491e517b-e5e9-44e7-8012-0f49f7696d6b
Or you can disable the auto-compression system-wide by running fsutil behavior set disablecompression 1 in PowerShell, although I am not sure if this is a recommended approach.
Hope this helps others.

For those that using Comodo antivirus/firewall, you definitely need to disable firewall (like suggested by many) in order to make network working in WSL Ubuntu.

I was facing this issue only under corporate firewall (Zscaler). Otherwise, WLS Ubuntu was able to connect to the network.
As suggested in this thread, some interaction of Hyper-V or Hyper-V plus docker desktop was the root cause for me. The steps I took:

Uninstalled the distribution: wsl --unregister
Disable Hyper-V (From Windows Features On & Off )
Restart the laptop
wsl --install

System reboots at this level. When I try to start the ubuntu app on my laptop, it fails with error 0x80370102. In this thread, someone suggests to enable Hyper-V to avoid this error. But, this solution worked for me:
wsl --set-default-version 1
That's it. Once installation is over, there is no networking issue even when it's behind corporate firewall.
However, I will suggest to try the following simple steps first:

Disable Hyper-V (From Windows Features On & Off )
Restart the laptop
Check if internet is working.

Try to use another wi-fi router. I've also done all the steps you've done and they haven't fixed the problem. After using another router (a pocket wifi actually) wsl connects now to the internet. So, I concluded that the problem was on my router, not on wsl or my computer...

happened to me today, is there no solution?

If you are having name resolution issues, please look at troubleshooting documentation we just added here: https://github.com/MicrosoftDocs/WSL/blob/main/WSL/troubleshooting.md#troubleshooting-dns-in-wsl.
It walks through some configurations which can break name resolution from the WSL container - as well as a work around for an HNS issue which can also break connectivity.

There are compatibility issues with some VPNs which want to see all packets from the top of the stack.
Some compat issues with VPNs can be addressed by updating the interface metrics so the vNIC for WSL is more preferred than the VPN interface. We document this https://learn.microsoft.com/en-us/windows/wsl/troubleshooting, see the sections "WSL has no network connectivity once connected to a VPN" and "Cisco Anyconnect VPN issues with WSL in NAT mode".

The solution worked for me is(I do not use Hyper-V, Maybe you could do other way around if you use Hyper-V):

Turn on Hyper-V from the Windows Features
Restart
Turn off Hyper-V from the Windows Features
Restart

Turning on Hyper-V does some magic :P I had to do the same after installing updates too.

This has just occurred for me after months of this being not happening:

After recovery from hibernate on a different Wi-Fi network, in cmd.exe I can ping google.com
in existing WSLv1 session and on new WSLv1 session, DNS lookups stopped working: Temporary failure in name resolution, ping of goolge by IP still works

@vadimkantorov It's DNS issue. You need to explore about "fixing DNS issue on WSL".

I checked https://github.com/MicrosoftDocs/WSL/blob/main/WSL/troubleshooting.md#troubleshooting-dns-in-wsl. I don't think my situation is described there, but I don't have time/skills for a deeper investigation.
I just thought that the nslookup crash and stack trace is interesting, I don't think I saw it in this discussion, so I hope it's helpful for further people reporting. Might be it's a different flavor of DNS problems issues

@vadimkantorov try this: https://github.com/microsoft/WSL/issues/7141#issuecomment-1092965552

the second command probably should use >> to append instead of rewriting >
chattr failed: chattr: Operation not supported while reading flags on /etc/resolv.conf

I highly recommend doing this step #4 if you are using NAT and having DNS issues:

The HNS Firewall rule to allow the DNS packets to shared access can become invalid, referencing a previous WSL interface identifier. This is a flaw within HNS which has been fixed with the latest Windows 11 release. On earlier releases, if this occurs, it’s not easily discoverable, but it has a simple work around:

Stop WSL
wsl.exe –shutdown
Delete the old HNS Firewall rule. This Powershell command should work in most cases: 1.Get-NetFirewallRule -Name "HNS*" | Get-NetFirewallPortFilter | where Protocol -eq UDP | where LocalPort -eq 53 | Remove-NetFirewallRule
Remove all HNS endpoints
Note: if HNS is used to manage other containers, such as MDAG or Windows Sandbox, those should also be stopped.
hnsdiag.exe delete all
Reboot or restart the HNS service
When WSL is restarted, HNS will create new Firewall rules, correctly targeting the WSL interface.

I got it working by not using ethernet adapter and using wifi adapter. It was mentioned in one of these billion Issues logged on the subject, but I couldn't get it working the first time I tried. I uninstalled all the virtualization features & wsl. I then installed only Hyper-V. Created my wifi v switch and made sure it was working. (Here, I also tried creating an ethernet v switch, but it would not connect: Unidentified network. I wish I had a different ethernet card to plug in and test. I think the problem is tied to the ethernet card in use or it's driver.) Then I installed Sandbox & WSL + Ubuntu. Now it is all working. Not correctly.  I don't want to use wifi for this, and prefer to have my wifi disabled on the computer. The ethernet adapter on the other computer sitting next to me works just fine, out of the box. Why not this one?

I know this thread is a few years old.  Was there a fix determined for this issue?  I am having the exact same issue with the same board series, ROG Strix Z690-E Gaming motherboard on Windows 11.  The z690 onboard LAN will not connect to my cisco catalyst ws-c3550.  But I have four other intel chipset motherboards (z670 prime, z170, h81 & z68) that have no problem connecting.


Too many interfaces?

Hi Matthias!
I'd first like to thank you for this nice library, it's very well done!
However, we feel that there are too much mandatory interfaces to comply with, and that couples our commands and command handlers to your implementation. Let me show that with an example. This is a Command and a Command Handler example, we wrote this classes before choosing a command bus implementation (maybe we would write our own)
final class SignUpUser
{
    private $email;

    public function __construct($email)
    {
        $this->email = $email;
    }

    public function email()
    {
        return $this->email;
    }
}

final class SignUpUserHandler
{
    private $userRepository;

    public function __construct(UserRepository $userRepository)
    {
        $this->userRepository = $userRepository;
    }

    public function handle(SignUpUser $command)
    {
        $user = new User($command->email());

        $this->userRepository->register($user);
    }
}

Now we go on the quest to find a command bus implementation that is nice and provides fancy middleware (Doctrine) and integrates with Symfony. We find yours which seems nice but unfortunately we have to implement some interfaces that force us to modify example.
final class SignUpUser implements Command
{
    private $email;

    public function __construct($email)
    {
        $this->email = $email;
    }

    public function email()
    {
        return $this->email;
    }
}

final class SignUpUserHandler implements MessageHandler
{
    private $userRepository;

    public function __construct(UserRepository $userRepository)
    {
        $this->userRepository = $userRepository;
    }

    public function handle(Message $message)
    {
        $user = new User($message->email());

        $this->userRepository->register($user);
    }
}

As you can see we are now tightly coupled to the command bus implementation and we have lost valuable expressiveness having to type hint on Message instead of our SignUpUser.
So my question is: why are these interfaces needed? If we agree that we are going to pass something (a Command) to some class (a Command Handler) that has the handle method we can get rid of the interfaces and everything just works with less coupling. Tactician works like this and I feel that it's a better approach (well, they have an Inflector service if you don't want the method in your Command Handlers be called handle, but no interfaces in the Commands nor Command Handlers) even I prefear the combined Event/Command approach of this package.
Thanks!!

This is essentially what I was getting at with https://github.com/SimpleBus/CommandBus/pull/2 :)
Also, for reference here is the discussion around this on tactician: https://github.com/thephpleague/tactician/issues/43

Ah! I should have checked the closed issues too, thanks ;)

That was in the old CommandBus repo, that's why I didn't find the issue before. Well, hope @matthiasnoback can reconsiderate this in light of the Tactician discussion :)

I actually discussed this with @rosstuck yesterday and I totally agree. In fact, I'm already testing this approach for a new major release of SimpleBus/MessageBus.

That would be awesome! It would be great if you could open a branch to test and give feedback

I will do that soon.

Also, can't wait for that! :)

Good to know you're awaiting these changes!
I'm working in the decoupling branch right now: https://github.com/SimpleBus/MessageBus/tree/decoupling There are some things that I'd like to tackle first, but this will be a new major version and that means quite some changes to the other libraries as well. So you may have to wait for a bit longer ;)

@matthiasnoback Looks great! Would it be an option to make the handle/notify methods configurable too? That way I can have 1 subscriber that listens to multiple different events, something like:
class LogSubscriber
{
    public function notifyUserCreated($event);
    public function notifyUserUpdated($event);
    public function notifyUserDeleted($event);
}

<service id="user_subscriber" class="UserSubscriber">
  <tag name="event_subscriber" subscribes_to="UserCreatedEvent" method="notifyUserCreated" />
  <tag name="event_subscriber" subscribes_to="UserUpdatedEvent" method="notifyUserUpdated" />
  <tag name="event_subscriber" subscribes_to="UserDeletedEvent" method="notifyUserDeleted" />
</service>

@ruudk I had your request in mind when I was working on this ;) And yes, what you describe is already the case in this library. The next step will be to update the SymfonyBridge to reflect these changes.

Looks great, I would say it's even simpler now :)

@acasademont True, much simpler, I'm happy that this is changing now.

My only suggestion would be that if no method name is provided in the callable map a default name handle is used so the handlers array stays BC, one less thing to change from 2.0 to 3.0.
$commandHandlersByCommandName = [
    'Fully\Qualified\Class\Name\Of\Command' => 'command_handler_service_id'
];

would call the method handle on the given service
If you want full customization of the handler method you can use the new syntax
$commandHandlersByCommandName = [
    'Fully\Qualified\Class\Name\Of\Command' => ['command_handler_service_id', 'anotherMethodName']
];

@acasademont :+1:

Yes, I was considering that, but I still like to remove the interface in that case - So I could just add an extra case like if (method_exists($callable, 'handle')) { return [$callable, 'handle']; }

Yeah, that would be great

Cool, I will add it.

Hi all, as you may have seen already, this has been fixed in the new major release of the SimpleBus packages :) Handlers/subscribers can be any callable now. No need to implement the interfaces (which have been removed by the way ;)).

Thank you very much! I'm going to test this now. :)


Bump fluentbit version, change to ubi7/ubi base image

Which issue this PR addresses:
Ev2 cannot build the fluentbit image with base image rhel7
What this PR does / why we need it:
Switch our fluentbit image from rhel7 base to ubi7/ubi base.
Bump fluentbit version to 1.7.8-1
Test plan for issue:
Manually verified on development cluster.
Is there any documentation that needs to be updated for this PR?
Yes, we need documentation on how we manage fluentbit images.  Current process is a manual release.  That means once this is approved the new image needs to be pushed, ideally before merged, else cluster logging stacks will be broken.  I have added "hold" label.  If merged early it would break only INT, so blast radius is small.

Pushed this version of fluentbit image to INT ACR for E2E to pick up.
/azp run E2E

Onebranch isn't able to build this.  After current E2E run is complete I will change the base image to ubi7/ubi-minimal to align w/ what is done in Dockerfile.aro-multistage which we know works.  If that still fails we'll dig deeper.

New version of the 1.7.8-1 image is pushed for E2E to pickup.

Build works with ubi-minimal on Onebranch, we're good to merge when E2E completes and this is approved.

Flake on redeploy, may need to look at bumping timeout more.  Portal activity logs indicate this took 4 min 34 seconds from when accepted, but our timeout is 10 min.  So it took longer for it to be available via API for our E2E client.

/azp run E2E

Holding still to get to public cloud production ACR first.

Removed hold, image is pushed to production.  Ready to merge.


edl: init at unstable-2022-09-07

Description of changes
This adds edl, a tool for interfacing with the low-level flashing and recovery interface embedded in the Boot ROM of a lot of Qualcomm SoCs.
An unreleased version is used as the last released version is very old and does not properly install itself.
I have successfully tested this for dumping and restoring an MSM8916-based device.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@onny ping

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1945


add setter for UTCDateBox.dateFormat

I'll build a new release with this change in the next day or two.


Realize linear and logistic regression.

Sklearn logistic regression predict only scalar values. We can find new library but we do not have enough time for this.


Basic Auth for Elasticsearch

Changes:

Added basic auth for Elasticsearch.
Included RRE in quickstart.sh script.

PR looks good....  Here's an idea however...   Should we have username/passwords be modeled on a real Chorus Business?
is the elastic:ElasticRocks a behind the scene service account, or would a real user use those credentials?   If it's a real user, then admin chorus_admin:password?

The elastic user is used to interact with elasticsearch:

create an index including the mapping
indexing data
querying the index
...

The intention of the elastic user is not that it is used by a "real" user.
How about this: We add a second user (chorus_admin:password) which we mention as the one a human can use to explore the index, access Kibana, etc.?

@epugh I updated the basic auth setup. Can you review the changes and see if everything is in place?


Automatically detect "bad" PV data

Some automatic checks for each PV system's PV power timeseries:

Does it produce PV power at night?
Does PV power roughly correlate with NWP irradiance (or, maybe even better: does PV power correlate with PVLib's estimate of PV power, produced from NWP irradiance & temperature)?

Maybe compute correlation on a week-by-week basis. Because sometimes a PV system might produce dud data for a short period, and we should throw away that dud period, not the entire PV system's data.

Are there any crazy high peaks? If so, does the data look sensible again if we throw away, say, the top 0.1% of values?

This is an issue I also found when looking at a subset of the PV readings. I just eyeballed them, which was pretty quick for seven systems but would be harder for ~1300.

I compared the PV readings against other ones nearby. Maybe comparing yield with other systems nearby might be helpful (but I guess they might have different angles/positions etc).

Another potential idea: what about comparing yield with other systems nearby

That is an interesting idea. I guess one challenge is: what happens in the worst case when all the "near neighbours" are bad? Then the PV system currently under consideration might be thrown away because it doesn't look like its bad neighbours :slightly_smiling_face:
To start with, we probably just want to throw away the "really obviously bad" data :slightly_smiling_face:  Like PV systems which report zero power for an entire week. Or PV systems which always report 1 kW, even at night :slightly_smiling_face: Stuff like that :slightly_smiling_face:


feat: add defineConfig function in dts-cli/config

add defineConfig function that can be used from dts.config.ts or
dts.config.js in order to provide IntelliSense for configuration
options.
move configuration loading logic into getDtsConfig and
getNormalizedDtsConfig in src/createBuildConfigs.ts.
getDtsConfig loads the appropriate dts.config.* file.
getNormalizedDtsConfig normalizes the loaded configuration by
providing default values for the otherwise nullable values in DtsConfig.
this setup would allow for easy use of babel-node if so desired
to allow the use of import statements in dts.config.js.

the easiest way I can see is to just export:
export function defineConfig(opts: DtsOptions){
  return opts;
}

thoughts?

It should be available to be used as both
import { defineConfig } from "dts-cli/config";

and
import { defineConfig } from "dts-cli";

with the current implementation.

but what's the benefit?  Generally, it's no good to have multiple ways to do one thing.


Fixes #6121

Fixes #6121

Indeed, the main linprog page says minimize, http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linprog.html
The method-specific page probably should only have the Options section in order to avoid duplication.


Integrate with Web Audio

Proposal:
partial interface AudioContext {
  attribute MediaSession? session;
}

As far as possible, AudioContext and HTMLMediaElement should integrate with MediaSession in the same way. An important difference is that new AudioContext() creates an audio context which is already playing (silence), so it would be like connecting a playing media element to a session, which we haven't wanted to do.

Additionally, in the media session algorithms (starting here in the spec) we would additionally handle 'active participating AudioContext objects' of a media session wherever we currently handle existing 'active participating media elements'.

@richtr I think it would be better to introduce some concept like "audio producer" and say that media elements and audio contexts both have an audio producer. Maybe eventually audio producer gets defined in terms of web audio, e.g. as an audio worker.

Great idea @domenic!
So I will work on replacing 'participating media elements' with a generic like 'participating audio producers'.

The net effect of this would be to isolate the interface points between media session and media elements/audio contexts down to just a single section in the spec, instead of spreading it throughout.

I will then work on defining interaction of media sessions with audio producers in separate algorithms (e.g. 'pause an audio producer', 'unpause an audio producer', 'duck an audio producer', 'unduck an audio producer', etc).
Right now those algorithms will probably treat AudioContext and HTMLMediaElement objects separately (e.g. 'For each AudioContext-based audio producer...suspend() the audio context', 'For each HTMLMediaElement-based audio producer...pause() the media element', etc). We could then eventually replace those algorithms with something based on AudioWorker or whatever our unified 'audio producer' ends up being.
Does this sound good?

That does sound pretty good!
For clarity I think it would make sense to try to isolate the AudioContext and HTMLMediaElement stuff to their own sections. So instead of defining "to duck an audio producer... if it's AudioContext-based, do X; if it's HTMLMediaElement-based, do Y", you'd say stuff like:
Audio producers are an abstract concept representing audio production blah blah. They have a number of operations:

...
Ducking, which conceptually means lowering the volume to get out of the way
...

We currently define two audio producers, which implement these procedures in their own idiosyncratic ways. In the future we could maybe unify blah blah.
Then later you'd have a section for "The AudioContext audio producer" which says something like:
An AudioContext is a type of audio producer. It implements the audio producer operations as follows:

To duck an AudioContext, do blah blah...

An important difference is that new AudioContext() creates an audio context which is already playing (silence), so it would be like connecting a playing media element to a session, which we haven't wanted to do.

It may make sense to disallow web developers from assigning a media session to an audio context unless its 'active' attribute is 'suspended'. Or let web developers somehow initiate an AudioContext object that is born 'suspended'.
Something like the following could work:
// Audio Context

var ctx = new AudioContext(); // Go!! (with no media session)

ctx.session = session; // will throw an exception because ctx.state !== "suspended"

ctx.suspend().then(() => {
  ctx.session = session; // will now work because ctx.state === "suspended"

  // ... optionally, load data ready for our AudioContext to start

  return ctx.resume(); // Go!! (with a media session)
}).then(() => {
  console.log("ctx now belongs to an active media session");
});

The good thing about that is that an AudioContext object will only then grab audio focus when .resume() is called. It will also allow us to make the way media sessions work on AudioContext and HTMLMediaElement identical. Here's how the same thing will look for HTMLMediaElement:
// HTMLMediaElement

var el = document.createElement('audio');
el.play(); // Go!! (with no media session)

el.addEventListener('playing', () => {
  el.session = session; // will throw an exception because el.paused === false

  el.pause();

  el.addEventListener('pause', () => {
    el.session = session; // will now work because el.paused === true
    el.play(); // Go!! (with a media session)
  }, false);
}, false);

tl;dr You cannot assign a MediaSession to an AudioContext object when its active attribute is not suspended. Also, you cannot assign a MediaSession to an HTMLMediaElement object when its paused attribute is false.

I think the implicit activation makes more sense for HTMLMediaElement than AudioContext. It's a bit odd to have to create an audio context, suspend it, assign a media session, and then resume it. A model where an audio context has a single media session over its entire lifetime seems simpler. (Doesn't work as well a media element because it can play multiple resources during its lifetime, it's wrapping an underlying player that's created and destroyed, which is the object which ought to have a single session over its lifetime.)
This is related to a proposal about exposing MediaSession.activate() that we've been discussing in the office, and I'll create a separate issue for that.

Let's try to keep Web Audio discussion in this issue, but in https://github.com/whatwg/mediasession/issues/50 I've proposed a change that I believe would make things slightly simpler for Web Audio.

It seems that we agree that the AudioContext should have a session attribute. Could we reflect that in the specification? We are currently sending the signal that WebAudio is a second class citizen in this specification.

I'm going to add something similar to https://github.com/whatwg/mediasession/issues/48#issuecomment-111029744 to the specification this week minus the throwing of exceptions if an AudioContext object is in the 'wrong' state (e.g. 'running').
The main difference from https://github.com/whatwg/mediasession/issues/48#issuecomment-111029744  then is that the web developer does not need to manually suspend() an AudioContext object before assigning a MediaSession object to it as that will be done internally according to the spec algorithms. i.e. we will not throw an exception if an AudioContext object is 'running' when we assign it to a new MediaSession object, instead we will suspend it.
When a new MediaSession object is attached as AudioContext object's session then it can be activated by calling resume() at any later point on the AudioContext object.
Here's an example:
// Web Audio

var ctx = new AudioContext(); // Go!! (with no media session)

// ctx.state === "running"

ctx.session = new MediaSession("content");

// ctx.state === "suspended"

ctx.resume(); // Go!! (with a media session & activate that media session)

// ctx.state === "running"

This matches the current specification logic for attaching a new MediaSession object to a currently playing HTMLMediaElement object via its session attribute (i.e. a HTMLMediaElement object is paused when its session is changed) and also reflects nascent implementation experience in Webkit: https://github.com/whatwg/mediasession/issues/48#issuecomment-111029744.

Added in https://github.com/whatwg/mediasession/commit/e62c0d5e5a613e86bc9080a4bb985ec08a698049.