Clicking on notification does not invoke a callback in ringStream

Alarm plugin version
Latest version
Describe the bug
If the app has been sent to the background, sometimes clicking on an alarm notification does not call the Stream subscription callback
Instead I see the following error in the logcat
W/FlutterJNI(13027): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: com.gdelataillade.alarm/alarm. Response ID: 3
Has anyone seen this behavior?
I am trying to make a small project to reproduce this behavior. But just wanted to see if someone else has seen this?

Hi @arungopalan
Thanks for your interest in the plugin.
I never heard of this issue before. I'll take a close look at it as soon as I find the time. Let me know if you if you find something.

I'm using Firebase in my app.
I found out, that the ringStream doesn't get invokend when I'm setting up the background message handler  FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler).
I did a small test:

I'm running the app with FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler) in main function. In logs I even get I/FLTFireMsgService(10382): FlutterFirebaseMessagingBackgroundService started!.
I trigger the alarm and get notification only.  ringStream doesn't receive any data, as a result no RingScreen is triggered.
Alarm is still on.
I Remove the app from app manager with alarm still ON.
I click on alarm notification and app opens with the RingScreen on. (This time I don't get the I/FLTFireMsgService(10382): FlutterFirebaseMessagingBackgroundService started! message, which means, that onBackgroundMessage handler was set up on the first run.
If I close the app and restart it the FlutterFirebaseMessagingBackgroundService gets restarted as well and I have to do the same procedure again to get data in ringStream.
Spent multiple hours trying to figure out what went wrong, but no result.

Hi @vitalii-t12
Thanks for sharing your issue.
It looks like there is a conflict between my plugin and Firebase Messaging. If you could answer the following questions it could help me a lot identify the issue:

Does the ringStream work properly if you don't call FirebaseMessaging.onBackgroundMessage ?
Do you have any relevant logs ? Any error or warning ?
What device do you use exactly ? And what Android version ?
Have you tried to schedule the alarm with different ids ?
Do you initialize FMC first ? Or alarm service first ? Have you tried both cases ?

Thanks in advance.

Hi, @gdelataillade
Sorry for late reply. Have been very busy the whole week.
So, let's go one by one:

Yes, it works perfectly good when I don't call FirebaseMessaging.onBackgroundMessage.
No errors or warnings. The only log I get is when I call  FirebaseMessaging.onBackgroundMessage:

I/FLTFireMsgService( 5549): FlutterFirebaseMessagingBackgroundService started!

Device: Pixel 6 Pro
Android version: 13
I think, it could be relevat for other devices as well.

Yes, but it didn't help

I have tried initializing in different order and from different places (main function or Widgets). But i got the same result.

I'm using the example app and just added Firebase to it, nothing else.
Here is a sample video describing the bug:
Screencast from 03-09-2024 08:03:10 PM.webm
Video timing 2:00 when I kill the app WITH ALARM RINGING and then click on notification, it works perfectly well. But in this case I don't get the log that FlutterFirebaseMessagingBackgroundService is initialized:
I/FLTFireMsgService( 5549): FlutterFirebaseMessagingBackgroundService started!

You can see this at timing 3:27 the message with FlutterFirebaseMessagingBackgroundService  and when I close the app from task manager and click on notification I get only my test log  (timing 3:40 the logs with #myTest)
I could conclude, that it gets broken only when FlutterFirebaseMessagingBackgroundService is initialized. When you start the app normally it is, so ringStream doesn't work.
Feel free to ask any questions, I would be happy to help resolving this issue.

Hi @arungopalan
Thanks a lot for the detailed answer.
I might have a workaround you can try: change the plugin's code and in the Alarm class in alarm.dart, change this (line 25):
static final ringStream = StreamController<AlarmSettings>();
to:
static final ringStream = StreamController<AlarmSettings>.broadcast();
Let me know if it changes something. Thanks in advance.

@gdelataillade Hi.
You tagged the wrong person :sweat_smile:
Thanks for suggested fix. I tried it, but didn't help.
When using broadcast() I don't even get the ringing screen after killing the app and starting it from notification.
I also noticed, that when FlutterFirebaseMessagingBackgroundService is initialized the handleMethodCall method from android_alarm.dart  isn't called

Hi @vitalii-t12
Thanks for your answer !
It seems the issue lies with the alarmRinging invokeMethod not being triggered from AlarmService. My suspicion is that there's a conflict with the firebase_messaging package. To address this, I'm working in PR #166  on a solution that involves utilizing an EventChannel instead of a MethodChannel for sending ring events from the native side to Flutter. This change aims to mitigate potential conflicts. Unfortunately, I'm unable to replicate the issue on my device, so I'd greatly appreciate it if you could test the fix on your end.
For testing the proposed fix, you'll need to modify your pubspec.yaml to use the alarm plugin from a specific branch where the fix has been applied. Here's how you can do it:
alarm:
    git:
      url: https://github.com/gdelataillade/alarm.git
      ref: fix/android-ring-stream-issue

Please let me know if this resolves the issue for you. Your feedback will be invaluable.

Hi, @gdelataillade
I'm happy to help! I love your lib, and will do anything I can to make it better.
I tried running it with your fix, but the app doesn't run. Do you have any idea why I'm getting this issue?

@gdelataillade hello again :)
I managed to fix the issue above by pulling the project from your branch and setting up firebase again. Probably, was some caching issue.
This fix brought some very interesting behavior to the app: alarm screen works ONE TIME when app is freshly installed.
I install the app, app starts, FirebaseMessagingService is initialized, and when I start alarm instantly and IT WORKS :fireworks:, but then when I do it again, it doesn't work.
Even when I kill the app and start it from notification, it doesn't display the alarm screen. But it also removes the alarm, when I start it from notification.
I tried it on my real device as well, and it's the same behavior, except, if I wait some time (like 5min.) and do a cold start, the alarm screen works one time as well, and then doesn't work again.
Here is a short video, describing the case:
Screencast from 03-16-2024 05:45:09 PM.webm

Hi @vitalii-t12
Thanks for the feedback !
I just pushed a commit on the fix/android-ring-stream-issue branch. It should fix the issue with the ring screen that shows only the first time. Let me know if it works !

Hi, @gdelataillade
That's amazing! It works well now!!!
The only thing is, that when I open the app from notification I get the RingScreen twice. I've added a timestamp on RingScreen and you can see a difference at milliseconds.
Here is a short video describing how it works and the bug I described above:
Screencast from 03-18-2024 05:14:54 PM.webm

Hi again @vitalii-t12
Glad to see it works !
I'll take a look a this. In the meantime you can avoid the double navigation by checking if the navigation to the ring screen was already done once.

Hi, @gdelataillade
We're almost there, but the side effect we're getting with double ring screen is a bit concerning.
It looks, like it's called twice independently, while hasNavigatedToRingScreen  is still false
Screencast from 03-19-2024 05:35:15 PM.webm

Hi @vitalii-t12
I've been unable to reproduce the double navigation issue... Have you been able to find a fix or a workaround ?

HI, @gdelataillade
I didn't have time recently to play around with it.
I tried it without FirebaseMessaging, and it works perfectly well. But when I initialize FirebaseMessagingService it shows the double ring screen.
I will try to find a workaround for it the next days. At least, it works pretty good now

Hello, @gdelataillade
Sorry for taking so long, was busy recently.
I found a solution for the ringing screen taht appears twice. In home.dart I modified the initState:
  @override   void initState() {     super.initState();     if (Alarm.android) {       checkAndroidNotificationPermission();       checkAndroidScheduleExactAlarmPermission();     }     loadAlarms();     DateTime? dateAlarmCalled;     subscription ??= Alarm.ringStream.stream.listen(       (alarmSettings) {         if (dateAlarmCalled != alarmSettings.dateTime) {           navigateToRingScreen(alarmSettings);           dateAlarmCalled = alarmSettings.dateTime;         }       },     );   }
It worked now. I tried earlier doing something similar with state varialbe, but it didn't work (I really don't wanna investigate why, I'm happy it works now). Now it works perfecly well, and there are no other side effects.
I can confirm that it works perfectly well, and you can close this discussion and merge your fix into main branch!
Thank you very much for your work!
I'm very happy to have the opportunity to use your library.
Wish you all the best in future :rocket:

Hi @vitalii-t12
Awesome ! I'm glad that it works now and that you like the library. Thank you so much and I wish you all the best too !


Update Readme.md

Hi @himanshupandey26 i am curious, is there a site or book or something that directed you to open this pull request?

Hi @himanshupandey26 i am curious, is there a site or book or something that directed you to open this pull request?

Some PRs mentioned Apna College

This is hilarious.

Hi @himanshupandey26 i am curious, is there a site or book or something that directed you to open this pull request?

There's a YouTube video titled "complete git and GitHub tutorial for beginners" by Apna college in which they demonstrate using pull requests by typing their name on a pull request to this repo. Seems like this will never end lol


💚  multiarch

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


API for Zeroconf connection to other devices on the network

Problem:
Spotify Web API only allows me to connect to devices which are specifically registered to my account, rather than those devices which advertise themselves over mdns on my local network.
Possible solution:
I'd like to be able to use an API in order to programmatically connect to any Spotify devices on my local network, using Zeroconf. I can see that you've done the hard yards to be able to connect the librespot-java player via Zeroconf: would it be possible to onboard other players using a similar method, and incorporate this into the API?
Background / use case:
I have created an application in Spotify, and I can use it for Spotify Web API calls, including connecting to those devices which are registered to my Spotify account. I use Sonos speakers, which seem to rely more on Zeroconf connections for devices on the local network, so when I use the Spotify Web API to list available devices using the Spotify Web API, unless I've recently connected to the Sonos device specifically through the Spotify app, the Sonos devices do not appear in the list of available devices. The Sonos devices still show up on the Spotify Connect app (they're still advertised and over mdns), just not in the Web API, presumably because they aren't registered specifically to my account, and need to be available to other users on my local network.

So you'd like an API endpoint to list devides available on your network and one to connect to them?

Basically yes - that was just a long-winded way of asking, so I could explain the use case.

First part should be relatively easy: just need to make a mDNS probe and get the results. For the second one we need to craft the zeroconf blob which ultimately is a lot of wrapping around stored credentials data.
I'll start by modifying zeroconf-java to allow probing.

