Issue with drawing circle stroke using path.addOval with large strokeWidth

Steps to reproduce
Run the sample shared in the code snippet then you can see the circle shape rendering issue in Custom Painter while resizing the window.

Set PaintingStyle.stroke and a large strokeWidth (e.g., 40) for the stroke paint.
Create a Rect using Rect.fromCircle to represent the circle or use final Rect rect = position & markerSize; for alternative approach.
Create a Path and add an oval shape using path.addOval(rect).

Expected results

Actual results

Code sample
Code sample
import 'package:flutter/material.dart';

void main() {
  return runApp(Custom_paint());
}

class Custom_paint extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text(
              'Issue with drawing circle stroke using path.addOval with large strokeWidth'),
        ),
        body: Center(
          child: CustomPaint(
            size: Size(100, 100),
            painter: CirclePainter(),
          ),
        ),
      ),
    );
  }
}

class CirclePainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    final Paint fillPaint = Paint()
      ..color = Colors.blue
      ..style = PaintingStyle.fill;

    final Paint strokePaint = Paint()
      ..color = Colors.red
      ..style = PaintingStyle.stroke
      ..strokeWidth = 40;

    final Offset position = Offset(size.width / 2, size.height / 2);
    final Size markerSize = Size(10, 10);

    // final Rect rect = position & markerSize;

    final Rect rect =
        Rect.fromCircle(center: position, radius: markerSize.width / 2);
    final path = Path()..addOval(rect);

    canvas.drawPath(path, strokePaint);
    canvas.drawPath(path, fillPaint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}

Screenshots or Video

Screenshots / Video demonstration
https://github.com/flutter/flutter/assets/105288098/72779f70-8c3b-4c92-bdf8-ac3def466ec6

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Version 10.0.19045.4291], locale en-US)
    • Flutter version 3.19.5 on channel stable at D:\flutter_windows_2.10.5-stable\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (4 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\NatrayanRamalingamNa.AzureAD\AppData\Local\Android\sdk
    • Platform android-34, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.3.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Professional
    • Visual Studio Professional 2022 version 17.3.32825.248
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2021.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)

[√] VS Code, 64-bit edition (version 1.88.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.86.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4291]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 124.0.6367.61
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 124.0.2478.51

[√] Network resources
    • All expected network resources are available.

Hi @natrayansf, what version of windows are you running? Do you only see this on windows desktop or do you see this on the web and other platforms as well?

Hi @danagbemava-nc,
What version of Windows are you running?
Version	22H2

Do you only see this on Windows desktop or do you see this on the web and other platforms as well?
We are also facing the same issue on Windows, web, and Android platforms. I've attached the demo for web and Android platforms below.
Web demo:
https://github.com/flutter/flutter/assets/105288098/78a2e014-360a-45eb-be4f-13cd1e5c0f8b
Android screenshot:

Thanks for the updated code sample. I can now reproduce the issue.
Reproducible using the code sample in https://github.com/flutter/flutter/issues/147297#issuecomment-2076413725
Maybe related? https://github.com/flutter/flutter/issues/42014
https://github.com/flutter/flutter/assets/88313112/ee7ca2ea-bec5-4339-931d-015b5fb478d1

flutter doctor -v
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-GB)
    • Flutter version 3.19.6 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (7 days ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/nexus/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode-15.3.0.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Users/nexus/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/nexus/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 77.2.2
    • Dart plugin version 232.10286

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (4 available)
    • Nexus (mobile)       • 00008020-001875E83A38002E • ios            • iOS 17.4.1 21E236
    • Dean’s iPad (mobile) • 00008103-000825C811E3401E • ios            • iOS 17.4.1 21E236
    • macOS (desktop)      • macos                     • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 124.0.6367.78

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.22.0-16.0.pre.57, on macOS 14.4.1 23E224 darwin-arm64, locale en-GB)
    • Flutter version 3.22.0-16.0.pre.57 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 36a316d17d (2 hours ago), 2024-04-25 00:51:24 -0400
    • Engine revision 9de649ed29
    • Dart version 3.5.0 (build 3.5.0-98.0.dev)
    • DevTools version 2.35.0-dev.8
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/nexus/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode-15.3.0.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Users/nexus/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/nexus/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 77.2.2
    • Dart plugin version 232.10286

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (5 available)
    • Nexus (mobile)                  • 00008020-001875E83A38002E • ios            • iOS 17.4.1 21E236
    • Dean’s iPad (mobile)            • 00008103-000825C811E3401E • ios            • iOS 17.4.1 21E236
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 124.0.6367.78

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Possibly worth checking if Impeller exhibits the same issue. It could be either incorrect culling in our display_list layer or (if not) incorrect culling in Skia.

This is a Skia issue and does not affect Impeller
Bisected this to https://skia.googlesource.com/skia/+/25da4062d5c2abb54b9e519f4fddb2eb157729d4


[Feature Proposal] Make component rendering DRY

First of all, thank you for such an amazing library!
While developing a side project of mine, I started to feel like doing <%= render(ComponentClass.new(params: ...)) %> was way too verbose and repetitive.
Looking at how React does things, I had this idea "what if we could simply call <%= component_class(params: ...) %>? I was about to start trying to code this for my project-only, but It feels like this could be helpful for others.
Do you think having an additional API like this would be helpful in the library?

Hey @rcdvl! This is a good suggestion, and various folks in the community share your sentiment. #1293 has some example code you might want to drop in to generate those helpers if you wish to use them. I'll be closing this issue in favor of that discussion.


Can't use method = "cbps" (windows, Python 3.10)

And yet another - I'm so sorry...
Also just trying to complete the quick start example in a Python 3.10 environment, I just tried switching the method, so running this line instead:
adjusted_cbps = sample_with_target.adjust(method = "cbps")
This fails with the following error:
AttributeError: module 'balance.adjustment' has no attribute 'apply_transformations'
Sorry I have no guesses as to what's causing this one.

Thanks for the report @tomwagstaff-opml !
So interesting.
Some thoughts:

Could you please run in your bento the following code, and paste here the output?

# Sessions info
import session_info
session_info.show(html=False, dependencies=True)

In your bento, could you please run:

import balance
dir(balance.adjustment)

And paste the input you get?

For reference, here is the output I get:
import balance
dir(balance.adjustment)

['BALANCE_WEIGHTING_METHODS',
 'Callable',
 'Dict',
 'List',
 'Literal',
 'Tuple',
 'Union',
 '__annotations__',
 '__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 '_find_adjustment_method',
 'absolute_import',
 'apply_transformations',
 'balance_adjust_null',
 'balance_cbps',
 'balance_ipw',
 'balance_poststratify',
 'balance_util',
 'default_transformations',
 'division',
 'is_bool_dtype',
 'is_numeric_dtype',
 'logger',
 'logging',
 'np',
 'pd',
 'print_function',
 'scipy',
 'trim_weights',
 'unicode_literals']

Sure thing, @talgalili
Sessions info
-----
balance             0.2.0
pandas              1.4.3
session_info        1.0.0
-----
IPython             8.9.0
PIL                 9.4.0
asttokens           NA
backcall            0.2.0
beta_ufunc          NA
binom_ufunc         NA
coxnet              NA
cvcompute           NA
cvelnet             NA
cvfishnet           NA
cvglmnet            NA
cvglmnetCoef        NA
cvglmnetPredict     NA
cvlognet            NA
cvmrelnet           NA
cvmultnet           NA
cycler              0.10.0
cython_runtime      NA
dateutil            2.8.2
decorator           5.1.1
elnet               NA
executing           1.2.0
fishnet             NA
glmnet              NA
glmnetCoef          NA
glmnetControl       NA
glmnetPredict       NA
glmnetSet           NA
glmnet_python       NA
hypergeom_ufunc     NA
jedi                0.18.2
joblib              1.2.0
kiwisolver          1.4.4
loadGlmLib          NA
lognet              NA
matplotlib          3.6.3
mpl_toolkits        NA
mrelnet             NA
nbinom_ufunc        NA
nt                  NA
numpy               1.24.1
packaging           23.0
parso               0.8.3
patsy               0.5.3
pickleshare         0.7.5
pkg_resources       NA
plotly              5.13.0
prompt_toolkit      3.0.36
pure_eval           0.2.2
pygments            2.14.0
pyparsing           3.0.9
pytz                2022.7.1
rpycall             NA
rpytools            NA
scipy               1.8.1
seaborn             0.11.1
setuptools          65.6.3
six                 1.16.0
sklearn             1.2.1
stack_data          0.6.2
statsmodels         0.13.5
tenacity            NA
threadpoolctl       3.1.0
traitlets           5.9.0
wcwidth             0.2.6
wtmean              NA
-----
Python 3.10.9 | packaged by conda-forge | (main, Jan 11 2023, 15:15:40) [MSC v.1916 64 bit (AMD64)]
Windows-10-10.0.19044-SP0
-----
Session information updated at 2023-01-30 17:49

balance.adjustment
Here I seem to get the same results as you:
['BALANCE_WEIGHTING_METHODS', 'Callable', 'Dict', 'List', 'Literal', 'Tuple', 'Union', '__annotations__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_find_adjustment_method', 'absolute_import', 'apply_transformations', 'balance_adjust_null', 'balance_cbps', 'balance_ipw', 'balance_poststratify', 'balance_util', 'default_transformations', 'division', 'is_bool_dtype', 'is_numeric_dtype', 'logger', 'logging', 'np', 'pd', 'print_function', 'scipy', 'trim_weights', 'unicode_literals']

Hi @talgalili,
So I re-installed balance, and it worked! 😅 I can now use the CBPS method and reproduce the results for that method in the quickstart script.
The only thing that's an issue now is that some of the plots don't output - it seems to be the ones based on Seaborn, so these lines:
adjusted_cbps.covars().plot(library = "seaborn", dist_type = "kde")
adjusted_cbps.outcomes().plot()

They don't throw any error when I run them, there's just no output. 🤷
But since I can output the adjusted dataset I'm sure I can reproduce them another way - this is just an FYI.
Thanks so much for your help and suggestions - we got there in the end!

Hey @tomwagstaff-opml - I'm glad to hear that re-installing balance worked for you!
Some followup question:

did you re-install it using pypi or github?
Which Python version did you use for this install? (3.10, or 3.11?)
Could you please open a new issue for the seaborn plots not working? In it, could you share the output of your session_info from the ipynb (so we could see which version are together there, and see if we can understand where this is coming from)?

Thanks!

No worries @talgalili,

Installed it from PyPi
In a Python 3.10 environment

