text:
chore: Adjust metrics units

Description
Fixes: #1389

Note for reviewer: The corresponding PR is opened in the control-plane charts repository.

Please make sure to also run the corresponding make targets in the interal repo, otherwise the charts will not be rendered and the Pipelines will fails

authors: Tomasz-Smelcerz-SAP jeremyharisch

repo: kyma-project/lifecycle-manager


text:
Spike: Investigate how OTLP and HTTP outputs of a LogPipeline can coexist in terms of versioning

Before we can start implementing OTLP LogPipeline output, the following questions have to be addressed:

Should the v1beta1 version of LogPipeline only support the new output type or both? Which version is used as a storage version? Discuss pros and cons with the team.
Create a PoC with v1alpha1, v1beta1 LogPipelines, a conversion webhook, and 2 separate reconcilers, each of which is reconciling its own version only. We could store the LogPipeline spec in an annotation to allow roundtrip conversion without data loss.
Describe your findings in an ADR.
https://github.com/kyma-project/telemetry-manager/issues/872

After multiple rounds of discussions, we concluded that bumping the telemetry group version to introduce the OTLP output is not necessary and will only introduce more problems (version conversion, hard-to-separate reconcilers, etc.).
So here are our requirements:

From the semantic versioning perspective, adding a new output does not break backward compatibility. However, we want to hide it from our productive users until we reach feature parity with Fluent Bit implementation.
Moreover, we understand that the old LogPipelinbe reconciler deviates quite a bit from Metric and Trace Reconcilers. Refactoring it would be time-consuming and effort-consuming. On the other hand, we acknowledge that we will have to support OTel and Fluent Bit—based LogPipelines for quite a while. So the most feasible approach would be to separate Fluent Bit and OTel reconcilers codewise.

There are a few ways to achieve the aforementioned requirements:

Introduce a completely different CR and only render it in the dev kustomize variant
Introduce an OTLP output in v1alpha1 LogPipeline Go struct, but exclude it manually from the CRD (only keep it in the dev variant)
Introduce a set of annotations that represent an OTLP output that would only have effect if a feature flag is enabled
Introduce a hierarchy of CRs -> Deploying a LogPipeline will, in turn, deploy either a FluentBitLogPipeline or OTLPLogPipeline, depending on which output is defined.

@a-thaler Let's discuss it when you are back.

source: gharchive/issue

repo: kyma-project/telemetry-manager

license_type: permissive

license_source: github-api


text:
🛑 senoshaidodelasmanos.love is down

In 710fefa, senoshaidodelasmanos.love (https://senoshaidodelasmanos.love) was down:

HTTP code: 0
Response time: 0 ms

Resolved: senoshaidodelasmanos.love is back up in 40fd421 after 566 days, 10 hours, 21 minutes.

repo: kyryl-bogach/upptime

license: MIT


text:
解析結果の一覧ページのAPI化とコード自動生成機能のuserscript化

https://kyuridenamida.github.io/atcoder-tools/#/quality/summary のページには全問題の解析結果が含まれていることに気付きました。これの内部に含まれているデータをもうすこし扱いやすい形式で (たとえば https://kyuridenamida.github.io/atcoder-tools/api.json のようなURLを叩くだけなど) で提供してほしいです。
用途は、userscriptからatcoder-toolsを使えるようにすることです。

わかりました。全データダウンロードするのパフォーマンス大丈夫ですかね(あとキャッシュによる不具合とか)

丸ごとひとつの json の形で大丈夫です。
ただし https://kyuridenamida.github.io/atcoder-tools/manifest.json とほぼ同様に設置されると仮定しています。
1回の通信の容量はいまそのまま解析結果のページを開くのと同じ量なので 300KB と大きくなく 200ms と十分に高速、接続数が増えたとしてもAtCoder のユーザ数程度なら GitHub pages は耐えてくれます。キャッシュも適切に設定されているので、複数ページを開いても重複しての通信はないので安心です。
また、もし最適ではなかったとしても、 userscript の内部で使うAPIなので互換性は気にせず壊すことができるので、問題が起こってから考えても遅くはないです。

OKです。ダウンロード出来るようにしてみます。

よろしくお願いします。

https://kyuridenamida.github.io/atcoder-tools/api/all.json
これでいいですか?型はQualityResult.tsの定義を見てください
import Problem from './Problem'

export default interface QualityResult {
    problem: Problem,
    contest: {
        contest_id: string,
    },
    statement_parse: {
        error: string | null
    },
    format_prediction: {
        error: string | null
    },
    modulo: {
        value: number | null
        error: string | null
    },
    yes_str: {
        error: string | null
        value: string | null
    },
    no_str: {
        error: string | null
        value: string | null
    },
    codes: {
        [lang: string] : string,
    }
}

完璧です。
ではuserscriptを書きます

いい話

authors: kmyk kyuridenamida

repo: kyuridenamida/atcoder-tools

license: mit

license_source: bigquery


text:
デフォルトのテンプレート内変数名をもう少しまともにする

Suggested by @asi1024
実際全部微妙で

input_part -> input code
formal_arguments -> parameters
actual_arguments -> arguments

などが考えられる。
どのみち #55 が実装されたらユーザーが自由にそのあたり決めれるんだけど、良いデフォルトは良いため良いデフォルトを実装しよう

2年開いてるかつ優先度が低いのでwontfixとして閉じます。

2年開いてるかつ優先度が低いのでwontfixとして閉じます。


text:
Update Index.vue

changed to 1 hour and test of next calendar month for dashboard activity

Pushed latest to live.  Closing this.

source: gharchive/pull-request

repo: kzfw/ui


text:
add user defined commands to config

Allows for users to add commands that can be called by mpris-notifier in order to control other parts of their system. These commands are called for all signals, not just track changes.
This is especially useful for programs like waybar, where you can update a module based on a signal, and if you do so without an update rate it is much more recourse efficient.

Hey, I noticed that this ends up triggering pretty often from being in handle_signal ; I think this'd be more appropriately fired at the same time as a pending notification would be, in handle_pending. What do you think?

I thought I did this before, but obviously not (probably placed it at the end of the function or something); just tested that and yeah, that should be better, I was under the impression that a signal would not be sent when a player becomes innactive, which is important in my case.

Oh, I completely missunderstood your suggestion, but that does make more sense. I will work on that soon.

commands are called from within SignalHandler::handle_pending in #9


text:
Printing training progress

Hello,
First of all, thanks a lot for this great repo and detailed insights into your approach to training ball actions.
I have a question related to the training script. I would like to print training progress, e.g.:
Epoch 1/20
224/768 [========] ------------------------  264us/step - loss: 0.4730 - acc: 0.7747
I understand you are using your own training library (argus), which does some things in train_step I don't quite get. Can you please suggest how this can be done? (wrapping tqdm around the data loader does not work).
Thanks a lot in advance.

Hello, thank you!
You need a custom callback for logging. I think you can use the tqdm callback that has been implemented in another solution with argus:
https://github.com/sankovalev/deep_chimpact.drivendata/blob/master/src/modules/callbacks.py
If you want to understand how it works or improve it, then here is the documentation page about callbacks:
https://pytorch-argus.readthedocs.io/en/latest/api_reference/callbacks/base_callback.html

Thanks a lot for the quick and useful answer. The TQDM callback is a good starting point, I just added the total=len(state.data_loader) on_epoch_start so that I get the desired progress bar.

authors: druefena lRomul

repo: lRomul/ball-action-spotting


text:
feat(frontend): show line breaks in element text

Resolves https://github.com/label-sleuth/label-sleuth/issues/465

Codecov Report

Merging #466 (d9de004) into main (e77dd75) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #466   +/-   ##
=======================================
  Coverage   81.75%   81.75%
=======================================
  Files          63       63
  Lines        4182     4182
=======================================
  Hits         3419     3419
  Misses        763      763

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

repo: label-sleuth/label-sleuth


text:
Add searchbar for filtering registry entries

For long lists of registry keys and directories, you can now type a substring of the key/dir you want into the search bar and the key/dir lists will be filtered based on that substring.

a couple of small comments. otherwise LGTM

So it's cool if I merge this?

Otherwise LsGTY?

I think it would be nice to stick with a polymer input element to maintain a consistent style, e.g.: https://github.com/labrad/scalabrad-web/commit/faa33557ac69c9cc04e11b2ab37026cffc3c2446

The search bar is a different kind of input that a registry key, I was trying to differentiate it from that input. Paper-input is more styled to be a form input which is kind of different than this application. Also this is more consistent with the search inputs on other websites like Inbox, GitHub, Polymer, Scala's tutorial site, etc..

Well, I personally like the polymer style better than the blue outline when clicking on the search box, but seeing as how we are totally in the realm of style here, I don't think it's worth pressing the point :) LGTM

Blue outline? I have a grey outline. I can suppresse the outline entirely if you like.
Anyhow, you're right we can tune the CSS when we have the app more fleshed out so things are consistent among pages. My goal here was to emulate the search bar that appears on other sites.