@benturnberg You should be good now.

It's still only recognising itself.

What do you see if you run dns-sd -B _spotify-connect local?

The devices are there:
Timestamp     A/R Flags if Domain                    Service Type              Instance Name
16:03:30.999  Add     2 20 local.                    _spotify-connect._tcp.    librespot-java
16:03:31.162  Add     2 20 local.                    _spotify-connect._tcp.    sonos48A6B8XXXXX1
16:03:31.208  Add     2 20 local.                    _spotify-connect._tcp.    sonos48A6B8XXXXX2

Hey @devgianlu let me know if there's anything else I can do to troubleshoot. Cheers

@benturnberg I just need to find the time to debug zeroconf-java with a Spotify Connect enabled device (likely my TV).

Thanks @devgianlu , I appreciate it. Finding the time can certainly be difficult!

Hi,
I just stumbled upon librespot-java (which looks amazing!) and then this thread when trying to use it. I'm building an NFC remote control to enable the kids to play Spotify albums/playlists on a Sonos speaker by scanning a card with an NFC tag.
Like @benturnberg I can see the speakers with dns-sd:
dns-sd -B _spotify-connect local

Browsing for _spotify-connect._tcp.local
DATE: ---Sun 20 Jun 2021---
13:39:23.219  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
13:39:23.220  Add        3   6 local.               _spotify-connect._tcp. sonosB8E93745F1C7
13:39:23.220  Add        3   6 local.               _spotify-connect._tcp. sonos7828CACAD0C2
13:39:23.220  Add        3   6 local.               _spotify-connect._tcp. sonos7828CAA6C62A
13:39:23.220  Add        3   6 local.               _spotify-connect._tcp. sonos7828CAA6C620
13:39:23.220  Add        3   6 local.               _spotify-connect._tcp. librespot-java
13:39:23.220  Add        2   6 local.               _spotify-connect._tcp. Kodi (mediacenter)

But when running the API server (via Coursier)
cs launch -r https://oss.sonatype.org/content/repositories/snapshots xyz.gianlu.librespot:librespot-api:1.6.1-SNAPSHOT -M xyz.gianlu.librespot.api.Main

and then calling the discovery endpoint, I can see only the other Spotify connect devices but not the Sonos speakers:
curl -s -X POST http://localhost:24879/discovery/list | jq

[
  {
    "name": "librespot-java",
    "target": "Sorens-MacBook-Pro",
    "port": 34515
  },
  {
    "name": "Kodi (mediacenter)",
    "target": "mediacenter.local",
    "port": 46233
  }
]

