Support yaml front matter in mermaid blocks

Mermaid diagrams can start with yaml front matter, e.g.
---
title: Example Diagram
---
graph LR
  A --> B

Relearn injects an init directive
%%{init: {"theme":"default"}}%% at the top of a mermaid block to support theming the mermaid diagram. However this will cause a syntax parser error in mermaid if the init directive comes before the yaml front matter.
Valid:
%%{init: {"theme":"default"}}%%
graph LR
    A --> B

Invalid:
%%{init: {"theme":"default"}}%%
---
title: Example
---
graph LR
    A --> B

To support yaml front matter, we detect if front matter is used, and inject the init directive after the front matter.
---
title: Example
---
%%{init: {"theme":"default"}}%%
graph LR
    A --> B

I've had to significantly change the implementation to support theme switching. Basically the location of your bugfix was wrong in serializeGraph as you need to separate the components in parseGraph and then only change the assembling.


Accuracy degradation with approx and noisy data.

https://discuss.xgboost.ai/t/xgboost-1-7-fits-much-worse-than-1-5-on-noisy-data-with-reproducible-experiment/3108
Related:
https://github.com/jpmml/jpmml-sparkml/issues/128

Some of the default parameters were changed over the course of multiple releases. Including max_bin and some subtle parameters in sketching. I can reduce the logloss to something similar to 1.5 by using a smaller number of bins. (like 64)

Some of the default parameters were changed over the course of multiple releases. Including max_bin and some subtle parameters in sketching. I can reduce the logloss to something similar to 1.5 by using a smaller number of bins. (like 64)

Thanks for looking into this! When you matched the performance to 1.5, are they on the same hyperparameters, or did you have to do more parameter tuning than with 1.5..?

@r-luo Unfortunately, there's not a universally good parameter set. The max_bin is currently set to 256, and was set to 64 before. A smaller number of bins can help mitigate over-fitting, but also introduces the chance of under-fitting. I opened an issue only to track whether there's a bug in the implementation.
I guess the only thing we as maintainers of the project can do is to spend more time on https://github.com/dmlc/xgboost/issues/4986 .

@r-luo Unfortunately, there's not a universally good parameter set. The max_bin is currently set to 256, and was set to 64 before. A smaller number of bins can help mitigate over-fitting, but also introduces the chance of under-fitting. We usually benchmark with large datasets, as a result, the default parameter might favor over-fitting. I opened an issue only to track whether there's a bug in the implementation.
I guess the only thing we as maintainers of the project can do is to spend more time on #4986 .

That makes sense. I agree that there's not a universally good set of parameters for every problem. I'll do more experiment on my side to see if they are able to perform the same after extensive hyperparameter tuning. Would you mind pointing me to the parameters that affects sketching that you mentioned above? Are those accessible through training parameters?

Unfortunately, the parameters for sketching are hard coded. But for this specific case, the max_bin is most significant I think. The change in performance comes from this PR: https://github.com/dmlc/xgboost/pull/7214 .

Unfortunately, the parameters for sketching are hard coded. But for this specific case, the max_bin is most significant I think. The change in performance comes from this PR: #7214 .

Makes sense, thanks so much for looking into this issue!


[Question] Best Spanner client usage patterns?

Hey, we wanted to ask if we could get some guidance about some best practices for writing application code using the Spanner client.

In general, are Spanner JOINs performant or should they be used sparingly in practice? We're considering putting all of our data (which has a simple parent-child relationship) onto Spanner and then frequently running JOIN queries. Alternatively, we could separate our data and query from Spanner and other data sources, and then merge ResultSets on the application-side (basically avoiding a JOIN on Spanner but merging results on the application-side). Curious which approach you think would be better.

If we interleave tables (which co-locates rows of child tables with parent tables), does the overall query performance to either table degrade? I am curious if queries which do not need the interleaved relationship would slow down due to how the rows are co-located differently.

@dzou I'm not sure if I can make generalised recommendations here that will be really helpful. Answers would depend on your specific use case (patterns for data access, size/structure of data, etc), so if you are in touch with your account team, they would be able to help you best.
That said, for

Please go through Writing Efficient Queries for Joins and Join Types for understanding joins in Spanner better
Make sure that you are following Schema Design Best practices to avoid hotspots and have appropriate Parent Child Table relationships

Thanks, this helps. 👍


Handle bad responses

It looks like a service sent something back incorrectly? Here's the logs:
[2024-05-20 14:53:45,398: ERROR/root]: Error in getting futures back
[2024-05-20 14:53:45,413: ERROR/root]: Unexpected error 4: ['Traceback (most recent call last):\n', '  File "/Users/mwang/CoVar/translator/sri/testing/PerformanceTestRunner/PerformanceTestRunner/load_test.py", line 402, in stress_individual_agents\n    json_data= json.loads(stringv)\n', '  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads\n    return _default_decoder.decode(s)\n', '  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n', '  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode\n    raise JSONDecodeError("Expecting value", s, err.value) from None\n', 'json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n']
[2024-05-20 14:53:45,413: ERROR/root]: <traceback object at 0x105b04d80>

This also caused the rest of the services in the list to not get evaluated

changed to asyncio to handle these tasks in the updated code release


fix: german translation optimizations

Description
First of all, it's really awesome to now have language support in the admin! This makes Payload so much more accessible to 'non-tech' users!
I took the time to review the german translations and found some typos and inconsistencies. Please feel free to argue in favor or against.
Some elaborations:
Login & Logout
Although there are the derived words 'Einloggen' and 'Ausloggen' in German, the more correct translation is 'Anmelden' and 'Abmelden', which is also widely used by Google, Facebook, etc.
E-Mail-Adresse and other dashes
In German you often combine words that belong together with a dash. The correct translation for email address is 'E-Mail-Adresse'
Direct salutation form
In German there are two salutation forms, the formal and the direct. I've changed a few translations so it's always the direct salutation form (direct salutation is used mostly among friends & family, but most big tech companies use it as well because it feels more friendly).
Unpublish
There is no real translation for the word 'unpublish' which is why I opted for 'Auf Entwurf setzen', which means 'set to draft'.
Locales
Currently 'locale' and 'language' are both translated to 'Sprache'. I've changed it so 'locale' translates to 'Sprachumgebung' which basically means 'language environment', which is the best translation I could find to differentiate the two.
Globals & Collections
There aren't really good translations for these terms, since they are very 'techy' and don't make much sense outside of a coding environment. I've changed the translation of 'Globals' to 'Globale Dokumente', which means 'global documents', since there is no german word for a 'global'.
Adjectives & Placeholders
There may be still some problems regarding translation strings with placeholders in combination with adjectives, since in German the spelling of the adjective changes depending on the noun. I've tried my best to ship around this problem, but I guess in some places it is still an issue.
Example:
'add new block' -> 'Neuen Block hinzufügen'
'add new collection' -> 'Neue Sammlung hinzufügen'
I've changed it like this:
'add new block' -> 'Block neu hinzufügen'
'add new collection' -> 'Sammlung neu hinzufügen'

[x] I have read and understand the CONTRIBUTING.md document in this repository

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist:

[x] I have added tests that prove my fix is effective or that my feature works
[x] Existing test suite passes locally with my changes
[x] I have made corresponding changes to the documentation

Just adding a +1 here; all of these changes sound a lot more natural and less "machine translated" :+1:

@reiv  thanks, "erstellen" does seem like a more natural fit tbh.
So it would be "{{label}} erstellen" which basically means "create {{label}}"

Thanks @christian-reichart, much appreciated!


Document high level security concerns

This was discussed in a comms SIG and floated by the security SIG prior with thumbs ups.
Proposal:

Top-level node in the docs called Security
Index page is a general overview
Page on HTTP operations and, in particular, things like being wary of capturing PII and looking into any config settings you have to set with instrumentation
Page on the collector that, in particular, covers the redactionprocessor

Relevant slack thread: https://cloud-native.slack.com/archives/C05A85QC281/p1692283776729499

This should also include details on the approach to collector image security as that's something I hear a lot about.

There is a Security document in the collector repo, not sure if this belongs there or can be migrated into the docs:
https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md
cc @open-telemetry/collector-approvers

Some parts of this doc are for Collector end-users while others are for component developers. I think information for end-users makes sense to have under the OpenTelemetry docs, but information for component developers may be too niche

Splitting it into end-user material @ docs and keep the developer specific material in the repo makes sense to me. (and adding a back-reference from both documents to link them)


Export the grids

Step 1

[ ] add arrows to definition squares
[ ] being able to split definition squares
[ ] choose font for definitions
[ ] see on which format should we export: png svg pdf other ?
[ ] being able to enphasis the spaces in composed words

Step 2

[ ] export one grid
[ ] export a list of grids
[ ] select the format of the exported grid: A4, A5 etc.

Test with html2canvas to  see if we can make it quicly

https://excalidraw.com/#json=s302XAqNNfCPEAxpACI9f,d0qymUfiAOS_C6ZRrtI9Kw


Add option for setting original creation time when restoring files and folders

Output of restic version
restic 0.15.1 compiled with go1.19.5 on windows/amd64

What should restic do differently? Which functionality do you think we should add?
When restoring files and folders there should be the possibility to restore the original creation time.
What are you trying to do? What problem would this solve?
From my point of view metadata is also important when doing a complete data restore.
It would be great if there was an option to be able to restore the original file (and folder) creation time.
E. g. Robocopy can also include this metadata like Robocopy.exe ... /COPY:DT /DCOPY:T
Did restic help you today? Did it make you happy in any way?
restic is great!
Thank you for this great backup software.

@nullinger Have you reproduced this on Windows only or can you reproduce it on Mac/Linux as well?
I just tried restoring a file in an old snapshot, and I get the file's old creation date set by the restore:
% restic restore --target tmp --verify 3901cdc7
repository ba330420 opened (version 1)
restoring <Snapshot 3901cdc7 ...> to tmp
verifying files in tmp
finished verifying 2 files in tmp (took 0s)

% stat -x tmp/foo2/peepdf_0.3.zip
  File: "tmp/foo2/peepdf_0.3.zip"
  Size: 170213       FileType: Regular File
  Mode: (0644/-rw-r--r--)         Uid: (  502/  rawtaz)  Gid: (   20/   staff)
Device: 1,15   Inode: 6301790    Links: 1
Access: Mon May  3 18:01:05 2021
Modify: Mon May  3 18:01:05 2021
Change: Wed Mar 22 18:23:10 2023
 Birth: Mon May  3 18:01:05 2021

So for me, the original creation date and time are restored as expected - no options needed. This was using restic 0.15.1 on macOS Monterey.