authors: joshmutus maffoo

repo: labrad/scalabrad-web


text:
feat: refactor imagecrbuilder, add cr-option flag.

Refactor imagecrbuilder, add cr-option flag.
Default cr-option is auto, if registry is sealos registry, auto will switch to yes otherwise no.
Add --cr-option only flag, apply image cr only without push image.
Add --cr-option yes flag, apply cr when push images, will check registry too.
Add --cr-option no flag, will not apply cr when push images.

need add test ci

root@master: /src/sealos push-cr
# sealos version                                                                                [14:40:03]
CriVersionInfo:
  RuntimeApiVersion: 1.42.0
  RuntimeName: docker
  RuntimeVersion: 23.0.1
  Version: 0.1.0
KubernetesVersionInfo:
  clientVersion:
    buildDate: "2022-12-08T10:15:02Z"
    compiler: gc
    gitCommit: 804d6167111f6858541cef440ccc53887fbbc96a
    gitTreeState: clean
    gitVersion: v1.25.5
    goVersion: go1.19.4
    major: "1"
    minor: "25"
    platform: linux/amd64
  kustomizeVersion: v4.5.7
  serverVersion:
    buildDate: "2022-12-08T10:08:09Z"
    compiler: gc
    gitCommit: 804d6167111f6858541cef440ccc53887fbbc96a
    gitTreeState: clean
    gitVersion: v1.25.5
    goVersion: go1.19.4
    major: "1"
    minor: "25"
    platform: linux/amd64
SealosVersion:
  buildDate: 2023-02-22T14:38:23+0800
  compiler: gc
  gitCommit: d0d39f99
  gitVersion: untagged
  goVersion: go1.20
  platform: linux/amd64

root@master: /src/sealos push-cr
#                                                                                [14:40:05]

root@master: /src/sealos push-cr
# sealos images                                                                                [14:40:14]
REPOSITORY                     TAG      IMAGE ID       CREATED        SIZE
hub.sealos.cn/labring/affine   latest   703ac8a51fdf   3 months ago   7.75 MB

root@master: /src/sealos push-cr
# sealos push --debug hub.sealos.cn/labring/affine:latest                                                                                [14:40:19]
2023-02-22T14:40:23 debug Destination argument not specified, assuming the same as the source: hub.sealos.cn/labring/affine:latest
2023-02-22T14:40:23 debug Assuming docker:// as the transport method for DESTINATION: docker://hub.sealos.cn/labring/affine:latest
Getting image source signatures
Copying blob 5e5ee18f8a7c skipped: already exists
Copying config 703ac8a51f done
Writing manifest to image destination
Storing signatures
2023-02-22T14:40:25 debug pushed image "hub.sealos.cn/labring/affine:latest@sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8" with digest sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8
2023-02-22T14:40:25 debug Successfully pushed docker://hub.sealos.cn/labring/affine:latest with digest sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8
2023-02-22T14:40:25 info start image cr build and push
2023-02-22T14:40:25 debug Executing CreateContainer in ImageCRBuilder
2023-02-22T14:40:25 debug Pull Policy for pull [missing]
2023-02-22T14:40:25 debug Executing CreatImageCR in ImageCRBuilder
2023-02-22T14:40:25 debug CreatImageCR in ImageCRBuilder done
2023-02-22T14:40:25 debug ImageCRBuilder CreatImageCR result:  &{{Image imagehub.sealos.io/v1} {labring.affine.latest      0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] []  []} {labring/affine:latest  {[]       0 map[]}} {}}
2023-02-22T14:40:25 debug Executing MutateImageCR in ImageCRBuilder
2023-02-22T14:40:25 debug Executing GetReadmeDoc in ImageCRBuilder
2023-02-22T14:40:25 debug <nil>
2023-02-22T14:40:25 debug MutateImageCR in ImageCRBuilder done
2023-02-22T14:40:25 debug ImageCRBuilder MutateImageCR result:  &{{Image imagehub.sealos.io/v1} {labring.affine.latest      0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] []  []} {labring/affine:latest  {[]     703ac8a51fdf9002b5b6bd70ebb319455ad024a5c242fcfa8359a990c75fdb37 amd64 7745372 map[]}} {}}
2023-02-22T14:40:25 debug Executing ApplyImageCR in ImageCRBuilder
2023-02-22T14:40:26 debug Executing DeleteContainer in ImageCRBuilder
2023-02-22T14:40:26 info image cr build and push success

root@master: /src/sealos push-cr
# sealos tag hub.sealos.cn/labring/affine:latest docker.io/lingdie/affine:dev                                                                                [14:40:26]

root@master: /src/sealos push-cr
# sealos push --debug docker.io/lingdie/affine:dev                                                                                [14:43:31]
2023-02-22T14:43:39 debug no kubeconfig file for this registry, skip image cr build
2023-02-22T14:43:39 debug Destination argument not specified, assuming the same as the source: docker.io/lingdie/affine:dev
2023-02-22T14:43:39 debug Assuming docker:// as the transport method for DESTINATION: docker://docker.io/lingdie/affine:dev
Getting image source signatures
Copying blob 4edf49c2d005 skipped: already exists
Copying config 703ac8a51f done
Writing manifest to image destination
Storing signatures
2023-02-22T14:43:48 debug pushed image "docker.io/lingdie/affine:dev@sha256:36b2e99982bbc722b09da1e926a263b8c83f8a0674dd64f5175a7a8cd8361d63" with digest sha256:36b2e99982bbc722b09da1e926a263b8c83f8a0674dd64f5175a7a8cd8361d63
2023-02-22T14:43:48 debug Successfully pushed docker://lingdie/affine:dev with digest sha256:36b2e99982bbc722b09da1e926a263b8c83f8a0674dd64f5175a7a8cd8361d63
2023-02-22T14:43:48 debug skip image cr build by flag cr-option

root@master: /src/sealos push-cr
# sealos push --debug --cr-option only hub.sealos.cn/labring/affine:latest                                                                                [14:43:48]
2023-02-22T14:44:06 debug Destination argument not specified, assuming the same as the source: hub.sealos.cn/labring/affine:latest
2023-02-22T14:44:06 debug Assuming docker:// as the transport method for DESTINATION: docker://hub.sealos.cn/labring/affine:latest
2023-02-22T14:44:06 info Only push image cr to the dest registry
2023-02-22T14:44:06 info start image cr build and push
2023-02-22T14:44:06 debug Executing CreateContainer in ImageCRBuilder
2023-02-22T14:44:06 debug Pull Policy for pull [missing]
2023-02-22T14:44:06 debug Executing CreatImageCR in ImageCRBuilder
2023-02-22T14:44:06 debug CreatImageCR in ImageCRBuilder done
2023-02-22T14:44:06 debug ImageCRBuilder CreatImageCR result:  &{{Image imagehub.sealos.io/v1} {labring.affine.latest      0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] []  []} {labring/affine:latest  {[]       0 map[]}} {}}
2023-02-22T14:44:06 debug Executing MutateImageCR in ImageCRBuilder
2023-02-22T14:44:06 debug Executing GetReadmeDoc in ImageCRBuilder
2023-02-22T14:44:06 debug <nil>
2023-02-22T14:44:06 debug MutateImageCR in ImageCRBuilder done
2023-02-22T14:44:06 debug ImageCRBuilder MutateImageCR result:  &{{Image imagehub.sealos.io/v1} {labring.affine.latest      0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] []  []} {labring/affine:latest  {[]     703ac8a51fdf9002b5b6bd70ebb319455ad024a5c242fcfa8359a990c75fdb37 amd64 7745372 map[]}} {}}
2023-02-22T14:44:06 debug Executing ApplyImageCR in ImageCRBuilder
2023-02-22T14:44:07 debug Executing DeleteContainer in ImageCRBuilder
2023-02-22T14:44:07 info image cr build and push success

root@master: /src/sealos push-cr
# sealos push --debug --cr-option no hub.sealos.cn/labring/affine:latest                                                                                [14:44:07]
2023-02-22T14:44:18 debug Destination argument not specified, assuming the same as the source: hub.sealos.cn/labring/affine:latest
2023-02-22T14:44:18 debug Assuming docker:// as the transport method for DESTINATION: docker://hub.sealos.cn/labring/affine:latest
Getting image source signatures
Copying blob 5e5ee18f8a7c skipped: already exists
Copying config 703ac8a51f done
Writing manifest to image destination
Storing signatures
2023-02-22T14:44:22 debug pushed image "hub.sealos.cn/labring/affine:latest@sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8" with digest sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8
2023-02-22T14:44:22 debug Successfully pushed docker://hub.sealos.cn/labring/affine:latest with digest sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8
2023-02-22T14:44:22 debug skip image cr build by flag cr-option

