tf.reverse_sequence crash with abort when seq_axis is negative

Click to expand!
Issue Type
Bug
Source
binary
Tensorflow Version
tf 2.10
Custom Code
Yes
OS Platform and Distribution
Linux Ubuntu 20.04
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
`tf.reverse_sequence` crash with abort when seq_axis is negative

Standalone code to reproduce the issue
import tensorflow as tf

def f(input):
    seq_lengths = [7,2,3,5]
    seq_axis = -1
    batch_axis = 0
    return tf.reverse_sequence(input, seq_lengths, seq_axis=seq_axis, batch_axis=batch_axis)

f_jitted = tf.function(jit_compile=True)(f)
input=[[0]*8,[0]*8, [0]*8, [0]*8]
f_jitted(input)
# segfault

Relevant log output
segmentation fault (core dumped)

@MThalberg,
When we are using tf.reverse_sequence, the  seq_axis we should provide as an int and the dimension which is partially reversed and this op first slices input along the dimension batch_axis, and for each slice i, reverses the first seq_lengths[i] elements along the dimension seq_axis.

Hi @tilakrayal, the seq_axis is -1 in the code example. Here, the negative integer value cause crash. This could potentially be used for DoS attack.

@sachinprasadhs,
I was able to reproduce the issue on tensorflow v2.8, v2.10 and nightly. Kindly find the gist of it here.

Negative value in the seq_axis is handled in the code and it returns the InvalidArgument Error, below is the code and the output for that.
import tensorflow as tf
seq_lengths = [7, 2, 3, 5]
input = [[1, 2, 3, 4, 5, 0, 0, 0], [1, 2, 0, 0, 0, 0, 0, 0],
         [1, 2, 3, 4, 0, 0, 0, 0], [1, 2, 3, 4, 5, 6, 7, 8]]
output = tf.reverse_sequence(input, seq_lengths, seq_axis=-1, batch_axis=0)
print(output)

InvalidArgumentError: Invalid seq_dim -1 [Op:ReverseSequence]


Add case insensitive property for LDAP and AD userstore properties

Description:
Property "CaseInsensitiveUsername" needs to be added for LDAP and AD userstore properties.
Steps to reproduce:
Affected Product Version:
apim-2.6.0
Environment details (with versions):

OS:
Client:
Env (Docker/K8s):

Optional Fields
Related Issues:

Suggested Labels:

Suggested Assignees:

This issue is fixed. Hence closing the issue.


Omit the package names from the license text.

This was a minor typo in the original code. It makes the license display
slightly cleaner.


refactor: switch to subsystem loggers for HTTP logging

This addresses a linting issue that was bypassed in #736 to constrain the scope of that PR.  The logging transport we were previously using for HTTP clients is deprecated, but the new Terraform logging plugin is more context-aware and requires--or at least enables--specifying separate subsystems for each provider component that will write logs.
This adds a new HTTPLoggingTransport type that encapsulates the logic of creating a subsystem HTTP logging transport, ensuring the necessary subsystem exists in any relevant HTTP request context, and masking any sensitive values in the request.
The Config type is updated to create a separate HTTPLoggingTransport for each API client.  For now, the log level for all of the new transports is wired up to the TF_LOG environment variable.  This matches the previous behavior of the deprecated HTTP logging transport.