@rawtaz Thank you for your reply.
Unfortunately I cannot test it on a Mac.
Test in Linux (Ubuntu 22.04):
$ stat source/test.txt
  Datei: source/test.txt
 Größe: 0               Blöcke: 0          EA Block: 4096   Normale leere Datei
Gerät: 802h/2050d       Inode: 658762      Verknüpfungen: 1
Zugriff: (0664/-rw-rw-r--)  Uid: ( 1000/     xx)   Gid: ( 1000/      xx)
Zugriff: 2023-03-23 13:38:58.730006128 +0100
Modifiziert: 2023-03-23 13:38:58.730006128 +0100
Geändert: 2023-03-23 13:38:58.730006128 +0100
Geburt: 2023-03-23 13:38:58.730006128 +0100
$ stat restore/source/test.txt
  Datei: restore/source/test.txt
 Größe: 0               Blöcke: 0          EA Block: 4096   Normale leere Datei
Gerät: 802h/2050d       Inode: 662891      Verknüpfungen: 1
Zugriff: (0664/-rw-rw-r--)  Uid: ( 1000/      xx)   Gid: ( 1000/      xx)
Zugriff: 2023-03-23 13:38:58.730006128 +0100
Modifiziert: 2023-03-23 13:38:58.730006128 +0100
Geändert: 2023-03-23 13:43:16.202311984 +0100
Geburt: 2023-03-23 13:43:16.202311984 +0100

It seems that the Birth times ("Geburt") are different.
But I am not sure if it is really the same problem as in Windows. I am not a Linux expert.

AFAIK it is not possible to set the birth time of a file on Linux. For Windows see #3622.

Thanks @MichaelEischer. I did not find that PR before.
I’ll close this issue.


Install llvm@4 from homebrew -> Install llvm release_40 from github/source

Change Description

Homebrew removed llvm@4, so we need to install it from the source as we do for Linux.
Consensus Changes

[ ] Consensus Changes

API Changes

[ ] API Changes

Documentation Additions

[ ] Documentation Additions

technically you can still install it from brew by referencing it like
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1d91e94e8ecdf6877ad2c24a7cda1114e50f2a14/Formula/llvm%404.rb
Not really sure that's worth doing

technically you can still install it from brew by referencing it like
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1d91e94e8ecdf6877ad2c24a7cda1114e50f2a14/Formula/llvm%404.rb
Not really sure that's worth doing

This is what I'm thinking:

We've seen this multiple times now from brew that it makes everyone uncomfortable.
Personally, I've advocated for code consistency between Linux and mac so things are easier to maintain; if we install from source for one, why not install from source for the other.

I'd like to use this as an opportunity to move darwin away from brew.

I'd like to use this as an opportunity to move darwin away from brew.

Indeed, as I've said multiple times I would prefer binaries that have all deps beyond the basics static linked so the user could just untar & run. For both linux & mac. Unfortunately gmp & libusb make this problematic because we can't static link them and our legal team does not want us distributing bundled binaries with them (which would be cheesy anyways).
I have private branches that remove the gmp & libusb deps (with some caveats) but I'm having trouble rallying enough support to take this further. I believe with low to medium effort we could take our pinned build script and massively simplify it such that a single script builds all deps and works anywhere... linux/mac/freebsd/mingw, whatever. (python, needed for some unittests, an exception here)
I actually may need to take that on anyways: our requirement for a hardened macos nodeos for "pass project" would prohibit linking to any unsigned libraries (like gmp, etc) as macos hardened runtime does not allow that.

can you cherry pick in 3b54f79 ?

I'd like to use this as an opportunity to move darwin away from brew.

Indeed, as I've said multiple times I would prefer binaries that have all deps beyond the basics static linked so the user could just untar & run. For both linux & mac. Unfortunately gmp & libusb make this problematic because we can't static link them and our legal team does not want us distributing bundled binaries with them (which would be cheesy anyways).
I have private branches that remove the gmp & libusb deps (with some caveats) but I'm having trouble rallying enough support to take this further. I believe with low to medium effort we could take our pinned build script and massively simplify it such that a single script builds all deps and works anywhere... linux/mac/freebsd/mingw, whatever. (python, needed for some unittests, an exception here)
I actually may need to take that on anyways: our requirement for a hardened macos nodeos for "pass project" would prohibit linking to any unsigned libraries (like gmp, etc) as macos hardened runtime does not allow that.

Apologies, I meant move LLVM away from brew.

can you cherry pick in 3b54f79 ?

Sure, I'll handle that first thing tomorrow

I tested the build script for each distro and it works: https://buildkite.com/EOSIO/eosio-scripts/builds/6

Tested the build scripts on each distro and it seems to work: https://buildkite.com/EOSIO/eosio-scripts/builds/8


Add support to control pytest test, verbosity and coverage

Type of changes

[ ] Bug fix
[X] New feature
[ ] Documentation / docstrings
[ ] Tests
[ ] Other

Checklist

[X] I've run the latest black with default args on new code.
[] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate. --> I've added it in earlier PR
[] I've added tests for new code. --> Infra change. No need for added tests
[X] I accept that @willmcgugan may be pedantic in the code review.

Description
Added ability to control which tests are executed (all by default), in what verbosity level to run (-vv by default), and whether to run code coverage (run coverage by default) when running make test.
Example:
$ make test VERBOSE=1 COVERAGE=0 TEST_KW=test_highlight_iso8601_regex

Doesn't seem like much of an improvement over copying the command. And it's not very discoverable. Thanks anyway.


Use Kubernetes annotations to configure kubernetes_sd

I propose that we take advantages of kubernetes annotations to configure scraping per pod/service:
---
apiVersion: v1
kind: DeploymentConfig
metadata:
  name: foo
  labels:
    app: foo
spec:
  replicas: 1
  template:
    metadata:
      annotations:
        prometheus.io/path: '/metrics'
      labels:
        app: foo
    spec:
      containers:
      - name: foo
        image: foo:latest
        ports:
        - containerPort: 8080

Pod annotations are provided as meta labels on discovered pod targets.
So this is something you should be able to do via relabeling configurations as it is today.

You need to know the path before you scrape

Yes, you can relabel onto the __metrics_path__ label to use the value
provided in the annotation. (
https://prometheus.io/docs/operating/configuration/#relabel_config)
On Fri, Jul 28, 2017 at 2:03 PM Julien Pivotto<EMAIL_ADDRESS>wrote:

You need to know the path before you scrape
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/prometheus/prometheus/issues/2989#issuecomment-318634706,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEuA8nNZpK92f5xy_E-jdx3dsvGFSAjQks5sSc4qgaJpZM4Oiawd
.

This is already included in the example configuration so there is nothing to do here.


WIP: Feature/avbsf

No really sure how to do error handling for send and receive packet. I know the FFI functions return i32 but I'm not sure how to make that a useful error in rsmpeg other than AVError(i32).

You can refer the implementation of AVCodecContext.

Ok. I think we're in a pretty good spot. Let me know if you see anything else you want me to change.

Awesome, thanks for the contribution!.


Pages version & Reorganize are out of modal "overflow"

pages version -> finish button is out of modal :

also for reorganize modal:

.apos-ui.apos-modal .apos-modal-header .apos-modal-controls {
position: relative;
vertical-align: top;
display: inline-block;
/*max-width: 40%;*/
float: right;
white-space: nowrap;
text-align: right;
}

This was resolved 4cf877ff43ad62ef5ad03efecb0acc444309e377. Thanks!


Question: Is this project still maintained

Is this project still maintained?
Or is it considered complete / abandoned?
I can see opened PRs and issues, but no recent commits.
Does it mean that if the current state is not enough for someone, they should look for a fork / alternative rather than wait for the update?

yep


Does not work in IE11 with Array.prototype.findIndex polyfill defined

It does not work in IE11 if Array.prototype.findIndex polyfill defined.
http://plnkr.co/edit/H4HTjvp80WEefqUPzpmG?p=preview
Fx -- OK
IE11 -- error
TypeError: Unable to get property '' of undefined or null reference
at $scope._isHidden (angular-multi-select.js:538:5)
Comment out Array.prototype.findIndex polyfill in app.js and it will works fine in IE11 as well.

I'm currently working on v6, which will hopefully fix tons of possible bugs and greatly improve performance. Can this wait for a few days until I finish v6?

Thanks for your answer.
I'll wait for a few days.

I just merged v6. Docs are still missing, but you can check the specs, those are very nice (until I finish the docs).


Method Baum\Console\InstallCommand::handle() does not exist

problem here for Laravel 5.5

The same Problem for me


test: add wait=complete to navigation to try to mitigate flakiness

Fixed: #1428

===================== 50 passed, 1050 deselected in 14.27s =====================
✅ Ran 2 scripts and skipped 2 in 15.5s.
^Cnpm run e2e --watch -- tests/network/test_{continue,fail}_request.py -vv -s -  3.12s user 2.48s system 27% cpu 20.017 total
tperrotta@tperrotta-macbookpro ~/Projects/chromium-bidi (git)-[1428-flaky-fail-request]
% npm run e2e --watch -- tests/network/test_{continue,fail}_request.py -vv -s -k test_fail_request_completes_new_request_still_blocks --flake-finder


feature: fish.txt added.

feature: fish.txt added for our git tutorial.

I think that this text file is ok. I agree with this approach.


use-latest-versions ignores dependencies with versions defined as properties

If you have <dependency>                 <groupId>a.b.c.d</groupId>                 <artifactId>e</artifactId>                 <version>${e.version}</version>             </dependency>
it will be completely ignored by the command

I could observe a different behavior. The goal use-latest-version overwrite the version that use a property.
Example:
pom.xml snippet:
    <properties>
        <java.version>11</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring-boot.version>2.1.3.RELEASE</spring-boot.version>
    </properties>

<dependencyManagement>
        <dependencies>
            <dependency>
                <!-- Import dependency management from Spring Boot -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>2.1.6.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot.version}</version>
                </plugin>
           </plugins>
        </pluginManagement>

Running mvn versions:use-latest-versions results in:
[INFO] --- versions-maven-plugin:2.7:use-latest-versions (default-cli) @ demo-app ---
[INFO] Major version changes allowed
[INFO] Updated org.springframework.boot:spring-boot-dependencies:pom:${spring-boot.version} to version 2.1.6.RELEASE
[INFO] Major version changes allowed

My expectation is that either the goal ignores versions with properties or it updates the property.

Ran into the same issue as @sparsick above, created a fix for it, and am already using it locally with much success. See the pull-request for the fix.