root@master: /src/sealos push-cr
# sealos push --debug --cr-option yes hub.sealos.cn/labring/affine:latest                                                                                [14:44:22]
2023-02-22T14:44:27 debug Destination argument not specified, assuming the same as the source: hub.sealos.cn/labring/affine:latest
2023-02-22T14:44:27 debug Assuming docker:// as the transport method for DESTINATION: docker://hub.sealos.cn/labring/affine:latest
Getting image source signatures
Copying blob 5e5ee18f8a7c skipped: already exists
Copying config 703ac8a51f done
Writing manifest to image destination
Storing signatures
2023-02-22T14:44:29 debug pushed image "hub.sealos.cn/labring/affine:latest@sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8" with digest sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8
2023-02-22T14:44:29 debug Successfully pushed docker://hub.sealos.cn/labring/affine:latest with digest sha256:9cc5e857271af97f9609b015ebcd9835fa4dc0b7cb4a8b65a563563b4830afb8
2023-02-22T14:44:29 info start image cr build and push
2023-02-22T14:44:29 debug Executing CreateContainer in ImageCRBuilder
2023-02-22T14:44:29 debug Pull Policy for pull [missing]
2023-02-22T14:44:29 debug Executing CreatImageCR in ImageCRBuilder
2023-02-22T14:44:29 debug CreatImageCR in ImageCRBuilder done
2023-02-22T14:44:29 debug ImageCRBuilder CreatImageCR result:  &{{Image imagehub.sealos.io/v1} {labring.affine.latest      0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] []  []} {labring/affine:latest  {[]       0 map[]}} {}}
2023-02-22T14:44:29 debug Executing MutateImageCR in ImageCRBuilder
2023-02-22T14:44:29 debug Executing GetReadmeDoc in ImageCRBuilder
2023-02-22T14:44:29 debug <nil>
2023-02-22T14:44:29 debug MutateImageCR in ImageCRBuilder done
2023-02-22T14:44:29 debug ImageCRBuilder MutateImageCR result:  &{{Image imagehub.sealos.io/v1} {labring.affine.latest      0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] []  []} {labring/affine:latest  {[]     703ac8a51fdf9002b5b6bd70ebb319455ad024a5c242fcfa8359a990c75fdb37 amd64 7745372 map[]}} {}}
2023-02-22T14:44:29 debug Executing ApplyImageCR in ImageCRBuilder
2023-02-22T14:44:30 debug Executing DeleteContainer in ImageCRBuilder
2023-02-22T14:44:30 info image cr build and push success

root@master: /src/sealos push-cr
# sealos push --debug --cr-option yes hub.sealos.cn/labring/affine:latest                                                                                [14:44:30]
FAIL

root@master: /src/sealos push-cr
# sealos push --debug --cr-option yes hub.sealos.cn/labring/affine:latest                                                                                [14:44:32]
FAIL

root@master: /src/sealos push-cr
# sealos push --debug --cr-option yes docker.io/lingdie/affine:dev                                                                                [14:44:38]
2023-02-22T14:44:45 debug Destination argument not specified, assuming the same as the source: docker.io/lingdie/affine:dev
2023-02-22T14:44:45 debug Assuming docker:// as the transport method for DESTINATION: docker://docker.io/lingdie/affine:dev
Getting image source signatures
Copying blob 4edf49c2d005 skipped: already exists
Copying config 703ac8a51f done
Writing manifest to image destination
Storing signatures
2023-02-22T14:44:55 debug pushed image "docker.io/lingdie/affine:dev@sha256:36b2e99982bbc722b09da1e926a263b8c83f8a0674dd64f5175a7a8cd8361d63" with digest sha256:36b2e99982bbc722b09da1e926a263b8c83f8a0674dd64f5175a7a8cd8361d63
2023-02-22T14:44:55 debug Successfully pushed docker://lingdie/affine:dev with digest sha256:36b2e99982bbc722b09da1e926a263b8c83f8a0674dd64f5175a7a8cd8361d63
2023-02-22T14:44:55 info start image cr build and push
2023-02-22T14:44:55 debug no kubeconfig file for this registry, skip image cr build
2023-02-22T14:44:55 debug skip image cr build, not sealos registry

test pass.

authors: cuisongliu lingdie

repo: labring/sealos


text:
Registration creates lines/squares on image

Hi,
I have RNAScope WSI from 3 cycles that I would like to register.  Cycle 1 and 2 looked very nice, but in cycle 3 some black lines started to appear. I've tried to use both cycle 1 or 2 as reference. but this doesn't change it.
This first screenshot is DAPI cycle 1 + 2.

Here is just the DAPI signal from cycle 3, where we can see very thin black lines.

This is the first time I use the tool, but this issue was also encountered by the person who recommended me this tool.
Thanks for your attention
Lucas

Apologies for the slow response. I'm happy to take a look if you could share your images. I can also be reached via email yu-an_chen [at] hms.harvard.edu

I just sent an email with my images. Thank you

Hi @Lucas-Maciel, thanks for being patient and sharing your images! I think I've identified and fixed the bug. Please get the latest version of palom (v2023.8.2) and lmk if the issue persists.
Here's a jupyter notebook for documenting my process. Interestingly VGP_cycle3_ROI1  is rotated 180° relative to the other two images. If this is common, the detect_flip_rotate=True in as in In [7]: should handle image flipping. Note that in In [11], I was only selecting the DNA channel (reader.pyramid[0][0]) to write to the output file.

authors: Lucas-Maciel Yu-AnChen

repo: labsyspharm/palom


text:
Create a challenge for PEP 698 @override

PEP 698

PEP 698

I find it hard to come up with a challenge for @override. We can have something like the following, but # expect-type-error always needs to resides with @override, and it's impossible to have @override in user code and # expect-type-error in test code.
"""
TODO:
Annotate the methods of class `Tiger`.
"""
class Animal:
    def eat(self, food):
        ...

from typing import override

class Tiger(Animal):
    @override
    def eat(self):  # expect-type-error
        ...

    @override
    def eat(self, food):
        ...

    @override
    def fly(self):  # expect-type-error
        ...


text:
For inactive working groups, the organizer role is also inactive

When a helper is organizer of an inactive group, the 'Add' button is still shown and causes the add action to fail. We need to not show the 'Add' button to users unless they are the organizer of an active work group.

@dottorer I guess you mean the "Add" button for tasks/supplies/projects. Indeed, when there are only inactive WGs for a user, it should not be displayed; as if there weren't any WGs at all.
So it would be shown if:

for circle admins: circle has at least one active active working group
for "regular" users: user is admin of at least one active working group

@phillipoertel yes your two outlined criteria for the button are perfect.

@dottorer Implemented and testable on staging!

@phillipoertel Trying to verify the fix, I noticed the following. In staging, the user 'ralf.schroeder@gmail.com' is still organizer of group 'Sprache und Bildung' but already does not have access to the 'Add' button. This group is active so I expect him to have it. Can we look why?

@phillipoertel Can you quickly check the scenario above to see why the 'add' button is not showing for that user?

@dottorer implemented and on staging, please review.

@phillipoertel Tested on case above - works perfectly now....

authors: dottorer phillipoertel

repo: lale-help/lale-help


text:
correction of BTCEUR ticker calculation

Calculating BTCEUR from BTCUSD / EURUSDsell does not produce valid results in comparison to actual BTCEUR price on BitStamp
This should be a quick/dirty fix hopefully not affecting the rest of the server code. I'm not a JavaScript programmer, so please double-check that this is fine. Thanks.

Thanks @marian001. Is this portable to the next-gen, @joshmh?

Corresponding changes should be applied also to lamassu-admin. I have made a few quick/dirty changes in my server installation and they seem to work fine. Let me know if you're interested. I could submit additional pull requests. I'm also quite new to this GitHub collaboration, so if my suggestions should be submitted other way than as pull requests, please, let me know..

Good point, @marian001, looks like Bitstamp updated their API since this was written, to add currency pairs. We're not making these kinds of changes to the old version, but we'll update next-gen with this fix.

authors: joshmh marian001 naconner

repo: lamassu/lamassu-bitstamp

license: unlicense


text:
Replace add segments

TITLE
Description
Replace memory.add_segment in hints to use VMProxy methods
Checklist

[ ] Linked to Github Issue
[ ] Unit tests added
[ ] Integration tests added.
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

Codecov Report

Merging #457 (85b1591) into main (6b3e505) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #457      +/-   ##
==========================================
- Coverage   96.65%   96.62%   -0.04%
==========================================
  Files          54       54
  Lines        9161     9148      -13
==========================================
- Hits         8855     8839      -16
- Misses        306      309       +3

Impacted Files
Coverage Δ

...rocessor/builtin_hint_processor/dict_hint_utils.rs
99.78% <100.00%> (-0.01%)
:arrow_down:

...t_processor/builtin_hint_processor/dict_manager.rs
95.67% <100.00%> (-0.21%)
:arrow_down:

src/hint_processor/builtin_hint_processor/usort.rs
94.66% <100.00%> (ø)

src/vm/vm_core.rs
95.53% <0.00%> (-0.27%)
:arrow_down:

..._processor/builtin_hint_processor/blake2s_utils.rs
99.51% <0.00%> (-0.02%)
:arrow_down:

src/hint_processor/proxies/vm_proxy.rs
91.66% <0.00%> (+1.66%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

authors: Juan-M-V codecov-commenter

repo: lambdaclass/cairo-rs


text:
[Bug] Observed discrepancy in the behavior of the compute_doubling_slope function

Describe the bug
When investigating a discrepancy in the behavior of the compute_doubling_slope function, I was able to isolate a potential bug. The issue arises when compiling and running the following Cairo program:
from starkware.cairo.common.cairo_secp.bigint3 import BigInt3
from starkware.cairo.common.secp256r1.ec import (
     EcPoint,
     compute_doubling_slope,
)

let test_point = EcPoint(
    BigInt3(-1, -5, -10),
    BigInt3(2, 4, 20)
);
let (slope_k) = compute_doubling_slope(test_point);

To Reproduce
Compile and run the program with both VMs
Rust VM: The program runs successfully without any issues.
Python VM: The program fails with the following error:
let (slope_k) = compute_doubling_slope(test_point);
                ^********************************^
cairo-vm/cairo-vm-env/lib/python3.9/site-packages/starkware/cairo/common/secp256r1/ec.cairo:49:5: (pc=0:176)
    verify_zero(
    ^**********^

Traceback (most recent call last):
  File "cairo-vm/cairo-vm-env/lib/python3.9/site-packages/starkware/cairo/common/secp256r1/field.cairo", line 130, in <module>
    assert r == 0, f"verify_zero: Invalid input {ids.val.d0, ids.val.d1, ids.val.d2}."
AssertionError: verify_zero: Invalid input (3618502788666131213697322783095069128085273774818029388902779187248654918653, 1000998741443085759556365127856636729742657698, 1024993258929947376774861639509083549149264010799).

Expected behavior
Both VMs should behave the same way.
What version/commit are you on?
Rust version: 2.0.0-rc0
Python version: 0.13.2
Additional context

The failing hint was introduced in this PR and reuses the existing compute_slope function from the Rust VM implementation.
No significant differences are apparent in the hint's logic, suggesting the issue might stem from subtle differences in VM handling or edge cases in the inputs.
The issue manifests only with the Python VM.
[Question] Is it possible to have scenarios that have negative limbs?

Relevant PRs
https://github.com/lambdaclass/cairo-vm/pull/1706
https://github.com/lambdaclass/cairo-vm/pull/1829

Yes, negative limbs are possible:
https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/cairo/common/cairo_secp/bigint3.cairo#L4

Hi @whichqua!
Took a look at this. I was able to reproduce both cases. Do you know what should be the correct output? That would be a little to check if the issue comes from the Rust VM.
Talking about you question: Yes, limbs can be negative. You can check the Python VM for references on that.

Do you know what should be the correct output?
I am not sure. I can spend a little more time on this but it might be good to have pointers on what to check.

How are you compiling and running that program?

Compiling via cairo-compile:
This was the command I was using
cairo-compile --cairo_path="cairo_programs/proof_programs:cairo_programs/benchmarks" cairo_programs/secp_cairo0_ec.cairo --output cairo_programs/proof_programs/secp_cairo0_ec.json --proof_mode"

For running I was using run_program_simple
fn run_program_simple(data: &[u8]) {
    run_program(data, false, None, None, None)
}

I think I've found issue here. So the problem comes from the hint inside verify_zero (which gets called during the execution of the method compute_doubling_slope. In order mimic the divmod(...) present in the hint, the Rust VM performs a val.div_rem(...) (example here). However, div_rem differs from divmod when it is used with parameters with different signs.
Replacing div_rem with div_mod_floor should do the trick.

@FrancoGiachetta any updates?

Hi @whichqua!
Sorry for the absence. I think I've found the issue here. The method verify_zero, referenced in the error, executes a hint:
%{
        from starkware.cairo.common.cairo_secp.secp_utils import SECP_P, pack

        q, r = divmod(pack(ids.val, PRIME), SECP_P)
        assert r == 0, f"verify_zero: Invalid input {ids.val.d0, ids.val.d1, ids.val.d2}."
        ids.q = q % PRIME
    %}

The problem here is that, to mimic the divmod inside the hint from rust, we use div_rem:
pub fn verify_zero(
    vm: &mut VirtualMachine,
    exec_scopes: &mut ExecutionScopes,
    ids_data: &HashMap<String, HintReference>,
    ap_tracking: &ApTracking,
    secp_p: &BigInt,
) -> Result<(), HintError> {
    exec_scopes.insert_value("SECP_P", secp_p.clone());
    let val = Uint384::from_var_name("val", vm, ids_data, ap_tracking)?.pack86();
    let (q, r) = val.div_rem(&secp_p);
    if !r.is_zero() {
        return Err(HintError::SecpVerifyZero(Box::new(val)));
    }

    insert_value_from_var_name("q", Felt252::from(&q), vm, ids_data, ap_tracking)
}

An so div_rem does not provide the same behaviour as divmod in cases were negative values are used. To solve this, we you could use div_mod_floor instead.
A PR will be created to make this change. However, I've also found that the code you've provided uses a variant of the same hint (which uses SECP256R1_P instead of SECP_P) and so is not implemented in the rust vm.
Running the example above with this little change should provide with same result in both VMs.

@FrancoGiachetta I will look at the hint at hand, and get back! Thanks for your speedy response and PR

repo: lambdaclass/cairo-vm


text:
Update References.md

TITLE
Description
Description of the pull request changes and motivation.
Type of change
Please delete options that are not relevant.

[ ] New feature
[ ] Bug fix
[ ] Optimization

Checklist

[ ] Linked to Github Issue
[ ] Unit tests added
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

[ ] This change is an Optimization

[ ] Benchmarks added/run

Codecov Report

Merging #426 (b44cbbd) into main (dfd0066) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #426   +/-   ##
=======================================
  Coverage   94.30%   94.30%
=======================================
  Files          62       62
  Lines        8022     8022
=======================================
  Hits         7565     7565
  Misses        457      457

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

authors: codecov-commenter diegokingston

repo: lambdaclass/lambdaworks


text:
chore: Bump starknet deps to 2.0.0

TITLE
Description
Description of the pull request changes and motivation.
Checklist

[ ] Linked to Github Issue
[ ] Unit tests added
[ ] Integration tests added.
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

Codecov Report

Merging #755 (4fe3925) into main (280abae) will increase coverage by 0.01%.
The diff coverage is n/a.

:exclamation: Current head 4fe3925 differs from pull request most recent head 7968ece. Consider uploading reports for the commit 7968ece to get more accurate results

@@            Coverage Diff             @@
##             main     #755      +/-   ##
==========================================
+ Coverage   92.41%   92.43%   +0.01%
==========================================
  Files          51       52       +1
  Lines       11846    11866      +20
==========================================
+ Hits        10948    10968      +20
  Misses        898      898

see 4 files with indirect coverage changes

authors: SantiagoPittella codecov-commenter


text:
Optimize show_kudo_all_button

• Optimize perf by switching from setInterval to mutation observer
• Changed element creation code from text concatenation to more structured object
• Changed the button text to match the title attribute on original kudo buttons (Give Kudos to …)
Tested for a few days, seems working fine 👍

Hey @ThomasMldr, kudos for the original feature :))
I'm trying to get rid of setIntervals to optimize perf, can you please also take a look at the code if everything is ok?

Hi @Strajk , thanks for the kudos ! :-)
Not familiar with the arrive library (yet, but looks good, might use in the future :-) ) but I checked out and tested your code and it seems to work just fine 👍

@ThomasMldr thx for checking 🙏

authors: Strajk ThomasMldr

repo: lamby/strava-enhancement-suite


text:
🎨 Improve runtime formatting code

See https://github.com/laminlabs/lamindb/pull/2157#issuecomment-2470812207
Claude and chatGPT both suggested the earlier version with this as alternative. Suggested in https://stackoverflow.com/questions/538666/format-timedelta-to-string. Note that the earlier solution is also suggested in this stackoverflow thread!
Less "manual" string wrangling is generally better and more robust - I agree. In this case, it's still a bit meh especially as we're performing some math.
I can live with either solution.

@falexwolf do you prefer this solution? I might have a slight preference for this new one but no strong feelings.

Interesting! I like this solution much better than the previous one. 🤔
But I'm surprised that nobody suggests using the stdlib for it: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes. Am I missing something?
In any case, not showing 0h and 0m if a run just takes 5s would be really nice given how much work goes into this now.

That's because these are different objects. a timedelta object is not a datetime object.

how much work goes into this now.

Not a lot - just a bit more communication :)

You're right, sorry!
Claude suggests:
days = td.days
seconds = td.seconds
hours = seconds // 3600
minutes = (seconds % 3600) // 60
secs = seconds % 60
print(f"{days}d {hours}h {minutes}m {secs}s")  # 1d 2h 30m 0s

Claude suggested to me the one that this PR is currently implementing :) I mean divmod or not doesn't make a difference anymore but if you prefer // I can adapt it.