The log format for HTTP logs is different with the new loggers.  Previously we would see logs like this:
---[ REQUEST ]---------------------------------------
GET /metal/v1//devices/5f286421-214e-4366-9358-f77a6d3ea4b0?include=project HTTP/1.1
Host: api.equinix.com
User-Agent: HashiCorp Terraform/1.8.1 (+https://www.terraform.io) Terraform Plugin SDK/unknown-version terraform-provider-equinix/dev equinix-sdk-go/0.42.0
Accept: application/json

-----------------------------------------------------
2024/07/23 10:45:45 [DEBUG] Equinix Metal (metal-go) API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Content-Length: 19139
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8

{
 "id": "5f286421-214e-4366-9358-f77a6d3ea4b0",
 "short_id": "5f286421",
 "hostname": "tfacc-test-device-8858291862441735794",
 "description": "",
 "tags": [
  "8858291862441735794"
 ], ...
}

But the new loggers produce messages like this:
2024-07-23T14:47:34.535-0500 [DEBUG] equinix.Equinix Metal (metal-go): Sending HTTP Request: tf_http_trans_id=bce44d87-fd74-f11e-c4cd-2b90f42d73ab tf_http_req_body="" tf_http_req_version=HTTP/1.1 Host=api.equinix.com tf_http_op_type=request Accept=application/json X-Auth-Token="***" tf_http_req_method=DELETE User-Agent="HashiCorp Terraform/ (+https://www.terraform.io) Terraform Plugin Framework/unknown-version terraform-provider-equinix/dev equinix-sdk-go/0.42.0" tf_http_req_uri=/metal/v1//projects/701296d1-3de0-41fd-8f04-2142bbe1c733 Accept-Encoding=gzip
2024-07-23T14:47:35.160-0500 [DEBUG] equinix.Equinix Metal (metal-go): Received HTTP Response: tf_http_res_body="" X-Xss-Protection="1; mode=block" Cache-Control=no-cache X-Request-Id=3945d28e69a415cd76c5e5d172d75cc1 tf_http_res_status_code=204 X-Content-Type-Options=nosniff tf_http_trans_id=bce44d87-fd74-f11e-c4cd-2b90f42d73ab X-Permitted-Cross-Domain-Policies=none Referrer-Policy=strict-origin-when-cross-origin Date="Tue, 23 Jul 2024 19:47:35 GMT" tf_http_op_type=response tf_http_res_version=HTTP/1.1 X-Frame-Options=SAMEORIGIN X-Download-Options=noopen Connection=keep-alive Strict-Transport-Security="max-age=31536000; includeSubDomains" tf_http_res_status_reason="204 No Content"


Simplify imports of custom components and data

User story
As a user I want to be able to use simple import paths to easily import my custom components and custom data into MDX files.
Acceptance

[ ] custom data can be imported with a simple import path, e.g. import exampleData from "data/exampleData.json"
[ ] custom components can be imported with a simple import path, e.g. import MyComponent from "custom/MyComponent.jsx"

Tasks

[ ] research how to create custom path resolutions in MDX files

[ ] is it even possible when we're using Contentlayer?
[ ] do we need to create a custom mdx loader that would somehow do its work before Contentlayer takes over?

[ ] think about how to create such path resolutions dynamically, based on where the user has his components or data folder

Notes
At this point when we're trying to import custom data, that is located in /site/data, into MDX file the path looks like this:
import exampleData from "../../site/data/exampleData.json"

For custom components we've simplified this path a bit (or at least made its usage easier - same as for importing template components) by creating a symlink to /site/components in /templates/default/components (under custom name), so the path looks like this:
import MyComponent from "../components/custom/MyComponent.jsx"

instead of
import MyComponent from "../../site/components/MyComponent.jsx"

FIXED with 3897be239dca944c4a256c26163b0a488a2e619c thanks to adding cwd: process.cwd() in contentlayer.config.js.


vagrant up fails when using the fusion provider

± | ✓| → vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Box 'lattice/ubuntu-trusty-64' could not be found. Attempting to find and install...
    default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
    default: Box Version: 0.2.0
==> default: Loading metadata for box 'lattice/ubuntu-trusty-64'
    default: URL: https://vagrantcloud.com/lattice/ubuntu-trusty-64
==> default: Adding box 'lattice/ubuntu-trusty-64' (v0.2.0) for provider: vmware_desktop
    default: Downloading: https://atlas.hashicorp.com/lattice/boxes/ubuntu-trusty-64/versions/0.2.0/providers/vmware_desktop.box
==> default: Successfully added box 'lattice/ubuntu-trusty-64' (v0.2.0) for 'vmware_desktop'!
==> default: Cloning VMware VM: 'lattice/ubuntu-trusty-64'. This can take some time...
==> default: Checking if box 'lattice/ubuntu-trusty-64' is up to date...
==> default: Verifying vmnet devices are healthy...

And just hangs there

@cdavisafc what version of vmware fusion are you using?  we've tested with the latest 7.1.1 i believe, there was an earlier report on #26 of something similar, and we rebuilt the vagrant image to fix that, but aren't sure about backwards-compatibility now

Good point - I am still on the latest version of 6.x. Am working on getting a license for 7 and will report back.

Saw this issue with a fusion/vbox vmnet conflict in the past. did you run it in box first, then switch the fusion?

On Apr 2, 2015, at 2:15 PM, Cornelia Davis<EMAIL_ADDRESS>wrote:
± | ✓| → vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Box 'lattice/ubuntu-trusty-64' could not be found. Attempting to find and install...
default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
default: Box Version: 0.2.0
==> default: Loading metadata for box 'lattice/ubuntu-trusty-64'
default: URL: https://vagrantcloud.com/lattice/ubuntu-trusty-64
==> default: Adding box 'lattice/ubuntu-trusty-64' (v0.2.0) for provider: vmware_desktop
default: Downloading: https://atlas.hashicorp.com/lattice/boxes/ubuntu-trusty-64/versions/0.2.0/providers/vmware_desktop.box
==> default: Successfully added box 'lattice/ubuntu-trusty-64' (v0.2.0) for 'vmware_desktop'!
==> default: Cloning VMware VM: 'lattice/ubuntu-trusty-64'. This can take some time...
==> default: Checking if box 'lattice/ubuntu-trusty-64' is up to date...
==> default: Verifying vmnet devices are healthy...
And just hangs there
—
Reply to this email directly or view it on GitHub https://github.com/cloudfoundry-incubator/lattice/issues/74.

It's possible, I don't remember for certain. How do I fully reset from this? What is left after I do a vagrant destroy that causes this?

the virtualization provider (i.e., virtualbox or vmware fusion) still has networking interfaces after a vagrant destroy that attempting to use a different provider will conflict with.  If you simply did a vagrant up on Fusion, you'll need to do LATTICE_SYSTEM_IP=<IP_ADDRESS> vagrant up --provider=virtualbox to avoid the networking conflict.  This is mentioned at https://github.com/cloudfoundry-incubator/lattice#networking-conflicts.
We're also updating the docs to indicate the minimum supported version for VMware Fusion is 7.x

Yes, I have run into that, and have set the LATTICE_SYSTEM_IP when starting the vagrant box. I don't believe that this has anything to do with the lattice vagrant box not starting with the fusion provider though. I've now got fusion 7 and am looking for the latest version of the fusion plugin for vagrant - or I should say, a license for it. I'll report back as soon as I can.

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start

On Apr 3, 2015, at 7:52 AM, Cornelia Davis<EMAIL_ADDRESS>wrote:
It's possible, I don't remember for certain. How do I fully reset from this? What is left after I do a vagrant destroy that causes this?
—
Reply to this email directly or view it on GitHub https://github.com/cloudfoundry-incubator/lattice/issues/74#issuecomment-89310612.

that is correct.  it's something to do with vmware tools baked into .box image not working properly with vmware provider i think (being out of sync).

fusion 7 works fine for me - and I note that the README was updated today to indicate that requirement. Thx.


added address option for enabling restricted setup

Hi,
because my tomcat instance is only accessible from localhost, I have to set the address attribute of the connector tag. This was not possible right now, so I added the support for the config option.
Please add the "feature" to your cookbook.
best regards,
Christian Kaspar

+1 for getting this merged

First off I'm very sorry that it's taken so long to get back to you on this PR.  For a significant period of time there was no active Chef Software Inc. maintainer for this repository and things languished.  We're now actively maintaining this cookbook again, and as part of that I've rewritten the cookbook with new custom resources for installing Tomcat from Apache Org sources.  This will ship in an upcoming 2.0 release and then we'll remove the existing recipes and providers in a future 3.X release.  With those new providers I believe the need for this change goes away so I'm going to close this out.  I encourage you to give the new providers a try and let me know if we can tackle more Tomcat management without the attributes bloat the current code suffers from.  They're on the master branch and once the documentation and testing improves a bit they'll be released as a 2.0 cookbook.


Remove deprecated test fixtures

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

Project coverage is 94.31%. Comparing base (af0fde4) to head (3e9eb5a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #343   +/-   ##
=======================================
  Coverage   94.31%   94.31%
=======================================
  Files           6        6
  Lines         299      299
=======================================
  Hits          282      282
  Misses         17       17

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


test-revert

This was just a test to determine if the source of the breaking linux runners was due to the last PR. It is not.

This was just a test.


Enhancement/Execute external requests to VCS/CIS in batches

Attempt to improve reliability of submission/result handling.
Fixes issue: https://github.com/ls1intum/Artemis/issues/1000
Requests to the VCS (lock repos), CIS (trigger builds) are now executed in batches, before which we wait a specified delay to not overload the external systems with requests.

Hey @thilo-behnke, I just saw this and maybe we can create a util to simplify this and make it reusable like so:
    public static <T> void batch(List<T> list, int batchSize, int sleepTime, Consumer<T> consumer) {
        for (int index; index < list.size(); index++) {
             if (index > 0 && index % batchSize == 0) {
                 try {
                     Thread.sleep(sleepTime);
                 } // TODO: catch
             }

            consumer.accept(list.get(i);
        }
    }

Hey @thilo-behnke, I just saw this and maybe we can create a util to simplify this and make it reusable like so:
public static <T> void batch(List<T> list, int batchSize, int sleepTime, Consumer<T> consumer) {
  for (int index; index < list.size(); index++) {
    if (index > 0 && index % batchSize == 0) {
      try {
        Thread.sleep(sleepTime);
      } // TODO: catch
    }

    consumer.accept(list.get(i);
  }
}

I can't test this well locally when I'm not at home so I made it as easy as possible. I think for the now the fix is sufficient.


Recommendations for tuning with large dataset

I have a table with 170 million rows and a vector(512) column,
I started building the index with the default settings, but after 25 minutes it appears as though it is only 1% of the way through building the graph!
SELECT phase, round(100.0 * blocks_done / nullif(blocks_total, 0), 3) AS "%" FROM pg_stat_progress_create_index;

What index settings would be suitable for such a large amount of data?

At the moment, indexing millions of vectors is going to be a resource and time intensive operation regardless of the vector database technology you choose.
As of version 0.2.0, a 50 million vector dataset of 768 dimensions took roughly 2 days to index on an unpartitioned table using the default index build parameters using a machine with 64 CPUs, 128 GB of RAM, and the data directory placed on a local SSD.
For comparison, a considerably more expensive Pinecone setup took roughly 1 day to index the same dataset. However, it performed worse than pgvectorscale at query time.
See our blog post for more details.
You can experiment with the index build parameters, which may speed things up, but you will likely trade off some accuracy at query time. This may or may not be acceptible to you.
You can also try partitioning the table and building indexes on the partitions in parallel. This will likely also negatively impact accuracy, but might be okay for you. Smaller partitions will index more quickly, but will probably have a more negative impact on accuracy.

That's extremely helpful, thanks John.


ssh using github action appleboy/ssh-action

I want to ssh into server using  this github action https://github.com/appleboy/ssh-action, With following config:
  pull:
    runs-on: ubuntu-latest
    steps:
      - name: ssh key passphrase
        uses: appleboy/ssh-action@master
        with:
          host: direct.labs.play-with-docker.com
          username: ip172-18-0-018-cd3jsnm1tccg00b3sbjg
          key: ${{ secrets.SECRET_KEY }}
          port: 22
          script: |
            docker composer up -d --build

But i'll get the following error:
======CMD======
docker composer up -d --build

======END======
err: Connecting to <IP_ADDRESS>:8022
out:
out:
err:
err:
2022/10/14 14:20:49 wait: remote command exited without exit status or exit signal
err:
err:
err:
err:
out:
err:
out:
out:
out:
out:
out:
err:
out:
err:
out:
out:
err:
out:
out:
err:
err:
err:
err:
err:
err:
err:
out:
out:
err:
out:
out:
err:
out:
err:
out:
err:
err:

why do you want to ssh into PWD from a github action? that's not what the environment is used for.

I just wanted to train myself before using a actual server

I see.. but this issue doesn't belong here. I'd open it in the GH
action repo.


equivalent of kubectl describe

Here is what a typical pod description looks like:

Name:               weavescope-probe-x7qma
Namespace:          default
Image(s):           weaveworks/scope:0.13.1
Node:               kube-6/<IP_ADDRESS>
Start Time:         Tue, 08 Mar 2016 12:20:08 +0000
Labels:             k8s-app=weavescope-probe
Status:             Running
Reason:
Message:
IP:             <IP_ADDRESS>
Replication Controllers:    <none>
Containers:
  weavescope-probe:
    Container ID:   docker://ab802641492c6f3a376c65ce6d84fc45b329e86045f4a95a9080ea506e093358
    Image:      weaveworks/scope:0.13.1
    Image ID:       docker://sha256:d721bbaaca3544ae2c7102c027c8c78b85d58a17daecd0c44fe1e55c46d2fe19
    QoS Tier:
      cpu:  Guaranteed
    Limits:
      cpu:  50m
    Requests:
      cpu:      50m
    State:      Running
      Started:      Tue, 08 Mar 2016 12:20:22 +0000
    Ready:      True
    Restart Count:  0
    Environment Variables:
Conditions:
  Type      Status
  Ready     True
Volumes:
  docker-sock:
    Type:   HostPath (bare host directory volume)
    Path:   /var/run/docker.sock
  default-token-ss3h5:
    Type:   Secret (a secret that should populate this volume)
    SecretName: default-token-ss3h5
Events:
  FirstSeen LastSeen    Count   From            SubobjectPath               Reason  Message
  ─────────   ────────    ───── ────            ─────────────             ──────  ───────
  14m       14m     1   {kubelet kube-6}    implicitly required container POD   Pulled  Container image "gcr.io/google_containers/pause:0.8.0" already present on machine
  14m       14m     1   {kubelet kube-6}    implicitly required container POD   Created Created with docker id 66d40ef47151
  14m       14m     1   {kubelet kube-6}    implicitly required container POD   Started Started with docker id 66d40ef47151
  14m       14m     1   {kubelet kube-6}    spec.containers{weavescope-probe}   Pulling Pulling image "weaveworks/scope:0.13.1"
  14m       14m     1   {kubelet kube-6}    spec.containers{weavescope-probe}   Pulled  Successfully pulled image "weaveworks/scope:0.13.1"
  14m       14m     1   {kubelet kube-6}    spec.containers{weavescope-probe}   Created Created with docker id ab802641492c
  14m       14m     1   {kubelet kube-6}    spec.containers{weavescope-probe}   Started Started with docker id ab802641492c

It'd be nice to present similar information in details panel, for pods as well as services and replication controllers etc.

I think the "ready" status is most important.  Then maybe the restart count.

@errordeveloper @bboreham Would you be open to having this information as a pop-out, similar to the logs UI?

@BenHall I was initially suggesting that some of this info could be covered in the details panel, but I've not given it too much thought.


internal/tests-not-run-properly

Useful links: https://stackoverflow.com/questions/23260057/the-forked-vm-terminated-without-saying-properly-goodbye-vm-crash-or-system-exi
https://java.tutorialink.com/maven-build-and-maven-failsafe-plugin-the-forked-vm-terminated-without-properly-saying-goodbye/

Solution: sometimes the Integration Tests doesn't close Java properly so the Java session is still opened. You must open the Task manager and close OpenJDK process


dask.dataframe.resample

Given a series that is indexed and partitioned on a datetime, implement resample from pandas.
If the resample period fits nicely within the partitions then this should be a straightforward operation.  This might be enough to start with.
If we want to get adventurous we could also take a bit from the surrounding partitions similar to how dask.array does ghosting (though far simpler).  If we go this route then it might be good to generalize the overlap logic.
If a continuum person works on this then the anaconda-download-data might be a good test dataset.  I've been playing with it for other projects and can probably provide a decent testbed.
CC @cpcloud this might be up your alley.

After #354 and the dd.repartition function I think that resample just became much easier.  I think that it suffices to align the partitions to the nearest resample period boundary (e.g. shift every partition to the nearest Sunday or whatever) and then the appropriate pandas resample function onto each block.
It is still non-trivial to find those datetime boundaries but I wouldn't be surprised if there was magic in Pandas to align things.
E.g. if resampling by month and if we have the following divisions
>>> df.divisions
('2014-01-01',
 '2014-04-03',
 '2014-08-04',
 '2014-11-05')

Then we probably want to call repartition with the following new divisions that fall on month boundaries.
>>> df2 = df.repartition(['2014-01-01', '2014-04-01', '2014-08-01', '2014-11-05'])

Note that we kept the first and the last as-is.  Not sure what Pandas does in this case.
Then we should be able to use map_blocks
>>> df3 = df2.map_blocks(lambda part: part.resample(...))

cc @cpcloud

This was completed by #332  #369 and finally #613


Infinities during model evaluation

I'm noticing infinities appearing in the hidden state during decoding (the MLP is the immediate culprit, even while unfused).
This unsurprisingly makes the probs very very unhappy.
Any advice on potential causes, or how to debug this?

That's not a lot to go on. Any other details like, what model etc..?

Ah, sorry. I was testing with https://huggingface.co/TheBloke/Chronos-Hermes-13B-SuperHOT-8K-GPTQ, with args -l 8192 -a 4.
Prompting is relatively simple:
I start with "This is a roleplay between Alice and Bob.\nAlice is trying to get help from Bob on her science homework.\nThe roleplay between Alice and Bob begins.\n### Response:\nAlice: "
Then alternating between "\n### Response:\nBob: " and "\n### Response:\nAlice: ". I usually hit a infinities after only a few generations, though the output is... comprehensible until then.
I'm trying to get some intuition for how these kinds of failures creep in, and methods to debug them.
I've noticed that hidden_state often develops max values of several thousand during decoding; is that expected?
I would have expected much smaller ranges, especially if there's only 4 bits of weight to play with...

Well, it's always difficult to debug. The hidden state is repeatedly normalized, so if it grows out of control I would suspect some problem with the weights or how the model is being used. In your case you're using -a 4 which isn't correct for SuperHOT, which is tuned to use RoPE scaling. You'll want to use -cpe 4 instead for this particular model.
That's probably the issue here, but as for how you'd go about detecting that... yeah, it's a black box at the end of the day. You can compare to a reference, say the unquantized version of the model running in HF Transformers, then try to find where the hidden state deviates more than it should due to quantization. But that'll only help find some bug in the implementation, it won't highlight a problem with the model itself or how it's being used.

Well, nuts.
Unfortunately, it looks like switching to -cpe 4 didn't fix it, still running into the same issue, complete with hidden_state values climbing into the 7000s.

I come bearing good, but also potentially much worse, news.
I've tried multiple different projects, even ones that run with FP16 precision, and it seems that some models on HF just... spit out infinities sometimes. I think it may be something to do with the LoRA process, but that's a complete guess on my part.
It's either a problem with the models, or at least three separate projects (using GPTQ, GGML, and FP16 respectively) all have a bug with the same symptoms.

Well, language models are black boxes. There's really nothing to constrains the values in the hidden state, other than some normalization over the forward pass. In some years it may be possible to use a much larger language model to interpret the hidden state of a smaller model, but for now that's kind of unrealistic.
And lots of stuff can go wrong during finetuning, especially with how confused some people are about the whole process. If a model shows the same behavior in quantized and full-precision versions, on different implementations, I'd say it's probably just a bad model.

Closing this for now unless there's some indication that the behavior is down to a bug in the implementation rather than the model weights.


Publish workflow (for latest and beta) [not fully tested yet!]

When you add a release, it check if it is pre-release or not.
The version to publish to npm is downloaded from the github release tag.
I did not test the publication for npm process because I do not know about it. It's a request to you because I know you know about it well.

When you add github release you add tag like 1.5.1 to latest version and 1.5.1-beta.0 for beta version.
PS: this is marked as x (not pass lint compile test) - you must first merge #187 (there are fixes for old errors and warnigs) or fix them by yourself.

@ilcato I changed it to one workflow that automatically detects whether it should be beta or not.

@ilcato You can merge this workflow without worries - until it will be tested 100% it can be disabled. But you can already make corrections at this time.


[New game]: 2048 game

🎮 Game Request
"2048" is an addictive and challenging puzzle game that tests the player's strategic thinking and planning abilities. With its simple yet engaging gameplay mechanics, players must carefully plan their moves to create larger numbers while preventing the grid from filling up too quickly. The game's minimalist design and intuitive controls make it accessible to players of all ages, yet mastering it requires patience, concentration, and foresight.
Point down the features
Game points
Select program in which you are contributing
GSSoC24
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @SrijaVuppala295 , You can't have another issue before completing the previous one 😀
you already have the following 1 open issues 👀 ! :
#3222

Hey @SrijaVuppala295 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇

Hey @SrijaVuppala295 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

assign


Decompression error?

This file appears to be corrupted. What happened?
image-2024-4-4.npy.ckl.gz
Here's the original file:
image-2024-4-4.npy.gz

This was due to some local experimental changes, not due to a released version.


Creation hangs if Github default branch is not master

Expected behavior
Begin apps would deploy from master
Description of bug
When the default branch is not set to master, then the deploy process will hang indefinitely.
Steps to reproduce

create a repo on Github
create a develop branch
use repo settings to set default branch to develop

create new Begin app from existing repo

Screenshots
App will remain on fetching git repo step

Additional context or notes
If a default branch is changed after a successful deploy, begin will not deploy future pushes to master.
This is my test app https://github.com/pchinjr/begin-different-default-branch

We're overdue to fix this feature, especially since we're all going to be moving on from master soon enough (and rightfully so).

/cc @gr2m

Good news! The first version of this shipped last week. Anyone can now change their default branch to any name (and even associate new apps with existing repos that use a default branch of any name) and it will be automatically picked up and used by Begin.
This is a nice improvement for customization, and a small step forward in promoting the use of inclusive language and terminology within our industry.


⚠ Bofrost.lu has degraded performance

In a02c031, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1027 ms

Resolved: Bofrost.lu performance has improved in 464f215 after 6 minutes.


Contributing new datasets

Hi thank you for your great work ! Is open-instruct open to contributions ? (The code seems understandable enough for me to submit a PR easily enough)
I would like to add tasksource-instruct https://huggingface.co/datasets/tasksource/tasksource-instruct-v0
Thanks

Hi,
Thanks for your interest! We are open to contributions, although we would like to make sure that original experiments remain reproducible and I'm not sure what adding a new dataset would help with - we are not planning to rerun experiments over every new instruction dataset.
Are you planning to add a conversion function in [reformat_datasets.py](https://github.com/allenai/open-instruct/blob/main/open_instruct/reformat_datasets.py)? So long as you have a dataset file with the right format, using this codebase to train models on new datasets should be straightforward.

Closing due to inactivity.


MFEM under compiler variability

FLiT Overview
FLiT is a tool used to measure and locate compiler-induced variability in C++ code.  It does this by providing a C++ floating-point testing framework and by running many compilations.
FLiT Results with MFEM
All 19 MFEM examples (run on MFEM version 3.4) were converted into FLiT tests and run through 244 compilations.
Here is a table of relative variability of each of the 19 examples from MFEM version 3.4.

Test
# variable of 244
min rel. err.
mean rel. err.
max rel. err.

1
49
4.8e-15
5.8 e -15
1.3 e -14

2
49
8.2e-14
1.3e-13
2.0e-13

3
107
1.8e-14
2.0e-14
2.3e-14

4
109
4.9e-10
8.5e-10
4.4e-9

5
115
8.9e-15
6.5e-14
1.3e-13

6
49
5.0e-15
7.6e-15
2.0e-14

7
55
6.5e-16
1.1e-15
1.9e-15

8
49
2.4e-7
3.1e-7
7.6e-7

9
119
1.0e-15
4.1e-15
1.8e-14

10
117
3.3e-11
6.8e-11
1.2e-10

11
13
2.3e-14
1.9e-9
3.9e-9

12
0
-
-
-

13
12
1.84
1.92
1.97

14
51
6.4e-15
3.9e-14
1.1e-13

15
118
3.9e-15
1.9e-12
7.3e-12

16
49
5.2e-16
8.4e-16
3.4e-15

17
50
5.0e-14
2.5e-13
5.7e-13

18
0
-
-
-

19
55
1.2e-9
1.8e-9
2.2e-9

These numbers represent relative error according to the L2 norm.  Noteworthy are tests 12 and 18 had no observed variability by the FLiT tool regardless of the compilation performed.  Also noteworthy is that tests 8 and 13 had a significant relative error.
Relative error is calculated as || baseline - actual || / || baseline ||, where baseline is the mesh from g++ -O0.
Example 8
We had manually investigated this difference with an older version of MFEM and had isolated the problem to dot product: vector.cpp line 90 mfem::Vector::operator*(double*).  With this new version of MFEM, things have changed a bit:
For g++ -O2 -mavx2 -mfma, we get the following functions with associated absolute errors (marked as "score"):

mfem/linalg/densemat.cpp:3689 mfem::AddMult_a_AAt(double, mfem::DenseMatrix const&, mfem::DenseMatrix&) (score 7.7e-6)
mfem/linalg/densemat.cpp:643 mfem::DenseMatrix::Invert() (score 6.3e-6)
mfem/linalg/densemat.cpp:461 mfem::DenseMatrix::Det() const (score 4.4e-06)
mfem/linalg/densemat.cpp:2975 mfem::Mult(mfem::DenseMatrix const&, mfem::DenseMatrix const&, mfem::DenseMatrix&) (score 3.7e-6)
mfem/linalg/sparsemat.cpp:493 mfem::SparseMatrix::AddMult(mfem::Vector const&, mfem::Vector&, double) const (score 1.6e-6)
mfem/linalg/sparsemat.cpp:571 mfem::SparseMatrix::AddMultTranspose(mfem::Vector const&, mfem::Vector&, double) const (score 1.6e-6)
mfem/linalg/vector.cpp:279 mfem::add(mfem::Vector const&, double, mfem::Vector const&, mfem::Vector&) (score 3.8e-7)
mfem/linalg/densemat.cpp:3480 mfem::AddMultABt(mfem::DenseMatrix const&, mfem::DenseMatrix const&, mfem::DenseMatrix&) (score 6.6e-8)
mfem/linalg/vector.cpp:90 mfem::Vector::operator*(double const*) const (score 3.0e-8)

For g++ -O3 -mavx2 -mfma, we get the exact same list, except mfem::Vector::operator*() no longer causes variability.
For g++ -O3 -funsafe-math-optimizations, we only get one variability-inducing symbol:

mfem/linalg/vector.cpp:90 _ZNK4mfem6VectormlEPKd -- mfem::Vector::operator*(double const*) const (score 3.2e-6)

Note: this is dot product again, but with a much higher variability than that seen with g++ -O2 -mavx2 -mfma.
There were 49 total compilations that caused variability.  These are the only three for which example 8 succeeded with symbol bisect.
Example 13
This was not in the old set of tests and is brand new.  The relative error here is between 183% to 197%.  That is very significant.  All successful bisect runs found only one function to blame, with different scores.  The ones listed below are absolute scores where the L2 norm of the baseline mesh is 5.64.
The one blamed function is:

mfem/linalg/densemat.cpp:3689 mfem::AddMult_a_AAt(double, mfem::DenseMatrix const&, mfem::DenseMatrix&)

The compilations with their L2 norms are:

g++ -O3 -mavx2 -mfma (score 10.9)
icpc -O2 -march=core-avx2 (score 10.4)
icpc -O3 -march=core-avx2 (score 10.4)
g++ -O2 -mavx2 -mfma (score 10.9)
icpc -O3 -fp-model=extended (score 11.1)
icpc -O2 -fp-model=extended (score 11.1)

I believe this requires further investigation.  At least based on the flags used, AVX2, FMA, and higher precision intermediates are likely culprits (depending on the compilation).  The function in question performs a scalar and matrix multiplication followed by a matrix addition.
  This is easily vectorizable and capable of utilizing FMA.  Either extreme catastrophic cancellation is occurring or the algorithm itself is numerically sensitive to small variations in this matrix operation.
Conclusion
I believe these two tests warrant further investigation by the MFEM team to see about making these functions more robust or documenting that particular compiler optimizations are unsafe if using one of these two methods.  I am unsure if other relative errors are sufficiently small to safely ignore effects of compiler optimizations.

This will be discussed in a meeting at LLNL on 11/12/19.


[HUDI-1130] hudi-test-suite support for schema evolution (can be trig…

…gered on any insert/upsert DAG node).
Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contributing.html before opening a pull request.

What is the purpose of the pull request
Each insert/upsert dag node in the hudi test-suite can specify a schema to be used for the node.   DAG execution context
is reinitialized with the new/evolved schema.  This allows verification of schema evolution scenarios.
Brief change log

Modify the test suite to accept "reinitialize_context" flag and new schema file.
reinitialize the writer context, as part of DAG node execution.  (Remaining nodes will use the updated schema).

Verify this pull request
Verified using the hudi-test-suite.
This change added tests and can be verified as follows:

Launched hudi test suite with the following:

    insert_1:
      config:
        record_size: 7000
        num_partitions_insert: 1
        repeat_count: 5
        num_records_insert: 10
        reinitialize_context: true
        hoodie.deltastreamer.schemaprovider.source.schema.file: "file:///tmp/evolved.avsc"

Committer checklist

[ x] Has a corresponding JIRA in PR title & commit

[x ] Commit message is descriptive of the change

[ x] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

can we first make the test-suite tests work on master and run in CI, before we merge more features? cc @n3nash

@vinothchandar Yes, that PR is following later today by @modi95. We will merge this after that.


Caching etcd/backend responses is non productive

I'm not sure this caching helps anyone. I'm also still in the process of validating this works correctly. I think this ripping this out and only cache upstream queries would help some people.
So the plan is: rip out caching in the normal (query backend) path. Only use caching for recursive upstream queries. This is also more inline with how "proper" nameservers work, i.e. assume your backend is responsive and just query that.

Pondering ripping out the entire caching stuff (except for signatures - which is used internally). Why not bother with caching: edns buffer size(s) potentially makes this more difficult, as an cached answer might not fit the current buffer size of a client. DNSSEC yes/no complicates this further.
I also feel it makes the behavior of SkyDNS more straight forward. And simplifies the code.

New plan: use go-cache. Rip out my stuff.  Looks in the cache first when getting answers from etcd.
replace dnssec signature cache with go-cache
add upstream caching, also for stub zone - this will speed up those queries considerably.

@miekg could it be considered, that SkyDNS starts caching local domain entries so, that it does not rely on TTL anymore, but rather it starts watching the relevant records in the backend (e.g. etcd)?

long living entries in the backend do not require TTL refresh in SkyDNS
SkyDNS can answer queries from the cache as long as the record is in the backen
record removals in the backend are realized "immediately" (well, fast) in the cache with the help of the watch - so no stale records are returned to the clients until the TTL expires.

[ Quoting<EMAIL_ADDRESS>in "Re: [skynetservices/skydns] Caching..." ]

@miekg could it be considered, that SkyDNS starts caching local domain entries so, that it does not rely on TTL anymore, but rather it starts watching the relevant records in the backend (e.g. etcd)?

long living entries in the backend do not require TTL refresh in SkyDNS
SkyDNS can answer queries from the cache as long as the record is in the backen
record removals in the backend are realized "immediately" (well, fast) in the cache with the help of the watch - so no stale records are returned to the clients until the TTL expires.

Think CoreDNS caching might be more to your liking
(https://github.com/coredns/coredns). That can cache everything, but with a
fixed (configureable) TTL. This cache is backend agnostic, so there is no
eviction based on a watch (although surely something like that could be added).
/Miek
--
Miek Gieben


Could make it compatible with other S3 providers?

leaving a custom URL option would be great

That would be awesome!

I think it could be made using the pip package awscli-plugin-endpoint which allows to easily (said the authors) access third party S3 providers.
I'm too much of a beginner with HASS to know how and if it could work though.

Hey, thanks for the Feature Request. I am open for a Pull Request. If you can test i with other providers, please also add a note to the README on which Providers you have tested it.


scrollify doesn't set height correctly

Hi,
I'm using scrollify in a React application and have the problem that scrollify doesn't set the height so that every section fills out the entire browser window.
I don't know what I am doing wrong, but I have an identical website without react where everything works properly.
What would be the best way to set the height manually?
My idea was to set it on the before callback. Something like this: $.scrollify.current().css({'height':$(window).height()});
Any other ideas?
Thanks

Just found the issue. Scrollify doesn't work with the latest jQuery lib 2.2.0.
For some reason this:
$(this).css("height","auto").outerHeight()
only returns the Element and not the outerHeight(). This way this line:
($(this).css("height","auto").outerHeight()<$(window).height())
always returns false= and height isn't set to the current window size.
I didn't dig further into it but I hope this helps.

Thanks, this is helpful. I'll investigate further.

I've now looked for the issue you describe using jQuery 2.2.0, 2.2.1 and 2.2.2 and I've not found that problem.
I think your issue might have had some other root cause.

I thought I had this same error; however, I found that I had a section overflowing in x direction. And while the body has overflow:hidden when scollbars are disabled, the height calculations still thought there was an x scollbar therefore the window size was about 20px shy of full height. Applying overflow-x: hidden on the afflicting section solved my issue. Hope that helps someone.


Add missing word 'from'.

Add a missing word "from" in the "Entities with properties" section.
Automatically apply markdown formatting per Google's markdown style guidelines.

@rsned Will you please review?


Demo not work?

Hello,
Login data for demo usage not work for me.


Immutable DB: better recovery of index files

During validation of the on-disk files stored by the ImmutableDB, each epoch file is parsed and verified against the offsets in the corresponding index file. When the index file is missing or corrupt, we can only be sure that the epoch file is complete when the last slot of the epoch is filled with a block, otherwise it is possible that the last block(s) might not have been written to disk or might have been truncated somehow. If we ignore this possibility, we could end up restarting with a chain that contains a gap.
This is unfortunate, as it would be very useful to be able to throw away all index files and reconstruct them (e.g., in #756). Duncan suggested checking the back pointer of the first block of the next epoch, but the ImmutableDB doesn't know about blocks (with blockPrevHash and blockHash), only about binary blobs. However, the EpochFileParser might be able to return us the hash of the first block.

I have played around with this. I was blocked by the lack of a correct blockPrevHash implementation for the test blocks.
We want simple test blocks that we can generate without (much) state. For example, we use the block itself as its hash or use a path through the chain as a hash. We derive the slot and block number from each other or from the hash.
Unfortunately, this prevents us from implementing blockPrevHash, as the hash of the block would need to include the hash of the previous block, which includes the hash of the block before it, and so on. Deriving the blockPrevHash deterministically is not really an option, because we wouldn't be able to skip slots or EBBs.
I think we should bite the bullet and implement more complex test blocks that resemble real blocks more, and support all desired features (EBBs!). They will need a real hash, but a simple and quick one.
See #872 and #966.

Further enhancements will be part of https://github.com/input-output-hk/ouroboros-network/issues/1253 .

Done in #1244.


Need to write a proper system-agent uninstall script

The system-agent today currently installs via a posix-compliant shell script found at https://github.com/rancher/system-agent/blob/main/install.sh
We need to create a corresponding uninstall script that removes the system-agent from the node.
Notably, it should just "ctrl-z" the actions that the install script performs.
It should clean up the stock directories for the system-agent i.e.
/etc/rancher/agent
/var/lib/rancher/agent
/etc/systemd/system/rancher-system-agent.service
/etc/systemd/system/rancher-system-agent.env
/usr/local/bin/rancher-system-agent
- OR -
/opt/rancher-system-agent/bin/rancher-system-agent

It should accept the same environment variables as the install script to handle the case where the user changes the directories the script installs to.
Bonus points if we install the uninstall script along with the system-agent.

@jakefhyde @rosskirkpat @luthermonson @sirredbeard just pinging you all so we don't forget that we need this for Windows too.

@jakefhyde If this is implemented for Linux, it needs to be implemented for Windows too.

@sirredbeard @phillipsj , we're not too familiar with the way it work on Windows, so would like your assistance for this. Do you want a separate issue created elsewhere for this?
@Oats87 , would be great if you could also clarify the "ask" in this ticket as it's not clear what's the purpose or intended future use of the requested script.

Happy to help.

@sirredbeard @phillipsj, added https://github.com/rancher/windows/issues/171 - please add labels / status as necessary.
Ideally, we want this script done ready for v2.6.5 release, but it's not part of "code" per se so it can be done up until the release date. @jakefhyde, FYI.

@snasovich both issues have the 2.6.6 milestone. Do we want this for 2.6.5 or 2.6.6?

@snasovich Doesn't the script need to go into the RKE2 release, which has already been cut for April?

@sirredbeard , this issue is to come up with a script to cleaning up system-agent manually.
This is in addition to removing RKE2 which is detailed here: https://docs.rke2.io/install/linux_uninstall/#tarball-method.
In a long run we probably want this done automatically by Rancher as part of deleting Custom RKE2 clusters, similar to how cleanup is done for Custom RKE1 clusters. So right now there is no need to "bake" this script into anything - just document (ideally we should include it with system-agent install similar to how RKE2 does it, but it's too late for that for 2.6.5 as you correctly pointed out).

@phillipsj Is mostly done with the script and will be testing. It can be added to docs when Linux script is added to the docs.
cc @snasovich

Root cause
System agent  did not have an uninstall script
What was fixed, or what changes have occurred
An uninstall script was installed alongside system agent when the install script is used.
Areas or cases that should be tested
Airgap and non-airgap clusters should have no problem installing the uninstall script
The uninstall script should uninstall everything related to system agent
What areas could experience regressions?
N/A
Are the repro steps accurate/minimal?
:heavy_check_mark:

This issue is currently blocked by https://github.com/rancher/rancher/issues/38438. Once the associated PR (https://github.com/rancher/system-agent/pull/88) is merged, this issue can be tested on airgap.

Additional Information from @jakefhyde:
"the system-agent install script will install it automatically when it installs the system-agent binary. For a custom cluster, you'll remove the node from the cluster and have to manually ssh in and run the script yourself. It will remove all related system-agent resources:
/var/lib/rancher/agent
/etc/rancher/agent
/usr/local/bin/rancher-system-agent
/opt/rancher-system-agent (if /usr/local is read-only)
/etc/systemd/system/rancher-system-agent.service
/etc/systemd/system/rancher-system-agent.env
The install script and the uninstall script will be left behind in /usr/local/bin, but everything else should be removed."
cc @slickwarren @sowmyav27

so to summarize, here is our tentative test plan:
uninstall script is at /usr/local/bin The install script and the uninstall script will be left behind in /usr/local/bin, but everything else should be removed." with the name rancher-system-agent-uninstall.sh
test cases:

verify that the uninstall script is available for the following rke2 cluster types:

node driver clusters
custom clusters

verify for custom clusters that the uninstall script works by doing the following (not necessary to test for node driver clusters because scaling down/removing a node from a node driver will remove the entire node):

delete the node from rancher

verify that the following resources still exist on the deleted node:

/var/lib/rancher/agent
/etc/rancher/agent
/usr/local/bin/rancher-system-agent
/opt/rancher-system-agent (if /usr/local is read-only)
/etc/systemd/system/rancher-system-agent.service
/etc/systemd/system/rancher-system-agent.env

after node is removed on rancher side, ssh into the node and run the uninstall script.

verify that the previously mentioned files are removed

edge cases:

making sure it works on different role nodes (etcd, controlplane, worker).
reusing a previously used node in a new cluster to verify that everything was cleaned up to the point that it is a useful node again.
There might be some other edge cases we can think of.

@jakefhyde could you clarify one point for us? In the original comment:
It should accept the same environment variables as the install script to handle the case where the user changes the directories the script installs to.

What vars to add to change the directory for install/uninstall scripts?

@slickwarren https://github.com/rancher/system-agent/blob/6a89e30879b60966471bc52d4c499adfef6f65be/install.sh#L16-L21
So if you were to create an rke2 cluster with the env vars CATTLE_AGENT_CONFIG_DIR=/tmp/rancher for example, running the uninstall script with CATTLE_AGENT_CONFIG_DIR=/tmp/rancher rancher-system-agent-uninstall.sh should properly clean it up. While in theory everything should work if those vars are set, if they don't it would be a separate issue.

tested in airgap on v2.6.7-rc6 (awaiting other section of testing in non-airgap setup):

verify that the uninstall script is available for the following rke2 cluster types:

custom clusters  -- pass (installed once node is registered with the cluster)

verify for custom clusters that the uninstall script works by doing the following (not necessary to test for node driver clusters because scaling down/removing a node from a node driver will remove the entire node):

delete the node from rancher

verify that the following resources still exist on the deleted node: (see https://github.com/rancher/rancher/issues/37283#issuecomment-1204365810) -- pass

after node is removed on rancher side, ssh into the node and run the uninstall script.

verify that the previously mentioned files are removed -- pass

run rke2 uninstall script
register node in a new cluster -- pass

create a  custom cluster with env. var CATTLE_AGENT_CONFIG_DIR=/tmp/rancher set and register a node

verify that the cattle agent config dir is properly updated based on the user vars -- pass

follow the main steps from this thread, but specifying the env. var when running the agent-uninstall scripts

verify that the cattle agent uninstall is properly removing the following, in addition to the cattle_agent_config_dir based on the user vars -- pass

/var/lib/rancher/agent
/etc/rancher/agent
/usr/local/bin/rancher-system-agent
/opt/rancher-system-agent (if /usr/local is read-only)
/etc/systemd/system/rancher-system-agent.service
/etc/systemd/system/rancher-system-agent.env

Tested in non-airgap on v2.6.7-rc6 using custom and EC2 downstream clusters. During testing all files that were removed as intended. An arbitrary error message was observed, but it did not effect the outcome of the testing. Therefore non-airgapped testing is done.
cc @slickwarren @jakefhyde
/usr/local/bin# bash rancher-system-agent-uninstall.sh
Removed /etc/systemd/system/multi-user.target.wants/rancher-system-agent.service.
Failed to reset failed state of unit rancher-system-agent.service: Unit rancher-system-agent.service not loaded.
/usr/local/bin# ls
rke2  rke2-killall.sh rke2-uninstall.sh
/var/lib/rancher# ls
rke2
/etc/rancher# ls
node  rke2
/etc/systemd/system# ls
cloud-final.service.wants                default.target.wants     graphical.target.wants    multipath-tools.service          rescue.target.wants                       snap-core18-2538.mount   snap-snapd-16292.mount                           snap.lxd.daemon.unix.socket   syslog.service
cloud-init.target.wants                  emergency.target.wants   iscsi.service             network-online.target.wants     'snap-amazon\x2dssm\x2dagent-3552.mount'   snap-core20-1587.mount   snap.amazon-ssm-agent.amazon-ssm-agent.service   sockets.target.wants          timers.target.wants
dbus-org.freedesktop.resolve1.service    final.target.wants       mdmonitor.service.wants   open-vm-tools.service.requires  'snap-amazon\x2dssm\x2dagent-5656.mount'   snap-lxd-19647.mount     snap.lxd.activate.service                        sshd.service                  vmtoolsd.service
dbus-org.freedesktop.timesync1.service   getty.target.wants       multi-user.target.wants   paths.target.wants               snap-core18-1988.mount                    snap-lxd-22753.mount     snap.lxd.daemon.service                          sysinit.target.wants


[9.x] improve finding model namespace in Model:show command

hi
in this PR update method qualifyModel of model:show command to improvement finding the models.
in this method first find with glob function in models folder, After finding the matched files, return exact namespace of the file.
actually if model namespace failure to follow PSR-4 rule, old version can't show model detail because namespace generated manually ,  but in new method if matched file name with argument, return namespace of model to continue command processing.
thanks.

Hi @alissn, could you please provide reproduction steps for what does not currently work?
The current implementation is based on the same logic that is used by the generator commands such as make:model, with a small tweak to support passing a full model namespace.

Sometimes it happens the namespace of model failure to follow PSR-4 rule like bellow :
the path of model is : app/Models/User.php
<?php

namespace App;

class User extends \Modules\User\Entities\User
{
    //
}

if you use php artisan model:show User
the previous method return : App\Models\User
but new method return : App\User (this correct namespace of user model )
Sometimes you can't change namespace of model... this PR handle this issue for searching model name based on File name.

Sometimes it happens the namespace of model failure to follow PSR-4

I don't think that should be supported. Also how are you loading this model's class in other files? By requiring/including it directly? Or by using a custom autoloader?
Loading classes without composer autoload seems to be a very edgy case, it would make generator commands very hard to maintain if they should cover every unusual use case.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


fix: ensure connectedCallback runs after Ember initializer

This resolves an issue where the initialization logic was being run in the constructor of the custom element before the Ember initializer was finished. The result of this issue was that the custom element attempted to access properties that were not yet ready for access.
The Ember initializer creates a new promise on each run to ensure that, in a testing scenario, each initializer run gets it's own promise. This isn't strictly necessary, but is probably safer for testing purposes.
Related to #6

@Ravenstine could you cut a release that includes this fix? We're currently installing in our codebase through my GitHub fork, but would much prefer to install through npm!

@alexlafroscia Yes, I will certainly do that right now.  I'm sure you may might have seen my other comment but, in case you didn't, I have a PR up that addresses the related problems, so if you can check that out and make sure it does, I can also merge that and cut a release with those fixes as well.

@alexlafroscia I've published v2.0.2 to NPM.


[Event Modification]  codeunit 90 "Purch.-Post"

Hello,
Is it possible to add the following to an Event:
    OnBeforeDeleteAfterPosting(PurchHeader, PurchInvHeader, PurchCrMemoHeader, SkipDelete, SuppressCommit);

to
    OnBeforeDeleteAfterPosting(PurchHeader, PurchInvHeader, PurchCrMemoHeader, SkipDelete, SuppressCommit, TempPurchLine);

TempPurchLine as var

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


404 Not Found<EMAIL_ADDRESS>

I'm attempting to follow the instructions in Cloud Functions for Firebase (Angular) and in the section "10. Images moderation"  I've been asked to install dependencies by running the command:
npm install --save @google-cloud/vision @google-cloud/storage child-process-promise
However, I get the following error when I run the above command:

npm ERR! code E404
npm ERR! 404 Not Found<EMAIL_ADDRESS>

npm ERR!      /Users/XXXXXXXX/.npm/_logs/2018-10-20T07_34_34_069Z-debug.log

Snippet from the above logs is stored in https://pastebin.com/FxaRMHQi

@jmdobry PTAL

FYI in the non-angular sample we've fixed the installed version of these dependencies to avoid having the codelab broken by non backward-compatible changes of @google-cloud/vision and @google-cloud/storage

This looks resolved to me.


Jenkins Hygieia publisher is not pushing deployment data to Hygieia

Hi, I am using jenkins hygieia publisher plugin to push build and deploy data to Hygieia. I am able to see build data populated in Hygieia but not the deployment data. Request your help in resolving the issue.

Can you let me know the syntax you used in your pipeline code?

I am using a freestyle job in Jenkins. I have configured all the parameters according to documentation available.

Did you configure the plugin via Global settings in Jenkins? If so at this point we support build, sonar and custom reflex patterns for collectors. Can you post a screenshot of the configuration just to confirm if we are on the same page.

Yes, I have configured the plugin on configure system page and the connection test on the endpoint was successful. Hence I was able to see build results in Hygieia. For sonar, I am using collector. We are not allowed to use API of UCD. So I want to go with the Jenkins Hygiea publisher for configuring deploy widget.
Below is the configuration in Jenkins:
I have checked Publish deployment results and Publish Deploy start status.
Application Name: myapp
Environment Name: DEV
Artifact Directory: target
Artifact File Name Pattern: .zip
Artifact Group: org.mycompany
Artifact Version: 1.0-SNAPSHOT

Here is the log in Jenkins
Hygieia: Automatically publishing build data to Hygieia using hygieia-publisher version 2.1.9-SNAPSHOT (private-ae661508-root), Please refresh your browser to see the status.
Hygieia: Auto Published Build Complete Data. Response Code: 201. 5cc04385f2896743bcfd11e7,5cc03ef4f2896743bcfd11e2
Hygieia: Auto Published Sonar Result. Nothing to publish
Hygieia: *** Hygieia publish completed in 0 seconds at 2019-04-24T07:07:49.107 ***

I don't see any UCD data being pushed to Hygieia in Jenkins console output. Please let me know if I am missing something.

@Blessie7 The jenkins log output you have shown is from the auto configuration i.e. from Global preferences (This capability currently takes care of Build, Sonar and Custom Regex patterns). Can you search for other references of Hygieia in the jenkins log?

I can see the logs of only build data being published. No traces of deployment data.

I have checked the option to Publish Deployment Results. Not sure why Jenkins isn't pushing the results to Hygieia.
I am not using udeploy collector.
Please let me know if I need to do any additional configuration in Jenkins/Hygieia.

I have found that if the global plugin is turned on you cannot use these steps.

Here is the log in Jenkins
Hygieia: Automatically publishing build data to Hygieia using hygieia-publisher version 2.1.9-SNAPSHOT (private-ae661508-root), Please refresh your browser to see the status.
Hygieia: Auto Published Build Complete Data. Response Code: 201. 5cc04385f2896743bcfd11e7,5cc03ef4f2896743bcfd11e2
Hygieia: Auto Published Sonar Result. Nothing to publish
Hygieia: *** Hygieia publish completed in 0 seconds at 2019-04-24T07:07:49.107 ***

I don't see any UCD data being pushed to Hygieia in Jenkins console output. Please let me know if I am missing something.

Thanks for your prompt response. So, in order to get the publisher plugin working, global settings should be disabled? I assume this is the settings in Configure System page on Jenkins, where we provide the Hygieia server url, UI url and auth token.

Yes, that is correct. Another option is to switch to Jenkinsfile and use the publish steps. The global push could be left enabled doing this.

@rvema @Sbrenthughes Thank you so much for your support. I am able to see the deployment data in Hygieia now.

Hi,
Can anyone help me how to create properties file for hygieia jenkins collectors. Sample  properties would be a great help..

@mohanelango Please open a new issue this one is not related to the collector.


Noise handling

Thanks for making Popper!
An extra feature i would find useful is the ability to handle noise. I tried this but i get no theory.
bias.pl
max_vars(3).
max_body(2).

head_pred(grandparent,2).
body_pred(parent,2).

bk.pl
parent(abe,homer).
parent(homer,lisa).
parent(homer,bart).
parent(clancy,marge).
parent(marge,maggy).
parent(marge,lisa).
parent(marge, bart).

exs.pl
pos(grandparent(abe,bart)).
pos(grandparent(abe,lisa)).
pos(grandparent(clancy,lisa)).
pos(grandparent(clancy,bart)).
neg(grandparent(homer,bart)).
neg(grandparent(abe,homer)).
neg(grandparent(homer,bart)).
neg(grandparent(bart,lisa)).
neg(grandparent(clancy,maggy)). % noise

Hi @JeanChristopheRohner, yes, this feature would be great. We will look to add it in the next 1-3 months.

@JeanChristopheRohner this feature is now working. Please try running Popper (currently from the main branch) with the--noisy flag.

@andrewcropper  Is JCR's example expected to work with v3.0.0? When I run the example with the --noisy flag (and without max_vars/3 and max_body/2 in bias.pl) , there's no solution:
$ time python popper.py hakank/jcr1 --noisy
08:11:32 Generating programs of size: 2
08:11:32 Generating programs of size: 3
08:11:32 Generating programs of size: 4
08:11:32 Generating programs of size: 5
08:11:32 Generating programs of size: 6
NO SOLUTION

Please note that the noisy* examples in examples/ works with the  --noisy flag, so it's not a general problem, just for this specific example.
My environment:

Linux Ubuntu 20.05LTS
Popper: main version (per 2023-11-01)
Python: 3.9.4
SWI-Prolog: 9.0.4
pyswipl: main version
pysat: python-sat 0.1.8.dev10

Hi Hakan,
The noise tolerent version of Popper (with —noisy) works by learning a solution with the minimal description length, i.e. it tries to find a program that optimally compresses the examples.
In JCR’s example, it is simpler to say that everything is true and then only send the misclassified negative examples. However, it is not obvious to a user that Popper suggests such a theory. I will talk with Céline to see what we can do to make it clearer.
Thanks for pointing out this issue!
Kind regards,
Andrew

On 1 Nov 2023, at 07:20, Hakan Kjellerstrand @.***> wrote:
@andrewcropper Is JCR's example expected to work with v3.0.0? When I run the example with the --noisy flag (and without max_vars/3 and max_body/2 in bias.pl) , there's no solution:
$ time python popper.py hakank/jcr1 --noisy
08:11:32 Generating programs of size: 2
08:11:32 Generating programs of size: 3
08:11:32 Generating programs of size: 4
08:11:32 Generating programs of size: 5
08:11:32 Generating programs of size: 6
NO SOLUTION
Please note that the noisy* examples in examples/ works with the --noisy flag, so it's not a general problem, just for this specific example.
My environment:
• Linux Ubuntu 20.05LTS
• Popper: main version (per 2023-11-01)
• Python: 3.9.4
• SWI-Prolog: 9.0.4
• pyswipl: main version
• pysat: python-sat 0.1.8.dev10
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>


AWS distribution of Kubeflow v1.4

Feature list:

[x] Cognito Integration
[x] RDS integration for pipelines
[x] RDS integration for Katib
[x] S3 integration for pipelines
[x] DLC in Jupyter Notebooks
[x] https://github.com/awslabs/kubeflow-manifests/issues/76
[x] Secrets manager integration for credentials
[x] EFS
[x] FSx
[x] e2e tests
[x] #109
[ ] Telemetry component documentation
[ ] #120
[ ] Canaries
[ ] #62
[ ] #74
[ ] #67
[ ] #82
[ ] #22
[x] #110
[x] #99
[ ] #95
[ ] Documentation updates to website (Currently available in docs/deployment)

looking forward to the release!

Kubeflow-1.4 and 1.5 have been released
https://github.com/awslabs/kubeflow-manifests/releases/tag/v1.5.1-aws-b1.0.0
https://github.com/awslabs/kubeflow-manifests/releases/tag/v1.4.1-aws-b1.0.0


Do not change 'runtimepath'

A plugin must not change 'runtimepath' implicitly.
It is plugin manager's work.

Ideally no, but there's no other way to get this to work for everyone.

I have pushed a commit here so you can stop ALE from modifying runtimepath if it bothers you: https://github.com/w0rp/ale/commit/f15c8f41279b8b8d9e397e55021d31ca983da3b0
The after plugin is only needed to warn users about incompatible plugins.

NO!
The after directory is automatically added by plugin manager.  If not, it is a plugin manager's bug.
So the after directory duplicates in the 'runtimepath' if you add it.
This occurs some problems in other plugins.
All plugins except plugin manager MUST not change the 'runtimepath'.
Please revert before commit and merge this.

Sorry to disappoint, but ALE will continue to modify runtimepath. If you don't want that, set the option to disable that behaviour.
I'm more than willing to break from conventions if it means I have far fewer GitHub issues to deal with, because ALE is able to consistently warn users about installing incompatible plugins.


Check for assignability during deserialization

Fixes the first half of the issue I raised in this comment: https://github.com/serverpod/serverpod/issues/1522#issuecomment-1792959727
Issue #1522
Pre-launch Checklist

[x] I read the Contribute page and followed the process outlined there for submitting PRs.
[x] This update contains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
[x] I read and followed the Dart Style Guide and formatted the code with dart format.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
[ ] I added new tests to check the change I am making.
[x] All existing and new tests are passing.
[x] Any breaking changes are documented below.

I took the additional liberty of a few code cleanups too in this PR.

Additionally, I noticed that this appears broken in the original code:
    } else if (_isNullableType<Duration>(t)) {
      return data == null ? data : Duration(milliseconds: (data as int)) as T;

Duration is not a subtype of int, so this can't possibly work. (This is not fixed in my PR.)

I don't understand why the tests are failing -- my own limited testing seems to indicate the modifications work as intended, and the test failures don't give much info...

Thanks for the submission!
We will be focusing moving to inline deserialization in the classes instead of providing this shared interface.
That should both provider better feedback to the user when a value is not what is expected but it should also make is align with general conventions for a fromJson method.
Issue for tracking that change here: https://github.com/serverpod/serverpod/issues/2027
Therefore I will close this PR in favor of that solution.

Thanks for the submission!
We will be focusing moving to inline deserialization in the classes instead of providing this shared interface.
That should both provider better feedback to the user when a value is not what is expected but it should also make is align with general conventions for a fromJson method.
Issue for tracking that change here: https://github.com/serverpod/serverpod/issues/2027
Therefore I will close this PR in favor of that solution.


Show the name of the current song

For this to work, we need to fix the radio API. Current element is not always (rarely) correct.

Working on this now. Not the api though.


startup scripting establish common subset (sh, nsh, bash)

environment variables
conditionals

multiple conditions (AND, OR)

equality tests (= vs ==)
airframe autostart (generate rc.autostart?)
shebang
enforce with cross platform test and shellcheck

We should do a quick pass to figure out what's actually needed, then establish the limited subset. A simple test should be written that runs on all platforms to verify. NuttX, Linux (bash, sh, dash), OSX (older bash?)

Linux: bash >= 4
NuttX: bash like mostly sh compatible
OSX: bash 3.2

I think we should find out what NuttX supports and validate for that.

Bebop 2 runs busybox which apparently has ash shell by default, I don't which version.


Update Cascadia Code to 2111.01

This update fixes the bracket ligatures in italic.
See microsoft/cascadia-code#595 for more details.

assign me


ImageSets for Kitti Benchmark

How should I obtain the ImageSets for the Kitti Benchmark?
I dont think its a part of the dataset.

Hi,
ImageSets is the train/val split used in 3DOP/Mono3D.
You can download via this link: https://xiaozhichen.github.io/files/mv3d/imagesets.tar.gz

Thanks.

Hi,
ImageSets is the train/val split used in 3DOP/Mono3D.
You can download via this link: https://xiaozhichen.github.io/files/mv3d/imagesets.tar.gz

good job! respect you!


Use cookiecutter data science template?

I've been pondering over the best way to structure this repo. After some thought and exploration, I'm thinking that the cookiecutter data science template might fit well for this project.
We might want to use conda rather than virtualenv, but other than that I think it could be a good way forward.

Perhaps it would be interesting to make it possible to really have subpackages in the src directory, a bit like https://medium.com/opendoor-labs/our-python-monorepo-d34028f2b6fa. For example, I'd like to give py_ppo its own tests and pyproject.toml

Also look at:

pants

bazel(?!?)

buck

please

opendoors example repo

This talk and corresponding slides

Twitter migrate pants (v1) to bazel

Monerepo structured with poetry and makefiles at Elastic

Nice overview: https://monorepo.tools/

bazel to pants

comparing blog post

Alternative cookiecutter using snakemake, also supporting R code somehow. https://github.com/xguse/cookiecutter-snakemake-analysis-pipeline

Also consider DVC https://dvc.org/


Add feature: audio normalization during transcoding

Motivation and Context

Reason for this feature: #1206
With the new feature, this problem can be avoided: #1186
Description

Applies the loudnorm filter of ffmpeg during transcoding. Parameters are chosen according to the EBU recommendation R128.
Results of some experiments with this method
Steps for Testing

Prerequisites:

Any video(s) with one audio track
To test locally:

Mock the struct StreamContext with only one member variable transcodingCmd: *exec.Cmd;
Mock the method StreamContext.getStreamName(void): string by returning any string (will be used in log information);
Mock the method StreamContext.getRecordingFileName(void): string by returning the directory of the video to test;
Mock the method StreamContext.getTranscodingFileName(void): string by returning the directory of the output video (with a proper file extension, such as .mp4)

Initialize a variable, say sc, of the mocked type StreamContext, with transcodingCmd = nil
Call function transcode(streamCtx: *StreamContext): error with the parameter &sc
Get transcoded video, of which the audio is normalized

I'll rewrite the change to runner once possible.


Added documentation to CounterHandler.java

Added comments for every member and method. Possible bug detected will be treated in another issue

You must sync first with the master branch as there are conflicts with the README.mdfile.


[AutoPR resources/resource-manager] Revert the changes for 2019-07-01/Microsoft.Resources.

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/6935

(message created by the CI based on PR content)

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/6533


ios App

Very interested in this.. but is there a way to make it work as a iOS app? Curently we are using geckoboard, mainly so we can also monitor our stats from the iphone..

Hi, just picked up this post as I am trying to use the Add to Homepage feature on iOS to make a shortcut to access freeboard.io hosted dashboards. Even when I am logged in and allowed to access a dashboard by testing with Safari, when I try the shortcut directly to look at the dashboard I am not allowed. Is this something to do with how freeboard.io have configured the authentication or an iOS issue?


Algorithm 1 fine-tuning

In Algorithm 1, "Learn theta and Fine-tune M with (L^S)_p and L_f." which means that the weights of the first layer to layer L_p will be updated w.r.t to (L^S)_p and whole model weight will be updated w.r.t L_f (the final loss), is that right?
In this line, I can understand that i != index is going to update weights of the first layer to layer L_p by self.seg_optimizer[i].step() but the i != len(self.pruned_segments) - 1 is going to update weights of the first layer to the end of the second-last segment.
According to Algorithm 1, it should be the last segment, that is, the whole model, but why the second-last segment?

The i != len(self.pruned_segments) - 1 indeed is going to update weights of the first layer to the end of the last segment.

That's right. I forgot the zero-based index. Thanks for correction.


Support V code completion

I am very excited to see the v language plugin of zed. Will it support code hints and completion of tabs in the future?

It's already supported. Make sure you have v-analyzer installed on your system.


refactor: Make TagsField a special MultiTextField; rename Field.filterRegexp()

Description
This is an attempt to refactor the current implementation of TagsField by making it a special case of a MultiTextField.
A MultiTextField is a subclass of a TextField that handles fields that can have multiple values, like tags.
Motivation and Context
There is some duplication of code in the method createFilterOrErrorMessage of TextField and TagsField. By making MultiTextField a subclass of TextField, this duplication is avoided. Changes to that method, in particularly, implementing new operators, now need to be only made in one place. This refactoring also makes the code a bit more readable and it becomes obvious that TagsField is actually not something special or treated differently from TextField except for having multiple values.
Currently this PR adds some more lines than it removes, since tags is currently the only case of a MultiTextField. But when other MultiTextFields such as headings (not only the closest heading, but also headings higher up) are added, it will pay out. It will also pay out when there are any additions or changes to the text filtering methods, like adding a "startswith" or "endswith" operator, since these need to be made only once in TextField. The added lines are also much simpler than the duplicated code in  createFilterOrErrorMessage.
A similar refactoring was originally part of #1153 which combined refactoring with feature changes and therefore was decided to be closed in favor of more focused, smaller PRs.
How has this been tested?
I have run the unchanged test suite since this is a pure refactoring.
Types of changes

Changes visible to users:

[ ] Bug fix (prefix: fix - non-breaking change which fixes an issue)
[ ] New feature (prefix: feat - non-breaking change which adds functionality)
[ ] Breaking change (prefix: feat!! or fix!! - fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation (prefix: docs - improvements to any documentation content)
[ ] Sample vault (prefix: vault - improvements to the Tasks-Demo sample vault)

Internal changes:

[X] Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)
[ ] Tests (prefix: test - additions and improvements to unit tests and the smoke tests)
[ ] Infrastructure (prefix: chore - examples include GitHub Actions, issue templates)

Checklist

[X] My code follows the code style of this project and passes yarn run lint.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] My change has adequate Unit Test coverage.

Terms

[X] My contribution follow this project's contributing guide
[X] I agree to follow this project's Code of Conduct

Thanks @Cito - I was initially sceptical about the need for this refactoring, back in #1153, but I am thoroughly persuaded now!
🎉 ❤

Also got much better thanks to your input!


improve Vega performance

based on #943
Prerequisites:

[x] Unless it is a hotfix it should be merged against the dev branch
[x] Branch is up-to-date with the branch to be merged with, i.e. dev
[x] Build is successful
[x] Code is cleaned up and formatted

Summary
improves the rendering performance of Vega especially for the county map

refactored the vega.svelte such that less updates are triggered
set precision = 0 such that the geometric data won't be adaptive sampled. it might end up a few artifacts but since we mostly have straight lines we shouldn't see much differences.

more artifacts than we were hoping, particularly around state borders:

the technologies are for sure completely different, but maybe there's something we can take from https://github.com/cmu-delphi/covidcast/issues/542?

current dev version:

after creating a "highres" version of county and states for detail views: I don't think it can better with the base shape files that we have (https://github.com/cmu-delphi/covidcast/tree/main/Python-packages/covidcast-py/covidcast/shapefiles)

How much faster is it? if it's faster by a lot, we can accept the weird nonmatching outlines and just flag finding better shape files as future work. if it's not that much faster, might as well leave it how it is.

How much faster is it? if it's faster by a lot, we can accept the weird nonmatching outlines and just flag finding better shape files as future work. if it's not that much faster, might as well leave it how it is.

the first version of the previous comment was showing the current dev version without this improvements/PR applied:
dev version:
https://user-images.githubusercontent.com/4129778/119189725-6a60b100-ba4a-11eb-804d-2328ca2d490f.png
your posted image:

I cannot see any differences between the current dev version of this image and the one you have posted. Can you elaborate how this PR changed the view?


The transaction is rolled back before returning error

Your Question

I want to delete the existing record in a transaction after error creation. In the document, it is said that the transaction will be rolled back if an error is returned.
But in the example below, the transaction is aborted due to an error in the creation, not after returns an error
func (l likeGorm) CreateOrDelete(ctx context.Context, like *entity.Like) error {
	return l.db.Transaction(func(tx *gorm.DB) error {
		likeDB := l.marshal(like)

                // Create - ERROR: duplicate key value violates unique constraint "like_db_pkey" (SQLSTATE 23505)
		if err := tx.WithContext(ctx).Model(l.model).Create(likeDB).Error; err != nil {
			if isDuplicate(err) {
                                // Delete - ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02)
				if err := tx.WithContext(ctx).Model(l.model).
					Where("post_uuid = ? AND creator_uuid = ?", like.PostID, like.Creator).
					Delete(l.model).Error; err != nil {
					return err
				}
				return nil
			}

			return err
		}

		return nil
	})
}

The document you expected this should be explained

https://gorm.io/docs/transactions.html#Transaction
Expected answer

How can I handle a query error by another query in a transaction?

@thanhpp  Shouldn't be like this.
func BeginTransaction(db *gorm.DB) {
	if !db.Config.SkipDefaultTransaction && db.Error == nil {
		if tx := db.Begin(); tx.Error == nil {
			db.Statement.ConnPool = tx.Statement.ConnPool
			db.InstanceSet("gorm:started_transaction", true)
		} else if tx.Error == gorm.ErrInvalidTransaction {
			tx.Error = nil
		} else {
			db.Error = tx.Error
		}
	}
}

Begin() will return gorm.ErrInvalidTransaction so   create's transaction don't begin.

BeginTransaction

Can you suggest a way to workaround?

I try it and find the transaction is not  aborted due to an error in the creation, after returns an error....

BeginTransaction
@longlihale

Can you suggest a way to workaround?

It should be ok to use db.Transaction

BeginTransaction
@longlihale

Can you suggest a way to workaround?

It should be ok to use db.Transaction

This is a picture of my code's execution. It shows that the second query (delete) returns an error due to the transaction being aborted

@thanhpp  hello,  can you provide a demo in https://github.com/go-gorm/playground ? :kissing_heart:

@longlihale https://github.com/go-gorm/playground/pull/402
I still met the same problem using the playground

seems like this is a feature of postgres, refer: https://www.endpointdev.com/blog/2015/02/postgres-onerrorrollback-explained/****

Wait, it actually helped. I just had to make sure that the code was rolling back to the previous savepoint by returning non-nil error.


Add new parameter ANIMAL_NAME and display it

For add command

created a new branch, not using this anymore


Minor error in pagination section

Under https://github.com/opencontainers/distribution-spec/blob/master/spec.md#pagination
The text reads "If the value of n is 2, v1 and v1 will be returned", presumably this should be "If the value of n is 2, v1 and v2 will be returned".

hah, yes.
Would you mind opening a PR for this?

Sure. I probably should have just done that in the first place...


fix cross compile on target aarch64-linux-android

fix https://github.com/carllerche/mio/issues/598

Thanks... do you know if it would be possible to get this build somehow integrated in CI? To avoid breaking this in the future...

I surrender, can't get CI work...

Hello, I'm working on adding aarch64 support for Servo and this compilation error is one of the blockers. Could you move the CI integration to a separate PR to avoid delaying the compilation error fix?

@MortimerGoro I will do it later

This was merged into master as part of #601.


High RAM use during stackstac.stack(items, epsg=item_crs)

When I have >150 Sentinel-2 products in my pystac query, and then try to run:
stack = stackstac.stack(items, epsg=item_crs)
I am sometimes encountering >70GB of RAM usage. Is this expected behaviour and is there any workaround? I suspect it stems from the conversion between different CRS but, AFAIK, this is required, as I have found some variations in CRS between S2 products. Many thanks.

This is definitely not expected behavior. Can you provide a reproducer and more info about your environment?

Without a reproducible example, there's not much we can help with here, so I'm going to close this. @J6767, if you'd like to provide a reproducer, feel free to re-open.


Combine the command palette and search bar, like VSCode

Can be done via https://github.com/moroshko/react-autosuggest

Fixed a while ago.


Install via go install breaks on sqlite libs

Describe the bug
Installing via go install github.com/neilotoole/sq@latest does not work.
To Reproduce
go install go install github.com/neilotoole/sq@latestor go install<EMAIL_ADDRESS>Expected behavior
Complete install without errors
sq version
Paste the output of sq version --yaml into the code block below:
irrelevant : can't install version
Source details

Logs
...
go: downloading github.com/moby/term v0.5.0
go: downloading github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
go: downloading github.com/neilotoole/fifomu v0.1.1
go: downloading github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7
go: downloading github.com/richardlehane/msoleps v1.0.3
go: downloading github.com/segmentio/asm v1.2.0
# github.com/neilotoole/sq/drivers/sqlite3
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/grip.go:28:12: undefined: driveri
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/grip.go:62:9: undefined: getTableMetadata
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/grip.go:87:84: undefined: dbDrvr
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/grip.go:89:14: undefined: PathFromLocation
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/alter.go:18:10: undefined: driveri
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/alter.go:25:10: undefined: driveri
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/alter.go:32:10: undefined: driveri
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/alter.go:33:64: undefined: DBTypeForKind
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/alter.go:52:10: undefined: driveri
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/alter.go:92:15: undefined: DBTypeForKind
go/pkg/mod/github.com/neilotoole/sq@v0.48.3/drivers/sqlite3/grip.go:89:14: too many errors

Screenshots

Additional context

Same when trying building from sources.
One solution would be a go mod tidy

Not able to reproduce


Add detailed network info to getnetworkinfo RPC

This commit adds per-network information to the
getnetworkinfo RPC call:

Is the network limited?
Is the network reachable
Which proxy is used for this network, if any

Inspired by bitcoin/bitcoin #2575.

Does what it say, tested on regtest.


Using Select and Cut to Populate $TM_SELECTED_TEXT Variable

Hi, I recently migrated from the vsnip snippet engine to the luasnip snippet engine.
First of all, thank you for creating this excellent snippet engine.
In vsnip, I had two options for using the $TM_SELECTED_TEXT variable:
One option would only select the text but not delete it.
I had configured it to enter insert mode after selecting the text.
" Select & Cut in Visual Mode. "
xnoremap s <Plug>(vsnip-select-text)<esc>i
xnoremap c <Plug>(vsnip-cut-text)

I searched and only found one option in luasnip, which performs the cut operation.
require("luasnip").config.setup({store_selection_keys="c"});

Is there a way to simulate the select operation as well?
In HTML, there are times when I need to create a copy of an element but within a new container.
Currently, in luasnip, I have to cut the element first, then switch to normal mode, then undo, and then enter insert mode again to continue. This is a workaround to achieve this functionality.
The luasnip documentation states that it is inspired by vsnip.
The idea of selecting and cutting in vsnip was ingenious, and I think it would be beneficial to include it in luasnip as well.
Thanks

Hi :)
This sounds pretty reasonable, and is a really small change :D
I've pushed a first version of this in #1209, could you check if it works as you expect?
Just add copy_selection_keys in your config

Hi :) This sounds pretty reasonable, and is a really small change :D I've pushed a first version of this in #1209, could you check if it works as you expect? Just add copy_selection_keys in your config

Wow, that's fast! Thank you so much, you're amazing!
I tried it out, and it's working great now. But I ran some tests and I'd like to share them with you.
I apologize for the delayed response, as I'm still learning Lua. I tried to explore the luasnip code a bit today with the help of Gemini (Google AI) to understand how the selection part works.
Okay, first of all, I noticed that these two values are defined in the default_config file:
copy_selection_keys = nil,
cut_selection_keys = nil,

When the user sets them, they are used as {lhs} in the key mapping in config file:
if session.config.cut_selection_keys then
   vim.cmd(
    string.format(
     [[xnoremap <silent>  %s  %s]], session.config.cut_selection_keys, require("luasnip.util.select").select_keys
    )
  )
end

Then I found {rhs} in the select file and tried to play around with it a bit :))
M.select_keys =
 [[:lua require("luasnip.util.select").pre_cut()<Cr>gv"zs<cmd>lua require('luasnip.util.select').post_cut("z")<Cr>]]

M.copy_keys =
 [[:lua require("luasnip.util.select").pre_cut()<Cr>gv"zy<cmd>lua require('luasnip.util.select').post_cut("z")<Cr>]]

For example, I noticed that when I use copy, it doesn't enter insert mode by default (I know this is because of the "zy command, which only copies the value to the z register).
I initially changed it to this:
M.copy_keys =
 [[:lua require("luasnip.util.select").pre_cut()<Cr>gv"zyi<cmd>lua require('luasnip.util.select').post_cut("z")<Cr>]]

I added an "i" to it to enter insert mode after copying. Then I realized that this method always brings the cursor to the beginning of the line. To solve this, I played around with it again and came up with this :))
M.copy_keys =
 [[:lua require("luasnip.util.select").pre_cut()<Cr>gv"zygv<esc>i<cmd>lua require('luasnip.util.select').post_cut("z")<Cr>]]

With this method, the cursor stays where it is.
I know this behavior is probably only my preference and can't be forced on everyone who uses this popular plugin.
So I thought maybe a variable could be added for the user to customize!
local afterCopy = "<cmd>lua print('Copied')<cr>";
M.copy_keys =
 [[:lua require("luasnip.util.select").pre_cut()<Cr>gv"zy]] .. afterCopy .. [[<cmd>lua require('luasnip.util.select').post_cut("z")<Cr>]]

Now it copies and even prints a message for me :)
Finally, I want to thank you again. It's working great even now.
I understood how it works and I can customize it for myself.
I just wanted to share a few ideas with you that might help improve it!

Wow, that's fast! Thank you so much, you're amazing!

TY, power of procrastination :P
I'm happy it works for you :)

Then I found {rhs} in the select file and tried to play around with it a bit :))

Nice investigating :ok_hand:
That's some rather deep customization (or, just some I didn't anticipate :D), I'll have to consider how to best make an API for doing this (so your customization is not destroyed when I change something about the way select works :sweat_smile:)
I think it's fine if luasnip exposes the pre_yank and post_yank functions (so, rename them too, to be more accurate), and require that inbetween them, something is put into the register that post_yank gets as an argument. That has the flexibility you want to move the cursor around
Thanks for sharing that new usecase :)

Ah if we do add the new api, we wouldn't even need the new setting, users could just set up their own keymapping :)

Ah if we do add the new api, we wouldn't even need the new setting, users could just set up their own keymapping :)

Yes please, I much prefer defining keymaps myself 🙏

Awesome!
Nitpick on naming of rhs function, cut_keys feels a bit weird, have you considered cut_selection ?

Oh, that's because it's not a function, but a sequence of keys :D
Maybe cut_rhs would've been better, but I think not so much that I'd change it now

I see, oh well ¯\_(ツ)_/¯


Fixes documentation of dynamic topics

Fixes outdated documentation on how to use dynamic topics (breaking change in v13).
Closes #6111

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


build: Update to latest go-mod-messaging with ZMQ fix

close https://github.com/edgexfoundry/go-mod-messaging/issues/131
Signed-off-by: lenny<EMAIL_ADDRESS>

If your build fails  due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:

[x] I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
[x] I am not introducing a new dependency (add notes below if you are)
[ ] I have added unit tests for the new feature or bug fix (if not, why?) N/A
[ ] I have fully tested (add details below) this the new feature or bug fix (if not, why?) N/A
[ ] I have opened a PR for the related docs change (if not, why?) N/A

Testing Instructions
N/A
New Dependency Instructions (If applicable)
N/A

Codecov Report

Merging #3876 (cb9f7b1) into main (d6b89ac) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3876   +/-   ##
=======================================
  Coverage   45.78%   45.78%
=======================================
  Files         112      112
  Lines        9641     9641
=======================================
  Hits         4414     4414
  Misses       4844     4844
  Partials      383      383

Continue to review full report at Codecov.

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