Consider consensus peak overlap procedure

During consensus peak calling, consider using the method from Corces et al. (doi:10.1126/science.aav1898) to handle overlapping peaks, rather than bedtools merge. From pg. 7 of the supplement:

Check this

@kelly-sovacool we can call these "corces.consensus" peaks and have them output when we have replicates. .. what is your opinion?


Bits and pieces: bug fixes.

Sorry for the two false pull request (open/close).
This is a real one.

This change is

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

Comments from Reviewable


fix variable name when add in init function

i am debugging a variable naming issue that i found out when upgrading from v3.0.1 -> v3.3.3. the situation i observed is that the variable name random "restarts" in nested layers and i am able to root cause to https://github.com/keras-team/keras/commit/b53b4d being the culprit when keras is trying to fix another naming issue for lora.
with the ability to cache _parent_path on the first name_scope open with current_path(), the _parent_path will be set to empty string when self.add_weight() is being called in init function since the scope name stack will always be empty when construct layers. then, during build, since _parent_path is being set to an empty string resulted name will only contain the immediate layer name and thus causing the variable name to restart.
here is a snippet that explains what the current behavior and what's the ideal behavior:
import keras

class A(keras.layers.Layer):

    def __init__(self):
        super().__init__()
        self.b = B()
        self.c = C()

    def call(self, input):
        return self.c(self.b(input))

class B(keras.layers.Layer):
    def __init__(self):
        super().__init__()
        self.c = C()
        self.var_b = self.add_weight(
            shape=(1, ),
            name="var_b",
        )

    def call(self, input):
        return self.c(input) + self.var_b

class C(keras.layers.Layer):
    def __init__(self):
        super().__init__()
        self.var_c = self.add_weight(
            shape=(1, ),
            name="var_c",
        )
        self.dense = keras.layers.Dense(units=5)

    def call(self, input):
        return self.dense(input + self.var_c)

input = keras.Input(shape=(10, ), batch_size=8)

output = A()(input)
model = keras.Model(input, output)
print("Model A")
for var in model.variables:
    print(var)

above snippet will return
Model A
<KerasVariable shape=(1,), dtype=float32, path=b/var_b>
<KerasVariable shape=(1,), dtype=float32, path=c/var_c>
<KerasVariable shape=(10, 5), dtype=float32, path=c/dense/kernel>
<KerasVariable shape=(5,), dtype=float32, path=c/dense/bias>
<KerasVariable shape=(1,), dtype=float32, path=c_1/var_c>
<KerasVariable shape=(5, 5), dtype=float32, path=c_1/dense_1/kernel>
<KerasVariable shape=(5,), dtype=float32, path=c_1/dense_1/bias>

but the expectation would be a/b/c/dense/kernel, a/b/c/dense/bias, a/c_1/dense_1/kernel, a/c_1/dense_1/bias instead of missing a/b in the name path.
changing above snippet to creating variables in build matches the expectation. snippet:
class Ap(keras.layers.Layer):

    def __init__(self):
        super().__init__()
        self.b = Bp()
        self.c = Cp()

    def call(self, input):
        return self.c(self.b(input))

class Bp(keras.layers.Layer):
    def __init__(self):
        super().__init__()
        self.c = Cp()

    def build(self, _):
        self.var_b = self.add_weight(
            shape=(1, ),
            name="var_b",
        )

    def call(self, input):
        return self.c(input) + self.var_b

class Cp(keras.layers.Layer):
    def __init__(self):
        super().__init__()
        self.dense = keras.layers.Dense(units=5)

    def build(self, _):
        self.var_c = self.add_weight(
            shape=(1, ),
            name="var_c",
        )

    def call(self, input):
        return self.dense(input + self.var_c)

input = keras.Input(shape=(10, ), batch_size=8)
print("Model Ap")
output = Ap()(input)
model = keras.Model(input, output)
for var in model.variables:
    print(var)

output:
Model Ap
<KerasVariable shape=(1,), dtype=float32, path=ap/bp/var_b>
<KerasVariable shape=(1,), dtype=float32, path=ap/bp/cp/var_c>
<KerasVariable shape=(10, 5), dtype=float32, path=ap/bp/cp/dense/kernel>
<KerasVariable shape=(5,), dtype=float32, path=ap/bp/cp/dense/bias>
<KerasVariable shape=(1,), dtype=float32, path=ap/cp_1/var_c>
<KerasVariable shape=(5, 5), dtype=float32, path=ap/cp_1/dense_1/kernel>
<KerasVariable shape=(5,), dtype=float32, path=ap/cp_1/dense_1/bias>

there are two options to sort of solving the issue:

stop allowing add_weight in init function. but i think this would be a disruptive changes that could potentially break many existing code?
take a compromise where all variables add in init function will result in layer/var and variables add in build will result in parent_layer/layer/var and document the behavior. this option will still support the lora use case and still allow add_weight to be called in init function.

current pr implements option 2.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 56.95%. Comparing base (11be99a) to head (e3cf704).

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #19853       +/-   ##
===========================================
- Coverage   78.83%   56.95%   -21.88%
===========================================
  Files         498      498
  Lines       45864    45864
  Branches     8450     8450
===========================================
- Hits        36159    26124    -10035
- Misses       7999    18135    +10136
+ Partials     1706     1605      -101

Flag
Coverage Δ

keras
56.95% <100.00%> (-21.74%)
:arrow_down:

keras-jax
?

keras-numpy
56.95% <100.00%> (+<0.01%)
:arrow_up:

keras-tensorflow
?

keras-torch
?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Thanks for bringing this up! I took a look at the issue as well.

stop allowing add_weight in init function

This is definitely not an option since this pattern is fairly widely used.

take a compromise where all variables add in init function will result in layer/var and variables add in build will result in parent_layer/layer/var and document the behavior

I tried to find a more general solution, but it's not clear that it exists. So this is likely our best compromise for now.


Update projects.js

add fix for new github username

⚠Repository will be replaced with a new portfolio in the near future

This PR is valid and will be merged into the currently active branch (new).


Migrate express and AbstractRepresentation type from QuantumSymbolics

https://github.com/QuantumSavory/QuantumSymbolics.jl/issues/92

Just a note: I moved
express(obj) = express(obj, QuantumOpticsRepr()) # The default representation

to here from QuantumSymbolics to avoid type piracy in QuantumSymbolics. This isn't urgent whatsoever, but I wonder how beneficial it is to have a default representation for express, given that the ecosystem of packages supported by QuantumInterface is growing. This might be a bad comparison, but it's kind of like if DifferentiationInterface were to make its default backend AutoForwardDiff because ForwardDiff.jl has been around a long time and is used by a lot of people. Those things are true and ForwardDiff.jl is quite a handy package, but there's a ton of other autodiff packages that someone might rather use instead. I think the same could be said here. It probably would be a clearer translation interface if the user always has to explicitly define what backend they want to plug into. Of course, this would be a breaking change, but I thought I should put that thought out there.

@Krastanov


Snapshot should be able to run with an xcTestRun and without defining project path

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description

Command executed
I first generate derived data with the following command:
fastlane scan --project "MetricsSample.xcodeproj" --scheme "MetricsSampleUITests" --derived_data_path "~/Desktop/sample_derived_data" --build_for_testing true --device "iPhone 11 Pro Max"

That produces a derived data directory with everything necessary to run snapshots.
If I run from outsider the project directory
fastlane snapshot --scheme "MetricsSampleUITests" --derived_data_path "~/Desktop/sample_derived_data" --test_without_building true --device "iPhone 11 Pro Max"

I get the following error: Couldn't automatically detect the project file, please provide a path:
Fastlane scan provides the ability to pass in simply an xctestrun file (generated from my previous build step) without reference to the project itself i.e.:
fastlane scan -X "~/Desktop/sample_derived_data/Build/Products/MetricsSampleUITests_iphonesimulator14.4-x86_64.xctestrun"

I should have the ability to pass in an xctestrun file to fastlane snapshot --xctestrun "path/to/file.xctestrun" and not have any reference  to the project itself.  This works by following the options that scan uses.... i.e.
options += project_path_array unless config[:xctestrun]

It requires a few other changes but I have it working locally and would love to submit a PR for this small feature.
This eliminates the need to have the project checked out on CI machines since you can simply share the xctestrun file and derived data path and speeds up the process for taking screenshots.
Complete output when running fastlane, including the stack trace and command used

Couldn't automatically detect the project file, please provide a path:

Environment

✅ fastlane environment ✅
Stack

Key
Value

OS
11.2.2

Ruby
2.6.5

Bundler?
false

Git
git version 2.24.3 (Apple Git-128)

Installation Source
/usr/local/lib/ruby/gems/2.6.0/bin/fastlane

Host
macOS 11.2.2 (20D80)

Ruby Lib Dir
/usr/local/Cellar/ruby/2.6.5/lib

OpenSSL Version
OpenSSL 1.1.1d  10 Sep 2019

Is contained
false

Is homebrew
false

Is installed via Fabric.app
false

Xcode Path
/Applications/Xcode12_4.app/Contents/Developer/

Xcode Version
12.4

System Locale

Variable
Value

LANG
en_US.UTF-8
✅

LC_ALL
en_US.UTF-8
✅

LANGUAGE

fastlane files:
No Fastfile found
No Appfile found
fastlane gems

Gem
Version
Update-Status

fastlane
2.183.0
✅ Up-To-Date

Loaded fastlane plugins:
No plugins Loaded
Loaded gems

Gem
Version

did_you_mean
1.3.0

rouge
2.0.7

xcpretty
0.3.0

terminal-notifier
2.0.0

terminal-table
1.8.0

multipart-post
2.0.0

word_wrap
1.0.0

artifactory
3.0.15

colored
1.2

highline
2.0.3

commander
4.6.0

faraday_middleware
1.0.0

gh_inspector
1.1.3

rubyzip
2.3.0

security
0.1.3

retriable
3.1.2

httpclient
2.8.3

google-apis-core
0.3.0

google-apis-playcustomapp_v1
0.2.0

google-apis-androidpublisher_v3
0.2.0

google-apis-iamcredentials_v1
0.3.0

google-apis-storage_v1
0.3.0

google-cloud-storage
1.31.0

nanaimo
0.3.0

colored2
3.1.2

claide
1.0.3

CFPropertyList
3.0.3

atomos
0.1.3

xcodeproj
1.19.0

unicode-display_width
1.7.0

plist
3.6.0

public_suffix
4.0.6

addressable
2.7.0

tty-screen
0.8.1

tty-cursor
0.7.1

tty-spinner
0.9.3