No, as I said I like the solution you have here. I'd just print 5s instead 0h 0m 5s. So, if you could please account for that! 🙏

authors: Zethson falexwolf

repo: laminlabs/lamindb


text:
bug(node): Row ids did not arrive in sorted order

LanceDB version
0.5.2 @lancedb/lancedb
What happened?
Error: lance error: LanceError(IO): Execution error: Row ids did not arrive in sorted order: integers are ordered up to the 0th element, /home/build_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-datafusion-0.12.1/src/chunker.rs:47:46

Filter

Are there known steps to reproduce?
export async function append(tableName: string, data: lancedb.Data) {
  const db = await getConnection();
  const table = await getTable(db, tableName);
  await table.add(data);
  return table;
}

This seems to be a duplicate of #946.
Are you able to reproduce this in a newer version of LanceDB? This should have been fixed many months ago in https://github.com/lancedb/lance/issues/1926. You might need to rewrite the table with a newer version of LanceDB to fix it. You can run a migration in place on a table by running table.delete("false").
Out of curiosity, is there a reason you are using such an old version of the library?

Out of curiosity, is there a reason you are using such an old version of the library?

When I did the POC, the latest version was 0.5.2, and it has not changed since then. I upgraded to 0.8.0 yesterday

You might need to rewrite the table with a newer version of LanceDB to fix it. You can run a migration in place on a table by running table.delete("false").

Thank you very much for your reply. I am curious why initiating a delete operation will make the query result correct.

0.8.0 should fix this issue

rror: lance error: LanceError(IO): Execution error: Row ids did not arrive in sorted order: integers are ordered up to the 0th element, /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-datafusion-0.15.0/src/chunker.rs:47:46

0.8.0 version still has this issue, when compaction and insert happen simultaneously.

I am curious why initiating a delete operation will make the query result correct.

There's not thing special about the delete operation. Any write operation with the new version would trigger a fix to the manifest. delete("false") is just a way of forcing a write transaction that doesn't change any data.

rror: lance error: LanceError(IO): Execution error: Row ids did not arrive in sorted order: integers are ordered up to the 0th element, /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-datafusion-0.15.0/src/chunker.rs:47:46

0.8.0 version still has this issue, when compaction and insert happen simultaneously.

Hmm that's odd. That's what this test is supposed to get at:
https://github.com/lancedb/lance/blob/b9990d935b0c68ca7149ed8efe45d2f4ee3d9249/python/python/tests/test_optimize.py#L52-L89
I'm not able to reproduce this issue right now though. We can compact and insert in our tests just fine right now. I'll try once more to create a more exact reproduction. If you are able to create a reproducible example, that would help a lot here.

Here's a script where I've tried to reproduce an error when compacting and appending at the same time. I'm not able to get any error. Do you want to try to modify it to be closer to your situation and perhaps that will trigger the error?
import threading
import asyncio

import lancedb
import pyarrow as pa
import pyarrow.compute as pc

NUM_ROWS = 10_000
DIMS = 128

db = lancedb.connect("./test")
values = pc.random(NUM_ROWS * DIMS).cast("float32")
vectors = pa.FixedSizeListArray.from_arrays(values, DIMS)
data = pa.table({"id": range(NUM_ROWS), "vector": vectors})
table = db.create_table("test_table", data, mode="overwrite")

table.create_scalar_index("id")
table.create_index(num_sub_vectors=32)

for _ in range(10):
    table.add(data)

async def get_async_table():
    db_async = await lancedb.connect_async("./test")
    table_async = await db_async.open_table("test_table")
    return table_async

table_async = asyncio.run(get_async_table())

# One thread for compactions
def do_compaction():
    asyncio.run(table_async.optimize())

# One thread to append more data
def do_append():
    for _ in range(10):
        table.add(data)

compaction_thread = threading.Thread(target=do_compaction)
append_thread = threading.Thread(target=do_append)
compaction_thread.start()
append_thread.start()
compaction_thread.join()
append_thread.join()

assert table.count_rows() == NUM_ROWS * (10 * 2 + 1)

OK, I will try my best to give you a stable and reproducible case today.

@wjones127 Hi，
Hello, I spent a day today trying to reproduce the problem. However, I did not reproduce the problem, but I found two other serious problems.
Today I found that it seems difficult to find problems if the test is based on local files. I guess it is because the local operations are very fast, only tens of milliseconds. However, testing based on S3 will expose many problems.
I created two new issues:
https://github.com/lancedb/lancedb/issues/1525
https://github.com/lancedb/lancedb/issues/1526
I have made my smallest reproducible code and data public, I hope it will be helpful to you.
https://github.com/memfreeme/vector-test/tree/main
There are two other questions that I would like to confirm with you:

Is it true that compact and compact operations themselves cannot be concurrent?

In TS, can the object returned by append directly call optimize or other methods?

Like the following:
export async function ingest_jsonl(url: string, userId: string) {
  const data = await readFromJsonlFile(url);
  const table = await append(userId, data);
  if (Math.random() < 1 / 10) {
    await table.optimize({ cleanupOlderThan: new Date() });
    console.log(`${userId} table optimized`);
  } else {
    console.log(`${userId} table not optimized this time`);
  }
}

Is it true that compact and compact operations themselves cannot be concurrent?

Did you mean compact and append? Or two compact operations at the same time?
Two compactions at the same time will generally conflict, as they will try to apply the same operations to the table. Only one can succeed.
Compact and append should not conflict, so that should always work.

In TS, can the object returned by append directly call optimize or other methods?

Yes, that is a table reference that can be re-used for other operations. This can even be concurrent, though for writes there is a mutex that will serialize the writes within a process.

Today I found that it seems difficult to find problems if the test is based on local files. I guess it is because the local operations are very fast, only tens of milliseconds. However, testing based on S3 will expose many problems.

That's a fair point. I should try on a higher latency filesystem.

Did you mean compact and append? Or two compact operations at the same time?

The later.  That's consistent with my understanding.

Yes, that is a table reference that can be re-used for other operations. This can even be concurrent, though for writes there is a mutex that will serialize the writes within a process.

OK. get it. Thanks.

repo: lancedb/lancedb


text:
这个是什么问题导致的？

length = 1 : 0
length = 2 : 2496
length = 3 : 2642
length = 4 : 2568
length = 5 : 1313
length = 6 : 633
length = 7 : 249
length = 8 : 133
length = 9 : 66
length = 10 : 16
length = 11 : 6
length = 12 : 1
length = 13 : 1
start training...
reading training & test data...
done! train/test data sizes: 1/1
r: 1
iter0  diff=1.00e+100  train-time(sec)=5.64  f-score=0.06%
iter1  diff=1.00e+100  train-time(sec)=5.63  f-score=0.00%
Traceback (most recent call last):
File "test.py", line 8, in
pkuseg.train('msr_training.utf8', 'msr_test_gold.utf8', './models', nthread=20)
File "/Users/faby/.pyenv/versions/3.6.5/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkuseg/init.py", line 324, in train
trainer.train(config)
File "/Users/faby/.pyenv/versions/3.6.5/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkuseg/trainer.py", line 103, in train
score_list = trainer.test(testset, i)
File "/Users/faby/.pyenv/versions/3.6.5/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkuseg/trainer.py", line 169, in test
testset, self.model, writer
File "/Users/faby/.pyenv/versions/3.6.5/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkuseg/trainer.py", line 357, in _decode_fscore
gold_tags, pred_tags, self.idx_to_chunk_tag
File "/Users/faby/.pyenv/versions/3.6.5/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkuseg/scorer.py", line 37, in getFscore
pre = correct_chunk / res_chunk * 100
ZeroDivisionError: division by zero

您好，看上去您的训练集和测试集大小均为1，可能是训练文件和测试文件格式有误。文件格式为一行一句话，每句中所有单词以单个或多个空格分开，建议您检查训练文件和测试文件。

你好，训练中文语料，文件格式一行一句话，每局中的每个词语用单个或多个空格分开。是词语要分开对吗？例如：
中国矿业大学 位于 海淀区 的 学院路 上 。
这似乎需要很多的人工啊。

同遇到这个问题， 训练集的样本数要大于10，不然就会报这个错误。 这是为了测试所以只给了几个样本。。。。

authors: Fabyone Fan9 codeboywang

repo: lancopku/pkuseg-python


text:
🛑 trixmall.com is down