I also ran the discoverer manually (basically the code below from the DiscoveryHandler just to check and got the same result (Sonos speakers not showing up).
https://github.com/librespot-org/librespot-java/blob/2745b502e69a2dc69bd461516cb62f7d6dfad4e4/api/src/main/java/xyz/gianlu/librespot/api/handlers/DiscoveryHandler.java#L43-L53
If there's anything I can do to help debugging the issue, I'd be happy to.

Wow that was fast @devgianlu. While looking into zeroconf-java, I just saw that you had released 1.3.1. So I tried it and now the speakers show up on the discovery enpoint!

Turns out there was a bug in the code I hadn't written myself. It was working with zeroconf-java only because the packet creation is unoptimized while official clients are.
I was writing the code for the connection, but there two of ways on how that could be done:

supplying the username and password to the request
connecting with the current user of librespot-java

Let me know if you intended to use it differently.

I think connecting with the current user of librespot-java would be the best fit for my use-case.

Current user would work with my use case too. Thanks @devgianlu

@devgianlu now that discovery works is there anything I can do to help with the connect part?

I don't really have time to develop this feature. What needs to be done is writing the encryption code for the blob having the one for decryption.

Has anyone made any progress on this?
I have started the patchset to encrypt the blob and make the addUser request to the HTTP server advertised by zeroconf. I thought I'd check in before I do too much more work on the feature. My use case is basically the same as @sbrunk's.

@dsheets I haven't looked into this further yet.

Any progress on this?  I am trying to make the same addUser request in Python 3.   Thanks.

Just wanted to add myself in here. I have been trying to get my Spocon setup to show up on the network for things like HomeAssistant and have been struggling. I think this is a similar issue?
I am trying to do the mDNS port forwarding and Google led me here.
Is there any way to wake up Spocon/librespot and show it on Spotify Connect?

Not sure on that, as I am not familiar with “Spocon”.  Or is that short for Spotify Connect?
I have had success with getting the integration to work with the spotifyd and Spotify Connect Addon, both of which use librespot under the covers.  You just have to configure librespot in discovery mode, and create a credentials.json file.

@floodwayprintco
Apologies - I just realized that this thread is for the librespot-java process, and not SpotifyPlus integration.


readme with Processing version link

Hey! I've made a quick and simple Processing version of the original P5Js/Javascript.
If you like it, please feel free to include the link in your repo.

Awesome! If it's a literal translation of the code, I'm also happy to have it added to this repo (I try to maintain Processing and p5 versions of all the challenges as much as possible.)

My Pleasure
Yes, I think it can be considered a literal translation of the original code.
Have a great day!
P.s. Few weeks ago I also made an implementation for coding challenge 56
https://github.com/SetupandDraw/Learning-various-things-in-javascript/tree/master/Magnets https://github.com/SetupandDraw/Learning-various-things-in-javascript/tree/master/Magnets
you should have a pull request on the redeem file. (I hope, I am new to GitHub! ;P ).

Il giorno 05 apr 2017, alle ore 20:52, Daniel Shiffman<EMAIL_ADDRESS>ha scritto:
Awesome! If it's a literal translation of the code, I'm also happy to have it added to this repo (I try to maintain Processing and p5 versions of all the challenges as much as possible.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/CodingTrain/Rainbow-Code/pull/135#issuecomment-291959963, or mute the thread https://github.com/notifications/unsubscribe-auth/AM5TQWfJvLhAAzlvmniyeC9W69MncLM_ks5rs-LrgaJpZM4M0qSa.


chore: point polygon to dev

Description

Pull Request Type

[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[ ] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes #
Risk

Testing

Engineering

Operations

Screenshots (if applicable)

Current dependencies on/for this PR:

develop

PR #5199   👈

This comment was auto-generated by Graphite.


INSTALL: small typo

Checklist

[x] documentation is added or updated
[x] CLA is signed

Description of change

libssl, not libddl.

Merged


update duckdb to 0.3.4

Hamilton Ulmer
April 27, 2022, 7:13 PM
This has been fixed upstream and published as 0.3.4.
Edit
Delete
Hamilton Ulmer
April 22, 2022, 9:12 PM
Filed in the duckdb repo segfault with left join and inclusive ranges against tables w/ timestamps in 0.3.3 · Issue #3486 · duckdb/duckdb
Edit
Delete
Hamilton Ulmer
April 22, 2022, 9:01 PM
Steps to reproduce:
CREATE TEMPORARY TABLE tbl AS
SELECT generate_series as ts from generate_series(timestamp '2020-01-01', timestamp '2021-01-01', interval 1 day);
WITH data_table AS (
SELECT epoch(ts) as ts
FROM tbl
WHERE ts IS NOT NULL
),
S AS (
SELECT
min(ts) as minVal,
max(ts) as maxVal,
(max(ts) - min(ts)) as range
FROM data_table
),
values AS (
SELECT ts as value from data_table
WHERE ts IS NOT NULL
),
buckets AS (
SELECT
range as bucket,
(range) * (select range FROM S) / 40 + (select minVal from S) as low,
(range + 1) * (select range FROM S) / 40 + (select minVal from S) as high
FROM range(0, 40, 1)
)
SELECT
bucket,
low,
high,
count(values.value) as count
FROM buckets
LEFT JOIN values ON (values.value >= low AND values.value < high)
GROUP BY bucket, low, high
ORDER BY bucket;
Edit
Delete
Hamilton Ulmer
April 22, 2022, 9:00 PM
Additionally, this appears to be an issue with the CTE targeting a table speciifically, and is totally out of my depth. I’m filing an issue in the duckdb repo.
Edit
Delete
Hamilton Ulmer
April 22, 2022, 8:30 PM
Edited
I’ve identified that the left join in one of the CTEs now segfaults for numeric histograms. Need to produce a minimum test case so I can report to the duckdb team. I iteratively worked through the query and it began to break here. I also replaced the main select statement with select * from buckets and select * from values it was fine, as you would expect.
The issue seems to be, for some reason, LEFT JOIN values ON (values.value >= low AND values.value < high)
WITH data_table AS (
SELECT ${TIMESTAMPS.has(columnType) ? epoch(${sanitizedColumnName}) : ${sanitizedColumnName}::DOUBLE} as ${sanitizedColumnName}
FROM ${tableName}
WHERE ${sanitizedColumnName} IS NOT NULL
),
S AS (
SELECT
min(${sanitizedColumnName}) as minVal,
max(${sanitizedColumnName}) as maxVal,
(max(${sanitizedColumnName}) - min(${sanitizedColumnName})) as range
FROM data_table
),
values AS (
SELECT ${sanitizedColumnName} as value from data_table
WHERE ${sanitizedColumnName} IS NOT NULL
),
buckets AS (
SELECT
range as bucket,
(range) * (select range FROM S) / ${bucketSize} + (select minVal from S) as low,
(range + 1) * (select range FROM S) / ${bucketSize} + (select minVal from S) as high
FROM range(0, ${bucketSize}, 1)
)
  SELECT
    * from buckets
      bucket,
      low,
      high,
      count(values.value) as count
    FROM buckets
    LEFT JOIN values ON (values.value >= low AND values.value < high)
    GROUP BY bucket, low, high
    ORDER BY bucket

Edit
Delete

please close the loop on this issue by completing this PR: https://github.com/rilldata/rill-developer/pull/187

We need to be considerate of any breaking changes and communicating with users.


Pup-up header failed to hide the icon

views:
  - title: Testing
    type: sections
    max_columns: 4
    sections:
      - type: grid
        cards:
          - type: vertical-stack
            cards:
              - type: custom:bubble-card
                card_type: pop-up
                hash: '#testing'
                button_type: name
                name: Header Name
                show_icon: false
                show_name: true
              - type: custom:bubble-card
                card_type: button
                entity: switch.living_room_ac_nanoe
                show_icon: false

The Button card work as expected. However, I could not be abled to hide the header icon / name in the Pop-up card

OS: Windows 10 / OSX Sonoma 14.4.1
Browser: Chrome, 126.0.6478.127
Core: 2024.6.4
Supervisor: 2024.06.2
Operating System: 12.4
Frontend: 20240610.1
HACS: 1.34.0
HACS Frontend version:<PHONE_NUMBER>2053
Bubble Card: v2.0.4

Hi, indeed nice catch! I will take a look at this.

This should be now fixed in the new beta.
https://github.com/Clooos/Bubble-Card/releases/tag/v2.2.0-beta.1

The stable release is here:
https://github.com/Clooos/Bubble-Card/releases/tag/v2.2.0


Saving encrypted passcode locally?

If I understand correctly, the signify browser extension does not store Signify passcodes and requires the users to reenter their passcodes every time they opens new browser instances. My impression is that it is going to provide a bad user experience. Could the extension perhaps encrypt the passcode using a human-memorable password and store it locally in a similar manner to, e.g., Metamask?
This seems to be a security-convenience tradeoff. I am interested in learning how to significantly improve UX with minimal sacrifice to security.

The passcode needs to be reenter not only in new browser extension but also after a timeout period of inactivity.
A different approach to avoid the "responsibility" of storing passwords is to use password managers

I think most people do not have password managers. I imagine that if the browser extension gets substantial adoption, most users will store their Signify passcodes on their note-taking applications such as Notes on iOS which is synched with iCloud. These note-taking applications may be protected by weak passwords.

I was talking with Daniel Lenksjö today about this same issue.
Here’s a design I’ve thought about off and on for a year now since learning about how Webauthn works at IIW.  The idea is to use Webauthn with either a platform or roaming authenticator (e.g. a FIDO2 Hardware Key) and its pseudo random function capability.
See the picture below.

The browser extension creates a WebAuthn credential and register it on authenticator.
The user creates their random password. The extension uses a hash of this password and the Credential to request the authenticator to generate a pseudo-random result.
2.1	That result would be truncated to 21 characters and uses as the cleartext passcode.
2.1.1	The passcode would be hashed and stored (or could be stored encrypted with a hash of the password).

Later,  when a new unlock session is initiated, the user might be again prompted for their password, and would regardless be asked to re-authenticate with their authenticator.  The generated passcode is compared with what is stored.  If it matches, then the local authentication was successful, and a signifyClient can be instantiated and interact with KERIA.
There are still some UX and design issues to be made. One decision to be made is whether the user should ever be able to see the actual cleartext passcode.  That’s usually important to get backed up if they ever lose their authenticator (hardware key) or browser storage.  Using browser synchronized storage is an interesting optional feature, which would allow the user to use their roaming hardware authenticator on multiple devices without re-registering it (assuming the authenticator credential data could be the same, based on what is in sync’ed storage).
References:

https://webauthn.io/
Quoting from an article (https://wiki.geant.org/display/GWP5/Whitepaper+updates):
Emerging use of passkeys for end-to-end encryption with the PRF WebAuthn extension (https://github.com/w3c/webauthn/wiki/Explainer:-PRF-extension, https://w3c.github.io/webauthn/#prf-extension) which is used to provide access to an encryption key from a passkey for particular site, which can then be used to reliably encrypt and decrypt data. One of uses for this is to provide the client with vault data ( https://bitwarden.com/blog/log-into-bitwarden-with-a-passkey/).
https://blog.millerti.me/2023/01/22/encrypting-data-in-the-browser-using-webauthn/
https://issues.chromium.org/issues/41378082
diagram is at https://docs.google.com/drawings/d/1BrH-7KpT2iCA5r_HB08azVi4I5-PgIZe_i3vb2wc_7k/edit


I have a question about DocService.

I have a question about DocService.
Why doesn't @PATCH have a requestbody?

Yeah, it's a bug. Thanks for the reporting!


Allow setting offset relative to corner

Useful for multiple monitor setup, where each monitor has different dimensions.

Sorry I've not been around recetly to review and accept! I like the idea, I'll try it out on my setup soon.


Regen value not saved

I see regen value not saved when server close and restart.
(regenstam, regenhits, ecc), but seems regenval* corect save.
How Replicate:

.set regenstam 10 (set value)
.xshow regenstam (for see if correct set)
.save  (make a world save)
Restart sever
.xshow regenstam and see default value.

Also i see regenstam value not exist in char save block, exist only regenvalstam:
Save Block:
[WORLDCHAR c_man]
CREATE=1685
SERIAL=0307
NAME=B
COLOR=083ea
CURFOLLOWER=1
MAXFOLLOWER=5
TAG.ATTACKING=617
EVENTS=Class_Undeclared
ACCOUNT=a
DEATHS=1
SPEECHCOLOR=690
P=1614,1427
DIR=4
OSKIN=083ea
FLAGS=0a0000001
DAM=1,3
ACT=040000275
ACTP=1632,1476,10
EXP=380
HOME=0,0
OKARMA=2160
OFAME=48
OFOOD=0
FOOD=0
OSTR=160
OINT=10
ODEX=35
HITS=160
STAM=35
MANA=10
REGENVALSTAM=10  <----- REGENVALSTAM is here (not see any trace of REGENSTAM
Lumberjacking=1

Additional info:

Testet whit new build, but is long time i see this issue
Tested whit clear script pack

I make some test and sems work good.
Thx for fix it!


No World Panic when shootouts are happening far away due to AiC's

[ ] Shotsfired
[ ] #25
[ ] #12
[ ] All PlayerCallouts

alternative is to not really fire guns at the emergency scene to prevent world panic and just simulate them by
PLAY_SOUND_FROM_COORD. would not be real but... its a solution


Bump base image for container

The base image for the container is bumped from Node 8.10 to 8.15 which
also bumps Alpine from 3.6 to 3.8.

Pull Request Test Coverage Report for Build 67

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 97.692%

Totals

Change from base Build 66:
0.0%

Covered Lines:
163

Relevant Lines:
166

💛  - Coveralls


can't download

can't download hightail from github-cloud.s3.amazonaws.com

Not a problem with Hightail. Also, seems to work now.


et: 0.1 -> 0.1.1

Motivation for this change
Updates the et program.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Thanks!


KOGITO-1555: (Quarkus Snapshot) Bump Jackson version

@cristianonicolai apparently this breaks kogito-apps :(

@evacchi I seen this issue with other builds, yarn build is failing due to timeout, trying to fix it here https://github.com/kiegroup/kogito-apps/pull/123

@evacchi should we wait to merge this only if we upgrade?

I've been building on CI quarkus snapshot to make sure it works. So if it doesn't break current tree, and it's green, we can go ahead and merge https://rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/blue/organizations/jenkins/custom%2Fevacchi%2Fcustom-quarkus-snapshot/detail/custom-quarkus-snapshot/11/pipeline


pop-up cancel

Context
User dupond is logged and he has to choose a team after his declaration but he go back thinking that his declaration was upadated.
Expect Behaviour
As user like dupond
i want to select my team on the popup
so that i have to choose an team necesseraly
Criteria acceptance
if i don't choose an equipe, yaki don't register my update
if i click on cancel, a popup message appears to indicate that I have to choose a team to register and that it has not been registered

workflow change with bastiUI


collect alle elgato custom characteristics

i would like to suggest do collect all custom characteristics that are used by the elgato eve devices so they can be used instead of own custom ones.
a small start ist here: #140

I'm currently trying to makes sense of the Elgato Eve Energy services and characteristics and document everything here: https://gist.github.com/gomfunkel/b1a046d729757120907c


can we plot the mAP of the training?

I know now we only print out the mAP on validation. I want to know if it is possible to print out the mAP on training? Because, I want to know how well the model learn on my own dataset. Thanks.

I don´t think what you want makes sense, since in the training what you are tracking are the losses. Only in the validation you are generating the mask and bbox, which is what mAP measures.
But you can plot those results using the LogVisualizer class that comes in logger.py. You can check https://github.com/dbolya/yolact/issues/78#issuecomment-582152293 for plotting the logs generated.
If I am wrong, please correct me.


Look into possible GUI Libs

SFGUI and TGUI both look promising.
TGUI seems like the easiest and best fit at the moment
TGUI
SFGUI

https://tgui.eu/download/
https://tgui.eu/tutorials/v0.7/visual-studio-precompiled/
This is the TGUI stuff. Let's look into using that.

Ready to call this done. TGUI seems like the way to go. I've integrated TGUI into GameRegion and added an example of how to use it into NavigationDemoRegion.
Reviewers: Take a look at the use of SELECTED_NAVIGATOR_BUTTON_TYPE and the three new handle functions in NavigationDemoRegion to see if this is how you think things should be structured.
Also look into the constructors for NavigationDemoRegion (specifically the end of the "init" function).
Finally take a look at "initGUI".


Replace 'Breaking Change' with 'Important'

Change Logs
Replace 'Breaking Change' section heading with 'Important' heading.
Impact
None
Risk level (write none, low medium or high below)
None
Documentation Update
Replace 'Breaking Change' section heading with 'Important' heading.

The config description must be updated if new configs are added or the default value of the configs are changed
Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the instruction to make
changes to the website.

Contributor's checklist

[X] Read through contributor's guide
[X] Change Logs and Impact were stated clearly
[X] Adequate tests were added if applicable
[X] CI passed


Add CI best practices guide files

 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.


Index tag metadata for search

Using Elastic Search, index all of the tag metadata for full-text search.
This will probably require some thought about denormalization—flattening all of the tags for a particular image as the image's full-text tag record.
Eventually will also require database triggers for indexing.

Tags are now indexed and searchable


Remove the module attributes registry

Let's start with standardizing JSON modules cross-environment;
it's unclear what the registry would mean as the JS ecosystem evolves.

I'm going to land this for now, just so that the main branch focuses on the parts that are more or less agreed on, and we can keep discussing cross-ecosystem compatibility in issues.


Update scalatags to 0.8.2

Updates com.lihaoyi:scalatags from 0.7.0 to 0.8.2.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.lihaoyi", artifactId = "scalatags" } ]

labels: semver-minor

Superseded by #3039


move shared "read" and types code from relayer/conductor to utils crate

currently, there is a decent amount of code shared between the relayer and conductor, mainly by means of the conductor importing the relayer code. however, this shared code should live in some utils crate used by both. this will allow them to not depend on each other, and also facilitate testing within the conductor.

will do this after #99

@SuperFluffy is this related to your current work?

@joroshiba yeah, that's all the same issue essentially

closing as duplicate of #86


Improve escape within Drawer / Dialog / etc

Since on:keydown will only bubble to the Drawer from a focusable element within the drawer, we might want to consider adding an invisible input and give initial focus to it.
Using dialog.showModal can help here, but there are also tradeoffs that might not be worth it.

resolved via https://github.com/techniq/svelte-ux/commit/d9bdbc1ff5e9c7a59e8b0a4658bad412c1b6f9b8


Import error on Ubuntu - undefined symbol: PyFPE_jbuf

Hi,
I have followed the instructions on Github and have successfully (apparently) installed hdbscan. However, when I import hdbscan I receive the following error:

import hdbscan
Traceback (most recent call last):
File "", line 1, in
File "/home/soleilbleu/miniconda2/lib/python2.7/site-packages/hdbscan/init.py", line 1, in
from .hdbscan_ import HDBSCAN, hdbscan
File "/home/soleilbleu/miniconda2/lib/python2.7/site-packages/hdbscan/hdbscan_.py", line 43, in
from .plots import CondensedTree, SingleLinkageTree, MinimumSpanningTree
File "/home/soleilbleu/miniconda2/lib/python2.7/site-packages/hdbscan/plots.py", line 13, in
from sklearn.manifold import TSNE
File "/home/soleilbleu/.local/lib/python2.7/site-packages/sklearn/manifold/init.py", line 6, in
from .isomap import Isomap
File "/home/soleilbleu/.local/lib/python2.7/site-packages/sklearn/manifold/isomap.py", line 11, in
from ..decomposition import KernelPCA
File "/home/soleilbleu/.local/lib/python2.7/site-packages/sklearn/decomposition/init.py", line 11, in
from .sparse_pca import SparsePCA, MiniBatchSparsePCA
File "/home/soleilbleu/.local/lib/python2.7/site-packages/sklearn/decomposition/sparse_pca.py", line 9, in
from ..linear_model import ridge_regression
File "/home/soleilbleu/.local/lib/python2.7/site-packages/sklearn/linear_model/init.py", line 17, in
from .coordinate_descent import (Lasso, ElasticNet, LassoCV, ElasticNetCV,
File "/home/soleilbleu/.local/lib/python2.7/site-packages/sklearn/linear_model/coordinate_descent.py", line 29, in
from . import cd_fast
ImportError: /home/soleilbleu/.local/lib/python2.7/site-packages/sklearn/linear_model/cd_fast.so: undefined symbol: PyFPE_jbuf

This appears to be an issue in your sklearn implementation (which hdbscan depends on). You should find that a simple
import sklearn.manifold

will produce a very similar backtrace error. I'm not sure what version of sklearn you have, but you may want to check if you can install either a newer, or older (and more stable) version. Beyond that you may want to at least verify that 'import sklearn.manifold' fails, and if so consider filing a ticket with sklearn.

Thanks for your quick reply. The issue has been already fixed. I manually installed hdbscan using the provided scripts and also installed scikit-learn using pip rather than conda. I installed/uninstalled everything several times and the import kept giving me the same error. However, finally it was resolved by installing a specific combination of packages. I think miniconda was making some conflicts with the packages that were already installed on my Ubuntu. So I removed it, and reinstalled everything using pip or apt-get.


Add PhysicalDisks into Canisters

This PR is able to:

Add PhysicalDisks into Canister model
Modify save_inventory_infra for PhysicalDisks
Remove physical_storage deletion from physical disks inventory saving (bug fix)

Depends on:

ManageIQ/manageiq-schema#285

@felipedf can you add the canisters and physical_disks inventory collections to the base physical_infra_manager persister definition and fix the foreign_key for canisters in a follow-up PR?


DUB Tag for v5.1.5

Can you make a tag on git that is a version number like; "v5.1.5".
I'd like to remove the dub warning from my build log...
WARNING: A deprecated branch based version specification is used for the dependency luad. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.

I would fork this and do it myself but DUB doesn't have a way to override or use a fork.
Thanks!

You could use dub add-local directory to override the package locally, you'll have to sync with git directly.

Is there a reason not to give a tag like "v.0.0.1"?


Request Header Fields Too Large

Describe the bug
I have a small monitors like 6. The all alerts is so simple like the screenshot below. To works I need restart the Gatus each 10 minutes due the error "[api.ErrorHandler] Request Header Fields Too Large"

What do you see?
[api.ErrorHandler] Request Header Fields Too Large

What do you expect to see?
I don't remember but some version in the past I never got this error but now I am not able to say that version
List the steps that must be taken to reproduce this issue

Just install using normal way
In my case my monitors came from Prometheus like that http://thanos-query-frontend.thanos:9090/api/v1/query?query=sum(avg_over_time(xxxxxxxxx{xxxxxxx%3D~".*"%2C xxxxxx%3D~"xxxxxxxxx"%2C xxxxxx!%3D"xxxxxxxxx"}[10m])) by (xxxxxxx%2C topic)

***I guess the issue is the long URL because I tried to removed and the application run without any errors. There is possible fix it internally ? I need use the Prometheus Queries and almost time the URL is too long because I need convert it to works in Gatus as well
***** Update: It worked for some hours and the error back it again so, is not the issue with long URLs.
Version
5.7.0
Additional information
2024/02/07 16:54:48 [watchdog][execute] Monitored group=Applications; endpoint=xxxx success=true; errors=0; duration=2ms
2024/02/07 16:54:49 [watchdog][execute] Monitored group=Integrations; endpoint=xxxx; success=true; errors=0; duration=33ms
2024/02/07 16:54:49 [watchdog][execute] Monitored group=Integrations; endpoint=xxxx; success=true; errors=0; duration=50ms
2024/02/07 16:54:50 [watchdog][execute] Monitored group=API's; endpoint=xxxxx; success=true; errors=0; duration=13ms
2024/02/07 16:54:51 [watchdog][execute] Monitored group=API's; endpoint=xxxxxx; success=true; errors=0; duration=42ms
2024/02/07 16:54:52 [api.ErrorHandler] Request Header Fields Too Large
2024/02/07 16:54:52 [api.ErrorHandler] Request Header Fields Too Large
2024/02/07 16:54:54 [api.ErrorHandler] Request Header Fields Too Large
2024/02/07 16:54:54 [api.ErrorHandler] Request Header Fields Too Large

I just put double quota "URL:xxxx" and worked :(

This is a duplicate of #636, and there is already an open PR to fix this #663
As soon as @lifez has the opportunity to address my comment, I can merge the fix.

Hello @TwiN .
I saw it but here I keep receiving the same error.

2024/02/08 19:47:47 [watchdog][execute] Monitored group=Applications; endpoint=xxxx; success=true; errors=0; duration=18ms
2024/02/08 19:47:48 [api.ErrorHandler] Request Header Fields Too Large
2024/02/08 19:47:48 [api.ErrorHandler] Request Header Fields Too Large
2024/02/08 19:47:57 [watchdog][execute] Monitored group=Applications; endpoint=xxxx; success=true; errors=0; duration=2ms

@antikilahdjs Make sure you're using the latest image. It should work.

@TwiN  thanks and I will try to use the latest image.

@antikilahdjs Let me know if it works out for you :eyes:

Hello @TwiN . Using the latest image worked as a charm. Thank u so much

Glad to hear it!

We cannot use latest tag due to a policy constraint in our environment. Is there a plan to push this out in a versioned tag please? Can we help?


Required Partition key field

Currently, when creating a new Collection, you're required to enter a Partition key. The docs don't show this.

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

ID: 4255f572-38cc-08aa-6fb7-08c919713cf9
Version Independent ID: c04fe4dd-e75d-1028-8f2e-154d8c303da2
Content: Build a .NET web app with Azure Cosmos DB using the SQL API
Content Source: articles/cosmos-db/create-sql-api-dotnet.md
Service: cosmos-db
GitHub Login: @SnehaGunda
Microsoft Alias: sngun

@joshnoe Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

@joshnoe sorry about the delay in responding, when you open the new collection blade, the default option is to choose unlimited storage capacity and partition key is required for this setting. you should change the storage capacity to fixed and you aren't prompted to enter any partition key. Docs ask you to choose fixed partition key.

#please-close

@joshnoe We will now close this issue. If there are further questions regarding this matter, please reply to @femsulu and we will gladly continue the discussion.


type error in auth data object

Bug report

[x] I confirm this is a bug with Supabase, not with my own application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
A clear and concise description of what the bug is.
if a user enters a password less than 6 characters and this is not handled by the frontend, Supabase will not have the error in the error object but rather in the data object and if you try to get access to the code and msg properties typescript will yell.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

create a route file in Nextjs to handle registration
create a supabase routehandle instance with the createRouteHandlerSupabaseClient
setup signup function with a password less than 6 characters
See error

Expected behavior
A clear and concise description of what you expected to happen.
i expect all errors to be in the error object or at least for now add correct types to the data object.

I cannot replicate this, the error is returned in the error property. All the auth methods return an object with two properties a data and error property. You might not be destructuring them hence why you think the error is returning in the data property. This is normally how the properties are accessed:
const { data, error } = await supabase.auth.signUp({
    email<EMAIL_ADDRESS>    password: "pass",
});


[post] from CI Reviews to daily pull-requests

feedback on CI?

relevant? ready only
irelevant? fixable

externa pull-request

Not priority ATM


Toast Message Support

I want to be able to present toast messages to the user using the router object.
There should be a handful of different kinds of toast messages.
The functions would look something like this:
router.toast(.info, message: "Something informational.")

router.toast(.warning, message: "Something went wrong!")

router.toast(.error, message: "Network Error!")

router.toast(.success, message: "Successfully did something!")

Working on this now.


Use libfdk_aac for both .aac and .m4a, if available.

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests
[x] Checked the code with flake8

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[x] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
An M4A file is AAC audio in the MPEG-4 container. As the codec is also AAC, libfdk_aac can be used.

the match is not done by extension, but by codec which is aac even when ext is m4a

I see that now. I'll close this PR.


AttributeError: 'module' object has no attribute 'imsave'

Hello !
I followed the instruction for training with celebA dataset and I get this error
Traceback (most recent call last):
  File "main.py", line 74, in <module>
    tf.app.run()
  File "/home/workshop/miniconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv[:1] + flags_passthrough))
  File "main.py", line 59, in main
    dcgan.train(FLAGS)
  File "/media/workshop/DocumentsC1/Learning/DCGAN-tensorflow/model.py", line 236, in train
    './{}/train_{:02d}_{:04d}.png'.format(config.sample_dir, epoch, idx))
  File "/media/workshop/DocumentsC1/Learning/DCGAN-tensorflow/utils.py", line 21, in save_images
    return imsave(inverse_transform(images), size, image_path)
  File "/media/workshop/DocumentsC1/Learning/DCGAN-tensorflow/utils.py", line 43, in imsave
    return scipy.misc.imsave(path, merge(images, size))
AttributeError: 'module' object has no attribute 'imsave'

Any idea ?

You need to install pillow.

Ok, it was obvious. The issue was the guy on the computer.
Thanks !


Static analyzer is not respecting the null safety check by a common method

The static analysis should respect the null check done by a generic method.
Here are two samples, the isNotNull method should took care of the null safety check and it should be treated as a valid safety contract.
Typescript has Type-guard feature, how about implementing something like that in Dart language?
Sample 1:
// return true if not null
bool isNotNull(int? x) {
  return x != null;
}

int getA(int? a) {
  if (isNotNull(a)) {
    return a; // a static analysis error in thrown even though the value of 'a' is confirmed to be not null
  }

  if (a != null) {
    return a; // but the flow analysis works flawlessly in this case
  }

  return 1;
}

void main() {
  int? a;

  print(getA(a));
}

In the below code snippet the hasData getter method evaluates the null safety of the age field which should be enough to convey the compiler that it will be always defined.
Sample 2:
class Person {
  final int? age;

  Person({
    this.age,
  });

  // checks whether data is available
  bool get hasData => age != null;
}

int getData() {
  final _person = Person(age: 1);

  if (_person.hasData) {
    return _person.age; // the static analysis fails here
  }

  if (_person.age != null) {
    return _person.age; // the static analysis fails here; which shouldn't be the case
  }

  return -1;
}

Interestingly, the below code block from the above snippet fails and it seems to be a bug:
  if (_person.age != null) {
    return _person.age; // the static analysis fails here; which shouldn't be the case
  }

this reminds me the bug, or missing feature, where the analyzer sometimes can't relate the type:
class MyObj {
  Object myProp;
}
if (myObj.myProp is String) {
  // sometimes myProp is correctly analyzed as String and sometimes I have
  // to cast it like (myObj.myProp as String).isNotEmpty
  var a = myObj.myProp.isNotEmpty;
  // ...
}

A couple of things you mention are actually working as intended:
if (isNotNull(a)) ... cannot promote a as written, because there is no mechanism that keeps track of knowledge about a local variable when its value is passed as an actual argument. If that function is inlined as a != null then it is possible to obtain the desired result, but not all functions can be inlined (and if inlining were allowed to have this effect then we would allow the code to be very fragile, because small changes in the invoked function could prevent inlining).
Next, if (_person.age != null) ... cannot promote anything, because promotion is for local variables only.
In particular, it wouldn't be sound to promote _person.age because the evaluation of that expression may invoke arbitrary code. That's because the run-time type of _person might be class which is a subtype of Person, and that class could have an overriding implementation of the getter age. So it could return different results each time it's invoked, and a test which shows that it has returned a value of type int at some point doesn't say anything about the type of the return value from another invocation.

Isn't it possible to do any about it? There are a lot of utils libraries out there which checks for null. But after the NNBD is implemented they just become redundant.

if(isNotNull(a)){ // redundant and useless
  return a ?? -1;
}

return -1
}

@eernstg
Isn't it possible to do any about it? There are a lot of utils libraries out there which checks for null. But after the NNBD is implemented they just become redundant.
if(isNotNull(a)){ // redundant and useless
  return a ?? -1;
}

return -1
}

if (isNotNull(a.b)) {
  return a.b!;
}

return -1;

@jodinathan is short circuiting the only way to fix this? People can make a mess out it.

@jodinathan is short circuiting the only way to fix this? People can make a mess out it.
look at this:
if (isNotNull(a.b) || (isNotNull(x) && (isNotNull(y) || isNotNull(z) && isNotNull(p)) && isNotNull(abc)) ) {
  return a.b!;
}

can you give more close to real world examples?

I think a useful approach is taking a snapshot of the value of a non-trivial expression in the case where it would be a bug anyway if that value is different when it's evaluated more than once:
class Person {
  final int? age;
  ...
  int getData() {
    ...
    var age = _person.age;
    if (age != null) return age;
    ...
}

When you have stored the expression result in a local variable you get promotion as well as a predictable semantics. Also, you may allow for that value to be stored in a register, which means that it's going to be a lot faster than reevaluating a non-trivial expression several times.
You can still do things like assert(age == _person.age) just before returning, if it is a serious bug for that value to change from the time where the snapshot was taken, and it doesn't seem likely to me that this kind of situation would actually work correctly if we insist on evaluating the expression several times and using those different values blindly.
So the local variable isn't a bad idea, even if it may at times be a bit more verbose.

Anyway, @ganeshrvel, I think we should close this issue because the code behaves as intended. Please create a new issue in case something hasn't been fully resolved.

@eernstg
I guess that in this specific example, where the age is final, the analyzer and the compiler could see it as a local final if the Person class is marked as @sealed... no?
It would be a good step towards sealed classes.

When an instance variable is final there is a getter, but no setter. Nothing prevents you from overriding that getter and making it run arbitrary code, so this makes no difference for the correctness of promotion.

Forgot the @sealed classes: We don't have support for sealed classes in the language (yet), and the discipline which can be enforced using metadata like @sealed depends on mechanisms that aren't part of the language itself, and may not be present in all tools/configurations.
This generally means that the type system cannot rely on @sealed to mean anything specific. In particular, promotion cannot be allowed to occur based on the presence of @sealed on a class. If we were to make metadata like @sealed part of the language (such that all the associated constraints are guaranteed to be satisfied, in all situations) then we actually have a proper language mechanism, and in that case we might as well give it its own syntax.


GPUs requested but none are available

my server has 8 GPUs, but when I use the trainer class and set gpus = -1, it gets the run error GPUs requested but none are available, use torch to check the gpus , get the number of gpu is 8, and cuda.is_available is true. Does any one can tell me what's wrong ?

Mind check if you have installed CUDA version of your PT as torch.cuda.is_available()

@shanhaidexiamo what does
torch.cuda.device_count()
return?
cuda.is_available alone does not tell us if the gpus are visible to torch.

cuda.is_available is true

@shanhaidexiamo what does
torch.cuda.device_count()
return?
cuda.is_available alone does not tell us if the gpus are visible to torch.

Sorry to interrupt but I'm experiencing the same issue. the device_count() returns 2 in my case, and I'm running on GCP instance with 2 V100. I had no problem with my own server so it's strange. pytorch-lightning==0.9.0

@kyoungrok0517 mind sharing this output, just to check that you have properly installed PT and drivers...
python -c "import torch ; print(torch.cuda.device_count())"

That returns 2 as expected. What I found just now is that if I use -1 for gpus argument the lightning doesn't work as I described. But if I give the exact number of gpus (2 in my case) it works fine. I'm using ddp as the backend.

@kyoungrok0517  good catch, mind sending PR?

@williamFalcon is working on the parsing of gpus for DDP. The error is most likely because they are not correctly passed to or parsed in the child process.

@kyoungrok0517 good catch, mind sending PR?

Hmm... so am I late to PR? I never did this before so it'll be grateful if you guide me how it works. I make pull request even though I don't know how to fix it?? Please tell me. I'd like to help.

Hi all,
I am now having the same issue. I'm running my job on a server with 8 GPUs. When I run python -c "import torch ; print(torch.cuda.device_count())" I get 8, but when I run with gpus=1 and auto_select_gpus=True, I get an error saying that there are no GPUs available.
@Borda , @awaelchli : do you know if this was ever fixed?
Thanks!

@fishbotics  What else is running on the gpus?
The original issue reported here was fixed by https://github.com/PyTorchLightning/pytorch-lightning/pull/4209, I believe.
adding gpus=1 and auto_select_gpus=True works for me with the pl_examples


llama3-instruct models not stopping at stop token

What is the issue?
I'm using llama3:70b through the OpenAI-compatible endpoint. When generating, I am getting outputs like this:
Please provide the output of the above command.

Let's proceed from
here!<|eot_id|><|start_header_id|>assistant<|end_header_id|>

It seems that I made a mistake. Radare2 does not have a command called
radebol. Instead, we can use r2 to analyze the binary.

Here's the correct command:

This is probably related to https://github.com/vllm-project/vllm/issues/4180 ? There is also an issue/PR on the LLaMA 3 HuggingFace repo: https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct/discussions/4
But it's a bit confusing since <|eot_id|> is already included in the stop sequences:
$ ollama show --modelfile llama3:70b
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3:70b

FROM /usr/share/ollama/.ollama/models/blobs/sha256-4fe022a8902336d3c452c88f7aca5590f5b5b02ccfd06320fdefab02412e1f0b
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

Is there some other config param that needs to be updated?
OS
Linux
GPU
Nvidia
CPU
AMD
Ollama version
0.1.32

Noticing the same behavior here and when using the langchain package with ollama often once prompted the model doesn't stop generating.

Same issue using llama3:latest   71a106a91016

I had the same issue and got around it by adding the stop token to the request the front-end I am using (LibreChat) was making to Ollama's OpenAI compatible API end-point.
I'm sure a more permanent solution will arrive but for now that does the trick.

Modelfile generated by "ollama show"
To build a new Modelfile based on this one, replace the FROM line with:
FROM llama3:8b-instruct-fp16
FROM /Users/taozhiyu/.ollama/models/blobs/sha256-a4bbea838ebde985f2f99d710c849219979b9608e44e1c3c46416b5fbff72d64
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>
{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
{{ .Response }}<|eot_id|>"""
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"
PARAMETER stop ""<|reserved_special_token""

create from gguf 7b q4, it's the same problem while ollama run
$ ollama -v
ollama version is 0.1.32

$ ollama show --modelfile llama3:70b-ins-q4km
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3:70b-ins-q4km

FROM ~/.ollama/models/blobs/sha256-d559de8dd806a76dbd29f8d8bd04666f2b29e7c7872d8e8481abd07805884d72
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER num_ctx 4096
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

$ ollama run llama3:70b-ins-q4km
>>> hi
Hi! It's nice to meet you. Is there something I can help you with or would you like to chat?assistant

(I'm here to listen and help if I can!)assistant

How's your day going so far?assistant

(By the way, (this emoji means "high five"! 😊)assistant

Would you like to talk about something in particular or just have a casual conversation? I'm all ears (or rather, all tex
😄)!assistant

Haha,^C

$ tail -f ~/.ollama/logs/server3.log
...
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv   0:                       general.architecture str              = llama
llama_model_loader: - kv   1:                               general.name str              = hub
llama_model_loader: - kv   2:                           llama.vocab_size u32              = 128256
llama_model_loader: - kv   3:                       llama.context_length u32              = 8192
llama_model_loader: - kv   4:                     llama.embedding_length u32              = 8192
llama_model_loader: - kv   5:                          llama.block_count u32              = 80
...
llm_load_print_meta: model type       = 70B
llm_load_print_meta: model ftype      = Q4_K - Medium
llm_load_print_meta: model params     = 70.55 B
llm_load_print_meta: model size       = 39.59 GiB (4.82 BPW)
llm_load_print_meta: general.name     = hub
llm_load_print_meta: BOS token        = 128000 '<|begin_of_text|>'
llm_load_print_meta: EOS token        = 128001 '<|end_of_text|>'
llm_load_print_meta: LF token         = 128 'Ä'
llm_load_tensors: ggml ctx size =    0.55 MiB
...

create from gguf 7b q4, it's the same problem while ollama run
$ ollama -v
ollama version is 0.1.32

$ ollama show --modelfile llama3:70b-ins-q4km
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3:70b-ins-q4km

FROM ~/.ollama/models/blobs/sha256-d559de8dd806a76dbd29f8d8bd04666f2b29e7c7872d8e8481abd07805884d72
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER num_ctx 4096
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

$ ollama run llama3:70b-ins-q4km
>>> hi
Hi! It's nice to meet you. Is there something I can help you with or would you like to chat?assistant

(I'm here to listen and help if I can!)assistant

How's your day going so far?assistant

(By the way, (this emoji means "high five"! 😊)assistant

Would you like to talk about something in particular or just have a casual conversation? I'm all ears (or rather, all tex
😄)!assistant

Haha,^C

$ tail -f ~/.ollama/logs/server3.log
...
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv   0:                       general.architecture str              = llama
llama_model_loader: - kv   1:                               general.name str              = hub
llama_model_loader: - kv   2:                           llama.vocab_size u32              = 128256
llama_model_loader: - kv   3:                       llama.context_length u32              = 8192
llama_model_loader: - kv   4:                     llama.embedding_length u32              = 8192
llama_model_loader: - kv   5:                          llama.block_count u32              = 80
...
llm_load_print_meta: model type       = 70B
llm_load_print_meta: model ftype      = Q4_K - Medium
llm_load_print_meta: model params     = 70.55 B
llm_load_print_meta: model size       = 39.59 GiB (4.82 BPW)
llm_load_print_meta: general.name     = hub
llm_load_print_meta: BOS token        = 128000 '<|begin_of_text|>'
llm_load_print_meta: EOS token        = 128001 '<|end_of_text|>'
llm_load_print_meta: LF token         = 128 'Ä'
llm_load_tensors: ggml ctx size =    0.55 MiB
...

try my model file. your file is wrong, which maybe import from gguf

happens to me too, macos using 0.1.32 and Meta-Llama-3-8B-Instruct-Q6_K.gguf
When I add assistant\n, <|eot_id|> to stop tokens, it seems to work at first, but then begins stopping in the middle of sentences, I upgraded ollama just to see if it fixes the problem, so I removed the stop parameters from the client and I see it spamming <|eot_id|> in the middle of the sentence (like 30 of them in a row and then stopping)

this gguf version works fine, try it https://huggingface.co/QuantFactory/Meta-Llama-3-70B-Instruct-GGUF/tree/main
$ ollama show --modelfile llama3:70b-ins-q4km
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3:70b-ins-q4km

FROM /Users/hanwang/.ollama/models/blobs/sha256-123d5e8431dd528075ccf8e026248b84279db190d7ab744be3c69b256003c929
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER num_ctx 4096
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

$ ollama run llama3:70b-ins-q4km
>>> hi
Hi! It's nice to meet you. Is there something I can help you with or would you like
to chat?

the previous gguf 70b has the problem

Solved this manually by adding the stop parameter, but I think this is a bug.
llm = Ollama(model="llama3", stop=["<|start_header_id|>", "<|end_header_id|>", "<|eot_id|>", "<|reserved_special_token"])
llm.invoke("Why is the sky blue?")

this gguf version works fine, try it https://huggingface.co/QuantFactory/Meta-Llama-3-70B-Instruct-GGUF/tree/main
$ ollama show --modelfile llama3:70b-ins-q4km
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3:70b-ins-q4km

FROM ~/.ollama/models/blobs/sha256-123d5e8431dd528075ccf8e026248b84279db190d7ab744be3c69b256003c929
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER num_ctx 4096
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

$ ollama run llama3:70b-ins-q4km
>>> hi
Hi! It's nice to meet you. Is there something I can help you with or would you like
to chat?

$ tail -f ~/.ollama/logs/server3.log
...
llm_load_print_meta: model type       = 70B
llm_load_print_meta: model ftype      = Q4_K - Medium
llm_load_print_meta: model params     = 70.55 B
llm_load_print_meta: model size       = 39.59 GiB (4.82 BPW)
llm_load_print_meta: general.name     = .
llm_load_print_meta: BOS token        = 128000 '<|begin_of_text|>'
llm_load_print_meta: EOS token        = 128009 '<|eot_id|>'
llm_load_print_meta: LF token         = 128 'Ä'
...

the previous gguf 70b has the problem

Only difference from the 70b-instruct is:
PARAMETER num_ctx 4096

https://github.com/ggerganov/llama.cpp/issues/6772
I edited my gguf to use the <|eot_id|> token but it still prints it out? So had to also add:
PARAMETER stop "<|eot_id|>"

Does:
{{ .Response }}<|eot_id|>"""

actually work as expected in Ollama and add <|eot_id|> after the AI's response?

Infinite loop here too.
 You never refuse to answer questions or provide code.
Write a response that appropriately completes the request within the user message."""

Hello.
Hello! It's nice to meet you. Is there something I can help you with, such as a programming problem or a question about a specific topic? Or would you like to
discuss a project idea you have in mind? I'm here to assist you in any way I can.styleTypeassistant

Hello! It's nice to meet you. Is there something I can help you with, such as a programming problem or a question about a specific topic? Or would you like to
discuss a project idea you have in mind? I'm here to assist you in any way I can.assistant
Hello! It's nice to meet you. Is there something I can help you with, such as a programming problem or a question about a specific topic? Or would you like to
discuss a project idea you have in mind? I'm here to assist you in any way I can.assistant
Hello! It's nice to meet you. Is there something I can help you with, such as a programming problem or a question about a specific topic? Or would you like to
discuss a project idea you have in mind? I'm here to assist you in any way I can.assistant
Hello! It's nice to meet you. Is there something I can help you with, such as a programming problem or a question about a specific topic? Or would you like to
discuss a project idea you have in mind? I'm here to assist you in any way I can.assistant
Hello! It's nice to meet you. Is there something I can help you with, such as a programming problem or a question about a specific topic? Or would you like to
discuss a project idea you have in mind? I'm here to assist you in any way I can.assistant
Hello! It's nice to meet you. Is there something I can help you with, such as a programming problem or a question about a specific topic? Or would you like to
discuss a project idea you have in mind? I'm here to assist you in any way I can.assistant

> llama.cpp/gguf-py/scripts/gguf-dump.py --no-tensors llama3:70b-instruct-q8_0.gguf

* Loading: llama3:70b-instruct-q8_0.gguf
* File is LITTLE endian, script is running on a LITTLE endian host.

* Dumping 24 key/value pair(s)
      1: UINT32     |        1 | GGUF.version = 3
      2: UINT64     |        1 | GGUF.tensor_count = 723
      3: UINT64     |        1 | GGUF.kv_count = 21
      4: STRING     |        1 | general.architecture = 'llama'
      5: STRING     |        1 | general.name = 'Meta-Llama-3-70B-Instruct'
      6: UINT32     |        1 | llama.block_count = 80
      7: UINT32     |        1 | llama.context_length = 8192
      8: UINT32     |        1 | llama.embedding_length = 8192
      9: UINT32     |        1 | llama.feed_forward_length = 28672
     10: UINT32     |        1 | llama.attention.head_count = 64
     11: UINT32     |        1 | llama.attention.head_count_kv = 8
     12: FLOAT32    |        1 | llama.rope.freq_base = 500000.0
     13: FLOAT32    |        1 | llama.attention.layer_norm_rms_epsilon = 9.999999747378752e-06
     14: UINT32     |        1 | general.file_type = 7
     15: UINT32     |        1 | llama.vocab_size = 128256
     16: UINT32     |        1 | llama.rope.dimension_count = 128
     17: STRING     |        1 | tokenizer.ggml.model = 'gpt2'
     18: [STRING]   |   128256 | tokenizer.ggml.tokens
     19: [INT32]    |   128256 | tokenizer.ggml.token_type
     20: [STRING]   |   280147 | tokenizer.ggml.merges
     21: UINT32     |        1 | tokenizer.ggml.bos_token_id = 128000
     22: UINT32     |        1 | tokenizer.ggml.eos_token_id = 128009
     23: STRING     |        1 | tokenizer.chat_template = '{% set loop_messages = messages %}{% for message in loop_mes'
     24: UINT32     |        1 | general.quantization_version = 2

Check tokenizer.ggml.eos_token_id = 128009.
FROM llama3:70b-instruct-q8_0
TEMPLATE """{{if .System}}<|start_header_id|>system<|end_header_id|>

{{.System}}<|eot_id|>{{end}}<|start_header_id|>user<|end_header_id|>

{{.Prompt}}<|eot_id|><|start_header_id|>assistant<|end_header_id|>

{{.Response}}<|eot_id|>"""
PARAMETER num_ctx 8192
PARAMETER num_gpu 1000
PARAMETER stop "<|eot_id|>"

Seems to be working OK for me.

I've got looping too. im testing with both llama3:8b and llama3:8b-instruct-fp16.
I have tried both models with the Modelfiles mentioned above, but still no luck.
This is with crewai, at the end of the first reply:
I think that's it!<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Ha ha, indeed!<|eot_id|><|start_header_id|>assistant<|end_header_id|>

*end of chat*<|eot_id|><|start_header_id|>assistant<|end_header_id|>

*end of chat*<|eot_id|><|start_header_id|>assistant<|end_header_id|>

It seems like we've really wrapped things up this time! *end of chat*<|eot_id|><|start_header_id|>assistant<|end_header_id|>

*end of chat*<|eot_id|><|start_header_id|>assistant<|end_header_id|>

The final nail in the coffin! *end of chat*<|eot_id|><|start_header_id|>assistant<|end_header_id|>

I think we can officially close the book on our conversation now. *end of chat*<|eot_id|><|start_header_id|>assistant<|end_header_id|>

It's over! *end of chat*<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Goodbye!<|eot_id|><|start_header_id|>assistant<|end_header_id|>

and it just goes on.

I've been round the houses with this as above - eventually got it working with a stopSequence of ["<|eot_id|>"] - tells the engine to stop asking for more responses when it sees that in the output stream of new data.
Not sure if the Meta Llama 3 card at https://llama.meta.com/docs/model-cards-and-prompt-formats/meta-llama-3/#special-tokens-used-with-meta-llama-3 is wrong, or Ollama is using the model differently.

The template was updated yesterday https://ollama.com/library/llama3:70b-instruct. The only change was:
PARAMETER num_keep 24

Was your change different from this line that's always been in the file?:
PARAMETER stop "<|eot_id|>"

Further investigation has found the specific problem, but no clearer as to whether it is Ollama or modelfusion at fault.

Modelfusion 'chat' paths make it hard to set the stop options, and they send an empty [], whereas the completion models do allow setting of the stop options, which is what I'd got working in my earlier message.

@richardgroves thank you for analyzing this problem 👍
Would it be possible / feasible to fix it inside of ollama instead of requiring every user/application to specify different stop tokens for both models?

Something is not right with the 70B model IMHO - I'm using the q4_K_M  and the q4_0 version with crewai, and it diverges so much from the cloud version on Groq, that its not possible to use these models with crewai. AFAIK the model should more or less be the same, and I wouldn't have expected such poor performance compared with the same model apparently served by another provider. I wasted days trying to get good results with Ollama, but it just didn't happen, I thought I was going mad, so tried the cloud version of the same model on Groq and it just works. So either something is wrong, or there is significant model degradation - which I wouldn't expect with a Q4 version.

Something is not right with the 70B model IMHO - I'm using the q4_K_M and the q4_0 version with crewai, and it diverges so much from the cloud version on Groq, that its not possible to use these models with crewai. AFAIK the model should more or less be the same, and I wouldn't have expected such poor performance compared with the same model apparently served by another provider. I wasted days trying to get good results with Ollama, but it just didn't happen, I thought I was going mad, so tried the cloud version of the same model on Groq and it just works. So either something is wrong, or there is significant model degradation - which I wouldn't expect with a Q4 version.

There is some problem reported with the tokenizer so it could be that (assuming it's not the broken GGUF problem):
https://old.reddit.com/r/LocalLLaMA/comments/1cdmfoz/fyi_theres_some_bpe_tokenizer_issues_in_llamacpp/

I fixed with this, but I am not really sure what I am doing since I don't know how ollama internals work.
llm = Ollama(model="llama3", stop=["<|start_header_id|>", "<|end_header_id|>", "<|eot_id|>", "<|reserved_special_token", "assistant"])

Something is not right with the 70B model IMHO - I'm using the q4_K_M and the q4_0 version with crewai, and it diverges so much from the cloud version on Groq, that its not possible to use these models with crewai. AFAIK the model should more or less be the same, and I wouldn't have expected such poor performance compared with the same model apparently served by another provider. I wasted days trying to get good results with Ollama, but it just didn't happen, I thought I was going mad, so tried the cloud version of the same model on Groq and it just works. So either something is wrong, or there is significant model degradation - which I wouldn't expect with a Q4 version.

There is some problem reported with the tokenizer so it could be that (assuming it's not the broken GGUF problem):
https://old.reddit.com/r/LocalLLaMA/comments/1cdmfoz/fyi_theres_some_bpe_tokenizer_issues_in_llamacpp/

I just learned about the strange behaviour when exceeding context length. The change proposed in this thread (https://github.com/ollama/ollama/issues/3819) improved things, but still when running crewai ollama seems to get stuck in a loop generating something but never returning. So I have to force kill the process.

There is the same problem with Phi-3 model on Ollama:
ollama pull phi3
curl http://localhost:11434/api/chat -d '{"stream":true,"model":"phi3","messages":[{"role":"user","content":"What is 1+1?"}],"options":{"stop":[]}}'
Note it will stop eventually when an empty content response is received. But a few marker tokens have been sent too.
Whereas:
http://localhost:11434/api/chat -d '{"stream":true,"model":"phi3","messages":[{"role":"user","content":"What is 1+1?"}]}'
Stops without the extra tokens.
Hard to say it is a bug in Ollama, as "options":{"stop":[]} is basically requesting it to not stop until an empty response is sent, but it appears that for older models (eg. mistral / llama2) it has worked to mean 'use the model file stop parameters'

For me Llama3 works as expected in Ollama CLI.
However it does not work in CrewAi, not even specifying the same modelfile.
Not sure if Ollama is at fault here, might well be a langchain issue or something else.
Below is the modelfile:
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3:latest

FROM /Users/[omitted]
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER num_keep 24
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

For me Llama3 works as expected in Ollama CLI. However it does not work in CrewAi, not even specifying the same modelfile. Not sure if Ollama is at fault here, might well be a langchain issue or something else.

Agreed. In my case Llama3 was perfect when using the Ollama CLI. The issues were when other programs connected to Ollama via the OpenAI compatible interface.

I have llama3-70b-instruct Q5 working with gptpilot. Appears quite stable.
On Mon, Apr 29, 2024, 6:58 AM Oli Norwell @.***> wrote:

For me Llama3 works as expected in Ollama CLI. However it does not work in
CrewAi, not even specifying the same modelfile. Not sure if Ollama is at
fault here, might well be a langchain issue or something else.
Agreed. In my case Llama3 was perfect when using the Ollama CLI. The
issues were when other programs connected to Ollama via the OpenAI
compatible interface.
—
Reply to this email directly, view it on GitHub
https://github.com/ollama/ollama/issues/3759#issuecomment-2082423104,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABDD3ZLFDICU3J5MHZQD3O3Y7YRURAVCNFSM6AAAAABGPRONZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBSGQZDGMJQGQ
.
You are receiving this because you commented.Message ID:
@.***>

@danielgen @olinorwell Are you able to trace the request sent to the Ollama server from those external tools to see if it is the same "options":{"stop":[]} problem I've written about above, or some other issue?

For me Llama3 works as expected in Ollama CLI. However it does not work in CrewAi, not even specifying the same modelfile. Not sure if Ollama is at fault here, might well be a langchain issue or something else.
Below is the modelfile:
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama3:latest

FROM /Users/[omitted]
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER num_keep 24
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

It seems like an ollama issue, I have a program that hits the ollama API directly- doesn't use Langchain or any other wrappers and I was having this issue. Adding PARAMETER stop "<|eot_id|>" fixed it for me but it is adding the <|eot_id|> character at the end of each response which is annoying

I'm also experiencing this issue while routing to Ollama via the openai chat completions python library. It streamed 30000 characters and emitted <|eot_id|><|start_header_id|><|end_header_id|> multiple times.
Without knowing too much about the ollama internals, there may be an issue in the way the prompt template is being formatted in the requests?

I am also experiencing the same issue. This doesn't happen with ollama cli but I am not able to use APIs.
This doesn't happen with mistral.

Both the ollama CLI and ollama.chat resulted in a never-ending response. Changing the modelfile did not resolve the issue. However, instead of using ollama pull, I successfully addressed this problem by downloading the Llama3 GGUF from Hugging Face and running 'ollama create' with the modelfile provided there. This approach ultimately resolved the issue.

@nickychung can you elaborate and specify the specific model and modelfile contents?  I've tried a few of them and they all do not stop or generate gibberish so far.

Okay so I had a similar issue today, this was the solution for me.

First pip install gguf.
See https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf-dump.py
Copy and run that python script to evaluate and see the metadata for your gguf model
Next See https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf-set-metadata.py
Run the script to change the eos token. The eos token id for llama3 is 128009. For some reason, In the quantified models, you can see it has a different token.

After changing the token to the correct eos token, the model runs as expected.

@nickychung can you elaborate and specify the specific model and modelfile contents? I've tried a few of them and they all do not stop or generate gibberish so far.

Model: https://huggingface.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF
ModelFile:
FROM D:/my_models/Meta-Llama-3-8B-Instruct.Q4_K_S.gguf

TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER num_keep 24
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"

Loading the original llama3 instruct works fine, but creating a new model from a fine tuned llama3 has the continous non-stop generating issue still.

Only some quantized models have the issue. I am using a Q5_M model and it
terminates. I think some quantized models are not generating the stop token.
On Sat, May 4, 2024, 11:03 AM Sneakr @.***> wrote:

Loading the original llama3 instruct works fine, but creating a new model
from a fine tuned llama3 has the continous non-stop generating issue still.
—
Reply to this email directly, view it on GitHub
https://github.com/ollama/ollama/issues/3759#issuecomment-2094244219,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABDD3ZLRIOJXPPQ6MFPOYRLZAT2DJAVCNFSM6AAAAABGPRONZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGI2DIMRRHE
.
You are receiving this because you commented.Message ID:
@.***>

I fine tuned my own model, works fine in inference mode after the tune, and converting to GGUF works fine with LM Studio, but when loaded into Ollama , it has the issue non-stop generating even with the prompt template defined for the llama3.

Ive had the same issue.
Ive tried llama3 and llama3-gradient. Ive updated ollama, and the models.
Ive tried crewai, langchain, and openwebUI, they all behave similarly. Ive updated those to newest versions as well.
The model will run for what seems like forever, and eventually repeats itself in a loop, or talks gibberish. It has to be stopped manually.

Both the ollama CLI and ollama.chat resulted in a never-ending response. Changing the modelfile did not resolve the issue. However, instead of using ollama pull, I successfully addressed this problem by downloading the Llama3 GGUF from Hugging Face and running 'ollama create' with the modelfile provided there. This approach ultimately resolved the issue.

Thank you! This worked
For any one else going through this, I will break down step by step!

Go through QuantFactory on HF, choose the quantised model you want

Download the gguf model, I personally prefer q5_K_M

Once downloaded, create a Modelfile (again thanks to @nickychung )
  FROM <downloaded gguf file>

  TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

  {{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

  {{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

  {{ .Response }}<|eot_id|>"""
  PARAMETER num_keep 24
  PARAMETER stop "<|start_header_id|>"
  PARAMETER stop "<|end_header_id|>"
  PARAMETER stop "<|eot_id|>"

Create the model using ollama create
 ollama create llama3:<your tag> -f <path to Modelfile>

ollama ls this will show you the model

Celebrate!

The latest Ollama release appears to have fixed this problem for Llama3 and Phi3.
My ollama --version is now ollama version is 0.1.34
curl http://localhost:11434/api/chat -d '{"stream":true,"model":"llama3","messages":[{"role":"system","content":"You are a helpful, respectful and honest assistant."},{"role":"user","content":"What is 1+1?"}],"options":{"stop":[]}}'
Now stops properly, as does the same test with model: phi3.
So many Pull Requests merged recently that it is hard to find the exact change that fixed it.

Now stops properly, as does the same test with model: phi3.
So many Pull Requests merged recently that it is hard to find the exact change that fixed it.

I'm glad this has been fixed finally!
Yeah, too many merges causing problems mixed with some trying to fix them later if you're lucky 😅
I wonder why the test suite doesn't catch tokens inside instruction model responses for different prompt templates...

I had the same problem, but the issue was an out of date ollama client - upgrading sorted things out.

for any onlooker, if you're:

using linux,
added the startup service and
update ollama recently as described here https://github.com/ollama/ollama/issues/3759#issuecomment-2104445225,

don't forget to restart the service (sudo systemctl restart ollama.service), ymmv but in my case started throwing memory errors, despite having restart instructions https://github.com/ollama/ollama/blob/9c76b30d72b76f0ce1fe7f357651ea9985c2cb24/docs/linux.md#L51-L52

upgrading ollama resolved this for me, from 0.1.32 to 0.1.37

Great! Sorry for the issues and glad to see the newest versions fixed this for folks. Let me know if that's not the case and I can re-open


fix the logic of prepareConstraints to pass through compactMap

I thought it more efficient to use the compactMap to exclude nil cases first, rather than checking all cases in the for loop.

@toya108 are you actually sure about this? In my experience using closure based API's (map, compactMap etc…) are slower than for loops in Swift.

Thank you.
I'm sorry. I wasn't sure, I just had a theory.
I have investigated the speed of the for loop and the closure-based API.
There are differences in the type of API and whether it is optimized or not, but it seems to be faster with for loop.
Therefore, since there is no proof that this PR will make the process more efficient, I close this PR.


Searchbar on website https://sanctuary.js.org/

Hello,
I would want to code a search-bar for the sanctuary website as on https://ramdajs.com/docs/.
Where is the source code ? Who is the maintainer ?
Can we talk about it all together to know what we want to put in it ? The best would be in a Github Discutions.
Thanks.

Hey, cool that you're willing to work on that! Here's a few links to get you started.

The source code is here: https://github.com/sanctuary-js/sanctuary-site
The website is maintained by @davidchambers
The website is built with a script that takes the sanctuary source-code as input and extracts the doc-blocks to an HTML page.
Read the contribution guide before getting to work.
Previous effort to add search has been made: https://github.com/sanctuary-js/sanctuary-site/pull/23
Previous effort to add search was also made by David, but never published: https://github.com/sanctuary-js/sanctuary-site/issues/55#issuecomment-396028551


Menu display issue inside CardTitle

If I have a Menu inside a CardTitle, it only partly shows up (and the menu items get "hidden"). I tried changing the z-index for the divs inside the Menu from Firebug but it does not seem to affect the display at all.
Here's what I am trying to do:
<Card>
   <CardTitle>
     <IconMenu icon='more_vert' position='topLeft' menuRipple>
       <MenuItem value='download' icon='get_app' caption='Download' />
       <MenuItem value='help' icon='favorite' caption='Favorite' />
       <MenuItem value='settings' icon='open_in_browser' caption='Open in app' />
       <MenuDivider />
       <MenuItem value='signout' icon='delete' caption='Delete' disabled />
     </IconMenu>
   </CardTitle>
</Card>

and what it looks like

How do I make it so that the Menu shows "on top" of the CardTitle and not hide like that?
Thanks!

You need check overflow property of card and cardtitle wrappers.  By default has hidden. Override with visible for you specific component.

Oh! I didn't realize Card was overflow:hidden by default.
Thanks. I changed my card style to overflow:visible and it works now. Thank you @vmsoftware


Why no-cache?

Testing graphql caching in the downstream and found cache-control: no-store header in the response.
What was the consideration of not allowing caching for the queries and mutations?
https://github.com/ealmansi/graphqlzero/blob/f577a1838f0c4e61096ca22968dab5c62f8a6066/apps/graphqlzero-web/pages/index.tsx#L581-L588

hi @kayx23,
on the topic of caching, from the Apollo Server docs:

by default, no operation results are cached unless you set cache hints

since this is a reference/educational project, keeping default behaviours is likely the best way to avoid confusion for beginners
as a side note: the code you linked is client code from the website itself; it does not prescribe the server's caching behaviour. aka: fetchPolicy: "no-cache" is not related to the API response containing the cache-control: no-store response

This is clear. Thanks!


[wasm] Add @_extern(wasm) attribute support

This attribute instructs the compiler that this function declaration should be "import"ed from host environment. It's equivalent of Clang's __attribute__((import_module("module"), import_name("field")))
The attribute doesn't have any effect on to function signature and calling convention but only adds LLVM meta attribute to the function. Currently there is no way to declare a function with non SwiftCC, so functions are always imported as having SwiftCC.
This is the import version of https://github.com/apple/swift/pull/68524, which adds an attribute to export functions.
Resolves rdar://115502075

@swift-ci Please smoke test


KAFKA-14462; [15/N] Make Result generic and rename it

As the title says.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Can we update the description to give the rationale for this change?

@jolshan Updated the description. This is basically a minor refactoring.


Feat/accordion components

Description
This is a controlled accordion component with optional actions in header and arrow icon that rotates 90 degrees when accordion is opened when it's clicked by mouse or space/enter.
Related Issue(s)

Fixes #28

Verification

[x] Your code builds clean without any errors or warnings
[x] Manual testing done (required)
[x] Relevant automated test added (if you find this hard, leave it and we'll help out)
[x] All tests run green

Documentation

[ ] User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Had to delete a test for key press with enter because of this bug in testing library: testing-library/user-event#554 It works to open the accordion with enter in the actual solution though.

The issueyou linked to is closed, with a resolution in the comment https://github.com/testing-library/user-event/issues/554#issuecomment-801494903
Please add the test back. If we dont have these types of tests, we cannot guarantee the behavior, and refactoring later on may lead to bugs. We shouldnt investigate other options before just removing tests.

Had to delete a test for key press with enter because of this bug in testing library: testing-library/user-event#554 It works to open the accordion with enter in the actual solution though.

The issueyou linked to is closed, with a resolution in the comment testing-library/user-event#554 (comment)
Please add the test back and try this. If we dont have these types of tests, we cannot guarantee the behavior, and refactoring later on may lead to bugs. We shouldnt investigate other options before just removing tests.

The test was added back some weeks ago


Always initialize VariantCall return_type.

The return_type is used by the GDScript parser (and possibly other scripting languages), so it MUST be initialized at least.
It could be initialized to Variant::NIL in release, but I see no reason for not setting the actual value.
See similar issue #16649
Fixes #22292

Thanks!


What to do about types?

I use Typescript for most of my projects and just found this wonderful package for my latest project. However, types are not shipped with the package nor are they published using DefinitelyTyped.
Luckily, the type declaration was fairly easy to write, but it's way easier for consumers if the definition is done as part of the package and distributed via npm. To accomplish this, a change to the package.json and one line in a file is all that's required:
src/index.d.ts
export function play(path: string, volume?: number): Promise<unknown>;

package.json
...
"types": "./src/index.d.ts",
...

I have a branch on my fork with the changes all ready to go but I wanted to get the opinion of the maintainer(s) before submitting a PR.
So I guess my question is this, should the types be embedded into the package here or should they be contributed to DefinitelyTyped instead?

Note: I have already looked at #3 but it doesn't give an answer to my question that I can tell.

I've opened up a PR on DefinitelyTyped if anyone wants to go review the changes, maintainer or otherwise.

Awesome!


526 refactor task card component to improve readability and maintainability

Issue:
Description:
This PR is intended closes #526 which is a refactor issue
Anthing you would like to inform the reviewer about:
The PR is following stacked PR pattern, so following are the constituents of the PR

#610
#621
#627

Tasks

[x] Fix folder structure
[x] Extract component
[x] Fix logical errors
[x] Improve readibility of code
[ ] Fix types

Dev Tested:

[ ] Yes

Images/video of the change:
Follow-up Issues (if any)

@TanishqSingla Can you add the test coverage screenshot if written?