babosa
1.0.4

excon
0.81.0

unf_ext
<IP_ADDRESS>

unf
0.1.4

domain_name
0.5.20190701

http-cookie
1.0.3

ruby2_keywords
0.0.4

faraday-net_http_persistent
1.1.0

faraday-net_http
1.0.1

faraday-excon
1.1.0

faraday
1.4.1

faraday-cookie_jar
0.0.7

fastimage
2.2.3

json
2.5.1

mini_magick
4.11.0

naturally
2.2.1

xcpretty-travis-formatter
1.0.1

dotenv
2.7.6

bundler
2.1.4

simctl
1.6.8

jwt
2.2.3

trailblazer-option
0.1.1

declarative
0.0.20

uber
0.1.0

representable
3.1.1

mini_mime
1.1.0

multi_json
1.15.0

signet
0.15.0

os
1.1.1

memoist
0.16.2

googleauth
0.16.2

rexml
3.2.5

webrick
1.7.0

google-cloud-errors
1.1.0

google-cloud-env
1.5.0

google-cloud-core
1.6.0

rake
13.0.3

digest-crc
0.6.3

emoji_regex
3.2.2

aws-eventstream
1.1.1

aws-sigv4
1.2.3

aws-partitions
1.455.0

jmespath
1.4.0

aws-sdk-core
3.114.0

aws-sdk-kms
1.43.0

aws-sdk-s3
1.94.1

forwardable
1.2.0

logger
1.3.0

date
2.0.0

stringio
0.0.2

zlib
1.0.0

ipaddr
1.2.2

openssl
2.1.2

ostruct
0.1.0

strscan
1.0.0

io-console
0.4.7

fileutils
1.1.0

etc
1.0.1

racc
1.5.2

nokogiri
1.11.3

psych
3.1.0

mutex_m
0.1.0

generated on: 2021-05-17

Updated thefastlane env


Use more neutral term for captureMethod motionDetection

We currently allow 2 values for captureMethod:
timelapse
motionDetection

@dhobern indicated that timelapse is pretty straightforward, but motionDetection might be a bit too narrow a term to express that the camera automatically detected something, resulting in a trigger that captured the media. PIR sensors use a combination of motion and heat to trigger the camera and if we want to eventually allow audio sensors, then it might just be sound (not motion) that is used to capture a media file.
We could rename to:

trigger: cf. https://docs.gbif-uat.org/camera-trap-guide/en/#trigger, but the term is also used to indicate the series of images captured as result of a trigger
detection: quite a broad term, but fits nicely with e.g. detectionDistance
activityDetection: a bit narrower, while still leaving it open how it was measured.

I prefer detection.
I would also rephrase cameraDelay:

Predefined duration after a ~trigger~ detection when activity detected by the camera is ignored. Expressed in seconds.

To remove the term trigger altogether

It would be ideal to somehow use the infared heat detection aspect of the capture event. That is important in the broader community that animals like reptiles aren't readily detected using PIR sensors. If you went with detection then you lose that infared context. It becomes somewhat arbitrary how the animal was detected. A new technology/technique might make its way down the pipeline to camera traps that's distinctly different than infared. Maybe infaredDetection, thermalDetection?

Discussed with @kbubnicki. We want to keep the very broad categorization for this term. More specific (infrared, thermal, etc.) might be harder to provide by users and there is currently no use case for it. Suggested changes:

Rename value to activityDetection to express the broad concept of "sensor detected activity through undefined method". This would then also include the audio detection of a non-moving stridulating grasshopper, which is would be excluded by the current term motionDetection.
Remove "trigger" from cameraDelay and rephrase as:

Predefined duration after detection when further activity is ignored. Expressed in seconds.


Virtual environment is not fully activated when running tests in non-debug mode

Type: Bug