In 6505e86, trixmall.com (https://www.trixmall.com/) was down:

HTTP code: 567
Response time: 702 ms

Resolved: trixmall.com is back up in 522b954.

repo: lanen/bs-site


text:
🛑 vipgifts.net is down

In 4884c2b, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 727 ms

Resolved: vipgifts.net is back up in 5b7bad6 after 1 hour, 15 minutes.


text:
🛑 rexingsports.cn is down

In ffed243, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 597 ms

Resolved: rexingsports.cn is back up in bf7de35 after 13 minutes.


text:
🛑 vipgifts.net is down

In 4a44470, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: vipgifts.net is back up in 0fbb8c8 after 6 minutes.


text:
RetrievalQA custom prompt to accept prompts other than context and question e.g. language for use in Sequential Chain

Feature request
Update RetrievalQA chain so that custom prompts can accept parameters other than input_documents and question.
Current functionality is limited by call to StuffDocumentsChain:
answer = self.combine_documents_chain.run(
input_documents=docs, question=question, callbacks=_run_manager.get_child()
)
Any additional parameters required aren't passed, including chat history.
2 line code update required:
inputs['input_documents'] = docs
answer = self.combine_documents_chain.run(
inputs, callbacks=_run_manager.get_child()
)
Motivation
Improve flexibility of the RetrievalQA chain enabling system message to be customised, chat history to be passed so GPT can reference back to previous answers. Customise language in answer in QA chain etc.
Your contribution
Will submit PR with above change in-line with contributing guidelines.

I sort of got this to work (but not really, see below) using this code:
db = PGVector(
    embedding_function=self.embedding,
    collection_name="MY_FANCY_COLLECTION",
    connection_string=os.environ["DATABASE_URL"]
)
search_results = db.similarity_search(self.text, k=4)
logging.debug("Search results: %s", search_results)
llm = ChatOpenAI(model_name=self.llm_name, temperature=0)
qa_chain = RetrievalQA.from_llm(
    llm,
    retriever=db.as_retriever(),
    prompt=hub.pull("secretsourceorg/my-system-prompt")
)
result = qa_chain({"query": self.text})

I say "sort of" because this is being processed as a HUMAN role and not as a SYSTEM role, which is what I think you are looking for. At this time, I think, if you want to be able to do that you'll need to write your own retrieval_qa chain (but it shouldn't be too hard if you can read the source for the RetrievalQA class).
Do note, your prompt needs to include the {context} and {question} placeholders just like the sample
HTH

authors: PeterWelchWork tedsecretsource

repo: langchain-ai/langchain


text:
LlamaCppEmbeddings Error  type == GGML_TYPE_F16

System Info
llama_print_timings:        load time =   127.16 ms
llama_print_timings:      sample time =     0.00 ms /     1 runs   (    0.00 ms per token,      inf tokens per second)
llama_print_timings: prompt eval time =  1753.93 ms /   237 tokens (    7.40 ms per token,   135.13 tokens per second)
llama_print_timings:        eval time =     0.00 ms /     1 runs   (    0.00 ms per token,      inf tokens per second)
llama_print_timings:       total time =  1779.79 ms
GGML_ASSERT: /tmp/pip-install-7c_dsjad/llama-cpp-python_04ef08a182034167b5fee4a62dd2cdc2/vendor/llama.cpp/ggml-cuda.cu:3572: src0->type == GGML_TYPE_F16
中止 (核心已傾印)

Who can help?
No response
Information

[ ] The official example notebooks/scripts
[X] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[x] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
    vectorstore = Chroma.from_documents(documents=all_splits, embedding=LlamaCppEmbeddings(model_path="/home/mefae1/llm/chinese-alpaca-2-7b/ggml-model-q4_0.bin",
            n_gpu_layers=40,
            n_batch=16,
            n_ctx=2048
        ))

Expected behavior
return vectorstore and not error

https://github.com/langchain-ai/langchain/issues/8660#issuecomment-1663254921
Is work amazing 🤖


text:
Fix bug in index api

Description: a fix for index.
Issue: Not applicable.
Dependencies: None
Tag maintainer:
Twitter handle: richarddwang

Problem
Replication code
from pprint import pprint
from langchain.embeddings import OpenAIEmbeddings
from langchain.indexes import SQLRecordManager, index
from langchain.schema import Document
from langchain.vectorstores import Qdrant
from langchain_setup.qdrant import pprint_qdrant_documents, create_inmemory_empty_qdrant

# Documents
metadata1 = {"source": "fullhell.alchemist"}
doc1_1 = Document(page_content="1-1 I have a dog~", metadata=metadata1)
doc1_2 = Document(page_content="1-2 I have a daugter~", metadata=metadata1)
doc1_3 = Document(page_content="1-3 Ahh! O..Oniichan", metadata=metadata1)
doc2 = Document(page_content="2 Lancer died again.", metadata={"source": "fate.docx"})

# Create empty vectorstore
collection_name = "secret_of_D_disk"
vectorstore: Qdrant = create_inmemory_empty_qdrant()

# Create record Manager
import tempfile
from pathlib import Path

record_manager = SQLRecordManager(
    namespace="qdrant/{collection_name}",
    db_url=f"sqlite:///{Path(tempfile.gettempdir())/collection_name}.sql",
)
record_manager.create_schema()  # 必須

sync_result = index(
    [doc1_1, doc1_2, doc1_2, doc2],
    record_manager,
    vectorstore,
    cleanup="full",
    source_id_key="source",
)
print(sync_result, end="\n\n")
pprint_qdrant_documents(vectorstore)

Code of helper functions `pprint_qdrant_documents` and `create_inmemory_empty_qdrant`
def create_inmemory_empty_qdrant(**from_texts_kwargs):
    # Qdrant requires vector size, which can be only know after applying embedder
    vectorstore = Qdrant.from_texts(["dummy"], location=":memory:", embedding=OpenAIEmbeddings(), **from_texts_kwargs)
    dummy_document_id = vectorstore.client.scroll(vectorstore.collection_name)[0][0].id
    vectorstore.delete([dummy_document_id])
    return vectorstore

def pprint_qdrant_documents(vectorstore, limit: int = 100, **scroll_kwargs):
    document_ids, documents = [], []
    for record in vectorstore.client.scroll(
        vectorstore.collection_name, limit=100, **scroll_kwargs
    )[0]:
        document_ids.append(record.id)
        documents.append(
            Document(
                page_content=record.payload["page_content"],
                metadata=record.payload["metadata"] or {},
            )
        )
    pprint_documents(documents, document_ids=document_ids)

def pprint_document(document: Document = None, document_id=None, return_string=False):
    displayed_text = ""
    if document_id:
        displayed_text += f"Document {document_id}:\n\n"
    displayed_text += f"{document.page_content}\n\n"
    metadata_text = pformat(document.metadata, indent=1)
    if "\n" in metadata_text:
        displayed_text += f"Metadata:\n{metadata_text}"
    else:
        displayed_text += f"Metadata:{metadata_text}"

    if return_string:
        return displayed_text
    else:
        print(displayed_text)

def pprint_documents(documents, document_ids=None):
    if not document_ids:
        document_ids = [i + 1 for i in range(len(documents))]

    displayed_texts = []
    for document_id, document in zip(document_ids, documents):
        displayed_text = pprint_document(
            document_id=document_id, document=document, return_string=True
        )
        displayed_texts.append(displayed_text)
    print(f"\n{'-' * 100}\n".join(displayed_texts))

You will get
{'num_added': 3, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}

Document 1b19816e-b802-53c0-ad60-5ff9d9b9b911:

1-2 I have a daugter~

Metadata:{'source': 'fullhell.alchemist'}
----------------------------------------------------------------------------------------------------
Document 3362f9bc-991a-5dd5-b465-c564786ce19c:

1-1 I have a dog~

Metadata:{'source': 'fullhell.alchemist'}
----------------------------------------------------------------------------------------------------
Document a4d50169-2fda-5339-a196-249b5f54a0de:

1-2 I have a daugter~

Metadata:{'source': 'fullhell.alchemist'}

This is not correct. We should be able to expect that the vectorsotre now includes doc1_1, doc1_2, and doc2, but not doc1_1, doc1_2, and doc1_2.
Reason
In index, the original code is
uids = []
docs_to_index = []
for doc, hashed_doc, doc_exists in zip(doc_batch, hashed_docs, exists_batch):
    if doc_exists:
        # Must be updated to refresh timestamp.
        record_manager.update([hashed_doc.uid], time_at_least=index_start_dt)
        num_skipped += 1
        continue
    uids.append(hashed_doc.uid)
    docs_to_index.append(doc)

In the aforementioned example, len(doc_batch) == 4, but len(hashed_docs) == len(exists_batch) == 3. This is because the deduplication of input documents [doc1_1, doc1_2, doc1_2, doc2] is [doc1_1, doc1_2, doc2]. So index insert doc1_1, doc1_2, doc1_2 with the uid of doc1_1, doc1_2, doc2.

Linting and merging

authors: eyurtsev richarddwang


text:
Isolated python REPL based on docker containers

Description:
This PR provides the ability to execute python code using PythonREPLTool tool inside a Docker container. Isolated runs increase security by avoiding running malicious code generated by the model locally.
This is made possible by introducing a new REPL called PythonContainerREPL, which is a wrapper around the Docker container that runs the Python code.
Resolving Dependency Conflicts
Some checks failed due to a lack of added docker to the dependencies. Adding docker and updating poetry.lock caused a major merge conflict. We'd like to know how to go about adding Docker as an additional dependency in this case.
We would add docker to pyproject.toml as follows if it weren't for the difficult to resolve merge conflict of poetry.lock:
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
# Other dependencies...
docker = {version = "^6.1.3", optional = true}