And I'll post another issue about the seaborn plots

Thanks @tomwagstaff-opml - now we have a reference for the next person who asks about it.
:)


mount and unmount animations

Like transitiongroup.

If you would like this sort of thing I would recommend looking into react-motion instead.

Thank you !


Remove JAVA_HOME from env if it is not set

The launcher pulls in local environment variables from the OS prior to
launching Elasticsearch. This can be problematic if the $JAVA_HOME
variable is locally set, but explicitly not set by the Rally
launcher. For the case of the bundled JDK, a variable java_home is
explicitly unset, which should be reconciled with the local env by also
unsetting $JAVA_HOME if it exists before launching. This commit ensures
that if java_home is unset in the code, that the local env's $JAVA_HOME
variable is also unset.
Closes #976

@dliappis this commit does not remove any of the JAVAXX_HOME's, but I did not see the usefulness of that inside how we operate w/ rally today. I can do it, but I think that this PR fixes the bug that was present when we moved to the bundled jdk.

I want to ensure yall are ok w/ the functionality here. I added a check to keep PATH on the environment even if it was not explicitly stated in the rally config. I assume we need PATH and it would not make sense for a user to have to manually include that every time. If this is an invalid assumption, then please correct me!

Good call on the JAVA_HOME comments. Would you like this done as part of this PR or a followup?

Regarding JAVA_HOME, it is still needed to run rally unless you specifically invoke the jvm w/ the bundled param... I unset all my JAVA*_HOME's and got
(.venv) ➜  rally git:(del_java_home) esrally --distribution-version=6.5.3

    ____        ____
   / __ \____ _/ / /_  __
  / /_/ / __ `/ / / / / /
 / _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
                /____/

[INFO] Preparing for race ...
[ERROR] Cannot race. ("Install a JDK with one of the versions [11, 10, 9, 8] and point to it with one of ['JAVA11_HOME', 'JAVA10_HOME', 'JAVA9_HOME', 'JAVA8_HOME', 'JAVA_HOME'].", None)

Running with --runtime-jdk=bundled using 7.6.0 I got
/home/baz/.rally/benchmarks/races/873a53a5-f7f2-4780-910f-cbb4f471eca5/rally-node-0/install/elasticsearch-7.6.0/jdk/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -

And what is interesting, running with bundled and a version that had no bundled jdk, rally used /bin/java on my machine, which i suspect is a bug, and im going to eyeball it.

As per @rjernst , the fallback from finding java on the path (which is why /bin/java is running) changed at 7.0. Prior to 7.0, ES would look for java on the path, whereas 7.0 and up it falls back to using the bundled JDK.
Our code, however, allows for a bundled jdk to run the path jdk prior to 7.0. And not specifying a jdk version, as well as not having JAVA_HOME specified fails on 7.0 and above.
Should we change this so the code in 7.0 and above just uses the bundled JDK if the JAVA_HOME variables are not set?

I have added a note about the bundled jdk in the migration docs.


Can't seem to resolve anchors

Hi, I'm not sure if I am doing something wrong, but the same function I wrote that used to be able to resolve anchors can't seem to resolve anchor anymore.  I changed my program from single view app to multiple view, but the anchor loading function stayed the same. I even tried to revert my changes, but it doesn't seem like that work anymore.
All I am doing right now to load is essentially these two functions:
`

(void) loadAnchor: (NSString *) anchorID {
[self resolveAnchorWithIdentifier:anchorID];
}