Behaviour
Expected vs. Actual
Expected: When I run discovered pytests in non-debug mode via the "testing" tab, it behaves as though I ran pytest with the virtual environment configured for the workspace activated.
Actual: I have a particular test which uses subprocess.run to spawn another script which executes with the Python interpreter using a shebang (#!/usr/bin/env python3). When I run this test in my shell with the Python virtual environment active, the shebang executable resolves to the binary for the active environment, the desired behaviour. However, when I run the same test using the "testing" feature in VSCode, the executable is resolved to the system Python binary and the test fails as a consequence.
It is notable that this does not occur when I run the test in debug mode, there it works properly.
Steps to reproduce:
See the sample repository with steps to reproduce in the README: https://github.com/KyleRAnderson/vscode-python-bug-22630.

Diagnostic data

Python version (& distribution if applicable, e.g. Anaconda): 3.11.6
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
Value of the python.languageServer setting: Pylance

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings

languageServer: "Pylance"

testing
• cwd: "<placeholder>"
• pytestArgs: "<placeholder>"
• pytestEnabled: true

Extension version: 2023.22.0
VS Code version: Code 1.85.0 (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T20:48:09.019Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2
Remote OS version: Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2
Connection to 'wsl+ubuntu' could not be established

System Info

Item
Value

CPUs
13th Gen Intel(R) Core(TM) i7-13700 (24 x 2112)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
15.76GB (2.03GB free)

Process Argv
--crash-reporter-id aac21859-ebaf-495b-a1ef-a5146502f3a6

Screen Reader
no

VM
0%

Item
Value

Remote
WSL: Ubuntu

OS
Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2

CPUs
13th Gen Intel(R) Core(TM) i7-13700 (24 x 2111)

Memory (System)
7.64GB (3.55GB free)

VM
0%

Item
Value

Remote
WSL: Ubuntu

OS
Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2

CPUs
13th Gen Intel(R) Core(TM) i7-13700 (24 x 2111)

Memory (System)
7.64GB (3.55GB free)

VM
0%

Connection to 'wsl+ubuntu' could not be established

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30899288
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
2e4cg342:30602488
89544117:30613380
showlangstatbar:30737416
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialog:30910333
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30885897
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019:30917259

Related to #4300, but that one seemingly covers debugging rather than regular runs.

Hi! Could you try switching from the python extension version 2023.22.0 to 2023.20.0 and see if that makes a difference? I am trying to figure out if this is related to: this issue or if its different. Thanks

Hi @eleanorjboyd, thank you for taking a look. I tried out version 2023.20.0 of the Python extension (installed that version, reloaded the window) and can confirm that I am still seeing this issue on that version.

Thanks for checking, ill look into this further

I could reproduce the bug (just note that you need to install pytest in the venv first).
I have a similar issue with unit tests that utilize a local spark cluster. The error message is different but the behavior of the bug is exactly the same. For my case I inspected the environment that is setup when debugging a test vs running a test.
It turned out that I can solve the issue in both cases by putting a
os.environ["PATH"] = os.getcwd() + "/.testvenv/bin:" + os.environ["PATH"]

before running the subprocess (or before creating a local pyspark session as in my case).

Hi @eleanorjboyd -
I am experiencing the same problem.   Maybe this additional diagnostic will help.
It seems that when executing tests via pytest, the PATH is not set properly as the Virtual Environment does not seem to be activated.   By not properly, I mean the .venv/Scripts directory is not included in the PATH.
If the environment is activated, these directories are prepended to the PATH:
c:\Users\sambornk\.vscode\extensions\ms-python.python-2024.1.10451007\pythonFiles\deactivate\powershell;C:\Users\sambornk\source\scratch\venv_activation_test\.venv\Scripts

and there are other environment variables as well, for example, VIRTUAL_ENV and VIRTUAL_ENV_PROMPT.   And there are some other differences, like PYTHONPATH and PYTHONSTARTUP.
However, when running under pytest, the directories are missing and so are the additional environment variables.
When doing a normal "Run Python File", everything seems to be working correctly.
Below are two different outputs - one from running just a script and the other running pytest.
You can compare the two environments and how which("python") behaves.
I have highlighted a couple of key differences with "---->"
For what it's worth, we are also working in a pyspark environment and what matters is the PYSPARK_PYTHON environment variable.  This is normally set to simply "python" on Windows as this is the name of the executable as found in the PATH.   However, if the PATH doesn't include the .venv/Scripts directory, the wrong version of the Python executable can be found incorrectly.
Is there anything I should be doing differently?
Thanks
pytest
with python.testing.pytestArgs includes -s
--
import sys, os
import shutil

def test_venv_activation():
    print()
    print(os.environ["PATH"])
    print(shutil.which("python"))

    for name, value in os.environ.items():
        print("{0}: {1}".format(name, value))

    assert 1 == 1

--
CLIENT: Server listening on port 62353...

Run Python Program
--
import sys, os
import shutil

print(sys.version)

print(os.defpath)

print(shutil.which("python"))

for name, value in os.environ.items():
    print("{0}: {1}".format(name, value))

--
PS C:\Users\sambornk\source\scratch\venv_activation_test> & c:/Users/sambornk/source/scratch/venv_activation_test/.venv/Scripts/python.exe c:/Users/sambornk/source/scratch/venv_activation_test/src/path.py
3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
.;C:\bin
-----> C:\Users\sambornk\source\scratch\venv_activation_test\.venv\Scripts\python.EXE
ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\sambornk\AppData\Roaming
CHROME_CRASHPAD_PIPE_NAME: \\.\pipe\crashpad_33960_JVVWQUYKIVJUKSZJ
COMMONPROGRAMFILES: C:\Program Files\Common Files
COMMONPROGRAMFILES(X86): C:\Program Files (x86)\Common Files
COMMONPROGRAMW6432: C:\Program Files\Common Files
COMPUTERNAME: XXX
COMSPEC: C:\WINDOWS\system32\cmd.exe
DEPLOYMENT.EXPIRATION.CHECK.ENABLED: false
DRIVERDATA: C:\Windows\System32\Drivers\DriverData
GIT_LFS_PATH: C:\Users\sambornk\AppData\Local\Programs\Git LFS
HOMEDRIVE: C:
HOMEPATH: \Users\sambornk
LOCALAPPDATA: C:\Users\sambornk\AppData\Local
LOGONSERVER: \\XXX
NUMBER_OF_PROCESSORS: 8
ONEDRIVE: C:\Users\sambornk\OneDrive - XXXX
ONEDRIVECOMMERCIAL: C:\Users\sambornk\OneDrive - XXX
ORIGINAL_XDG_CURRENT_DESKTOP: undefined
OS: Windows_NT
-----> PATH: c:\Users\sambornk\.vscode\extensions\ms-python.python-2024.0.1\pythonFiles\deactivate\powershell;C:\Users\sambornk\source\scratch\venv_activation_test\.venv\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\dotnet\;C:\Users\sambornk\AppData\Local\Programs\Python\Launcher\;C:\Users\sambornk\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\sambornk\AppData\Local\Programs\Python\Python39\;C:\Users\sambornk\AppData\Local\Microsoft\WindowsApps;C:\Users\sambornk\AppData\Local\Programs\Git LFS;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;C:\Users\sambornk\AppData\Local\Programs\Microsoft VS Code\bin;
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD
PROCESSOR_LEVEL: 23
PROCESSOR_REVISION: 6001
PROGRAMDATA: C:\ProgramData
PROGRAMFILES: C:\Program Files
PROGRAMFILES(X86): C:\Program Files (x86)
PROGRAMW6432: C:\Program Files
PSMODULEPATH: C:\Users\sambornk\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC: C:\Users\Public
SESSIONNAME: Console
SYSTEMDRIVE: C:
SYSTEMROOT: C:\WINDOWS
TEMP: C:\Users\sambornk\AppData\Local\Temp
TMP: C:\Users\sambornk\AppData\Local\Temp
USERDNSDOMAIN: XXX.LOCAL
USERDOMAIN: XXX
USERDOMAIN_ROAMINGPROFILE: XXX
USERNAME: sambornk
USERPROFILE: C:\Users\sambornk
WINDIR: C:\WINDOWS
PYTHONSTARTUP: c:\Users\sambornk\.vscode\extensions\ms-python.python-2024.0.1\pythonFiles\pythonrc.py
TERM_PROGRAM: vscode
TERM_PROGRAM_VERSION: 1.86.2
LANG: en_US.UTF-8
COLORTERM: truecolor
GIT_ASKPASS: c:\Users\sambornk\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass.sh
VSCODE_GIT_ASKPASS_NODE: C:\Users\sambornk\AppData\Local\Programs\Microsoft VS Code\Code.exe
VSCODE_GIT_ASKPASS_EXTRA_ARGS:
VSCODE_GIT_ASKPASS_MAIN: c:\Users\sambornk\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass-main.js
VSCODE_GIT_IPC_HANDLE: \\.\pipe\vscode-git-b0e00517ad-sock
-----> VIRTUAL_ENV: C:\Users\sambornk\source\scratch\venv_activation_test\.venv
-----> VIRTUAL_ENV_PROMPT: .venv
VSCODE_INJECTION: 1
PS C:\Users\sambornk\source\scratch\venv_activation_test>

Hi @eleanorjboyd -
I just figured out that it does work when debugging pytest tests.
Also, in case it helps, there's slightly different behaviour in how .env files are interpreted and preset variables are expanded.
Here's what I have in my .env file:
PYTHONPATH=${env:PYTHONPATH};./main/src
PYSPARK_PYTHON=python

Here's all four cases, along with how environment variables are set
Run Python File:
virtual environment is activated
referenced environment variables from .env are expanded
PATH: c:\Users\sambornk\.vscode\extensions\ms-python.python-2024.0.1\pythonFiles\deactivate\powershell;C:\Users\sambornk\source\repos\xxx-lib\.venv\Scripts; <prepended>
PYSPARK_PYTHON: python
PYTHONPATH: ;./main/src
VIRTUAL_ENV: C:\Users\sambornk\source\repos\xxx-lib\.venv
VIRTUAL_ENV_PROMPT: .venv

Debug Python File:
virtual environment is activated
referenced environment variables from .env are not expanded
PATH: c:\Users\sambornk\.vscode\extensions\ms-python.python-2024.0.1\pythonFiles\deactivate\powershell;C:\Users\sambornk\source\repos\xxx-lib\.venv\Scripts; <prepended>
PYSPARK_PYTHON: python
PYTHONPATH: ${env:PYTHONPATH};./main/src
VIRTUAL_ENV: C:\Users\sambornk\source\repos\xxx-lib\.venv
VIRTUAL_ENV_PROMPT: .venv

Run Test
virtual environment is not activated
referenced environment variables from .env are not expanded
an extra directory is prepeneded to PYTHONPATH
PATH: <nothing prepended>
PYSPARK_PYTHON: python
PYTHONPATH: c:\Users\sambornk\.vscode\extensions\ms-python.python-2024.0.1\pythonFiles;${env:PYTHONPATH};./main/src
VIRTUAL_ENV: <not set>
VIRTUAL_ENV_PROMPT:  <not set>

Debug Test
virtual environment is activated
PYTHONPATH seems to be set twice, once with expansion, once without
PATH: c:\Users\sambornk\source\repos\xxx-lib\.venv\Scripts; <prepended>
PYTHONPATH: ${env:PYTHONPATH};./main/src;;./main/src
PYSPARK_PYTHON: python
VIRTUAL_ENV: c:\Users\sambornk\source\repos\xxx-lib\.venv
VIRTUAL_ENV_PROMPT: (.venv)

Hi @binderjoe. This is blocking users of our Databricks Extension as well, because we install some databricks packages to their virtual envs, which we need activated properly for functions such as "Run Python File in Integrated Terminal", but with the Databricks features enabled.
Is it possible to prioritise this issue?
cc @fjakobs @saadansari-db

With my Python core developer hat on, I want to say that assuming the virtual environment is activated is a bit dangerous as it's actually not necessary for the interpreter to work correctly. The shell scripts are considered a nice-to-have developer feature to make working in the shell easier and not meant to be required for code to function. As such, users can and do launch interpreters in virtual environments w/o ever activating them. And this isn't even covering the case of when people use a shell for which there aren't any activation scripts available.
If you need to know what Python interpreter you are using, sys.executable will always point to the running interpreter.

@brettcannon agreed. But the current behaviour is, the terminal is showing that the environment is activated (the python extension changes the PS1 I believe?), but the environment is not actually activated.
Anyway, seems like a combination of vscode update (to 1.86.2) and the latest extension version (v2024.2.0) seems to have fixed the issue for me now atleast.

Hi Brett - just to add to this, it's not so much the running Python execution environment that needs the activation script, it's the PATH for things that are called by Python or in a terminal.
Two examples

interactively, if the PATH isn't right, you will get the wrong Python interpreter (or none at all) and possibly run the wrong pip and other commands
specifically when using Apache Spark and pyspark, there is an environment variable PYSPARK_PYTHON that depends on python being found in the path for a remote node.   (Of course when using Databricks Connect, this isn't necessary)

Agreed on the other environment variables, but the PATH shouldn't be misleading
thanks for looking

But the current behaviour is, the terminal is showing that the environment is activated (the python extension changes the PS1 I believe?), but the environment is not actually activated.

This actually has nothing to do w/ how we run tests. Terminal activation occurs using VS Code APIs and only when you open a terminal (and any prompt issues are due to your shell's design or how some start-up script overrides what our activation does because of how early it occurs). Testing normally occurs in a subprocess and not the terminal (hence the "non-debug mode" in the title of this issue). So the way to get an "activated" subprocess is to either execute using a shell subprocess (which is itself problematic as that requires we do shell escaping and that's really hard as escaping rules are not well documented, vary from shell to shell, etc.), or we calculate what environment variable changes are required and then apply those changes (which is costly for e.g. conda). Chances are we used to do the latter and missed that detail in the testing rewrite.

possibly run the wrong pip

Another FYI w/ my core dev hat on, I would advise against running pip directly, or at least use it's --python argument.

thanks, Brett.   Just in case it helps diagnostically, I did notice that there are four different behaviors, which are different when running with and without debug.   see above.
again, thanks for looking.
Kevin

In my tests I test that templated files passes Ruff check after rendering. I used to have:
import subprocess

import pytest

def test_passes_ruff_check(rendered_project: Path):
    try:
        subprocess.check_output(["ruff", "check", "."], cwd=rendered_project)
    except subprocess.CalledProcessError as exc:
        pytest.fail(exc.output)

After the pythonTestAdapter got defaulted this is failing to FileNotFoundError of ruff executable. This is because the Scripts folder of the venv is not added to PATH. If pytest is run from terminal this works.
This can be "fixed" by changing the subprocess call to:
subprocess.check_output([sys.executable, "-m", "ruff", "check", "."], cwd=rendered_project)

@LKajan thank you for the clear steps- I will investigate.


externalPackagesPlugin slows down ng serve substantially

Command
serve
Is this a regression?

[x] Kinda, as the externalPackagesPlugin was just added via https://github.com/angular/angular-cli/pull/26923

The previous version in which this bug was not present was
Before https://github.com/angular/angular-cli/pull/26923 existed, which was part of 17.1.1, so I guess angular 17.1.0
Description
angular 17.2.0
vite/esbuild powered application builder
Using the loader option in angular.json like:
"loader": { ".webp": "file", ".svg": "text" },

to support images as ecmascript imports or svgs as inline. This causes angular-cli to add the externalPackagesPlugin which is a giant hit on build performance. For our apps:

angular version
watch rebuild time

angular 17.1.0 { "loader": { ".webp": "file" } }
0.8 seconds

angular 17.1.1 { "loader": { ".webp": "file" } }
6.0 seconds

angular 17.2.0 { "loader": { ".webp": "file" } }
6.0 seconds

Those additional 5.2 seconds are also added to the initial build.
My rough idea of the issue is, that the externalPackagesPlugin looks at every single import that doesn't start with . or / and doesn't cache the results. So tons of @angular/..., rxjs, @ngrx/... and similar imports are resolved over and over again. Even if this function only needs 2ms to run, this quickly adds up.
Minimal Reproduction
https://github.com/sod/ng-serve-external-deps-slowdown

The only difference between the development and development-slow configurations in the angular.json are:
            "development": {
            },
            "development-slow": {
              "loader": {
                ".webp": "file"
              }
            },

Your Environment
@angular-devkit/architect       0.1702.0
@angular-devkit/build-angular   17.2.0
@angular-devkit/core            17.2.0
@angular-devkit/schematics      17.2.0
@angular/cli                    17.2.0
@schematics/angular             17.2.0
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.4

As as side note. If you intend to just make the externalPackagesPlugin faster but keep the /^[^./]/ regex, this still would be a regression compared to angular 17.1.0.
E.g. if all that the externalPackagesPlugin was return null, like so:
            build.onResolve({ filter: /^[^./]/ }, async (args) => {
                return null;
            });

Then the watcher in our project would still need 1.4 seconds (instead of the 0.8 seconds in 17.1.0 without this plugin).
I guess having esbuild calling a javascript method on nearly every import doesn't come for free. For us it executes this plugin 7458 times.

We still patch angular for this 😅 The createExternalPackagesPlugin() still adds 6 seconds to every single build (slowing down incremental rebuilds from 0.8 seconds to 6.8 seconds)


dev tool does not update in real time

Version
6.2.1
Browser and OS info
Brave, Linux
Steps to reproduce
dev tool need to update in real time
What is expected?
dev tool need to update in real time
What is actually happening?
dev tool does not update in real time

I find it doesn't update the value when it's using v-model on a component. Otherwise, it seems to work fine.
Extension version: 6.2.1
OS: Ubuntu 20.04 / 64-bit
Browser: Version 105.0.5195.125
https://user-images.githubusercontent.com/2676602/190934449-69b1e360-3a38-4cfd-a388-16768a126d6a.mp4

Thank you for your response.
On Mon, Sep 19, 2022 at 6:13 AM Syed Sirajul Islam Anik <
@.***> wrote:

I find it doesn't update the value when it's using v-model on a
component. Otherwise, it seems to work fine.
Extension version: 6.2.1
OS: Ubuntu 20.04 / 64-bit
Browser: Version 105.0.5195.125
https://user-images.githubusercontent.com/2676602/190934449-69b1e360-3a38-4cfd-a388-16768a126d6a.mp4
—
Reply to this email directly, view it on GitHub
https://github.com/vuejs/devtools/issues/1942#issuecomment-1250423400,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOBR4SKCX4GCEQGFFCYULRLV66XTTANCNFSM6AAAAAAQPNKBPA
.
You are receiving this because you authored the thread.Message ID:
@.***>

It's that vue dev tools for @.*** does not have live changes facility but
vue dev tools for @.*** does. However, I tried to use vue dev tools for vue
version 2 on @.*** but it did not support. Maybe you can check for windows.
The link is below:
https://chrome.google.com/webstore/detail/vuejs-devtools/iaajmlceplecbljialhhkmedjlpdblhp
On Tue, Sep 20, 2022 at 12:34 AM EzeFSpa @.***> wrote:

Same exact case in Windows 10 + Brave (devtools version 6.2.1)
—
Reply to this email directly, view it on GitHub
https://github.com/vuejs/devtools/issues/1942#issuecomment-1251412549,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOBR4SPOTPOOVZGS3DZ2ES3V7CYR7ANCNFSM6AAAAAAQPNKBPA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Me too

6.2.1 me too


Add ItemsAdder support.

Description
You could add itemsadder support because I see that every time I try to add a weapon to itemsadder so that the pack is sent through the itemsadder with the sound it also bugs and does not play if you can add support or a separate addon with textures and models, sounds would be very nice.
Configuration
it would not be a configuration so I can't give an opinion on it but it would be an addon like many others here.

I'm not quite sure what the issue is you are describing. The server can only send one resource pack, so if you want a the server to send both the WeaponMechanics resource pack and the ItemsAdder resource pack, you'll have to combine them into one. If you need help with that, you should get in contact with the developer of ItemsAdder with us on our discord.

Since no additional information as been provided, this issue is being closed. You may open a new issue with more information.


favicon

The transparency doesn't work out so well.
Also, is the favicon being ignored on Windows?


Type inference should have a representation of "any self-interceptor"

It is very important for dart2js to eliminate getInterceptor calls.  When the type of x is known to be a self-interceptor, getInterceptor(x) can be replaced with just x.
However, the least upper bound of all self-interceptors does not have a compact representation as a TypeMask, because they have no common superclass other than Object, and Object is also the superclass of Interceptor.
Like the nullable bit in FlatTypeMask, we could have a bit indicating if it might be intercepted.
Below is an example of suboptimal code generated for an Angular2 benchmark.
rec.set$previousValue(v0);
rec.set$currentValue(null);
interceptor = J.getInterceptor$x(rec);
if (records.containsKey(interceptor.get$key(rec)))
  records.remove$1(0, interceptor.get$key(rec));

There is no need to get an interceptor after successfully calling a non-intercepted method on rec.
The example above can be fixed with a local analysis, but we still lose out on interprocedural information (e.g. knowing that a method returns a self-interceptor).

It might be useful for the bit to exclude null from the types that kill self-intercepting, i.e. the bit means self-intercepting-or-null. This could be helpful in identifying the example in https://github.com/dart-lang/sdk/issues/29618


Multiple Domain Controllers can cause this operation to fail

There is a bug in the module that ships with AD Connect.  If you have more than one DC, there is potential that the command will attempt to create the AD Object on one Domain Controller, but try to set the password on another.  This causes the command to fail with an error complaining that it couldn't set the password.
set-azureadkerberosserver -domain "contoso.com" -userprincipalname <globaladminupn>
Set-AzureADKerberosServer : Failed to create Azure AD Kerberos Server: Failed to set password for account:
LDAP://<domainName>/CN=AzureADKerberos,OU=Domain Controllers,DC=Contoso, DC=Com
At line:7 char:1
+ Set-AzureADKerberosServer -Domain $domain -UserPrincipalName <globaladminupn>
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-AzureADKerberosServer], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.AzureAD.Kdc.Management.SetAzureADKerberosServer

An updated module is available that you can install on any machine (no AD Connect dependencies).  The issue is fixed in this version of the module.  The module is called AzureADHybridAuthenticationManagement and is available on the powershell gallery .
# First, ensure TLS 1.2 for PowerShell gallery access.
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

# Install the Azure AD Client management module
# To prevent any conflicts during installation, be sure to inclue -AllowClobber option flag.
Install-Module -Name AzureADHybridAuthenticationManagement -AllowClobber

The bug is fixed in this module.

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

ID: 50b27a01-622e-d980-83f2-1ed27060613b
Version Independent ID: e6472e15-10d7-bd4a-da02-558f2774dbaf
Content: Passwordless security key sign-in to on-premises resources - Azure Active Directory
Content Source: articles/active-directory/authentication/howto-authentication-passwordless-security-key-on-premises.md
Service: active-directory
Sub-service: authentication
GitHub Login: @Justinha
Microsoft Alias: justinha

@Chireven Thanks for providing feedback that helps improve our documentation. This issue has been resolved and we are closing the issue. #please-close


Enhancing ui in footer section

Footer section which contains Home About us and many more is not changing color

Done the necessary changes and created a pr kindly check and merge and provide necessary tag for #181


"window_set_mouse_passthrough" With Transparent Window causes white flickering during runtime

Godot version
4.1.1.stable
System information
Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; <IP_ADDRESS>79) - Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz (6 Threads)
Issue description
https://github.com/godotengine/godot/assets/75141902/a8fa0a11-3a8b-474b-8a70-80dab030a947
When using window_set_mouse_passthrough with a transparent window in my project (a desktop Tamagotchi-like game) it causes white flickering/flashing across the newly set passthrough area (but not consistently)? I used the same setup in Godot 3.5 without flickering.
The issue is occurring in my project when the player performs an action that would update the mouse passthrough such as dragging the device around on the monitor or adding new charms/etc which change the clickable area (and is very disorienting)!
Steps to reproduce
Set up a clickthrough area with a transparent window + change the clickable area periodically.
Display > Window settings:

Minimal reproduction project
This project is set up the way mine is which causes the MOST flickering (setting the window area to cover all monitors), however you can comment out set_game_window() to only cover a normal project area (flickering happens way less often but still happens).
Pressing TAB while the window is selected will cause the selected area to swap between full coverage and the little red square (present for your sanity). You will likely have to click the red square to actually focus on the window!
Test_passthrough_Flicker.zip

I am unable to replicate the flickering on LInux:
Godot v4.2.dev (dcd187da9) - Debian GNU/Linux 12 (bookworm) 12 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 (nvidia)

Unrelated to the issue, but covering multiple screens with the single window will not work in many cases (if screens have different DPI, for example).
In general, if you want a moveable window like one in your video, the best way to do it should be:

use as smaller window as possible (exactly the same as image bounding box).
only set a pass-through for the center cutout once, on window init.
use DisplayServer::mouse_get_position (mouse position in the screen coordinates) to change the actual position of the window.

@bruvzg Ah I see, good points!
I originally started this in 3 so I am loving the new DisplayServer features! I am unsure I'd be able to figure out the window moving physics for the swinging charms using a window on my own though.
It's meant to be always on top so I'd like it to be as non-intrusive as I can possibly get it, I've included a video of my project so you can see why it might still need the runtime updates- which is why I'm VERY appreciative you're taking this on for me! (I just noticed my pet up and left the room while recording it how rude).
The biggest issue I've seen when I had a 4k/2k/1k all at once monitor setup was that depending on your highest resolution monitor the "base" size of the tama changes so I made it so it's resizable!
https://github.com/godotengine/godot/assets/75141902/7d192de6-6ded-4b7a-b4cb-e4460b980a1f


Expand Selection in function and arrow function skips body block

TS Template added by @mjbvz
TypeScript Version: 3.8.2
Search Terms

expand selection
selectionRange

Issue Type: Feature Request (maybe Bug)
Reproduce
Given these code examples (javascript or javascriptreact), run Expand Selection a few times:
const func = () => {
  |<-- put caret here
};
// or...
const func = () => {|<-- put caret here

};
// or...
function func(params) {
  |<-- put caret here
}

Actual
Expand Selection skips the body of the function and goes straight to selecting the whole function.

Expected
Should be able to select the function body when using Expand Selection, regardless of where I started inside the function.
In WebStorm it works as expected:

I find myself updating the body of an arrow function dozens of times a day, usually to inline the return expression as an implicit return.
Of course there are extensions and ESLint rules that can help with that, but Expand Selection should respect the function body block regardless.
Update: More examples
const func = () => {
  // some comment
  const one = 1;
};

Placing caret to the left of // some:

Expand Selection just once will select the whole arrow function (from () to the closing }).