[tool.poetry.extras]
docker = ["docker"]

Copy code
all = [
    "docker",
    # ... other packages ...
]

Twitter handle:
@deepsense_ai

Apologies for the slow review! Pr has some merge conflicts, happy to re-review if you'd like to resolve

authors: baskaryan eryk-dsai


text:
docs: update another TiDB Cloud link as it is already public beta

Thank you for contributing to LangChain!

[ ] PR title: "package: description"

Where "package" is whichever of langchain, community, core, experimental, etc. is being modified. Use "docs: ..." for purely docs changes, "templates: ..." for template changes, "infra: ..." for CI changes.
Example: "community: add foobar LLM"

[ ] PR message: Delete this entire checklist and replace with

Description: a description of the change
Issue: the issue # it fixes, if applicable
Dependencies: any dependencies required for this change
Twitter handle: if your PR gets announced, and you'd like a mention, we'll gladly shout you out!

[ ] Add tests and docs: If you're adding a new integration, please include

a test for the integration, preferably unit tests that do not rely on network access,
an example notebook showing its use. It lives in docs/docs/integrations directory.

[ ] Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:

Make sure optional dependencies are imported within a function.
Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
Most PRs should not touch more than one package.
Changes should be backwards compatible.
If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.

Thanks.


text:
json parser for when 3 backtiks are missing

Fixes #3455 and #2276.
The parse_json_markdown function expects a JSON string within triple backticks.
However, even though it's instructed this way, LLM's responses sometimes come with fewer that 3 backticks (as also described in the issue 3455.
You can try using this string as input to test:
json_string = '\n\nRESPONSE\n--------------------\n```json\n{\n    "action": "Current Search",\n    "action_input": "Atividades de lazer em Recife"\n}\n``'
Who can review?
Tag maintainers/contributors who might be interested:
@vowelparrot

Done. Thanks for the quick feedback.

looks like there's a failing unit test

@voulkon Hi , could you, please, resolve the merging issues? After that ping me and I push this PR for the review. Thanks!

authors: baskaryan leo-gan voulkon


text:
Does langchain4j support Kotlin programming language for development on Android platform?

Hi! I'm currently developing an Android application with an AI agent, so I want to know: Does langchain4j support the Kotlin programming language for development on Android platform? And can I create AI agent using langchain4j similar to langchain (https://python.langchain.com/v0.1/docs/modules/agents/quick_start/) ? Thank you so much.

@dosubot Thanks, I have some knowledge about langchain4j. It seems like that langchain4j doesn't support ReAct agent, so I want to know: If ReAct is not implemented, how does the language model autonomously choose which tools can be called？

Hi, not sure about kotlin, never tried it. But I guess it should work, worth trying.
ReAct is not implemented, but many model providers support tools/functions out of the box, see here column "tools".
I am closing this issue for now, feel free to continue here or open a discussions or use discord for questions/discussions.


text:
[FEATURE] Use Converse API instead of InvokeModel API for Amazon Bedrock integrations

Currently, Langchain4j’s Amazon Bedrock integration utilizes the InvokeModel API. Amazon has introduced the Converse API, which provides a consistent interface that works with all models that support messages. https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html

@AndrewSerbin sounds great! Would you like to implement this? 🙏

@langchain4j see my example in issue #1074. I propose a new architecture to implement the converse API or create a new package.

@herbert-beckman if converse API uses the same SDK, I would keep it in langchain4j-bedrock module.
We could create BedrockChatModel that could eventually be used instead of all Bedrock{Model}ChatModel classes.
WDYT?

I agree. However, some details still remain from the models, such as the input schemas and inference configs. I'm going to open a PR with the proposal.

@herbert-beckman swesome, thank you!

Hi @herbert-beckman, any news regarding this? Thanks!

Hello @langchain4j. No news. I haven't been able to focus on that yet.

@langchain4j I opened the draft PR. Please, if you can already suggest any changes, I'd appreciate it. Thank you!

@herbert-beckman great, thank you! ❤  Looks good from the first glance, I will take a deeper look this week!


text:
Can't access flow directly by link

Bug Description
When you try to access a flow using it's URL (ex. http://localhost:55650/flow/0b95342f-6ce4-43d0-9d60-c28bf66a3781), the page doesn't load and in the browser's console is shown the following message: Uncaught SyntaxError: Unexpected token '<' (at index-DK9323ab.js:1:1). I think that this problem is related to #1182 .
Navegating through the main page to access this flow works fine. If I reload the page, it doesn't load as described before.
Reproduction

Run the Docker image langflowui/langflow
Open the langflow main page
Creates a new flow
Copy the flow link into a new tab or just reload the page

Expected behavior
To open the flow editor page.
Who can help?
No response
Operating System
Docker image (langflowai/langflow) running in K8s
Langflow Version
1.0.19
Python Version
None
Screenshot
Instead of loading the JS file, is loaded the HTML file as shown in the following picture:

All requests in this image loads the same HTML.
Flow File
No response

Looks Like it has been fixed in latest. I cross checked latest build its working.

@amomra I am referring to latest code base. It will be available in upcoming release.

@amomra today v1.1.0 is released. Please cross check and let us know.

@irshadmb thanks for the info. I can't test because I'm having the problem related in #4572.

@amomra
Do you need any assistance with this case? If not, please let us know if this issue can be closed.

Hi @amomra, this was fixed in the latest langflow docker images, you can refer to them by using the nightly tag, for example: langflowai/langflow-nightly:v1.1.0.dev5 (I have tested with this one, and it seems to be working just fine).

authors: amomra carlosrcoelho irshadmb joaoguilhermeS

repo: langflow-ai/langflow


text:
2行显示时有右边有太多空白

与以前版本比较, 2行显示时有右边有太多空白.  请问如何变成紧凑型显示?
取消键永远不工作.

是说谷歌吗？还是说百度。如何的空白，什么浏览器版本
取消按钮就是取消 == 关闭

2 line search result 很多空白
Cancel按键没用 点空白处才可以取消

谷歌两行显示,框内右侧空白   我也这样
在设置里面调整两行  三行   预览显示是正常的  但是保存设置后依然有问题

@nonfxck 我也是这样的情况,之前就一直有,但是后来不知道怎么回事变好了,但是今天又出现了

脚本能否加个紧凑模式，可以减少不必要的操作

请问大佬，在这个REPO没有发布任何版本情况下，如何得知可以跟新新脚本？谢谢

请问大佬，在这个REPO没有发布任何版本情况下，如何得知可以跟新新脚本？谢谢


text:
没有安装篡改猴，但显示该脚本

没有安装篡改猴，但显示该脚本？怎么删掉它呢？

检查TamperMonkey，检查ViolentMonkey，检查AdGuard
其他的我就不清楚了

确实是AdGuard的锅，谢谢啦


text:
License change

Would you consider changing your license to MIT?

Can you elaborate a little on your reason for this request and your use case for this library that needs it?

I'd like to use this in some closed source code at work. If you are not up for the change I'll move on, but you might get contributions back if you change 👍

Closing this issue since the attached PR was also closed.

Hi, @lanrat, would you be able to release a new version with the changed license? This would make importing easier. Thank you!

Hello @Andreas5739738,
Similar to the prior request, can you elaborate a little on your reason for this request and your use case for this library that needs it?

I noticed that the released version is still licensed as GPLv3. It is the only GPL-licensed dependency of https://github.com/peak/s5cmd. To build a GPL-free version of s5cmd without having to depend on git revisions, having the Apache-licensed version of extsort released and versioned would be very helpful.

To clarify further: go.dev (https://pkg.go.dev/github.com/lanrat/extsort) still lists the package as licensed as GPL v3. So just depending on extsort will pull in the GPLv3-licensed package. Thanks!

authors: Andreas5739738 lanrat yonderblue

repo: lanrat/extsort


text:
Unable to compile gradle

I have used this in my app.gradle
compileSdkVersion 26
buildToolsVersion "26.0.1"
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.lapism:searchview:5.0.0-alpha6'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.google.android:flexbox:0.3.0'

But there are four errors:-
Error:Failed to resolve: com.android.support:appcompat-v7:26.0.2
Install Repository and sync projectOpen FileShow in Project Structure dialog

Try with 26.0.1

Try changing
com.android.support:appcompat-v7:26.+
to
com.android.support:appcompat-v7:26.0.2

I tried them all. but still it gives the same error and even I cannot Install Repository and Sync project

You have buildToolsVersion "26.0.1" and compile 'com.android.support:cardview-v7:26.0.2' and compile 'com.android.support:appcompat-v7:26.+' choose a vesion (26.0.1 or 26.0.2) and stick (explicitly to it).

@EmmanuelMess That won't matter. buildToolsVersion is different from Android support libraries. I use it like that, and it works. @Shubhraaaj Can you post all your build.gradle code?

apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.shubhraj.prototype"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
testCompile 'junit:junit:4.12'
}

You have to add cardview and flexbox dependencies.
You are using miguel catalan material search view in your last comment, this is not that searchview library.
    compile 'com.android.support:appcompat-v7:26.0.2'
    compile 'com.android.support:design:26.0.2'
    compile 'com.android.support:support-v4:26.0.2'
    compile 'com.google.android:flexbox:0.3.0'
    compile 'com.android.support:cardview-v7:26.0.2'

And in build tools version:     buildToolsVersion "26.0.1"

Yeah, the issue should be closed now.

hi i have the same problem, this solution didn't work for me..
can anyone help me with that? this is my app.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.galgoren.finalproject"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.squareup.picasso:picasso:2.3.2'
testCompile 'junit:junit:4.12'
}