(void)resolveAnchorWithIdentifier:(NSString *)identifier {
self.garAnchor = [self.gSession resolveCloudAnchorWithIdentifier:identifier error:nil];
}`

When the program is loaded, I connect to the database to get the list of all anchorIdentifier saved, and loop through them and call loadAnchor(anchor) for each.
Again, these same function worked before, but for some reason after changed to multiview (by adding more view controllers and add segue to reach the ExampleViewController) so I'm not sure if that would affect the ARCore at all.
Any suggestion?
EDIT:
I modified the touchEnded a little bit to try to resolve anchor again when is in StateResolving to attempt to load again and it seem to load, maybe I needed to wait a little bit before I attempt to resolve anchors?
EDIT 2:
I think I figured out why, my loadAnchor apparently get executed before ViewWillAppear is executed, so I just need to figure out how to wait for that to run. I'm going to close the issue. Thank!

I'm glad you were able to solve the problem. You aren't the first person to be tripped up by this, so I will look into seeing how we could improve this or at least our documentation.
Thanks!

Thank for replying!
Let me clarify something real quick so you don't have to go through the same problem if you are attempting to come up with a solution. I tried to load the anchor in ViewDidAppear (which is the latest in the cycle before ViewWillDisappear) and it doesn't work either. What I ended up doing were using a timer inside of ViewDidAppear instead to make it work:
- (void)viewDidAppear:(BOOL)animated {     [NSTimer scheduledTimerWithTimeInterval:2.0                                      target:self                                    selector:@selector(loadRoom)                                    userInfo:nil                                     repeats:NO]; }

This timer approach will work, but if it is helpful what you are really wanting to wait for is ARKit's camera tracking state to be a in a good state. You could also wait for this property (https://developer.apple.com/documentation/arkit/arcamera/2880259-trackingstate?language=objc) to be ARTrackingStateNormal. The reason your app has to wait is because in viewDidAppear ARKit has not had enough time to view your surroundings and get into a good state.
If you don't want to wait for that property there is also a delegate method that gets called when the camera's tracking state changes here: https://developer.apple.com/documentation/arkit/arsessionobserver/2887450-session?language=objc


Add reel/thread/fabric/cloth/pattern icons

Alts:

I'm not quite sure this will work, I understand where it's coming from, but with Lucide's restrictions in play, it just doesn't look recognisable enough.
I've been doodling around, but I'm not super happy with any of these either:

I'm not quite sure this will work
not super happy with any of these either

@karsa-mistmere I think some of these work pretty well…

Now the corners feel quite big.

I think it’s more balanced now actually 😅

Now the corners feel quite big.

I think it’s more balanced now actually

I thought those little nubbins were cute, but yes it is nice and balanced now.

While on the subject of materials… What do we think of metal?

While on the subject of materials… What do we think of metal?

We already have an icon for metal that I think is a much more obvious representation. 🙃
https://lucide.dev/icon/hand-metal?search=metal

While on the subject of materials… What do we think of metal?

We already have an icon for metal that I think is a much more obvious representation. 🙃 https://lucide.dev/icon/hand-metal?search=metal

Ha I wasn’t talking about the music genre 🙉

While on the subject of materials… What do we think of metal?

In 100% it's not really metally.

I'm not really feeling fabric and weave (it has low visual weight and is off centre), I'm ok with merging the others.

weave (it has low visual weight and is off centre)

@karsa-mistmere What do you think of this instead?

@karsa-mistmere What do you think of this instead?

This one is too dense I think, also, @jguddas might not like the 4-fold rotational symmetry. 😄

:+1: for cloth and yarn-ball

@karsa-mistmere Ok, so should be good to go now… Unless you think one of the reels above is better?

I'm still not completely happy with either. 😅
I find that they're either too dense or not recognisable enough.
I tried to mitigate the density but it's not much better:

This PR is merged to the lab branch. This PR does not match our PR template, which requires valid use cases. To move on we merged this PR to the lab branch, which will be moved to a separate repo in the future.


Generate canonoical kid

In need of some testing but this should fix the kid length issue

Is this really the only place where we use the kid?
This method isn't the exact same as Quay, but it does solve the problem.

This is indeed the only place where we generate the private key. LGTM.

Just fyi, here's an example of a generated kid: W4zWyIbf06kT6nfp-NI1luUqkZYCr1K2w6FOKBv1Xzo=


The simulated heritabilities for the generated test data are variable, should be all the same and higher

in src/test/configtest.py the heritabilities of the simulated phenotypes are all different, and with rather low values (0.4). This makes that some analyses do not go through. Maybe we could set them all to 0.6 or 0.8, so that the analyses converge for the test despite the small N?

I set all heritabilities to 0.8.
The script 00.run_all.py still crash in line 93 executing plotHSQ from 06-02.plot_hsq.R:

[1] "putamen"
[1] "thalamus"
Error in corrplot(mcor, type = "upper", method = "circle", diag = F, tl.pos = "td",  :
The matrix is not in [-1, 1]!
De plus : Warning message:
Removed 242 rows containing missing values (geom_bar).
> traceback()
4: stop("The matrix is not in [-1, 1]!")
3: corrplot(mcor, type = "upper", method = "circle", diag = F, tl.pos = "td",
tl.cex = 0.8, addCoef.col = "black", number.cex = 0.7, lowCI.mat = mcor -
mse, uppCI.mat = mcor + mse, mar = c(5, 5, 5, 5)) at 06-02.plot_hsq.R#371
2: plot_hsq_bivariate(outfile_bivariate, outpdf = gsub(".txt", ".pdf",
outfile_bivariate)) at 06-02.plot_hsq.R#625

if we accept that this is not a bug, but something that may happen, we need to add a test in the code to handle the case...

Maybe it is bug, at least we have to clarify why it is happening. Maybe @bitona has a clue?

It is not a bug, GCTA bivariates analysis converges seldomly when few samples, i found other papers reporting they could not get estimates either from this analysis. I think the plot function crashes when none of the bivariate analyses converges for a given phenotype, i will add a test to avoid the problem.


Fixing progress quota colors in user settings dropdown + fixing name&account-type space

Set same color for progress when it is close to its limits. I've decided to create a new color "caution" instead of changing the "alert" color preventing no desirable changes in the rest of parts in the new layout.
Fixed a problem with long names in the user settings dropdown.

Review: @viddo.
Fixes #4177

Frontend tests were OK :+1: (details)

:+1:

Fixed a problem with long names in the user settings dropdown.

What was the problem and the fix? :)

Have you seen the screenshot? :D

!important

Ah no, it didn't appear. So the problem was that there were no spacing between the name and org type, (prior to this PR), right?

Yep!

Frontend tests were OK :+1: (details)


gzipped all fastq files to mimic normal usage

I think it makes sense to store fastq files gzipped to mimic how they are stored in the field. From a real experiment, one would certainly compress the raw data files to save storage space.

Hi @daki,
I totally agree. Thanks for the fix!

Thanks for the merge. :)
tisdag 11 augusti 2015 skrev Rory Kirchner<EMAIL_ADDRESS>
Merged #1 https://github.com/roryk/tiny-test-data/pull/1.
—
Reply to this email directly or view it on GitHub
https://github.com/roryk/tiny-test-data/pull/1#event-379148899.


withdraw confirmation screen shows wrong information

The initial window is like this:

Enter an address and an amount:

Still fine by now. Now the user needs to click on the Withdraw button:

A confirmation screen appears, where Remaining balance now shows a wrong amount. It should be 2050.xxx, but it shows 2041.xxx. It's as if instead of 1, it subtracts 10.

hi @jorian
I can't reproduce this issue.
It shows "Nan" instead on my app
I noticed that fee is a string instead of a number in withdraw response
Just fixed it
Please test and reopen this if the issue still persists on your app


Possible error in example.

I think in this example the className attribute should contain the name prop rather than the state name.

:+1:

Thanks!


Feature Request - Support for POLYDATA in vtk format

Hi, thank you for the project for reading UNSTRUCTURED_GRID data in vtk format. I am just wondering could you help extend the code for reading the POLYDATA in vtk format too? Thank you!
The error occured when I try to read POLYDATA is shown below.
Traceback (most recent call last):

  File "<ipython-input-1-a89949ddc2bd>", line 3, in <module>
    mesh = meshio.read('smooth100.vtk')  # optionally specify file_format

  File "/home/fenqiang/anaconda3/envs/latest/lib/python3.6/site-packages/meshio-2.1.0-py3.6.egg/meshio/helpers.py", line 162, in read
    return format_to_reader[file_format].read(filename)

  File "/home/fenqiang/anaconda3/envs/latest/lib/python3.6/site-packages/meshio-2.1.0-py3.6.egg/meshio/vtk_io.py", line 112, in read
    out = read_buffer(f)

  File "/home/fenqiang/anaconda3/envs/latest/lib/python3.6/site-packages/meshio-2.1.0-py3.6.egg/meshio/vtk_io.py", line 161, in read_buffer
    dataset_type

AssertionError: Only VTK UNSTRUCTURED_GRID supported (not POLYDATA).

if I have a surface mesh  defined by [nx3] points and [nx3] triangles how can I export it to the vtp format from meshio? is this related to the above?

Not sure whether it can be done with meshio. You could give pyvista a try but it requires the library vtk to be installed.
If you have two arrays points and cells of shape (n, 3), you can try:
import numpy
import pyvista

poly = pyvista.PolyData(points, numpy.column_stack((numpy.full(len(cells), 3), cells)))
poly.save("filename.vtp")

Did not try it myself, though.

It’s really easy if vtk is installed. Mainly trying to keep it simple. Once
you import in paraview one can extract the surface which gives a polydata.
-Kurt
On Thu, Mar 12, 2020 at 12:53 PM Keurfon Luu<EMAIL_ADDRESS>wrote:

Not sure whether it can be done with meshio. You could give pyvista a try
but it requires the library vtk to be installed.
If you have two arrays points and cells of shape (n, 3), you can try:
import numpyimport pyvista
poly = pyvista.PolyData(points, numpy.column_stack((numpy.full(len(cells), 3), cells)))
poly.save("filename.vtp")
Did not try it myself, though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nschloe/meshio/issues/527#issuecomment-598334665, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACE44VJFNDQTKBLPSJ22ZRTRHEOQVANCNFSM4JPVN54Q
.

--
Kurt Sansom

I've also been coming up against this problem. I've previously used PyVista for this, but my understanding now is that PyVista uses meshio to perform VTK file IO? If so, it seems a bit counter-intuitive PyVista can read triangle PolyData but meshio cannot (though, it can read the same triangle surfaces if they are marked as UnstructuredGrid, not PolyData)

I've also been coming up against this problem. I've previously used PyVista for this, but my understanding now is that PyVista uses meshio to perform VTK file IO?

As far as I know, pyvista is still using VTK readers for every VTK files. It only switches to meshio if the format is not natively supported by vtk (e.g. Dolfin XML, Gmsh...).

If I may, what would be the choking point in supporting PolyData (*.vtp) files in meshio ?
is there any technical reason this isn't included ? (i mean except for the time needed to implement it)

I started to work on this, but i'm not sure what is the "correct" meshio way to handle polygon cells...
From meshio types they should be "polygon" but since the length of vertices might vary it would mean handle them not as numpy array but as a list (or at least as an array of obj, not numerical type).
Looking at the VTU reader I saw that meshio clustered polygons by length to force np.array but here it's a bit problematic since the cell_data ordering has no direct link with cells (based on vtkPolyData description)...
So I'm looking for advice on the best option between the headache with "polygonX" and simple "polygon" with dtype=np.object

Looking at the VTU reader I saw that meshio clustered polygons by length

The order is kept as it is in the file, it's just that blocks of the same length are packed together in one CellBlock.

I might not have read it correctly but it seems to me that there is a reodering grouping of all cells by length here:
https://github.com/nschloe/meshio/blob/b1753bdf450413b4590ecaced6dcf4ce65ffc7d2/meshio/vtu/_vtu.py#L94
unless i'm doing it wrong ...
here is an example:
import vtk
import meshio

def foo(file="polygons.vtu"):

    # Setup four points
    points = vtk.vtkPoints()
    points.InsertNextPoint(0.0, 0.0, 0.0)
    points.InsertNextPoint(1.0, 0.0, 0.0)
    points.InsertNextPoint(1.0, 1.0, 0.0)
    points.InsertNextPoint(0.0, 1.0, 0.0)

    # Create the polygons
    quad = vtk.vtkPolygon()
    quad.GetPointIds().SetNumberOfIds(4)  # make a quad
    quad.GetPointIds().SetId(0, 0)
    quad.GetPointIds().SetId(1, 1)
    quad.GetPointIds().SetId(2, 2)
    quad.GetPointIds().SetId(3, 3)
    tri = vtk.vtkPolygon()
    tri.GetPointIds().SetNumberOfIds(3)  # make a triangle
    tri.GetPointIds().SetId(0, 0)
    tri.GetPointIds().SetId(1, 1)
    tri.GetPointIds().SetId(2, 2)

    # Add the polygon to a list of polygons
    polygons = vtk.vtkCellArray()
    polygons.InsertNextCell(quad)
    polygons.InsertNextCell(tri)
    polygons.InsertNextCell(quad)

    # Create a VTU
    vtu = vtk.vtkUnstructuredGrid()
    vtu.SetPoints(points)
    vtu.SetCells(7, polygons)

    # Write VTU
    writer = vtk.vtkXMLUnstructuredGridWriter()
    writer.SetInputData(vtu)
    writer.SetFileName(file)
    writer.Write()

    mesh = meshio.read(file)
    mesh.cells

if __name__ == "__main__":
    foo()

which produces :
[<meshio CellBlock, type: polygon3, num cells: 1>,
 <meshio CellBlock, type: polygon4, num cells: 2>]

here the polygons should be [polygon4, polygon3, polygon4] ...

Good catch! That has to go away. I'll check it out now.

ok then i'll stay tuned ;)

But in the VTU it's no big deal since the cell_data is also re-ordered ... the problem in vtp is that is has to reorder cell_array but only in the slice of polygons (and after that there will be the same problem for lines ... and triangle strips)

But in the VTU it's no big deal since the cell_data is also re-ordered .

meshio promises not to mess with the data, and that includes the order of the cells. Definitely a bug.

Alright, fixed now. (At least in VTU.)

any updates on supporting the vtp format with meshio. vtk is a heavyweight library and it would be nice in meshio or maybe derived from meshio?


Transition to external package for optimizers

Some options:
https://github.com/JuliaNLSolvers/Optim.jl
https://github.com/Jutho/OptimKit.jl


Add support for forcing MonoMac project generation.

Simple change to the .csproj XSLT to allow for people to force the generation of a MonoMac project.

I ended up adding support for this in 31662a9, and added functional tests to go with it.
The "UseLegacyMacAPI" property is now deprecated (although it still works), and in future projects that want to force a Mac API version should use:
<Property Name="ForceMacAPI" Value="<version>" />

Where <version> is one of MonoMac, XamMac or Xamarin.Mac.  Note that only applications should do this, not libraries, because it only controls the API for that project, not projects referencing that project, so if you're not careful you'll cause compilation conflicts.  For that reason, this option should only be used when you control all the projects in a solution (and do not expect other people to use the projects in your solution).
If this sounds horrible, blame Xamarin.

Thanks @hach-que !
Any other Protobuild features coming in the next couple of weeks?  Looking to update it in MonoGame soon.

I don't have anything planned right now (apart from the NDA platform work after GGJ 16).
As per the comment I just left on https://github.com/mono/MonoGame/issues/4451#issuecomment-174246764, we might have to look into switching Mac OS to CoreCLR sooner rather than later, but that's a bigger piece of work because it means packaging up CoreCLR binaries and having them available for us (not to mention debugging is quite difficult on Mac / Linux at the moment as well?)


Gas tank cleanup and fix

About the PR

Apparently for a long while, empty Emergency Oxygen Tanks and Double Oxygen Tanks had a different volume than filled ones. I have adjusted the empty ones to match the filled ones in both cases. This should not be very noticeable to players, only Box has an empty one mapped (I wonder if that was an accident?) and I'm not sure if they can be made

Plasma tanks for some reason had a smaller external size than standard tanks despite having the same volume. I have increased their size to match

I have rounded every tank's default Release Pressure to only include a single fractional digit. Numbers in player-interactive UIs should not be formatted like 21.27825 when it makes no practical difference in supply time compared to 21.3

Cleanup and comment changes in the yaml

Changed some item descriptions so the difference between emergency, extended and double tanks is more clear

Added gas supply duration legend to all filled tanks, which reveals that all tanks are still absurdly large even after the nerf, as noted on #17106. I intend to address that too, but I kept the gas tank nerf to a different PR for logistic reasons, I wanted to fix this first

Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
:cl: Errant

fix: Emergency and Double oxygen tanks that spawn empty now have the same internal volume as filled ones.

I promise this was the last commit until review

gas tank cleanup

I ask in the interest of improving my use of git, was there an actual implied message here regarding commit naming, or was this just in jest?
I am under the impression that pre-review commit naming does not really matter that much because maintainers will only look at the total changes, and on merge the commits will all be squashed

schizo name your commits "a", "among", "bread", "egg", etc not the same thing 8 times :trollface:


[release-4.4] Bug 1771410: Use the new tls-server-name option in kubeconfig

This will make sure every client, even the hidden ones, get the correct client info with SNI.
Backport of https://github.com/openshift/cluster-kube-apiserver-operator/pull/785
Requires:

[ ] client-go bump with https://github.com/openshift/origin/pull/24630

/cc @soltysh @deads2k

/retest

/lgtm

/bugzilla refresh

/bugzilla refresh

/retest

/retest


[Performance] Use optimized kernels for MQA/GQA

In theory, MQA/GQA can reduce memory bandwidth for reading KV cache and enable using TensorCore for the dot products in attention mechanism. However, this benefit can be only realized when using optimized kernels that vLLM does not have at the moment.

For prefill, vLLM explicitly expands the incoming keys and values before running the attention op: https://github.com/vllm-project/vllm/blob/e5452ddfd6e9a08d5e15bd81a010934550b9b507/vllm/model_executor/layers/attention.py#L121-L128 because xformers (nor PyTorch SDPA) does not support MQA/GQA at the moment. This is bad for performance since 1) it causes extra overhead of expanding the tensor, and 2) the attention kernel cannot leverage the advantage described above. While FlashAttention efficiently supports MQA/GQA, we need to use it carefully since it does not cover all GPUs/data types/head sizes that xformers supports.
For decode, vLLM's current paged attention kernel also does not leverage the benefits of MQA/GQA. To enjoy the benefit, we need to either significantly rewrite the paged attention kernel, or modify the FlashAttention kernel to support paged KV cache.

This is a feature that is high on my list for performance reasons. I have scavenged other people's benchmarks and found an interesting one from TensorRT-LLM:
Llama 2 7B with 1x A100 80GB:

num requests: 128
sequence length: 1024
input length: 32
output length: 992

Latency benchmark:

MHA: 133.40s
GQA 44.74s
MQA 29.17s

Conclusion: Due to MHA taking up KV cache, latency increases as you must use more memory bandwidth. This is especially seen in scenarios where we aim for high throughput, i.e. when handling many requests at once. This means we can see a significant improvement in throughput if we spend less memory on the KV cache because of the grouping in GQA.
Reference: https://github.com/NVIDIA/TensorRT-LLM/issues/404

Seems it is prosible to migrate https://github.com/NVIDIA/TensorRT-LLM/blob/main/cpp/tensorrt_llm/kernels/decoderMaskedMultiheadAttention.h to fullfill vLLM's requirement.

@whitelok Thanks for sharing. Unfortunately, it seems the core part of the kernel is provided as cubin files, which are not human-readable.

sorry. my bad .

@whitelok Oh, not really. While I'm not sure at the moment, it seems there is some code that we can leverage. I will look into it soon. Thanks again for sharing!

seems entrance point is here: https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.5.0/cpp/tensorrt_llm/kernels/decoderMaskedMultiheadAttention/decoderMaskedMultiheadAttentionTemplate.h#L1015  all vllm need is just modify kvcache buffer.

FYI, I have modify the FlashAttention kernel to support paged KV cache with a restriction that block_size must match kBlockN in the kernel.

For prefill, I replaced xformers with FlashAttention and found attention caculation (softmax(Q @ K^T * softmax_scale) @ V) latency is reduced 2+ times. I could submit a PR if necessary.

Using CodeLLaMA-34B config (num_query_heads=64, num_key_value_heads=8, head_size=128)
Tested on A100-40GB

Test id
Batchsize
Prompt length
Original xformers (us)
FA (us)
Speedup (Original / FA)

1
1
1024
6.875
1.625
4.2

2
10
1024
36.965
11.518
3.2

3
100
1024
364.861
126.109
2.9

For decoding,  Is there lots of codes changed if we support MQA/GQA in paged attention kernel?

@zhaoyang-star See the following:
https://github.com/Dao-AILab/flash-attention/pull/678
https://github.com/vllm-project/vllm/pull/1679

have modify the FlashAttention kernel to support paged KV cache with a restriction that block_size must match kBlockN in the kernel.

Great work! As it is very important for performance, could you plan to submit the feature? I am glad to test it.

I've tidied up the code a bit, you could test using the following two branches:
https://github.com/beginlner/flash-attention/tree/blocked_kvcache
and
https://github.com/beginlner/vllm/tree/blocked_flash_attn

have modify the FlashAttention kernel to support paged KV cache with a restriction that block_size must match kBlockN in the kernel.

Great work! As it is very important for performance, could you plan to submit the feature? I am glad to test it.

I've tidied up the code a bit, you could test using the following two branches: https://github.com/beginlner/flash-attention/tree/blocked_kvcache and https://github.com/beginlner/vllm/tree/blocked_flash_attn

Thanks for the info. I will share the latency comparison after benchmark.

@beginlner I found you write a new function flash_attn_with_blocked_kvcache based on FlashAttention. I just want to know how much work will be done if we directly rewrite paged attention kernrel in vllm?

@beginlner I found you write a new function flash_attn_with_blocked_kvcache based on FlashAttention. I just want to know how much work will be done if we directly rewrite paged attention kernrel in vllm?

I think it will be a little complicated.

For prefill, I replaced xformers with FlashAttention and found attention caculation (softmax(Q @ K^T * softmax_scale) @ V) latency is reduced 2+ times. I could submit a PR if necessary.

Using CodeLLaMA-34B config (num_query_heads=64, num_key_value_heads=8, head_size=128)
Tested on A100-40GB

Test id	Batchsize	Prompt length	Original xformers (us)	FA (us)	Speedup (Original / FA)
1	1	1024	6.875	1.625	4.2
2	10	1024	36.965	11.518	3.2
3	100	1024	364.861	126.109	2.9
2. For decoding,  Is there lots of codes changed if we support MQA/GQA in paged attention kernel?

These are great results. I hope that decoding can get a speed up as well as this is likely to yield a substantial improvement
@beginlner Do you know what it takes for Tri Dao to accept flash_attn_with_blocked_kvcache into flash attention?

have modify the FlashAttention kernel to support paged KV cache with a restriction that block_size must match kBlockN in the kernel.

Great work! As it is very important for performance, could you plan to submit the feature? I am glad to test it.

I've tidied up the code a bit, you could test using the following two branches: https://github.com/beginlner/flash-attention/tree/blocked_kvcache and https://github.com/beginlner/vllm/tree/blocked_flash_attn

It seems the blocked flash attn unittest failed.

@zhaoyang-star Thanks for the reminder, the error tolerance should be relaxed.

@beginlner The greastest releative difference is 9.48. Is this a little larger than expected? FYI, the original test_flash_attn.py also failed. Please have a look.

@zhaoyang-star Thanks for the reminder, the error tolerance should be relaxed.

@beginlner The greastest releative difference is 9.48. Is this a little larger than expected? FYI, the original test_flash_attn.py also failed. Please have a look.

Base on my experience, the greatest absolute difference of 0.008 and the greatest relative difference of 9.48 are acceptable. I have updated a more reliable test to the branch.
Additionally, how the original test_flash_attn.py failed?

@beginlner Sorry I didnot store the log. I suggested you take a test.

@beginlner Sorry I didnot store the log. I suggested you take a test.

It failed only by OOM on my A100 40G.

@beginlner Sorry I didnot store the log. I suggested you take a test.

It failed on some tests only by OOM on A100 40G because someone else is also using the GPU.

Good news.
BTW, have you benchmark the latency or throughput using flash_attn_with_blocked_kvcache in vllm? I am very interested in the perf data.

@beginlner Sorry I didnot store the log. I suggested you take a test.

It failed on some tests only by OOM on A100 40G because someone else is also using the GPU.

Good news. BTW, have you benchmark the latency or throughput using flash_attn_with_blocked_kvcache in vllm? I am very interested in the perf data.

The flash_attn_with_blocked_kvcache kernel is expected to provide a speedup of about n_heads // n_heads_kv times compared to the current paged attention kernel base on my tests. Would you like to conducting a comprehensive end-to-end latency benchmark?

I would not expect a speedup for implementing GQA on prefilling, only on decoding (which is much harder because of PagedAttention).

@beginlner The unittest has passed. From the kernel benchmark and e2e benchmark we can see there is no speedup compared with paged attention v2 version. Did you have similar results? I used starcoder which is a MQA model.
[use_fa]root@50c663527862:/bigdata/zhaoyang/gerrit/vllm# python benchmarks/kernels/benchmark_paged_attention.py --version v1 --batch-size 1 --num-kv-heads 1
Namespace(batch_size=1, block_size=16, context_len=4096, dtype='half', head_size=128, num_kv_heads=1, num_query_heads=64, profile=False, seed=0, use_alibi=False, use_fp8_kv_cache=False, version='v1')
Warming up...
Kernel running time: 100.380 us
[use_fa]root@50c663527862:/bigdata/zhaoyang/gerrit/vllm# python benchmarks/kernels/benchmark_paged_attention.py --version v2 --batch-size 1 --num-kv-heads 1
Namespace(batch_size=1, block_size=16, context_len=4096, dtype='half', head_size=128, num_kv_heads=1, num_query_heads=64, profile=False, seed=0, use_alibi=False, use_fp8_kv_cache=False, version='v2')
Warming up...
Kernel running time: 52.862 us
[use_fa]root@50c663527862:/bigdata/zhaoyang/gerrit/vllm# python benchmarks/kernels/benchmark_paged_attention.py --version flash-attn --batch-size 1 --num-kv-heads 1
Namespace(batch_size=1, block_size=16, context_len=4096, dtype='half', head_size=128, num_kv_heads=1, num_query_heads=64, profile=False, seed=0, use_alibi=False, use_fp8_kv_cache=False, version='flash-attn')
Warming up...
Kernel running time: 70.118 us

[use_fa]root@50c663527862:/bigdata/zhaoyang/gerrit/vllm# python3 benchmarks/benchmark_latency.py --model /bigdata/shared/models/huggingface/starcoder/ --input-len 512 --output-len 512 --num-iters 10 --batch-size 1 --enforce-eager --use-flash-attn
Namespace(batch_size=1, dtype='auto', enforce_eager=True, input_len=512, kv_cache_dtype=None, model='/bigdata/shared/models/huggingface/starcoder/', n=1, num_iters=10, output_len=512, profile=False, profile_result_dir=None, quantization=None, tensor_parallel_size=1, tokenizer=None, trust_remote_code=False, use_beam_search=False, use_flash_attn=True)
INFO 01-22 22:20:30 llm_engine.py:71] Initializing an LLM engine with config: model='/bigdata/shared/models/huggingface/starcoder/', tokenizer='/bigdata/shared/models/huggingface/starcoder/', tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.float16, max_seq_len=8192, download_dir=None, load_format=auto, tensor_parallel_size=1, quantization=None, enforce_eager=True, use_flash_attn=True, kv_cache_dtype=None, seed=0)
INFO 01-22 22:21:30 llm_engine.py:283] # GPU blocks: 1775, # CPU blocks: 1638
SamplingParams(n=1, best_of=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=1.0, top_p=1.0, top_k=-1, min_p=0.0, use_beam_search=False, length_penalty=1.0, early_stopping=False, stop=[], stop_token_ids=[], include_stop_str_in_output=False, ignore_eos=True, max_tokens=512, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True)
Warming up...
Profiling iterations: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [02:18<00:00, 13.90s/it]
Avg latency: 13.8989108757989 seconds
[use_fa]root@50c663527862:/bigdata/zhaoyang/gerrit/vllm# python3 benchmarks/benchmark_latency.py --model /bigdata/shared/models/huggingface/starcoder/ --input-len 512 --output-len 512 --num-iters 10 --batch-size 1 --enforce-eager
Namespace(batch_size=1, dtype='auto', enforce_eager=True, input_len=512, kv_cache_dtype=None, model='/bigdata/shared/models/huggingface/starcoder/', n=1, num_iters=10, output_len=512, profile=False, profile_result_dir=None, quantization=None, tensor_parallel_size=1, tokenizer=None, trust_remote_code=False, use_beam_search=False, use_flash_attn=False)
INFO 01-22 22:24:44 llm_engine.py:71] Initializing an LLM engine with config: model='/bigdata/shared/models/huggingface/starcoder/', tokenizer='/bigdata/shared/models/huggingface/starcoder/', tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.float16, max_seq_len=8192, download_dir=None, load_format=auto, tensor_parallel_size=1, quantization=None, enforce_eager=True, use_flash_attn_zte=False, kv_cache_dtype=None, seed=0)
INFO 01-22 22:25:46 llm_engine.py:283] # GPU blocks: 14201, # CPU blocks: 13107
SamplingParams(n=1, best_of=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=1.0, top_p=1.0, top_k=-1, min_p=0.0, use_beam_search=False, length_penalty=1.0, early_stopping=False, stop=[], stop_token_ids=[], include_stop_str_in_output=False, ignore_eos=True, max_tokens=512, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True)
Warming up...
Profiling iterations: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [02:21<00:00, 14.17s/it]
Avg latency: 14.166307100310224 seconds

Hi, here is my kernel benchmark result. I have updated the code on https://github.com/beginlner/vllm/tree/blocked_flash_attn. Note that the shape and the block size of the KV cache are different from vllm's paged attention.

@beginlner Yes. The shape and block_size are different from paged attention. I used https://github.com/zhaoyang-star/vllm/tree/blocked_flash_attn_based_on_beginIner, which add some options based on your branch blocked_flash_attn.
Results using run_benchmark.sh are as following. Blocked FA could boost kernel perf when batch size is larger. But the speedup can hardly seen in e2e latency benchmark, which is unexpected. Could you like to benchmark e2e latency using my branch blocked_flash_attn_based_on_beginIner ?
Env:

vllm main branch latest commit id 8cd5a992
A100-40GB-PCIE
context_len=4096
num query heads=56, num kv heads=8
kernel data type=bfloat16

Batchsize
Paged attention V1 (us)
Paged attention V2 (us)
FA with blocked kv cache (us)

1
128.882
61.142
67.126

4
355.433
256.677
75.528

16
552.368
887.509
264.750

64
2504.497
3050.440
818.838

256
7878.213
8814.990
2550.177

Starcoder (MQA) e2e latency with In/Out length=512:

Batchsize
Baseline (sec)
FA with blocked kv cache (sec)

1
13.76
13.79

4
14.41
14.33

16
17.45
16.37

64
29.79
24.37

256

@zhaoyang-star It's as expected that the speedup can hardly seen in e2e latency benchmark when batch size is small. Because when the batch size is small, reading parameters is the bottleneck; when the batch size is large, reading the KV cache is the bottleneck to performance.

@zhaoyang-star Blocked KV cache was added to flash attention in 2.5.0. I wonder if the newer implementation gives any performance boost? Either way, it’s now in flash attention which makes it easy to use in vLLM

@zhaoyang-star Blocked KV cache was added to flash attention in 2.5.0. I wonder if the newer implementation gives any performance boost? Either way, it’s now in flash attention which makes it easy to use in vLLM

Great! @beginlner is the core contributor of this feature.
I have not benchmark it under FA 2.5.0. Bute I think the results will be close to data we had before.
The main question is FA only supports half and bfloat16 kv cache data type. So supporting fp8-e5m2 cache data type is needed. I am not familar with FA's code. But I think there is only limited lines should be changed to support fp8 cache without scale factor, because there is no additional quantization params.
We are looking for any contributions to deliver this feature :)

BTW xformers supports MQA/GQA https://github.com/facebookresearch/xformers/blob/fe0526babcd2114e70d9f4d9b10c729628461170/xformers/ops/fmha/init.py#L186-L212


orderBy not working and orderby gives http 500 error

if I apply a $orderBy=Name, for example and check EF Profiler this is not being applied to the Sql.
Also if I use it lower case (i.e. $orderby=Name) I get the following error:
ExceptionMessage=No method 'get_Item' exists on type xxx.

Just a comment here for future reference. I got the same error using $orderby=[Name], but it works with $orderby=Name. ForceDynamicProperties is not set.
Based on the examples, I'm not quite sure when to use the square brackets or not.


Add a list of common error messages and their resolution to the docs

Could we add something like a trouble shooting section to the docs?
Often it can be time consuming to diagnose the cause of an error due to node's cryptic error handling.
For example the following error means that you have another app running on the same port.
Listening on port 3000

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: listen EADDRINUSE
    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1156:14)
    at listen (net.js:1182:10)
    at Server.listen (net.js:1267:5)
    at EventEmitter.listen (/Users/gavinwye/Documents/HMRC/git/dc-prototypes/node_modules/express/lib/application.js:617:24)
    at Object.<anonymous> (/Users/gavinwye/Documents/HMRC/git/dc-prototypes/server.js:74:5)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
[nodemon] app crashed - waiting for file changes before starting...

The solution to this is to run:
lsof -i:3000

Where 3000 = the port that you are trying to use
Which should return:
COMMAND   PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
node    29943 gavinwye   14u  IPv6 0x7149ec43dc72b2ad      0t0  TCP *:hbci (LISTEN)

You can then run:
kill -9 29943

Where 29943 is the PID returned by the previous command.

Great idea!
I normally just run
killall node

#98 improves this specific error by telling you what's wrong and how to change the port.
I've never needed to kill node like this as I usually just change port or cycle through open terminal windows until I find the server.
Are there any other common errors we should catch?

going to close this, if other errors come up regularly hopefully we'll hear of it through research/slack/github issues


⚠ AGEG website (prod) has degraded performance

In f667bea, AGEG website (prod) (https://www.ageg.ca/) experienced degraded performance:

HTTP code: 200
Response time: 1307 ms

Resolved: AGEG website (prod) performance has improved in e9e734e.


Add a check to validate the changelog on PRs

Proposal
Even it's documented the proper way to add entries in the changelog, there are cases where we still approve PRs with the entry unsorted or with other style errors.
It's difficult to review every thing without any error, but maybe we can create a bash script that checks the unreleased section to validate it and append it to pre-commit checks
Use-Case
No response
Anything else?
No response

/assing @JorTurFer can you please share the link for

Even it's documented the proper way to add entries in the changelog

https://github.com/kedacore/keda/blob/main/CONTRIBUTING.md#Changelog


There is no api document?

no document,why?

We haven't gotten around to it yet. Is there anything in particular you're looking to do?

Lack of phpdoc for API makes it impossible to use code completion in an IDE. Due to extensive use of __call magic method I see 2 options to provide decent IDE support:

Wrap each call to ZMQ method in a delegate metod and provide phpdoc for those public methods. It would result in many one-line methods in code and getting rid of __call magic.

Use class-level phpdoc comment describing magic methods, like

/**
 * @method SocketWrapper getSocket(integer $type, string $persistent_id, \callback $on_new_socket) Shortcut for creating new sockets from the context.
 */
class Context {}

Choosing one over the other is a matter of style. However I think 1st approach is more straightforward and clear, despite producing a lof of code.


selectedDates in differents months

How do you do to selectedDays doesn't appers in the next month?

The day 29 appears in the next month, this would not be annoying if it would appers also the streak days.

There is no option to do that. The only way available is to disable trailing and leading days. That can be done using the leadingTrailingDatesProperties. Ideally, there should be an option to hide or customize that.


vitest errors if there are no in-source tests, even with --passWithNoTests

Describe the bug
With in-source tests, the recommendation is to change the file path glob to something like src/*.{ts,js} as per https://vitest.dev/guide/in-source.html. However, if you do this, you'll get errors for all of your source files that don't have any in-source tests. I would expect to be able to suppress this with --passWithNoTests, but I still get the same error.
My temporary hack to get around this is:
{
	"scripts": {
		"test:unit": "npx vitest run $(grep -lr 'import.meta.vitest' src/ | tr '\\n' ' ')",
		"test:unit:watch": "npx vitest --ui $(grep -lr 'import.meta.vitest' src/ | tr '\\n' ' ')"
	}
}

Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-jtuly9?file=package.json
System Info
System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
    Memory: 3.02 GB / 7.72 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.local/share/pnpm/node
    npm: 8.19.3 - ~/.local/share/pnpm/npm
  npmPackages:
    vite: ^4.0.4 => 4.0.4
    vitest: ^0.28.3 => 0.28.3

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

include is only for test files. includeSource is for source files with tests.


Upgrade outdated Webpack 2.6.1 to 4.16.5

Major speed increase
Added 'development' mode (default production mode fails when trying to search for restaurants)
Added a path config as new version prefers a dist directory

fixing conflicts

Also requesting help from @mykmartin since my npm version (6.3.0) reverts the package-lock.json changes.


SceneForm OpenGLES 3.0 requires or Later on android emulator sceneform 1.10.0

App not working on Emulator show SceneForm OpenGLES 3.0 requires or Later but i have 3.1 still show this message

Open GL != OpenGL ES

How can i solve this problem?
On Wed, 10 Jul 2019, 2:46 pm Consti10<EMAIL_ADDRESS>wrote:

Open GL != OpenGL ES
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/google-ar/sceneform-android-sdk/issues/773?email_source=notifications&email_token=AMNCAVJ6SK2H2FMMGYPI4DTP6WVVZA5CNFSM4H676VPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZS52MQ#issuecomment-509992242,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMNCAVNH446WR7ZSK64MDMLP6WVVZANCNFSM4H676VPA
.


Support different aggregate expression (outside SELECT list) in ORDER BY list

Is your feature request related to a problem or challenge?
In aggregate query with order-by: order-by list should support expressions with group by columns, or aggregated aggregate columns, this syntax is widely supported (by DuckDB, postgres and likely many others)
For aggregate function in order by list case, now DataFusion only supports aggregate functions which have appeared in SELECT list
See example
-- Setup
DataFusion CLI v41.0.0
> create table t1 (groupby1 int, agg1 int, agg2 int);

-- This is supported
select groupby1, sum(agg1)
from t1
group by groupby1
order by groupby1, sum(agg1);

-- Not supported yet in DataFusion
select groupby1, sum(agg1)
from t1
group by groupby1
order by max(agg2);

Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response

Interesting, I want to try it.

take


Try out Alan's site switcher

https://github.com/govhackaustralia/asset-server#govhack-site-switcher

Implemented!
I've got an enhancement request though :)
https://github.com/govhackaustralia/asset-server/issues/1

FYI, made an asset-server-side CSS change which will set position: fixed if there is a class of is-fixed
So no Jabberwocky css change needed.

How do I set is-fixed w/o doing the setInterval hack tho? :)


Execution fails on mac

macOS Sierra 10.12.6
Python 3.6.4

install looks ok
$ pip3 install kubefuse
Collecting kubefuse
  Downloading kubefuse-0.7.3.tar.gz
Requirement already satisfied: fusepy>=2.0.4 in /usr/local/lib/python3.6/site-packages (from kubefuse)
Collecting python-myna==1.2.0 (from kubefuse)
  Downloading python-myna-1.2.0.tar.gz
Requirement already satisfied: PyYAML>=3 in /usr/local/lib/python3.6/site-packages (from kubefuse)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/site-packages (from kubefuse)
Building wheels for collected packages: kubefuse, python-myna
  Running setup.py bdist_wheel for kubefuse ... done
  Stored in directory: /Users/my-user/Library/Caches/pip/wheels/92/18/07/49c7dbbc561c8ac4e366befec2af409f53765662ae4d4081bc
  Running setup.py bdist_wheel for python-myna ... done
  Stored in directory: /Users/my-user/Library/Caches/pip/wheels/d3/f5/6f/fd9f2b7ffc199ec6363b413a4a14e7dca1d4766ea42565b8a3
Successfully built kubefuse python-myna
Installing collected packages: python-myna, kubefuse
Successfully installed kubefuse-0.7.3 python-myna-1.2.0

running it not so
$ kubefuse
Traceback (most recent call last):
  File "/usr/local/bin/kubefuse", line 7, in <module>
    from kubefuse.kubefuse import main
  File "/usr/local/lib/python3.6/site-packages/kubefuse/kubefuse.py", line 13
    print "It looks like the Fuse system library is missing."
                                                            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "It looks like the Fuse system library is missing.")?

Looks like you need to install https://osxfuse.github.io/

I do have it installed (v3.7.1). Any ideas? thx

Not sure, probably some library path issue? I'm not on Mac anymore so can't help you much I'm afraid, but I think I had it working using fuse installed through brew.

Oh actually, just read the error more closely: you are using Python3 and this is Python2 code unfortunately.

ah. ok. i'll try using virtual env. thx!

Dupe of #25. I only give the newer issue precedence over this one as its more descriptive and indicative of the issue at hand.


Left aligned vertical bar character

With this vertical line character we probably won't need modify_font as it is already on the left edge of the character box.
Example usage in iTerm2:

Thank you,
But the character does not affect modify_font. modify_font controls the thickness and vertical position of the underline, it is not to align horizontally.
But I am using the left aligned character in the screenshot, it should be in the example config for context in the readme.
I don't want to change the default character, that would be a pretty big breaking change for everyone. Some terminals/fonts might not play well with that character.
Can you change the PR to only update the example config in the readme?

I'd suggest giving u258e as the example instead of u258f as it's slightly thicker, mirroring the appearance of the default character (u2502), only left aligned.


encoder unit test failed.

all encoder unit test failed as below:

[==========] Running 7 tests from 5 test cases.
[----------] Global test environment set-up.
[----------] 1 test from VaapiEncoderH264Test
[ RUN      ] VaapiEncoderH264Test.Factory
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
[  FAILED  ] VaapiEncoderH264Test.Factory (0 ms)
[----------] 1 test from VaapiEncoderH264Test (0 ms total)
[----------] 1 test from VaapiEncoderHEVCTest
[ RUN      ] VaapiEncoderHEVCTest.Factory
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
[  FAILED  ] VaapiEncoderHEVCTest.Factory (0 ms)
[----------] 1 test from VaapiEncoderHEVCTest (0 ms total)
[----------] 1 test from VaapiEncoderJpegTest
[ RUN      ] VaapiEncoderJpegTest.Factory
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
[  FAILED  ] VaapiEncoderJpegTest.Factory (0 ms)
[----------] 1 test from VaapiEncoderJpegTest (0 ms total)
[----------] 1 test from VaapiEncoderVP8Test
[ RUN      ] VaapiEncoderVP8Test.Factory
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
[  FAILED  ] VaapiEncoderVP8Test.Factory (0 ms)
[----------] 1 test from VaapiEncoderVP8Test (0 ms total)
[----------] 3 tests from VaapiEncoderJpegTest/SimpleDataTest
[ RUN      ] VaapiEncoderJpegTest/SimpleDataTest.Encode/0
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/0, where GetParam() = "NV12" (1 ms)
[ RUN      ] VaapiEncoderJpegTest/SimpleDataTest.Encode/1
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/1, where GetParam() = "I420" (0 ms)
[ RUN      ] VaapiEncoderJpegTest/SimpleDataTest.Encode/2
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/2, where GetParam() = "YUY2" (0 ms)
[----------] 3 tests from VaapiEncoderJpegTest/SimpleDataTest (1 ms total)
[----------] Global test environment tear-down
[==========] 7 tests from 5 test cases ran. (1 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 7 tests, listed below:
[  FAILED  ] VaapiEncoderH264Test.Factory
[  FAILED  ] VaapiEncoderHEVCTest.Factory
[  FAILED  ] VaapiEncoderJpegTest.Factory
[  FAILED  ] VaapiEncoderVP8Test.Factory
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/0, where GetParam() = "NV12"
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/1, where GetParam() = "I420"
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/2, where GetParam() = "YUY2"
7 FAILED TESTS

Which OS? Which version of gtest?  Can you attach your configure output?  All except the last 3 pass for me.  And the last three fail for different reason on my system than reported here.

14.04.1-Ubuntu. gtest 1.7.0, wired thing is if i run unittest more times i will see 3 items pass too.
But it's pass or failed is total random.

[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/2, where GetParam() = "YUY2" (0 ms)
[----------] 3 tests from VaapiEncoderJpegTest/SimpleDataTest (1 ms total)
[----------] Global test environment tear-down
[==========] 7 tests from 5 test cases ran. (1 ms total)
[  PASSED  ] 4 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/0, where GetParam() = "NV12"
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/1, where GetParam() = "I420"
[  FAILED  ] VaapiEncoderJpegTest/SimpleDataTest.Encode/2, where GetParam() = "YUY2"

The last three will always fail on HW older than SKL.

If you declare the destructors as virtual for VaapiEncoderH264, VaapiEncoderHEVC, and VaapiEncoderVP8, does it fix the std::bad_alloc errors?
Does gdb tell you anything?

I can confirm that on the current ToT the use cases failing for me are due to being run on old hardware. This is 100% reproducible and expected.

This is a case where we need a mechanism to skip tests (or expect failure) on hw that doesn't support it.

yes. may need add some caps query api

@uartie ：
Seems if i disable jpeg encoder unit test, it will be good. I guess this maybe a gtest issue.
My local gtest env is from Lizhong, I want build my own to reproduce this issue. But it can't find gtest-config. Do we need do some thing for gtest-config? If yes, maybe we need add something to readme.

checking whether make supports nested variables... (cached) yes
checking for 'gtest-config'... no
configure: error: Unable to locate either a built or installed Google Test.
The specific location '/home/thomas/projects/yami/googletest-release-1.7.0' was provided for a built or installed
Google Test, but no 'gtest-config' script could be found at this location.

The gtest-config script is generated during make.  How are you building gtest?  I use the autotools method.  I don't think the cmake method generates gtest-config.
This is how I build gtest:
cd <path to gtest source>
autoreconf -v --install
./configure --disable-shared --enable-static
make

...then to build libyami with gtest:
cd <path to libyami source>
./autogen.sh --enable-gtest=<path to gtest source> <other config args>

Great! it's fixed by your method.
I did see this command in gtest's readme.
Is it ok if I add this to readme?
thanks

yes

created as #490

close this since it's a gtest configuration issue


[DCE] Keep outer borrows alive when reborrowing.

Previously, when encountering a borrow of a guaranteed value, the end_borrows of that reborrow were marked alive.  Only doing that enables end_borrows of the outer borrow scope can be marked as dead.  The result is that uses of the reborrowed value (including its end_borrow) can outstrip the outer borrow scope, which is illegal.
Here, the outer borrow scope's end_borrows are marked alive.  To do that, the originally borrowed values have to be identified via findGuaranteedReferenceRoots.

@nate-chandler this looks good. As we discussed, the logic for "find borrow introducers" should be centralized in SIL/Utils/OwnershipUtils because it models a structural requirement of SIL independent of optimization. It needs to be complete and verified. So we also need to call it from the SILVerifier.


removed unnecessary lines

Range should be kept for users who want to configure the script to view more than one entry.

now you can get what feed you want, by modifying url and number of entries variables (less painfully for less experienced users)

nice!


Refs #31617 -- Added an id for helptext in admin forms.

Refs Admin Accessibility Ticket https://code.djangoproject.com/ticket/31617
This adds an id to the helptext in the admin and should be merged before https://github.com/django/django/pull/15246
If I stack this pr and 15246 then we see the helptext will be associated with the input.

Line 5216 in tests/admin_views/tests.py doesn't change because dates are multiwidgets and therefore they don't get an id. Likely that needs some more thought, but I think that can be addressed separately. Split Date/time widgets need work more generally, likely need a fieldset and a legend etc.
https://github.com/django/django/blob/4400d8568ad5695c46e8de45635a82a27a26b871/django/forms/widgets.py#L852

@smithdc1 Thanks :+1: I found a few more places:

django/contrib/admin/templates/registration/password_change_form.html:
{{ form.new_password1.help_text|safe }}
,
django/contrib/admin/templates/registration/password_change_form.html:
{{ form.new_password2.help_text|safe }}
,
django/contrib/admin/templates/admin/auth/user/change_password.html:
{{ form.password1.help_text|safe }}
,
django/contrib/admin/templates/admin/auth/user/change_password.html:
{{ form.password2.help_text|safe }}
,
django/contrib/admin/templates/admin/search_form.html:
{{ cl.search_help_text }}

found a few more places:

Thanks :-)
The first 4 are fairly straight forward, and I've assumed that folk have ids for their password inputs.
The last one is a little different as the input is in the template so I've added that aria-describedby (not labelled) here. I've added as a single commit (to be squashed) but maybe the change to the input should be a different commit or part of #15246?

found a few more places:

Thanks :-)
The first 4 are fairly straight forward, and I've assumed that folk have ids for their password inputs.
The last one is a little different as the input is in the template so I've added that aria-describedby (not labelled) here. I've added as a single commit (to be squashed) but maybe the change to the input should be a different commit or part of #15246?

Line 5216 in tests/admin_views/tests.py doesn't change because dates are multiwidgets and therefore they don't get an id.

hmm, should be using auto_id instead :thinking:
https://github.com/django/django/blob/205f67cd5bea242fac6b0380fa26570505d07dcb/django/forms/boundfield.py#L219
I need to think more about this.

Hi @felixxm
Can I get your thoughts please?
Currently I've been using id_for_label and this gives us aria-describedby on the correct widgets. That is everything except where there's multiple inputs involved, e.g. MultiWidget as mentioned above but also checkbox and radios won't get a aria-describedby as my patches currently stand. Instead for these it seems we should be adding the aria-describedby to the fieldset See gds example. Specifics aside, my key point here is that it's wrong to add an aria-describedby from every radio (say) to the field's help_text. Further, for these widgets we'd need to try and use auto_id as their labels don't have an id.
I'm wondering instead if widgets should learn a use_fieldset attribute (name can be improved). This will be False by default and True for radio/multi-checkboxes etc. We can then use auto_id instead and this new attribute. I think this approach has the following benefits:

We can simplify the fieldset logic in the proposed
 template to use this new attribute, rather than listing out widget names.
Improved consistency through use of auto_id everywhere we're going to associate help_text with an input. (What's the label got to do with help_text anyway?). We'll guard against applying the aria-describedby to the wrong widgets using the new attribute.
Folk with custom widgets will be able to get further by using the attribute on their widget.
Associating the help_text with the input will not be impacted by folk customising id_for_label.

I guess my main concern about this approach is we're adding another attribute (setting?) to widgets.

The first 4 are fairly straight forward, and I've assumed that folk have ids for their password inputs.

I don't think we can safely assume this :think I would add {% if form.password1.id_for_label %} ... etc.

ticket-31617 is already wide and it's getting harder and harder to follow all threads, opinions, and decisions :|

OK, we have ticket-32819 :facepalm:

getting harder and harder to follow all threads, opinions, and decisions :|

Completely agree, especially when I'm trying to push on with related tickets at the same time.
I'll think today about how to structure the order of these changes so they are easier to follow.

Hey @smithdc1 — so a quick look at this: it looks good.

...harder to follow...

What with here, https://github.com/django/django/pull/15246, and https://github.com/django/django/pull/15241 — it's like Argh! 😃
Is this one ready to go. Getting this in lets us look again at #15246 I think.
🏅

Yes. This one should be good to go, albeit I hadn't refreshed my memory enough of this to put it in the review queue more formally.
P.s. nearly there with my thoughts on the 'div' template. Hopefully get something pushed later with a proposal for consideration.


Require conditionPspDapiUpdate caller to be zero address

When we require msg.sender==address(0) this function can no longer change the state, which makes its name accurate

I fixed the things.


Fix incorrect temperature usage in _LLMBasedQuestionGenerator

Description

This PR fixes incorrect temperature usage in the _llm_complete method of the _LLMBasedQuestionGenerator class as described in the related issue. It replaces the hardcoded temperature value of 0.5 with self._llm_temperature.
Related Issue

#1998
Type of Change

[ ] 📚 Examples / docs / tutorials / dependencies update
[x] 🔧 Bug fix (non-breaking change which fixes an issue)
[ ] 🥂 Improvement (non-breaking change which improves an existing feature)
[ ] 🚀 New feature (non-breaking change which adds functionality)
[ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🔐 Security fix

Checklist

[x] I've read the CODE_OF_CONDUCT.md document.
[x] I've read the CONTRIBUTING.md guide.
[ ] I've written tests for all new methods and classes that I created.
[ ] I've written the docstring in Google format for all the methods and classes that I used.
[ ] I've updated the pdm.lock running pdm update-lock (only applicable when pyproject.toml has been
modified)

Thanks @asselindebeauville for your contribution! 🎉


Updated cardano-base & avoid libsecp256k1 on Windows

Closes #3678, libsecp256k1 is not available on Windows.

FYI: In https://github.com/input-output-hk/haskell.nix/pull/1424, @hamishmack added the possibility to download a Windows binary of libsecp256k1; this might be an alternative to this PR.

I wonder if these need to append to PKC_CONFIG_PATH somehow?
https://github.com/input-output-hk/ouroboros-network/blob/de22b3505ab84a98701f45411fb4fa21db0e2aec/.github/workflows/build.yml#L73
https://github.com/input-output-hk/ouroboros-network/blob/de22b3505ab84a98701f45411fb4fa21db0e2aec/.github/workflows/build.yml#L123

Can you echo "$PKG_CONFIG_PATH" in the failing step to see what value it has?

Can you echo "$PKG_CONFIG_PATH" in the failing step to see what value it has?

See https://github.com/input-output-hk/ouroboros-network/runs/5816059242?check_suite_focus=true

I wonder if it should be:
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(readlink -f secp256k1/lib/pkgconfig)"

To keep libsodium in the path.  But if that is the case why was it secp256k1 that it could not find?

Just pushed 4e887f581f7dcc457985f5303d9080a57a5275bf to append to PKG_CONFIG_PATH, but I agree that one would expect that libsodium and not libsecp256k1 could not be found before.
Also, I opened #3687 which I guess is a better place to discuss this.

Closing this one in favour of #3687.


Outputting saliency maps

Not certain that if I did something wrong when training the model but once saved and loaded, for the gradient activation mapping to compute one needs to invoke it using compute_saliency function. Otherwise it gives a value error.
gam_model = GradientActivationMapping(
    model,
    [i.name for i in model.layers if "conv" in i.name],
    output_activation=None,
    discard_negative_values=True
)

gam = gam_model.compute_saliency(X, None)

Which is different from how it does in the docs, i.e.
gam_model = GradientActivationMapping(
    sequential_model,
    ['conv_1', 'conv_2', 'conv_3', 'conv_4'],
    output_activation=None,
    discard_negative_values=False,
)

gam = gam_model(x_data, verbose=1)
print(gam[0])

Hi @vcanogil , thanks for the feedback! I will look into this.
Could you supply me with just enough code that raises an error when not invoking model.compute_saliency? The intention is that one should not need to invoke model.compute_saliency, and that loading a model and immediately calling the model (via call) should work.

Sure, here is what I've used:
import tensorflow as tf
from molgraph import features, Featurizer, MolecularGraphEncoder

atom_encoder = Featurizer([
    features.Symbol(),
    features.TotalNumHs(),
    features.ChiralCenter(),
    features.Aromatic(),
    features.Ring(),
    features.Hetero(),
    features.HydrogenDonor(),
    features.HydrogenAcceptor(),
    features.CIPCode(),
    features.RingSize(),
    features.GasteigerCharge()
])

bond_encoder = Featurizer([

    features.BondType(),
    features.Conjugated(),
    features.Rotatable(),
    features.Ring(),
    features.Stereo(),
])

encoder = MolecularGraphEncoder(atom_encoder, bond_encoder)

# some model I trained and saved via model.save (i.e. Keras)
model = tf.keras.models.load_model(...)
graph = encoder(np.array(["CCC", "CCO"])) # a random example

gam_model = GradientActivationMapping(
    model,
    [i.name for i in model.layers if "conv" in i.name], # this is also arbitrary, it could be whichever layer
    output_activation=None,
    discard_negative_values=True
)

gam = gam_model(graph, None)

At which point it should give you a ValueError that starts with
Could not find matching concrete function to call loaded from the SavedModel ...

After which it basically says that you're passing the wrong input.

Okay thanks for the info, I'll look into it!
It should be possible to save the actual gam_model and load it and use it; though it seems that loading a encoder model, then passing it to GradientActivationMapping and then use it throws the error.
Previously GradientActivationMapping was implemented as keras.Model, but I stumbled upon some issues and decided to make it a tf.Module instead. It also does not make much sense to use a keras.Model as one simply just wants to map a graph to some output (i.e. "fit" and "evaluate" is not used).

@vcanogil which version do you use? This seems to work for me (0.5.7):
import tensorflow as tf
import numpy as np
from molgraph.chemistry import features, Featurizer, MolecularGraphEncoder
from molgraph import layers
from molgraph import models

atom_encoder = Featurizer([
    features.Symbol(),
    features.TotalNumHs(),
    features.ChiralCenter(),
    features.Aromatic(),
    features.Ring(),
    features.Hetero(),
    features.HydrogenDonor(),
    features.HydrogenAcceptor(),
    features.CIPCode(),
    features.RingSize(),
    features.GasteigerCharge()
])

bond_encoder = Featurizer([
    features.BondType(),
    features.Conjugated(),
    features.Rotatable(),
    features.Ring(),
    features.Stereo(),
])

encoder = MolecularGraphEncoder(atom_encoder, bond_encoder)

graph = encoder(np.array(["CCC", "CCO"]))

model = tf.keras.Sequential([
    tf.keras.layers.Input(type_spec=graph.unspecific_spec),
    layers.GCNConv(128, name='conv_1'),
    layers.GCNConv(128, name='conv_2'),
    layers.Readout(),
    tf.keras.layers.Dense(1)
])
model(graph)

model.save('/tmp/my_model')

model = tf.keras.models.load_model('/tmp/my_model')

gam_model = models.GradientActivationMapping(
    model,
    ['conv_1', 'conv_2'],
    output_activation=None,
    discard_negative_values=True
)

gam = gam_model(graph, None)

Btw, there is possibly a bug in from_config() of the base GNN layer. I will fix this now (in 0.5.8). It could be the issue for you, but not sure. Futhermore, to avoid future bugs/breaks in user code, I will soon migrate the GraphTensor to the (relatively new) tf.experimental.ExtensionType API (in 0.6.0). This migration will possibly break some user code, but I think it is worth it. It is better/preferred to use TF's public APIs instead of internal TF modules that aren't really supposed to be used by us.

I have found that the bug is reproducible for me if you try to load a model that has been saved using an older version of keras or tensorflow.
I was able to reproduce the bug by loading a model that was using keras 2.9.0 and tensorflow 2.10.0, where if the versions are 2.12.0 for each, it works as intended.


Minor changes to communities page.

discussion: https://chat.zulip.org/#narrow/stream/57-core-team/topic/open.20communities.20directory/near/1434114

The screenshot looks good to me!

Merged, thanks @amanagr!


Dynamic groups modal updates

Updates modal data flow and hooks to include dynamic groups state. I have worked through the main changes, but still finalizing broken tests

Tests are reliably passing locally


Project name validation

Add validation exception if the project name has - in it.

Trying to fix #65  and #67
Let me know about further changes.
Thank you.

#65 was already fixed in staging but not released (in PR #66)
The fix allows to use '-' in project names
I will do release now.
Please check the new version of SDK

Cool, thanks :+1:


Service register best practices

I have been using do for a while. But I have a confused about service register
a typical service:
type Service struct {
	meegoMaterial *material.MeegoMaterial[material.MeegoMeta] `do:""`
	docMaterial   *material.DocMaterial[material.DocMeta]     `do:""`
	anyMaterial   *material.AnyMaterial[any]                  `do:""`
}

func NewService() (*Service, error) {
	return di.InvokeStruct[Service]()
}

And I add service.Register() function in main.go.
func Register() {
	di.Provide(material.NewMeegoMaterial)
	di.Provide(material.NewAnyMaterial)
	di.Provide(material.NewDocMaterial)

        di.Provide(report.NewService)
}

It works, But when I testing report:
func init() {
	service.Register()
}

func TestService_Report(t *testing.T) {

}

Circular dependencies error:
# ***/biz/service/report
package ***/biz/service/report
	imports ***/biz/service
	imports ***/biz/service/report: import cycle not allowed in test

I register service in test init func without report now.
func init() {
	di.Provide(material.NewMeegoMaterial)
	di.Provide(material.NewDocMaterial)
	di.Provide(objectstorage.NewService)
	di.Provide(material.NewAnyMaterial)
}

But I think it is ugly, Is there a better way? all in one service.Register() maybe no need to exist?
Of course, this is not do is problem, It should be my problem with using and understanding.

Yes, declaring services globally might create import cycles sometimes.
In v2-beta6, we added support for "do.Package" -> https://do.samber.dev/docs/getting-started#register-services-using-package-declaration
You can create a do.Package in ***/biz/service/ for a subset of your app.
go get -u<EMAIL_ADDRESS>
If you currently use v1, check the migration guide: https://do.samber.dev/docs/upgrading/from-v1-x-to-v2
I currently use v2 in my own project. You can consider it almost production-ready. Some APIs might change before release.

Thx, I try to do.Package.
I use v2 in production for some time, it is very good.

Hello samber, do.Package doesn't seem to solve my problem.
Maybe I didn't describe it in detail enough. I create a demo: https://github.com/iyaozhen/samber-do-learn/blob/main/service/car/car_test.go

import cycle:
package github.com/iyaozhen/samber-do-learn/service/car
	imports github.com/iyaozhen/samber-do-learn/service
	imports github.com/iyaozhen/samber-do-learn/service/car: import cycle not allowed in test

TestCar_Start_V2 It is work, but I will add lots of do.Provide.
service/register.go, Should it not exist?
I should use do.Package in car? But engine used in a other car2 service, car and car2 Lazy/Provide Duplicate?

Ok, i see your issue.
Maybe you could move your tests to a dedicated package? 🤔
I don't know the complexity of your app, but you can also have a do.Package in 2 sub-packages (here: service/engine/ and service/car/) and import them in tests: do.New(engine.Pkg, car.Pkg).
I don't know if this issue is related to DI, since you would have the same problem in traditional programming.
Did you try with interfaces? Using do.InvokeAs might prevent some troubles.

Thank you for your patient answer. There's no particular solution for me.
move your tests to a dedicated package
not golang customary norm
2 sub-packages
car.Package
do.Package(
	do.Lazy(engine.NewEngine),
	do.Lazy(NewCar),
)

airplane.Package
do.Package(
	do.Lazy(engine.NewEngine),
	do.Lazy(NewAirplane),
)

https://github.com/iyaozhen/samber-do-learn/blob/main/service/car/car_test.go
panic: DI: service `*/service/engine.Engine` has already been declared

interface
interface is a good way. But it will make the project more complex. In general, there is only one implementation of an interface.
This is not do is problem, the same problem in traditional programming.
I'll close this issue first, If there is a good solution, I will come back to update.


Quitting with main script running doesn't always stop node instance

Quitting also doesn't always remove the old node.js instance, requires https://github.com/getnamo/nodejs-ue4/blob/master/Source/NodeJs/Public/NodeComponent.h#L70 to be false.

Closing with release: https://github.com/getnamo/nodejs-ue4/releases/tag/0.5.0, open new issue if new related issues appear


clarifies purpose of delegate

Addresses https://github.com/Azure/azure-sdk-for-net/pull/28870#discussion_r897379386

API change check
API changes are not detected in this pull request.


sqliteStmt cannot received nil in nim 2.x

The Nim 2.0 changelog mentions:

nil literals can no longer be directly assigned to variables or fields of distinct pointer types. They must be converted instead.

In sqliteutils, the following line generates a compilation error:
template dispose*(sqliteStmt: SQLiteStmt) =
  doAssert SQLITE_OK == sqlite3_finalize(RawStmtPtr(sqliteStmt))
  sqliteStmt = nil

Trying to set SQLiteStmt(nil), as suggested in the doc, generates a SIGSEGV: Illegal storage access. (Attempt to read from nil?) error.
A solution could be to cast:
sqliteStmt = cast[SQLiteStmt[NoParams, void]](nil)

Done here: https://github.com/codex-storage/nim-datastore/commit/7e053e5e0d2b783ece0e850a750012f1eac3ed69


[Feature request] Firefox version

Firefox supports WebExtensions now, so porting may be pretty simple.

@marsjaninzmarsa would you like to work on necessary changes?

@prabhakar267 I can try. 😄

Digression:
Not interested for the project's idea, but FYI: https://github.com/yfdyh000/follow-me-or-not/tree/usersciript

@yfdyh000: that was on my checklist, but with single tree - you can just add userscript headers to current content script code and it would work.

Hello @marsjaninzmarsa

AMO review pending, create account so I could add you as author. 😄

Any update? What happened? https://addons.mozilla.org/it/firefox/addon/follow-me-or-not/ the link seems pretty broken..


Inherited User Identity

Hello, nice extension.
I have some troubles configuring forum.
As i see, there are two config scenarios: standalone forum users, and forum connected to app users.
I need to use third scenario - when app and forum is loosely coupled, when app and forum have their own user tables and rbac tables, but app logged user also logged in to a forum.
Is it possible out of box?

In case of inherited user identity Podium only relies on fact that user is logged in and in one case it checks user's password so it basically does nothing with user original table and the whole Podium data is stored in Podium tables anyway. What exactly is the case you are looking for?

I've tried two variants of advanced config:
1st config:
'userComponent' => 'user'
In this case forum uses app user and app rbac settings. But i wanted separate rbac's for app and forum.
In my case application rbac doesn't contain 'podiumAdmin' role, so there is no admin access (http 403 error).
2nd config:
            'userComponent' => [
                'class' => 'bizley\podium\web\User',
                'identityClass' => 'app\models\User',
            ],

In this case separate rbac used - its ok.
But Podium automatically creates linked user, what is not needed in my case. I wanted to control forum user creation from the application, we have many users and not all of them will be on the forum.
So i need to turn off auto registration in Podium.
Sorry for confused description.

In case of configuration like 'userComponent' => 'user' RBAC component is not automatically inherited as well - you need to add 'rbacComponent' => 'authManager' (or similar) to inherit it. At least it should work like that, please let me know if it's not the case.
Anyway, in that case RBAC should be separated from main app.
Every userComponent setting other than default true ends with inherited identity linked to Podium tables - otherwise Podium can not gain control over forum member data (at least without some special tables mapping).
Please check again your 1st config and let me know if there are problems with it because this config looks like case you are after.

More info about 1st config (without additional 'rbacComponent' configuration):

if imperative access check is used, it works ok. User::can(Rbac::PERM_DELETE_OWN_POST, ...
if declarative access check in controller behavior is used, it fails https://github.com/bizley/yii2-podium/blob/master/src/controllers/AdminController.php#L91

So it depends on type of access check.

Oh my... You are right. This is bug and will be fixed in 0.6. Thanks for pointing that.

Ok, thanx.
What about optional user auto registration?

Should it be something like:

there is no registration option,
access to Podium is granted through additional mechanism,
separated RBAC and inherited user component.

How does it look?

I think it can be a config settings:

enableAutoRegistration = true, this controls optional registration in BaseController https://github.com/bizley/yii2-podium/blob/master/src/controllers/BaseController.php#L193
enableProfileEdit = true, this can make forum profile fields (username, timezone, email) read only

Application will be responsible to register forum users by request. App will use internal Podium objects like RBAC and user model.
Also enableAutoRegistration flag can hide links to 'account/login'

I could go for the following scenario:

additional Podium parameter that allows control over Podium access (could be closure-like),
parameter works only in case of inherited user component.

Podium account is created automatically only in case this parameter returns true.
I prefer to keep Podium-only fields to be editable from within Podium. Making them read-only is weird (why?) and allowing them to be edited from outside is difficult.
With options like that application says who can get account at Podium and from this point the rest is the same - Podium creates linked account, register and log in links are hidden.

It will be nice.
Read-only profile needed for unified user profile. When user changes his application profile, then changes will be propagated to his forum profile (by application). But this task is not very important and can be achieved with application means.

Two new parameters in 0.6:

accessChecker callable returning access type,
denyCallback callable to call when access is denied.

accessChecker should return one of integers:

1 for member access (allows registering and signing in),
0 for guest access (allows only forum viewing as guest),
-1 for no access.

In case on no access custom denyCallback can be set otherwise Podium redirects to the target URL of goHome() method.

Thank you.

I keep this open untill 0.6.

Released with 0.6