Placing caret to the left of const:

Expand Selection actually works as expected, after 4 times, only the body of the arrow function is selected (although it doesn't select it including the {}, but that's not so bad).

Here's the example where I first encountered this issue:
const func = () => {
  return someFunc();
};

Select and Cut someFunc(); (caret will be to the right of return  at this point)
Expand Selection > results in selecting the whole function (from () to the closing })
If I first move the caret to the left of return, then Expand Selection works as expected.

System Details
VS Code version: Code - Insiders 1.40.0-insider (c58aaab8a1cc22a7139b761166a0d4f37d41e998, 2019-10-22T05:25:41.549Z)
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:44:27.652Z)
OS version: Darwin x64 18.7.0

Thanks @a-tarasyuk!


App doesn't connect to account anymore

I was just trying to use the app last night and it just wouldn't connect to the account anymore. Login and Authentication did nothing. Looked at the logs and looks like there's some issue with the api urls.
log20220723.txt

They're aware of the issues and a fix will be available soon

Oh thanks I'm not in the discord, I'll just leave the issue for now since there isn't one on github yet.


Build CI on OpenBSD with GH Action

@sthen thank you for packaging trippy for openbsd.
In #920 I've enabled building for OpenBSD in CI however it fails with:
error: component 'rust-std' for target 'x86_64-unknown-openbsd' is unavailable for download for channel 'stable'