@lagoren your dependencies{} doesn't have the 3 dependencies required. You don't even have the SearchView dependency so I don't understand how you are having this problem :/

hey thanks for replaying this is my gradle when it works :) i tried to do this and got an error:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.galgoren.finalproject"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.squareup.picasso:picasso:2.3.2'
testCompile 'junit:junit:4.12'
compile 'com.google.android:flexbox:0.3.0'
compile 'com.lapism:searchview:5.0.0-alpha6'

}

Use alpha7, it's released, although that's still not the reason. What error do you get?

Failed to resolve: com.lapism:searchview:5.0.0-alpha6

just used alpha7 and it did not give me errors, trying it right now ..thank you!

Update all dependencies, then clean and rebuild the project.

@lagoren https://bintray.com/lapism/maven/searchview/view
alpha6 is not there.

after changing it to alpha7 it seems to work thank you!
but when im trying to find the view i get an error:
SearchView cannot be cast to android.support.v7.widget.SearchView
at com.example.galgoren.finalproject.MainActivity.onCreate(MainActivity.java:74)

have you added the view to the layout?

this is my onCreate at MainActivity:
package com.example.galgoren.finalproject;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import com.example.galgoren.finalproject.adapters.MyFragmentAdapter;
import com.example.galgoren.finalproject.adapters.MyListAdapter;
import com.example.galgoren.finalproject.db.PlacesProvider;
import com.example.galgoren.finalproject.fragments.FragmentFavorite;
import com.example.galgoren.finalproject.fragments.FragmentMainSearch;
import com.example.galgoren.finalproject.model.Place;
import java.util.List;
public class MainActivity extends AppCompatActivity implements TabLayout.OnTabSelectedListener, MyListAdapter.OnMyClickListener, MyBatteryReceiver.OnBatteryChangedListener {
private MyFragmentAdapter myFragmentAdapter;
private ViewPager pager;
private MyBatteryReceiver receiver;
private SearchView searchWord;
private GooplePlacesReceiver googlePlacesReceiver;
private FragmentFavorite fragmentFavorite;

//-----------------------------------------------------------------------------

// onCreate
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // listening with the receiver to the googleSearchService
    googlePlacesReceiver = new GooplePlacesReceiver();
    LocalBroadcastManager.getInstance(this).registerReceiver(googlePlacesReceiver, new IntentFilter
            (IntentServiceGooglePlaces.ACTION_GOOGLEPLACES));

    // registering and connecting to battery receiver
    receiver = new MyBatteryReceiver(this);
    IntentFilter intentFilter = new IntentFilter();
    intentFilter.addAction(Intent.ACTION_POWER_CONNECTED);
    intentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED);
    registerReceiver(receiver, intentFilter);

    // setting the toolbar
    Toolbar myToolBar = (Toolbar) findViewById(R.id.myToolBar);
    setSupportActionBar(myToolBar);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        myToolBar.setOverflowIcon(getDrawable(R.mipmap.ic_menu_icon_white));
    }

    // finding the search view
   searchWord = findViewById(R.id.searchView);

    // connecting the fragments to the view pager and displaying search fragment
    myFragmentAdapter = new MyFragmentAdapter(getSupportFragmentManager());
    pager = (ViewPager) findViewById(R.id.pager);
    pager.setAdapter(myFragmentAdapter);

    pager.setCurrentItem(1);

    // connecting the tabLayout to the pager
    TabLayout tabs = (TabLayout) findViewById(R.id.tabLayout);
    tabs.setupWithViewPager(pager);

    fragmentFavorite = (FragmentFavorite) myFragmentAdapter.getItem(0); // it falls here

}

yes here is my activity_main.xml

<android.widget.RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.galgoren.finalproject.MainActivity">
<android.support.v7.widget.Toolbar
    android:id="@+id/myToolBar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_centerVertical="true"
    android:background="?attr/colorPrimary"
    android:minHeight="?attr/actionBarSize"
    android:theme="?attr/actionBarTheme">

    <com.lapism.searchview.SearchView
        android:id="@+id/searchView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="com.lapism.searchview.SearchBehavior" />

</android.support.v7.widget.Toolbar>

<android.support.design.widget.TabLayout
    android:id="@+id/tabLayout"
    app:tabGravity="fill"
    app:tabMaxWidth="0dp"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_below="@id/myToolBar"
    android:background="@color/colorPrimary"
    app:tabTextColor="@color/cardview_light_background">

    <android.support.design.widget.TabItem
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="FAV" />

    <android.support.design.widget.TabItem
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="SEARCH" />

</android.support.design.widget.TabLayout>

<view
    android:id="@+id/pager"
    class="android.support.v4.view.ViewPager"
    id="@+id/view"
    layout_alignParentLeft="true"
    layout_alignParentStart="true"
    layout_alignParentTop="true"
    layout_marginLeft="11dp"
    layout_marginStart="11dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/tabLayout" />

</android.widget.RelativeLayout>

and my MainActivity onCreate:
package com.example.galgoren.finalproject;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import com.example.galgoren.finalproject.adapters.MyFragmentAdapter;
import com.example.galgoren.finalproject.adapters.MyListAdapter;
import com.example.galgoren.finalproject.db.PlacesProvider;
import com.example.galgoren.finalproject.fragments.FragmentFavorite;
import com.example.galgoren.finalproject.fragments.FragmentMainSearch;
import com.example.galgoren.finalproject.model.Place;
import java.util.List;
public class MainActivity extends AppCompatActivity implements TabLayout.OnTabSelectedListener, MyListAdapter.OnMyClickListener, MyBatteryReceiver.OnBatteryChangedListener {
private MyFragmentAdapter myFragmentAdapter;
private ViewPager pager;
private MyBatteryReceiver receiver;
private SearchView searchWord;
private GooplePlacesReceiver googlePlacesReceiver;
private FragmentFavorite fragmentFavorite;

//----------------------------------------------------------------------------------------------

// onCreate
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // listening with the receiver to the googleSearchService
    googlePlacesReceiver = new GooplePlacesReceiver();
    LocalBroadcastManager.getInstance(this).registerReceiver(googlePlacesReceiver, new IntentFilter
            (IntentServiceGooglePlaces.ACTION_GOOGLEPLACES));

    // registering and connecting to battery receiver
    receiver = new MyBatteryReceiver(this);
    IntentFilter intentFilter = new IntentFilter();
    intentFilter.addAction(Intent.ACTION_POWER_CONNECTED);
    intentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED);
    registerReceiver(receiver, intentFilter);

    // setting the toolbar
    Toolbar myToolBar = (Toolbar) findViewById(R.id.myToolBar);
    setSupportActionBar(myToolBar);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        myToolBar.setOverflowIcon(getDrawable(R.mipmap.ic_menu_icon_white));
    }

    // finding the search view
   searchWord = findViewById(R.id.searchView);       **// it falls here**

    // connecting the fragments to the view pager and displaying search fragment
    myFragmentAdapter = new MyFragmentAdapter(getSupportFragmentManager());
    pager = (ViewPager) findViewById(R.id.pager);
    pager.setAdapter(myFragmentAdapter);

    pager.setCurrentItem(1);

    // connecting the tabLayout to the pager
    TabLayout tabs = (TabLayout) findViewById(R.id.tabLayout);
    tabs.setupWithViewPager(pager);

    fragmentFavorite = (FragmentFavorite) myFragmentAdapter.getItem(0);

}

You imported the wrong class. Replace import android.support.v7.widget.SearchView; with import com.lapism.searchview.SearchView;.

thank you!

i was trying for couple of hour to hide suggestions, when i click on the search view an empty blue menu is opened, i tried: searchBar.hideSuggestions(); and it didnt work

hi
im geting an error:
Failed to resolve: com.lapism:searchview:5.0.0-alpha6
this is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.galgoren.finalproject"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.google.android:flexbox:0.3.0'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.squareup.picasso:picasso:2.3.2'
testCompile 'junit:junit:4.12'
compile 'com.google.android:flexbox:0.3.0'
compile 'com.lapism:searchview:5.0.0-alpha6'

compile 'com.github.mancj:MaterialSearchBar:0.7.5'

}

@lagoren  implementation 'com.lapism:searchview:27.1.1.0.0'

authors: Dahnark EmmanuelMess HusseinElFeky Shubhraaaj lagoren lapism

repo: lapism/SearchView