Which Rust version did you build against?  OpenBSD is a Tier 3 Rust target so perhaps the stable version lags behind the latest?

Hi, sorry I don't have any idea about the problem you're seeing when you cross-compile. We're currently building with rust 1.75.0 (always native builds for each supported architecture, we don't do any cross-compiles). @semarie is doing a great job of maintaining our rust port and keeping it up to date.

a Tier-3 platform means that rust project doesn't build or test anything for OpenBSD. so there is no component to download on rust servers.

Thanks both. Any recommendations on the best way to enable automated builds in CI and on release?


Issue with system "Knight"

Hello, I am the creator of the Knight system on Foundry. I have been told about a compatibility problem between my system and your module.
I have searched a bit and the options of your module do not even appear in my tests, and I find myself with several errors that appear in your code.
I attach screenshots of the console errors.
Could you tell me what this is about? Can we see together to correct the problem ? I'm on the Foundry Discord under the nickname "Zakarik" if you want to contact me.
Oh and I'm French speaking, but I understand more or less English and I use a translator, so it's not a problem to communicate in writing !

It isn't a specific bug with your system, it's an issue with the subclass.
I already fixed it. Thanks for reporting it!


[SPARK-2645] [Core] Fix for SparkContext stop behavior

Fix for SparkContext stop behavior

Can one of the admins verify this patch?

Jenkins, this is ok to test.

Hi @rekhajoshm , could you explain details more in the description field?

Yeah, this might be a good change (stop() should be idempotent right?) but I'm not 100% clear how it connects to the JIRA. Also, there's no need to log an exception here.

ok to test

Merged build triggered.

Merged build started.

Test build #35709 has started for   PR 6973 at commit b566b66.

Test build #35709 has finished for   PR 6973 at commit b566b66.

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

Merged build finished. Test FAILed.

Hi @rekhajoshm
The PR look reasonable (with the suggested changes from andrew).  Could you also (a) change the title / description to be a more descriptive, eg. "Allow sc.stop() to be called multiple times" and also (b) add a test case to SparkContextSuite to prevent future regression?
thanks for working on this!

Merged build triggered.

Merged build started.

Test build #35745 has started for   PR 6973 at commit 380c5b0.

Test build #35745 has finished for   PR 6973 at commit 380c5b0.

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

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #35748 has started for   PR 6973 at commit 58dba70.

Thanks for your quick inputs and review comments @sarutak @srowen @andrewor14 @squito .
@sean – Based on my quick look yesterday, sc.stop() calls sparkEnv stop() which tries to stop the already stopped and as it is not idempotent, causes a spiral effect of uncaught_exception of 50 exit code. https://issues.apache.org/jira/browse/SPARK-2645
@squito Did as suggested.Please review.Thanks

Test build #35748 has finished for   PR 6973 at commit 58dba70.

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

Merged build finished. Test FAILed.

Jenkins retest this please

Merged build triggered.

Merged build started.

NAVER - http://www.naver.com/
<EMAIL_ADDRESS>님께 보내신 메일 <Re: [spark] [SPARK-2645] [Core] Allow sc.stop() to be called multiple times without side effects. (#6973)> 이 다음과 같은 이유로 전송 실패했습니다.

받는 사람이 회원님의 메일을 수신차단 하였습니다.

Test build #35772 has started for   PR 6973 at commit 58dba70.

Test build #35772 has finished for   PR 6973 at commit 58dba70.

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

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Thanks @srowen @squito for your review comments.
@srowen - log it for any kind of debugging, but can remove if not preferred
@squito - updated as suggested.

Test build #35806 has started for   PR 6973 at commit 9193a0c.

hmm, now I am a little confused -- that test actually passes even without your changes.  Sorry this may have been my fault for suggesting a test in SparkContextSuite -- I guess SparkContext itself already handles multiple calls to stop().
I'm not convinced this is still needed, but I suppose it doesn't hurt.  In any case, I'd leave the test you have, and also add a case where you just stop the env multiple times.

None of the changes here are in SparkContext; the PR title is misleading, since you're changing SparkEnv. What code path would cause SparkEnv.stop() to be called multiple times?
SparkContext.stop() is already idempotent:
if (!stopped.compareAndSet(false, true)) {
  logInfo("SparkContext already stopped.")
  return
}

Test build #35806 has finished for   PR 6973 at commit 9193a0c.

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

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #35821 has started for   PR 6973 at commit a5a7d7f.

Merged build triggered.

Merged build started.

thanks @vanzin for your comments.Updated the title.Other than SparkContext, SparkEnv stop can be invoked from Scheduler, or if Driver commanded a shutdown, Executor stop would invoke SparkEnv stop, hence making SparkEnv idempotent as well.
On SPARK-2645, org.apache.spark.ServerStateException: Server is already stopped, from my understanding unhandled exception surfaces as uncaught_exception (exit code: 50)
Issue may be erratic, even be due to somewhere a async code state not updated correctly, shutDown hook, or (wild) scala compiler optimization within steps, or only in machine/usage specific variants :-)
From my very quick analysis, the one apparent culprit was stop() not being idempotent on SparkEnv.,  the fix was to prevent stopped env to be stopped again.
@squito @srowen good point; in enthusiasm to avoid unhandled exception especially when I am not expecting any or only in erratic maneuvers, but completely agree with you.updated.
Thanks again @vanzin @squito @srowen !

Merged build finished. Test FAILed.

Test build #35821 has finished for   PR 6973 at commit a5a7d7f.

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

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #35873 has started for   PR 6973 at commit 12f66b5.

Merged build triggered.

Merged build started.

Test build #35874 has started for   PR 6973 at commit 1aff39c.

thanks @srowen for your inputs.I had missed capturing exception on fail.updated(12f66b5).try/catch/fail(e) seems to be accepted practice when failing on exception.Used org.scalatest.Matchers "noException should be thrownBy" if that is preferred (1aff39c).Or please let me know if you have another preference.
import org.scalatest.Matchers._
noException should be thrownBy {
    sc = new SparkContext(new SparkConf().setAppName("test").setMaster("local"))
    val cnt = sc.parallelize(1 to 4).count()
    sc.cancelAllJobs()
    sc.stop()
    // call stop second time
    sc.stop()
  }

Test build #35874 has finished for   PR 6973 at commit 1aff39c.

This patch fails MiMa tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #35875 has started for   PR 6973 at commit c97839a.

Test build #35873 has finished for   PR 6973 at commit 12f66b5.

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

Merged build finished. Test PASSed.

Test build #35875 has finished for   PR 6973 at commit c97839a.

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

Merged build finished. Test PASSed.

@rekhajoshm I think this is still in your court. The extra try blocks should be removed IMHO.

Merged build triggered.

Merged build started.

Test build #36022 has started for   PR 6973 at commit 2ce5760.

Test build #36022 has finished for   PR 6973 at commit 2ce5760.

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

Merged build finished. Test PASSed.

@srowen done.can you please review/approve it?thanks.

@rekhajoshm LGTM other than a minor comment @srowen had.

thanks @andrewor14 for your quick input.the last commit 2ce5760 was updated for the comment from @srowen kindly check.thanks

had missed that inline comment. updated @andrewor14 @srowen thanks

Merged build triggered.

Merged build started.

Test build #36077 has started for   PR 6973 at commit 446b0a4.

Test build #36077 has finished for   PR 6973 at commit 446b0a4.

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

Merged build finished. Test PASSed.

Thanks for your inputs @srowen @andrewor14. done.also removed unused JavaConversions._ please review, thanks.

Merged build triggered.

Merged build started.

Test build #36169 has started for   PR 6973 at commit 277043e.

Test build #36169 has finished for   PR 6973 at commit 277043e.

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

Merged build finished. Test PASSed.

Merging into master. Thanks for the fix @rekhajoshm

thank you @andrewor14 @srowen for the reviews and merge.


Ui/map: Velocity filter fix

When the vehicle comes to a stop, the map continues to zoom in due to the velocity filter alpha being too high. This fixes the behavior by dynamically adjusting the alpha based on the current speed. This may need to be adjusted based on aesthetic preference. I divide the speed by 3 here velocity_filter.updateAlpha(abs(locationd_velocity.getValue()[0])/3); to keep the alpha similar to the init value at at high speed.

You already had https://github.com/commaai/openpilot/pull/29488, no need to re-create the PR

Oh I found a bug I didn't know how to update the PR but I realize now it does it automatically. Sorry for the mistake I don't use github.

I'm not sure if this is a strict bugfix, it changes the zoom speed. Going to make a simpler change here: https://github.com/commaai/openpilot/pull/29601


Read 10-bit y4m input.

This requires mostly adding support to the y4m crate:
https://github.com/PistonDevelopers/y4m

This is done. We don't code 10 bit but that's for later.


Vault provider test flake

It seems there's a test flake in the Vault e2e tests:
https://jetstack-build-infra.appspot.com/build/jetstack-logs/pr-logs/pull/jetstack_cert-manager/954/pull-cert-manager-e2e-v1-11/493/
The root ca is not valid for <IP_ADDRESS>, and it seems we are being strict about SSL errors.
/kind bug

Similar failure, this time the CA could not be verified: https://jetstack-build-infra.appspot.com/build/jetstack-logs/pr-logs/pull/jetstack_cert-manager/1046/pull-cert-manager-e2e-v1-11/503/

/remove-lifecycle stale


added Abbotsford, BC, Canada and added country field for all templates

@Ceshion This looks awesome, we're going to go ahead and use this. I'm pulling it locally and double checking now. Gonna also add a "default" option for United States.


[INFO] Only fechts without download

Is it possible to only return the URLs without downloading the pages?

Short answer: yes.
Long answer: you can't crawl an entire site without actually looking through the response bodies of the pages on it, since that's where you'll find the next URL's to crawl.
But you can save the URL's that you receive via any of the events however you like. Perhaps discoverycomplete would suit your needs? You can also use download conditions if you want to fetch only the headers of certain pages. If you need more specific help, maybe you can let us know some more about your use case


Image not visible on page

If I have a system folder and I have an image source that points to this folder, the image is not being shown. I am on xampp and image url just goes to http://localhost/system/ as it will find this folder and bypass the htaccess.
Am I doing something wrong here? I just did what was in docs.

I'm not quite sure I understand what you're asking.  Can you give me a bit more info?  Can you show me your attachment configuration and how you're trying to display an image?

I actually figured it out. It was a silly mistake while naming the folder. I will just close this.


[SPARK-12705] [SQL] push missing attributes for Sort

The current implementation of ResolveSortReferences can only push one missing attributes into it's child, it failed to analyze TPCDS Q98, because of there are two missing attributes in that (one from Window, another from Aggregate).

cc @marmbrus

Test build #51040 has started for PR 11153 at commit e1919cc.

Test build #51040 has finished for PR 11153 at commit e1919cc.

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

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

Merged build finished. Test FAILed.

Merged build finished. Test FAILed.

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

Test build #2533 has started for PR 11153 at commit bec639d.

Test build #2533 has finished for PR 11153 at commit bec639d.

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

cc @gatorsmile

Test build #51085 has started for PR 11153 at commit c4607dd.

Sorry, my previous fix does not cover all the scenarios. Will read your fix tomorrow. Thanks!

Test build #51085 has finished for PR 11153 at commit c4607dd.

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

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

Merged build finished. Test PASSed.

Test build #51124 has started for PR 11153 at commit dce3857.

Test build #51124 has finished for PR 11153 at commit dce3857.

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

Merged build finished. Test PASSed.

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

LGTM

cc @cloud-fan for review too

LGTM except one comment

Merging this into master, thanks!


Slightly incorrect documentation for VAE

The example for a VAE indicates that from_pretrained is a static method
https://github.com/PyTorchLightning/pytorch-lightning-bolts/blob/4e1c1502b70e4be59a9ac80878ec5ad5a212f87e/pl_bolts/models/autoencoders/basic_vae/basic_vae_module.py#L30
Indeed, running this line causes as error:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-64-4c7d0e8ca436> in <module>
----> 1 vae = VAE.from_pretrained('cifar10-resnet18')

TypeError: from_pretrained() missing 1 required positional argument: 'checkpoint_name'

This is because the method is actually implemented nonstatically:
def from_pretrained(self, checkpoint_name):
    if checkpoint_name not in VAE.pretrained_urls:
        raise KeyError(str(checkpoint_name) + ' not present in pretrained weights.')

    return self.load_from_checkpoint(VAE.pretrained_urls[checkpoint_name], strict=False)

Seems to me either:

the documentation should to reflect this (vae = VAE(32).from_pretrained(...))
the method should be rewritten

@classmethod
def from_pretrained(cls, checkpoint_name):
    # snip
    return self.load_from_checkpoint(cls(32).pretrained_urls[checkpoint_name], strict=False)

Here is a minimal failing example on colab: https://colab.research.google.com/drive/1quvrQUyCIMC7Cq9QCjaJfip5hsi9jwSJ?usp=sharing
Happy to write a PR, if desired

@jeremyadamsfisher Hi, thank you for reporting the issue! Following the suggestion by @ananyahjha93 in https://github.com/PyTorchLightning/pytorch-lightning-bolts/issues/200#issuecomment-691534816, let's just fix the docs for now.

from_pretrained() needs to be an instance method and not a static method. In most cases, you will initialize the lightning module with specific params according the the weights being loaded.

@jeremyadamsfisher Hi, thank you for reporting the issue! Following the suggestion by @ananyahjha93 in https://github.com/PyTorchLightning/pytorch-lightning-bolts/issues/200#issuecomment-691534816, let's just fix the docs for now.

from_pretrained() needs to be an instance method and not a static method. In most cases, you will initialize the lightning module with specific params according the the weights being loaded.

@jeremyadamsfisher Would you be interested in submitting a PR?

You got it


Improve UI of Quiz App

Description
Hey can I improve the UI of the Quiz App ?
Domain
App Development
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct.

@ron2111 Can you please assign me the task


chore(lint cleanup)

Updated tslint ruleset
Cleaned up warnings

Coverage remained the same at 100.0% when pulling 7c2dd54c54a970d01071a90cc49192bffa026f90 on lint-cleanup into e94ac8a7328e6b451ddc876ca7e35d0b32741048 on master.


Use a shorter pip install command

I think the idea here was to have the commands that leaves you with a local, editable copy of the code

but this applies only to contributors, what about users who just want to use the latest version without waiting for the next release?


Make work.workType optional

Who is this for?
Bug with works causing search and work page to error
Slack alert
Slack investigation thread
What is it doing for them?
workType was typed as a required field in the API response when it is typed as optional on their side. This makes it optional on the FE as well.
I've deleted getWorkTypeIcon as I couldn't find it in use anywhere.

@taceybadgerbrook If I've understand it correctly, this change won't affect the workId data at all. This change is related to the workType IDs. Even so, we'll still be receiving the workType IDs if/when the pageviews have them - this change just allows the frontend to pass an undefined workType to segment when a workType value hasn't been specified by the user. In other words, there's no meaningful change for our reporting...
Do correct me if i'm wrong @rcantin-w !


fix Make sure that the prof_prefix defined in JEMALLOC_CONF is not overwritten in start_be.sh

run buildall

run p0


Pdf not show text

Mine pdf is not showing text;  After change  'com.github.barteksc:pdfium-android:1.5.0' to 1.6.0, this is OK!

Better don't use 1.6.0 version, not embedded fonts won't be rendered. I am currently fixing 1.6.0 and in a few days I will release new version. But it's good to see that newer version of pdfium has fixed some issues.

Version 2.7.0-beta updates PdfiumAndroid to newest version which should not have problems with font rendering


Add a maintenance banner to the static site

Description
We currently don't have a good way of informing our users that there is currently an outage in the app and that the engineers are working on a resolution.
Proposed solution
Add a maintenance banner to the static site with a switch we can flip on whenever we are resolving an outage.
Additional context

This request came of the postmortem for the Apollo Client Upgrade Outage
Max spend one day on spec

Met with @bmaden-usds and @nickclyde today to discuss the details around this banner. Decided on a REST-based implementation that will allow us to update the banner from the super admin page, without waiting for a deployment of either the app or the static site.
Implementation Details
We'll add a REST endpoint to the app that functions as a status checker, and is pinged on every load of the static site or app. (If this slows down the app too much we can only load it at app sign-in, but we'll definitely want it on the static site.)
This endpoint will report if an outage/maintenance banner should be shown. If it should be displayed, the endpoint will return the severity level of the incident and the user-facing message that should be displayed.
A second endpoint will be added to activate the maintenance banner. This will take in the severity level and user-facing message for the incident.
We'll add an option on the super-admin page to activate and deactivate the maintenance banner.
Finally, we'll add the skeleton maintenance banner to the static site and app, so that it's ready to be displayed if activated.
Open questions: should we store the maintenance banner text and severity level in the database? If so, where?

New plan after another meeting with engineers on 9/2.
There are concerns about putting a backend dependency in place for the maintenance banner. It would be called on every load of the static site, and if the backend was down (not unlikely if we're in the middle of an incident) the status banner might not work correctly.
New solution is hopefully more lightweight, while still enabling us to deploy the banner rapidly.
The new plan is to add a json blob to our repo (outage.json?) that contains the message and severity level for the incident.
We'll add a Github Action to enable/create the blob with a single button. (This will need to take in text input for both the message and severity level)
The action can be re-run to disable the banner by removing the blob.
The action should only take a few seconds to run, so we're not waiting for a full deployment of the app to pass messages onto users.

Should this be environment specific, or apply across all environments? I think the latter would be a lot simpler to implement

Should this be environment specific, or apply across all environments? I think the latter would be a lot simpler to implement

I think applying across all environments is fine for now!


Split the selected terms to multiple lines in the batch date edit header

Split the selected terms to multiple lines, without ‘comma’ separator, in the batch date edit header

Reassigning to @Coenego for review.

Coverage remained the same at 100.0% when pulling f6111aff5e7fbc7cea313445faffd3523187efe0 on bp323:issue-182 into 38e7bb03c9e48b623fedec7993cb0fa79765db84 on CUL-DigitalServices:master.


Stack Overflow

Version and Platform (required):

Binary Ninja Version: 3.4.4271
OS: Windows 11 Pro
OS Version: 22H2 Build 22621.1702
CPU Architecture: x64

Bug Description:
When using the API to lift, if you use il.set_reg with an int as the value argument instead of a il.const(...), Binary Ninja crashes immediately with a stack overflow. For example:
class MovlpInstruction(Instruction):

    def __init__(self, name, data, addr):
        super().__init__(name, data, addr)

        self.imm = data & 0b1111111

        return

    def lift(self, il: LowLevelILFunction):

        il.append(il.set_reg(1, "PCLATH", self.imm))

        return

leads to the following crash immediately:
[0:1996 Default error] Traceback (most recent call last):
  File "C:\Users\kat\AppData\Local\Vector35\BinaryNinja\plugins\..\python\binaryninja\architecture.py", line 699, in _get_instruction_low_level_il
    result = self.get_instruction_low_level_il(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kat\AppData\Roaming\Binary Ninja\plugins\pic16f-binaryninja\arch.py", line 52, in get_instruction_low_level_il
    self.lifter.lift(data, addr, il)
  File "C:\Users\kat\AppData\Roaming\Binary Ninja\plugins\pic16f-binaryninja\lifter.py", line 16, in lift
    return Instruction.new(data, addr).lift(il)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kat\AppData\Roaming\Binary Ninja\plugins\pic16f-binaryninja\instruction\instruction.py", line 258, in lift
    il.append(il.set_reg(1, "PCLATH", self.imm))
  File "C:\Users\kat\AppData\Local\Vector35\BinaryNinja\plugins\..\python\binaryninja\lowlevelil.py", line 3543, in append
    return core.BNLowLevelILAddInstruction(self.handle, expr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kat\AppData\Local\Vector35\BinaryNinja\plugins\..\python\binaryninja\_binaryninjacore.py", line 36417, in BNLowLevelILAddInstruction
    return _BNLowLevelILAddInstruction(func, expr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: exception: stack overflow

I think a check for the type would be best there, to have the error in the console and not have to launch with debug and log mode.

Unfortunately the way our lifting is implemented Expressions are associated with an integer index. There is really no good way internally for us to check that you're passing a valid instruction index.  I highly recommend using a linter and type hints on your python code as this is an unfortunately common way to cause a crash when implementing a custom architecture. I've made this same mistake on many occasions.  In python at least we can differentiate between a constant and an ExpressionIndex through type hints which can be validated with type checking.