Crop rect gets invalid randomly on zooming in and out

Version
7.0.2
Platforms
dart, Android
Device Model
Samsung A21
flutter info
[✓] Flutter (Channel stable, 3.7.3, on macOS 13.1 22C65 darwin-arm64, locale en-DE)
    • Flutter version 3.7.3 on channel stable at /Users/me/Downloads/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (6 days ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/me/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2022.1)
    • Android Studio at /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 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.74.2)
    • VS Code at /Users/me/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (4 available)
    • SM A217F (mobile) • <IP_ADDRESS>:33827                          • android-arm64  • Android 11 (API 30)
    • SM A217F (mobile) • adb-RF8N90WKSAA-SpQbtC._adb-tls-connect._tcp. • android-arm64  • Android 11 (API 30)
    • macOS (desktop)   • macos                                         • darwin-arm64   • macOS 13.1 22C65 darwin-arm64
    • Chrome (web)      • chrome                                        • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

How to reproduce?
After the image is loaded I zoom in and out. After some time randomly the image jumps and then it turns all white.
I can't zoom or drag any more.
Trying to get the crop rect now returns: Rect.fromLTRB(NaN, -0.0, NaN, 4000.0)
It looks like left and right are NaN.
Logs
======== Exception caught by rendering library =====================================================
The following UnsupportedError was thrown during paint():
Unsupported operation: Compared with Infinity or NaN

The relevant error-causing widget was:
  ExtendedImage-[GlobalKey#1b185] ExtendedImage:file:///Users/me/Downloads/project/title/lib/src/file.dart:324:72
When the exception was thrown, this was the stack:
#0      DoubleExtension.compare (package:extended_image/src/utils.dart:95:7)
#1      DoubleExtension.lessThan (package:extended_image/src/utils.dart:109:12)
#2      RectExtension.beyond (package:extended_image/src/utils.dart:129:17)
#3      paintExtendedImage (package:extended_image/src/image/painting.dart:130:21)
#4      ExtendedRenderImage.paint (package:extended_image/src/image/render_image.dart:503:5)
#5      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#6      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#7      RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2924:15)
#8      RenderStack.paintStack (package:flutter/src/rendering/stack.dart:654:5)
#9      RenderStack.paint (package:flutter/src/rendering/stack.dart:670:7)
#10     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#11     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#12     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:144:15)
#13     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#14     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#15     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:144:15)
#16     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#17     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#18     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:144:15)
#19     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#20     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#21     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:144:15)
#22     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#23     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#24     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:144:15)
#25     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#26     PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:169:11)
#27     PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:112:5)
#28     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1137:31)
#29     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:518:19)
#30     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:865:13)
#31     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:381:5)
#32     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1289:15)
#33     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1218:9)
#34     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1076:5)
#38     _invoke (dart:ui/hooks.dart:147:10)
#39     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:338:5)
#40     _drawFrame (dart:ui/hooks.dart:112:31)
(elided 3 frames from dart:async)
The following RenderObject was being processed when the exception was fired: ExtendedRenderImage#da128
...  parentData: top=0.0; right=0.0; bottom=0.0; left=0.0; offset=Offset(0.0, 0.0) (can use size)
...  constraints: BoxConstraints(w=411.4, h=258.8)
...  size: Size(411.4, 258.8)
...  image: [3000×4000]
...  fit: contain
...  alignment: Alignment.center
...  invertColors: false
...  filterQuality: low
RenderObject: ExtendedRenderImage#da128
  parentData: top=0.0; right=0.0; bottom=0.0; left=0.0; offset=Offset(0.0, 0.0) (can use size)
  constraints: BoxConstraints(w=411.4, h=258.8)
  size: Size(411.4, 258.8)
  image: [3000×4000]
  fit: contain
  alignment: Alignment.center
  invertColors: false
  filterQuality: low
====================================================================================================

Example code (optional)
ExtendedImage.file(
    _pickedImageFile!,
    key: keyButton,
    fit: BoxFit.contain,
    extendedImageEditorKey: editorKey,
    mode: ExtendedImageMode.editor,
    enableLoadState: true,
    cacheRawData: true,
    clearMemoryCacheWhenDispose: true,
    initEditorConfigHandler: (
      ExtendedImageState? state,
    ) {
      return EditorConfig(
        maxScale: 10.0,
        // Only for debugging:
        editActionDetailsIsChanged: (EditActionDetails? details) {
          Rect? cropRect = editorKey.currentState?.getCropRect();
          print(cropRect);
        }
      );
    },
  ),

Contact
No response

please provide the url in your issue demo

I got the same problem when I continually zoom in and out. I found after calling the method, the rect will have NaN
Rect getFinalDestinationRect() {
_reachCropRectEdge = false;
if (screenDestinationRect != null) {
  /// scale
  final double scaleDelta = totalScale / preTotalScale;
  if (scaleDelta != 1.0) {
    Offset focalPoint = screenFocalPoint ?? _screenDestinationRect!.center;
    focalPoint = Offset(
      focalPoint.dx
          .clamp(
              _screenDestinationRect!.left, _screenDestinationRect!.right)
          .toDouble(),
      focalPoint.dy
          .clamp(
              _screenDestinationRect!.top, _screenDestinationRect!.bottom)
          .toDouble(),
    );

    _screenDestinationRect = Rect.fromLTWH(
        focalPoint.dx -
            (focalPoint.dx - _screenDestinationRect!.left) * scaleDelta,
        focalPoint.dy -
            (focalPoint.dy - _screenDestinationRect!.top) * scaleDelta,
        _screenDestinationRect!.width * scaleDelta,
        _screenDestinationRect!.height * scaleDelta);
    preTotalScale = totalScale;
    delta = Offset.zero;
  }

  /// move
  else {
    if (_screenDestinationRect != screenCropRect) {
      final bool topSame =
          _screenDestinationRect!.topIsSame(screenCropRect!);
      final bool leftSame =
          _screenDestinationRect!.leftIsSame(screenCropRect!);
      final bool bottomSame =
          _screenDestinationRect!.bottomIsSame(screenCropRect!);
      final bool rightSame =
          _screenDestinationRect!.rightIsSame(screenCropRect!);

      if (topSame && bottomSame) {
        delta = Offset(delta.dx, 0.0);
      } else if (leftSame && rightSame) {
        delta = Offset(0.0, delta.dy);
      }

      _screenDestinationRect = _screenDestinationRect!.shift(delta);
    }
    //we have shift offset, we should clear delta.
    delta = Offset.zero;
  }

  _screenDestinationRect =
      computeBoundary(_screenDestinationRect!, screenCropRect!);

  // make sure that crop rect is all in image rect.
  if (screenCropRect != null) {
    Rect rect = screenCropRect!.expandToInclude(_screenDestinationRect!);
    if (rect != _screenDestinationRect) {
      final bool topSame = rect.topIsSame(screenCropRect!);
      final bool leftSame = rect.leftIsSame(screenCropRect!);
      final bool bottomSame = rect.bottomIsSame(screenCropRect!);
      final bool rightSame = rect.rightIsSame(screenCropRect!);

      // make sure that image rect keep same aspect ratio
      if (topSame && bottomSame) {
        rect = Rect.fromCenter(
            center: rect.center,
            width: rect.height /
                _screenDestinationRect!.height *
                _screenDestinationRect!.width,
            height: rect.height);
        _reachCropRectEdge = true;
      } else if (leftSame && rightSame) {
        rect = Rect.fromCenter(
          center: rect.center,
          width: rect.width,
          height: rect.width /
              _screenDestinationRect!.width *
              _screenDestinationRect!.height,
        );
        _reachCropRectEdge = true;
      }
      totalScale =
          totalScale / (rect.width / _screenDestinationRect!.width);
      // init totalScale
      if (_rawDestinationRect!.isSame(_rawDestinationRect!)) {
        totalScale = 1.0;
      }
      preTotalScale = totalScale;
      _screenDestinationRect = rect;
    }
  }
} else {
  _screenDestinationRect = getRectWithScale(_rawDestinationRect!);
  _screenDestinationRect =
      computeBoundary(_screenDestinationRect!, screenCropRect!);
}
return _screenDestinationRect!;

}


Prometheus metrics relabeling

Hi,
Often there are use cases for Prometheus metrics relabeling rules to be set in a target configuration. For example we need to rewrite the cluster label in CNPG metrics because it collides with external labels. In prometheus-operator this is done adding a RelabelConfig list in many custom resources.
I'd like to submit a PR implementing this in the PodMonitor.
Cheers
Edit: my initial statement was wrong about needing a ServiceMonitor... working on it :)

Oh dear, I got confused to the extreme. Metrics I had issue with come from Clusters own PodMonitors.
Closing this. Sorry about the noise.


azurerm provider maintainer pointing finger at terragrunt for woes in 2.99 -> 3.3.0 upgrade

Anyone willing and able to help here:
https://github.com/hashicorp/terraform-provider-azurerm/issues/16540

It's going to be hard to pinpoint where in the chain the bug is coming up from while you are going through terragrunt.
My suggestion would be to cut terragrunt out of the equation by using terragrunt debug mode and use terraform directly with the terragrunt generated code. If the issue goes away, then it's clearly a bug in terragrunt. If the issue persists, terragrunt could still be an issue, but now we isolated the possibility to an issue in the code generation as opposed to the runtime.

something else is awry. doubt it terragrunt at this point given my most recent update on the azurerm ticket.  think that shows it ought be safe to close this out.

Well, as a maintainer, I can certainly see their point. If someone isn't using terragrunt, then they most likely don't understand what terragrunt is doing, and know if the bug is in the provider, terraform, or terragrunt, especially if they can't repro.
Using debug mode is useful as a tool in these cases to help see that:

Terragrunt is mostly doing code generation and then passing through to Terraform.
Identify a reproducible pure Terraform example to help all maintainers identify the bug.

If anything, it helps cut out the blame game relatively quickly.

In any case, we're happy to help if we identify that there is an issue in Terragrunt!


mode..common

Hello! Thank you for the work!!!
mode: {   styl: {     common: '$var'   }   }
Result:
.$var   background url("sprite.svg") no-repeat
Add points to a variable - bug. How can I remove '.'

@platonov8anton I'm sorry but I don't understand your question at all. Please try using code blocks to clear up the formatting of your question. Thanks!

Sorry!
I set in the config option: mode.css.common = '$social'
I wanted to get the file 'sprite.styl':
$social
	background url("social.svg") no-repeat

Now as a result of:
.$social
	background url("social.svg") no-repeat

The point in the beginning of the file

@platonov8anton Thanks for reformatting.
mode.<mode>.common is used as a class name to construct a common CSS rule and will thus be prefixed with a dot "." (as are all class based CSS selectors).
Unfortunately I'm not really familiar with the Stylus syntax, but I assume what you want to achieve is what mode.<mode>.mixin is for. Possible?

if mode.<mode>.prefix = 'svg-%s' and mode.<mode>.common = 'common' will result in:
.common /* good */
  background url("sprite.svg") no-repeat
.svg-namefolder--namefile /* good */
  background-position 0 0

if mode.<mode>.prefix = '$' and mode.<mode>.common = '$common' and mode.<mode>.mixin = 'mix' will result in:
mix() /* good */
  background url("sprite.svg") no-repeat
.$common /* bad */
  mix() /* good */
$namefolder--namefile /* good */
  background-position 0 0

if mode.<mode>.prefix = '$' and mode.<mode>.common = '' and mode.<mode>.mixin = 'mix' will result in:
mix() /* good */
  background url("sprite.svg") no-repeat
$namefolder--namefile /* good */
  mix() /* bad */
  background-position 0 0

I expected the same behavior!

@platonov8anton I'm sorry, but svg-sprite is behaving exactly as intended. There's no error happening here. As I mentioned earlier, mode.<mode>.common will always generate a class selector, which — by design — starts with a dot. Always. An empty mode.<mode>.common (like "") will result in no common selector being created. I don't see a problem here.
Please adhere to the features provided by svg-sprite but don't expect it to behave differently just because you would like it to do so.

Thank you for your time!


Unclear what you mean by UUID

Under Test your bot locally it says:

At this point you will see a UUID (/INSPECT attach <identifier>) in your debugging emulator. Copy the UUID and paste it to the chat box of the first emulator.

I am interpreting UUID as GUID, which would mean the 16-byte identifier. Pasting the UUID does not seem to have an effect on the debugger. Did you mean for us to paste the entire command rather than just the UUID?
You might have meant to imply that the entire command including the /INSPECT attach is the UUID, but that would be misleading.

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

ID: 3680526e-63bf-e7a8-9bef-355562590bdd
Version Independent ID: bd094bae-f4f6-c1c6-3039-23254129c495
Content: Debug a bot with inspection middleware - Bot Service - Bot Service
Content Source: articles/bot-service-debug-inspection-middleware.md
Service: bot-service
GitHub Login: @zxyanliu
Microsoft Alias: v-liyan

Hi @v-kydela
Thanks for reporting the issue. Let me look into it (has been a while...) and get back to you soon.

@v-kydela I think both UUID and GUID are 128-bit (16-byte) numbers and they seem to be quite similar. However, I saw some comments on their similarities/differences where people say that "In Microsoft-speak they are called GUIDs, but call them UUIDs when not using Microsoft-speak".
To avoid confusion to the readers, I think it's a good idea to change the term to be less technical such as "A unique ID number" instead of "UUID" or "GUID"? or what do you suggest?
Thanks and please let me know so that we do not confuse our readers.

Now that you've clarified that UUID and GUID do indeed mean the same thing, I am unconcerned with which one you pick. But the screenshot in step 5 shows the debugger window. It does not show anything having been pasted anywhere.

I was wondering if you see step  4.

At this point you will see a UUID (/INSPECT attach ) in your debugging emulator. Copy the UUID and paste it to the chat box of the first emulator.
Did you paste it to the chat box of the first emulator?

@zxyanliu - Please read the step and my post more carefully. In the step it says "Copy the UUID" and not "Copy the whole command." In my post it says:

Pasting the UUID does not seem to have an effect on the debugger. Did you mean for us to paste the entire command rather than just the UUID?

I understand that you are supposed to copy the command from the debugging Emulator and paste it into the first Emulator. I am trying to help you improve the misleading documentation that does not say to do that. You had mentioned that the screenshot shows what you're supposed to copy and paste, but it does not because it doesn't show the correct Emulator which you're supposed to paste something into. When you run the Emulator in debug mode, it doesn't even allow pasting. In order to disambiguate with a screenshot whether you're supposed to paste the UUID or the whole command, you'd need to show the window where the actual pasting has been done.

Hey @v-kydela
I am sorry for the confusion. I have made some updates in PR2147.
Thanks again for your report to help us improve. : -)

Closing because the updated content is live. Thanks.


Implement proper I2C transaction validation

Proper handling of I2C transactions aren't handled (i.e., an unexpected NAK from the sensor), at least not consistently.

Implemented I2C NAK handling more consistently in ea39f0c100f7e1ec5af255f65a35983e33290333
Sets a stop condition on the bus and returns FALSE.


Some songs don't have a lyric to them

{
"error": "Failed"
}
this happens when i try to get lyrics From a song on Genius

This only happens on certain songs

error i get
validator: 's.literal(V)',
given: '[Intro: DJ Kay Slay & \n' +
'Sheek Louch\n' +
']\n' +
'Trackateering Music\n' +
"Man, y'all did it with this one here, y'all\n" +
People love to use that quote, "I'm doin' it for the culture"\n +
"But what culture is that that you're talking about?\n" +
'The one that you claim as a hip-hop artist\n' +
"But won't do the research on hip-hop history\n" +
'Or the one where you disrespect, disconnect\n' +
'And disregard the founding fathers?\n' +
"But you know what?

Sorry, for late reply but can you give the url and tell what you expecting to happen


in game console does not detect commands

While running installer.exe I get the correct messages, but the ingame console does not detect any of the inputs.

The trainer is not loaded : are you sure you are running the proper EFT instance? you can double check with the file %LOCALAPPDATA%Low\Battlestate Games\EscapeFromTarkov\output_log.txt, search for an installation path (often along with Fallback handler could not load library errors). Perhaps you forgot to update your shortcuts to server.exe/launcher.exe files.


Log correct caller line number and more control over verbosity

I've made the following changes for inclusion in another project and thought I'd see if there was interest in upstreaming them:

Log the correct caller line number: Previously we logged the line number in this wrapper rather than the line number of the log statement in calling code.
Report verbosity based on both -v and zap lvl

Display glog.V(n) n <= 2 if zap.InfoLevel is enabled.
Display glog.V(n) n <= 4 if zap.DebugLevel is enabled.
Display of glog.V(n) n > 4 now controlled by -v=n flag.
NOTE: The package now declares the -v flag which is a breaking change if importing projects already declare the flag themselves, however, fits within the glog package interface.

I also added in dependency management via dep but that may or may not be desirable.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/assign @geeknoid

Instead of doing it in init, can you have something that just does:
read global logger
if global logger has changed
allocate a new logger object
So basically, cache the entry until the global logger changes, and then
realloc, etc.
On Mon, Aug 13, 2018 at 9:57 AM Andrew Pryde<EMAIL_ADDRESS>wrote:

@prydie commented on this pull request.
In glog.go https://github.com/istio/glog/pull/2#discussion_r209683999:

@@ -38,136 +98,167 @@ func Flush() {
zap.L().Sync()
}

-// V is a shim
+// skipLogger constructs a suggared logger with an additional caller skip to
+// ensure we log the correct line number.
+func skipLogger() *zap.SugaredLogger {

return zap.L().WithOptions(zap.AddCallerSkip(1)).Sugar()

It could be allocated in func int() but callers would need to swap in
their own configured logger explicitly via an analogue of
zap.ReplaceGlobals() https://godoc.org/go.uber.org/zap#ReplaceGlobals
which would mean the package was no longer a complete drop-in replacement
for glog.
With this implementation, the user can just call zap.ReplaceGlobals()
https://godoc.org/go.uber.org/zap#ReplaceGlobals directly and we'll use
their configured logger.
On reflection maybe the performance improvement is worth the tradeoff?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/istio/glog/pull/2#discussion_r209683999, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AVucHUEA12Wi9B1nYeOdeym5PXr6nSzEks5uQbAIgaJpZM4V6ZVc
.

@geeknoid hopefully the new implementation is better (and correct!):
Before
BenchmarkSkipLogger-4           10000000               175 ns/op

After
BenchmarkSkipLogger-4           50000000                36.8 ns/op

Only calling zap.S()
BenchmarkSkipLogger3-4          100000000               18.7 ns/op

@geeknoid Like so?

@geeknoid Ah! Of course. Should be good now 🙂

Please reopen if you have time to address the feedback.


cyclonev_mac cell

The Cyclone V has 18x18 bit multiplier cells, which Quartus calls cyclonev_mac. We should use them.

This seems to be a specific form of the DSP cell, which is even more useful.


JDK16 Pipeline config file is missing commas

What are you trying to do?
Run the JDK16 pipeline as a nightly.
Expected behaviour:
The relevant config file expects commas between the disparate elements.
Observed behaviour:
One set of commas is missing.
Any other comments:
Fix is here: https://github.com/AdoptOpenJDK/openjdk-build/pull/2253

Pipeline running: https://ci.adoptopenjdk.net/job/build-scripts/job/openjdk16-pipeline/196/


Add order by field into update query.

Problem
When using increment or decrement, the order of change is important. Because if you start adding a number or subtracting from the wrong side, it can cause an error on unique indexes.
Suggested solution
Add order by field for updateMany query
Alternatives
Only raw queries
Example:
client.tableName.updateMany({
  where: {
    AND: [
      {
        orderIndex: { gte: 1 },
      },
      {
        orderIndex: {  lt: 5 },
      },
    ],
  },
  data: {
    orderIndex: {
      increment: 1,
    },
  },
});

Roughly translate to:
UPDATE `table_name` SET `order_index` = (`table_name`.`order_index` + 1) WHERE (`table_name`.`order_index` >= 1 AND `table_name`.`order_index` < 5);

And this query will cause an error, because order_index is a unique index, and in the first updated row, a two will be set in a value that conflicts with the next line, which also has two.
The correct query should look like this, where the increment of the index starts from the other end, because of which there are no conflicts
UPDATE `table_name` SET `order_index` = (`table_name`.`order_index` + 1) WHERE (`table_name`.`order_index` >= 1 AND `table_name`.`order_index` < 5) ORDER BY id DESC;

Or how it should look on prisma:
client.tableName.updateMany({
  where: {
    AND: [
      {
        orderIndex: { gte: 1 },
      },
      {
        orderIndex: {
          lt: 5,
        },
      },
    ],
  },
  data: {
    orderIndex: {
      increment: 1,
    },
  },
  orderBy: {
    id: "desc"
  }
});

I understand that this situation occurs quite rarely, but still it is a necessary feature for me. Hope it gets added sometime

As a workaround you could first query in a defined order, then make a batch update
Ordered select
let dataToUpdate = await client.tableName.findMany({
  where: {
    AND: [
      {
        orderIndex: {
          gte: 1,
        },
      },
      {
        orderIndex: {
          lt: 5,
        },
      },
    ],
  },
  orderBy: {
    id: "desc"
  },
});

Batch update
await prisma.$transaction([
  dataToUpdate.map((row) => await client.tableName.update({
    where: {
      id: row.id,
    },
    data: {
      orderIndex: {
        increment: 1,
      },
    },
  });
  )
])

I'm not sure this is a bug or expected behaviour of orderBy
Ex:
Suppose there is a schema like below:
user one-to-many post

user (id, name)
post (id, user_id, status) // status enum: active and inactive

================================
CASE 1
user A has 5 posts
user B has 3 posts
my query
const result = this.prisma.user.findMany({
   orderBy: {
        posts: {
          _count: 'desc',
        },
      },
})

Expected result will be user A -> user B => it works perfectly

================================
CASE 2
user A has 5 posts (1 active posts, 4 inactive posts)
user B has 3 posts (3 active posts, 0 inactive posts)
my query
const result = this.prisma.user.findMany({
  where: {
     posts: {
       some: {
         status: 'ACTIVE' // find users that have active posts
     }
    }
  }
   select: {
     _count: {
       select: {
        posts: {
          status: 'ACTIVE' // count active post by users
       }
     }
    }
  }
   orderBy: {
        posts: {
          _count: 'desc',
        },
      },
})

Expected result will be user B -> user A because user B has more active posts (3) than user A (1)

Howerver, the result is user A -> user B. As far as I inspect that orderBy is just order basing on all posts of user, no matter the where condition or the real _count

@nicksan222 Yes, I'm already using this approach instead of raw queries. Thank you


external-reference.hashes keys MUST be from the open vocab

(treat it like an enum)

Will be handled by https://github.com/oasis-open/cti-stix2-json-schemas/issues/106


MM-24956 Add saving data to automation dashboard

Summary

Add saving data to automation dashboard - https://reportportal.io/
While adding e2e/utils/dashboard.js, I needed a function from the main run_tests.js.  Such file is getting bigger, so I ended up breaking common functions into utils folder.  The refactor is straightforward with minor changes only.
Introduce the use of .env to easily handle environment variables, especially on local development.
console logs are added to easily identify key points on CI run.

Note: This is tested working.

able to save artifacts in AWS S3
send reports to Community and BizOps channels
send report to automation dashboard

Ticket Link
JIRA ticket - https://mattermost.atlassian.net/browse/MM-24956

Did QA review before Dean. Please feel free to assign for re-review if needed.


[Bug]: Nvidia DALI and VLLM

Your current environment
Collecting environment information...
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35
Python version: 3.11.11 (main, Dec 11 2024, 16:28:39) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-130-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.6.85
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090
Nvidia driver version: 560.35.05
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        39 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               12
On-line CPU(s) list:                  0-11
Vendor ID:                            GenuineIntel
Model name:                           Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz
CPU family:                           6
Model:                                165
Thread(s) per core:                   2
Core(s) per socket:                   6
Socket(s):                            1
Stepping:                             5
CPU max MHz:                          4800.0000
CPU min MHz:                          800.0000
BogoMIPS:                             8199.79
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp pku ospke md_clear flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            192 KiB (6 instances)
L1i cache:                            192 KiB (6 instances)
L2 cache:                             1.5 MiB (6 instances)
L3 cache:                             12 MiB (1 instance)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-11
Vulnerability Gather data sampling:   Mitigation; Microcode
Vulnerability Itlb multihit:          KVM: Mitigation: VMX disabled
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds:                  Mitigation; Microcode
Vulnerability Tsx async abort:        Not affected
Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==<IP_ADDRESS>
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==<IP_ADDRESS>
[pip3] nvidia-cufft-cu12==<IP_ADDRESS>
[pip3] nvidia-curand-cu12==<IP_ADDRESS>
[pip3] nvidia-cusolver-cu12==<IP_ADDRESS>
[pip3] nvidia-cusparse-cu12==<IP_ADDRESS>
[pip3] nvidia-dali-cuda120==1.44.0
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvimgcodec-cu12==<IP_ADDRESS>
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.0
[pip3] torch==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.47.1
[pip3] triton==3.1.0
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] nvidia-cublas-cu12        <IP_ADDRESS>                 pypi_0    pypi
[conda] nvidia-cuda-cupti-cu12    12.4.127                 pypi_0    pypi
[conda] nvidia-cuda-nvrtc-cu12    12.4.127                 pypi_0    pypi
[conda] nvidia-cuda-runtime-cu12  12.4.127                 pypi_0    pypi
[conda] nvidia-cudnn-cu12         <IP_ADDRESS>                 pypi_0    pypi
[conda] nvidia-cufft-cu12         <IP_ADDRESS>                 pypi_0    pypi
[conda] nvidia-curand-cu12        <IP_ADDRESS>               pypi_0    pypi
[conda] nvidia-cusolver-cu12      <IP_ADDRESS>                 pypi_0    pypi
[conda] nvidia-cusparse-cu12      <IP_ADDRESS>               pypi_0    pypi
[conda] nvidia-dali-cuda120       1.44.0                   pypi_0    pypi
[conda] nvidia-ml-py              12.560.30                pypi_0    pypi
[conda] nvidia-nccl-cu12          2.21.5                   pypi_0    pypi
[conda] nvidia-nvimgcodec-cu12    <IP_ADDRESS>                  pypi_0    pypi
[conda] nvidia-nvjitlink-cu12     12.4.127                 pypi_0    pypi
[conda] nvidia-nvtx-cu12          12.4.127                 pypi_0    pypi
[conda] pyzmq                     26.2.0                   pypi_0    pypi
[conda] torch                     2.5.1                    pypi_0    pypi
[conda] torchvision               0.20.1                   pypi_0    pypi
[conda] transformers              4.47.1                   pypi_0    pypi
[conda] triton                    3.1.0                    pypi_0    pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.6.post1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      0-11    0               N/A
Legend:
X    = Self
SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX  = Connection traversing at most a single PCIe bridge
NV#  = Connection traversing a bonded set of # NVLinks
LD_LIBRARY_PATH=vllm/lib/python3.11/site-packages/cv2/../../lib64:/usr/local/cuda-12.6/lib64:/usr/local/cuda-12.6/lib64
CUDA_HOME=/usr/local/cuda-12.6
CUDA_MODULE_LOADING=LAZY
Model Input Dumps
No response
🐛 Describe the bug
Hi,
I am currently trying to integrate NVIDIA DALI with VLLM for VLM image captioning. I was wondering what the best way to input batches of torch.uint8 image tensors into the llm.generate() function. The VLM can be arbitrary.
from nvidia.dali.plugin.pytorch import DALIGenericIterator
from nvidia.dali import pipeline_def, Pipeline
import nvidia.dali.fn as fn
import nvidia.dali.types as types

@pipeline_def(batch_size=1, num_threads=4, device_id=0)
def wds_pipeline(wds_data):

    img, _ = fn.readers.webdataset(
        paths=wds_data,
        ext=["jpg", "png"],
        name="WDSReader",
        shard_id=Pipeline.current().device_id
    )

    decode_img = fn.decoders.image(img, device="mixed", output_type=types.RGB)

    resize_img = fn.resize(decode_img, device="gpu", size=[224, 224])

    return resize_img

pipe = wds_pipeline(wds_data)
pipe.build()

wds_dali_iter = DALIGenericIterator(pipe, ["data"])

for data in wds_dali_iter:
    for d in data:
        image_batch = d["data"]
        outputs = llm.generate(
            {
                "prompt": prompt,
                "multi_modal_data": {
                    "image": image_batch
                },
            }
        )

Error:
[rank0]: RuntimeError: Failed to apply on data={'text': 'Caption this image', 'images': tensor([[[[233, 240, 247],
[rank0]:           [233, 240, 247],
[rank0]:           [233, 240, 247],
[rank0]:           ...,
[rank0]:           [237, 244, 251],
[rank0]:           [237, 244, 251],
[rank0]:           [237, 244, 251]],

[rank0]:          [[233, 240, 247],
[rank0]:           [233, 240, 247],
[rank0]:           [233, 240, 247],
[rank0]:           ...,
[rank0]:           [237, 244, 251],
[rank0]:           [237, 244, 251],
[rank0]:           [237, 244, 251]],

[rank0]:          [[233, 240, 247],
[rank0]:           [233, 240, 247],
[rank0]:           [233, 240, 247],
[rank0]:           ...,
[rank0]:           [237, 244, 251],
[rank0]:           [237, 244, 251],
[rank0]:           [237, 244, 251]],

[rank0]:          ...,

[rank0]:          [[ 55,  55,  39],
[rank0]:           [ 57,  54,  39],
[rank0]:           [ 57,  52,  37],
[rank0]:           ...,
[rank0]:           [ 89,  86,  65],
[rank0]:           [ 85,  83,  62],
[rank0]:           [ 88,  88,  66]],

[rank0]:          [[ 54,  54,  37],
[rank0]:           [ 58,  56,  40],
[rank0]:           [ 57,  53,  38],
[rank0]:           ...,
[rank0]:           [ 93,  90,  69],
[rank0]:           [ 84,  82,  61],
[rank0]:           [ 85,  84,  62]],

[rank0]:          [[ 53,  53,  37],
[rank0]:           [ 59,  57,  41],
[rank0]:           [ 60,  55,  41],
[rank0]:           ...,
[rank0]:           [ 99,  96,  75],
[rank0]:           [ 99,  96,  75],
[rank0]:           [ 91,  91,  69]]]], device='cuda:0', dtype=torch.uint8)} with kwargs={}

Thank you,
Enrico
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

It's recommended that you load the image to PIL.Image.Image format as input of the .generate method.


Restructure asciidoctor-rfc to the Metanorma structure

Refactor asciidoctor-rfc into the same structure as asciidoctor-iso and asciidoctor-gb.

Which I take it means IsoDoc XML is the target of the the asciidoctor conversion, and RFC XML v2 and v3 are target Isodoc outputs.

Well said 👍

Since we have just published an RFC that works with direct RFC XML output, I'd rather this be a new gem, than a replacement for the current gem.

That's fine too.

Btw, I can't believe I'm saying this, but the code style of asciidoctor-rfc is so ugly with the benefit of an extra year coding, that redoing it from scratch is not as repulsive a prospect as it used to be. (Maintaining the existing gem is still necessary though.)

👍

@opoudjis meet Oleksii ( @nattfodd ), could you help provide him with instructions on how to convert this gem to the Metanorma gem structure? (hint: metanorma-acme and metanorma-iso as examples). It should produce RFC XML output, and perhaps also HTML and PDF output.

OK, this is somewhat convoluted.
The Metanorma suite of gems converts Asciidoctor to HTML, PDF and Word, via an intermediate Metanorma XML representation. There is  a gem for each standard supported: metanorma-iso, metanorma-rsd, metanorma-m3d, etc; metanorma-sample is an exemplar gem, and the parent gem that all gems inherit from is metanorma-standoc.
The gems are invoked by the metanorma-cli gem script exe/metanorma, with the -t argument indicating which type of standard to invoke (and therefore which gem to use). The conversion of Asciidoctor to the intermediate XML representation is done by the lib/asciidoctor code in each gem, and the conversion from the intermediate XML representation to HTML, PDF and Word is done by the lib/isodoc code (which inherits from the isodoc gem).
https://github.com/riboseinc/metanorma-iso/blob/master/docs/customisation.adoc provides an overview of how the gems are structured, as a guide  to customising them for a new standard.
Now, the asciidoctor-rfc gem was written before the metanorma suite, and it does not follow the same structure or outputs. It maps directly from Asciidoctor to RFC XML, an XML format defined by the RFC standards body (IETF). This is the prescribed format going forward for IETF submissions. It has two versions, both supported by the gem. v2 is supported by the IETF toolset, including its tools to generate TXT and HTML output. v3 is nicer (closer to HTML, for one); but while IETF has talked it up, it was not yet supported by their toolset last time I checked.
Oh, and the code is a good deal messier than the more recent metanorma code. Sorry.
The task is to bring the code in line with the metanorma gems: instead of mapping direct from Asciidoctor to RFC XML, we wish to map from Asciidoctor to Metanorma XML, and from Metanorma XML to RFC XML, as a (new) instance of lib/isodoc/rfcxml_convert, to parallel html_convert.
The Asciidoctor to Metanorma XML code is supposed to be fairly lightweight, with not much difference from what is implemented in metanorma-standoc. You can customise the instance of Metanorma XML  generated by the code, but you should only do so additively, to the extent needed to support the generation of RFC XML.
The Metanorma XML to RFC XML will be fairly new code; but if you take the isodoc gem's HTML output as a starting point, you will get at least structurally close.
I would focus on v2 for now, rather than v3. I also wouldn't be too concerned about HTML and PDF output for now; there is native tooling offered by IETF to convert RFC XML to HTML, and I'm wary about competing with it.
It's... a lot of code, and it's not as stable as I'd like; but that should get you started. Please ask questions often.

@abunashir are you open to this task? This involves refactoring this gem into a gem similar to https://github.com/riboseinc/metanorma-ogc. Thanks! 😉

Sure thing @ronaldtse, I will put this on my list. I will start working on it as soon as I am done with my pending task on another gem.


eqMac cannot install driver

I'm running Catalina 10.15.4. Downloaded the .DMG, mounted it, dropped the app in the app folder, ran it, gave it my password but after trying to install the driver for a few seconds, the window goes away although the icon in the dock bar is still lit, so when CMD+TAB back to it, it shows this:

So first, I shut down all running apps and tried again without success, then I rebooted and tried it first thing after login without success... then I ran the terminal uninstall command you have posted on the web site ... that didn't work either.
Is there a more direct way to get the driver installed? Like a sudo method perhaps?
Thank you

Try brew cask install eqmac

I have the same issue.
I tried uninstalling eqmac (remove from applications, run cleanup command in terminal), then installing the latest (v0.3.0) version manually from GitHub. Homebrew cask still only knows about v0.2.0, so I didn't try that. MacOS 10.14.6 (18G5033) here.

Can you please read through #317 and try some of the steps the user went through there. Make sure to use v0.3.1 when you try.

Restarting my mac.... oof, that's a big step to ask from a pro user like me! ;)
JK. I'll try that later, and the other steps described! Thanks for the response.

Haha! I know it's not ideal. The installation process is trying it's best to not have to restart, but unfortunately this process is not very predictable :(

Just rebooted, still cannot install driver. I'm not sure what steps I can take from #317, because it seems that that user does have eqMac running successfully, but had troubles upgrading the driver. I cannot even open eqMac from a clean installation without the driver install failure.

Try running these commands in Terminal:
sudo cp -f -r /Applications/eqMac.app/Contents/Resources/eqMac.driver /Library/Audio/Plug-Ins/HAL/
sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod or just restart your Mac

@nodeful Thanks man! sudo worked for me! Catalina 10.15.5.

@nodeful
macOS version 10.15.7
download the latest available eqMac.pkg from https://eqmac.app/
I've got the same dialog as @EasyG0ing1
Unfortunately, the abovementioned commands did not help me:
sudo cp -f -r /Applications/eqMac.app/Contents/Resources/eqMac.driver /Library/Audio/Plug-Ins/HAL/
cp: /Applications/eqMac.app/Contents/Resources/eqMac.driver: No such file or directory

Is there anything I am missing or I can provide to you for father investigation and resolution?

@nodeful
macOS version 10.15.7
download the latest available eqMac.pkg from https://eqmac.app/
I've got the same dialog as @EasyG0ing1
Unfortunately, the abovementioned commands did not help me:
sudo cp -f -r /Applications/eqMac.app/Contents/Resources/eqMac.driver /Library/Audio/Plug-Ins/HAL/
cp: /Applications/eqMac.app/Contents/Resources/eqMac.driver: No such file or directory

Is there anything I am missing or I can provide to you for father investigation and resolution?

Thanks for being patient with me.
I have just released v1.0.0. You can download it here: https://github.com/bitgapp/eqMac/releases/tag/v1.0.0
Or from the website: https://eqmac.app
Could you please let me know if this issue is still present.
Thanks again.
Roman

Upgrading from v? to v1.0.0 went smooth for me. Just in case: I did restart my mac when the installer prompted me to do so, and I closed all apps before proceeding with the installation. Please consider closing this issue.

Had same issue with the latest release, so I followed manual uninstall instructions as seen on project homepage FAQ section, still with no success. But eventually I realised that I still had the development version installed by Xcode Debug run, which apparently conflicted release bundle driver installation. So I completely wiped out all the installed artefacts produced by Xcode Build & Run finally, the fresh installation completed successfully, including the driver.
So if somebody ever tried Xcode to run development version, and forgot about that alter on, wiping it out should help.
Other cases might include permissions, etc., not my case, so I leave others to advise on here.

I have completely revamped the site now and added more instructions to the FAQ: https://eqmac.app#install
Closing this issue as seems like the driver install process isn't currently a major problem.
Thanks for the feedback everyone


Refresh Token when user log in with Google

Did someone manage to renew token from an expired accessToken? the thing is that renewing the token with username and password is possible, but when the users logs in with google, the google AuthCode is expired, and i don't want the user to relog with google again. Any ideas?

I never got it working. I had it setup where it would login every 30min - Just using a timeout

Yeah, for now i will just user username, password and provider until a solution is found


$ is not a function

const puppeteer = require('puppeteer');
const scrapeIt = require("scrape-it");

async function ssr(url) {
  const browser = await puppeteer.launch({
    args: ['--no-sandbox', '--disable-setuid-sandbox'],
    headless: true
  });
  const page = await browser.newPage();
  await page.goto(url, {waitUntil: 'networkidle0'});
  const html = await page.content();
  await browser.close();
  return html;
}
let crowfallNews = ssr("https://crowfall.com/en/news/articles");

function Scrape(html) {
  console.log(html);
  let result = scrapeIt.scrapeHTML(html, {
      articles: {
        listItem: ".ArticleList__article",
        data: {
          // Get the article date and convert it into a Date object
          date: {
            selector: ".ArticleCard__date",
            convert: x => new Date(x)
          },
          // Get the title
          title: {
            selector: ".ArticleCard__title"
          },
          link: {
            selector: "a",
            attr: "href"
          },
          //get image url
          image: {
            selector: ".ArticleCard__img",
            attr: "style",
            convert: x => x.concat('https', x.slice(x.search("images.ctfassets.net")))
          },
          content: {
            selector: ".ArticleCard__description",
            closest: "p"
          }
        }
      }
    });
}

Returns "$ is not a function" on line  "let result = scrapeIt.scrapeHTML(html, "
Confirmed that the website is rendering inside puppeteer and contains the class selectors used above. Using latest version, just reinstalled.
Any thoughts?

Please post the full error stack to be able to inspect this...

"version": "5.1.4"
(node:4126) UnhandledPromiseRejectionWarning: TypeError: $ is not a function
    at /Users/bon/work/realt-scrapper/node_modules/scrape-it/lib/index.js:166:30
    at iterateObject (/Users/bon/work/realt-scrapper/node_modules/iterate-object/lib/index.js:28:17)
    at handleDataObj (/Users/bon/work/realt-scrapper/node_modules/scrape-it/lib/index.js:149:9)
    at Function.scrapeIt.scrapeHTML (/Users/bon/work/realt-scrapper/node_modules/scrape-it/lib/index.js:237:12)
    at Object.convert (/Users/bon/work/realt-scrapper/newBuildingsLun.js:192:38)
    at /Users/bon/work/realt-scrapper/node_modules/scrape-it/lib/index.js:228:34
    at iterateObject (/Users/bon/work/realt-scrapper/node_modules/iterate-object/lib/index.js:28:17)
    at handleDataObj (/Users/bon/work/realt-scrapper/node_modules/scrape-it/lib/index.js:149:9)
    at Function.scrapeIt.scrapeHTML (/Users/bon/work/realt-scrapper/node_modules/scrape-it/lib/index.js:237:12)
    at Timeout.setTimeout [as _onTimeout] (/Users/bon/work/realt-scrapper/newBuildingsLun.js:160:33)

in my case some selectors were missing. but why does it break everything?


Decoding issue

When scanning a QR code with the following value:
YAZBNS5-T7TTTOJ-G4UZATU-BAF2SOG-LMXMDH2-Z5PDXF6-27SUVQ7-NS6FGA5
It returns this:
undefinedAundefinedBundefinedSundefined-undefined7undefinedTundefinedOundefined-undefined4undefinedZundefinedTundefined-undefinedAundefined2undefinedOundefined-undefinedMundefinedMundefinedHundefined-undefined5undefinedDundefinedFundefined-undefined7undefinedUundefinedQundefined-undefinedSundefinedFundefinedA5

Thanks for reporting this issue. I believe I've narrowed down the problem and have a fix in master. I should be able to deploy it to npm in the next few days.

Great, Thank you for the quick fix. 👍
I will test it out when it is released and hopefully close the issue.

@JodusNodus Just wanted to provide an update here - This was fixed (I believe) in https://github.com/cozmo/jsQR/pull/12/commits/beef8b9ad0feb925c2d63d9006ea12c9d1ef1b4f, which was on master since that PR but just got published to npm as version 2.0.1 tonight.
Sorry for the delay in publishing, that was our bad :(
I'm going to close the issue as fixed, feel free to re-open if you find this is still an issue.


Fix php generated code test

Fix php generated code test. The generated code expected the caller to pass in an object thru the constructor, instead of just the hostname.
I believe Michael already submited a pull request for this. I just want to practice submiting a pull request on my own for the first time. Feel free to discard this.

duplicate with pull request 1181

For reference, you can link directly to a pull request with # and its number, like #1181

Ah good to know. Thanks!


Watch injector ConfigMap when local config is absent

As part of #27707
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
[X] Does not have any changes that may affect Istio users.
This should only affect istiod deployments that are manually edited to remove mounting of the inject volume

@tbarrella: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
6f5d95ca4c8641652f0b948c68cb583d951d6b48
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test release-notes_istio


Implement a Trimming Utility

Implement a command line utility to trim capture files to a user specified range of frames.
Depends on #182 for tracking API state prior to start of trimmed range of frames.

A combination of the replay tool and capture layer can be used to trim existing capture files.


Remove make build-all

make build-all won't work on cross-platform builds.  For example on macOS:
% make build-all

Building /Users/michaeldockter/senzing.git/go-sdk-abstract-factory//target/darwin-amd64/go-sdk-abstract-factory
Building /Users/michaeldockter/senzing.git/go-sdk-abstract-factory//target/linux-amd64/go-sdk-abstract-factory
# github.com/senzing/go-sdk-abstract-factory/factory
factory/factory.go:109:46: undefined: g2configbase.G2config
factory/factory.go:144:52: undefined: g2configmgrbase.G2configmgr
factory/factory.go:179:54: undefined: g2diagnosticbase.G2diagnostic
factory/factory.go:214:46: undefined: g2enginebase.G2engine
factory/factory.go:249:48: undefined: g2productbase.G2product
make: *** [linux/amd64] Error 1

Pull requests:

https://github.com/Senzing/go-sdk-abstract-factory/pull/95


textillate not working on js loaded html

I'm trying to run textillate on html that has been loaded dynamically but it refuses to run. Here is a fiddle to illustrate what I mean. http://jsfiddle.net/hGKHH/
Is it meant to run on dynamic html?

Is there no way to change the text dynamically?  I just want to change the text and re-textillate it.


add a force render option

I wanted to be able to force a render when using a form in an alert
the render method was too late because alerts animate in

small change - merging


Kce 57 create a readme.md for the kpsr ocv tutorial

note some HTML comments, not visible at markdown rendering

branch moved to KCE-60


list_servers() returns empty list every time

no matter how many servers the aternos side of things can see the list_servers() function always returns []

my code
aternos = python_aternos.Client.from_credentials("username", "password")
servers = aternos.list_servers()
print(servers)

output
[]

however the aternos account i used has access to 8 servers

Could you send me the full HTML code of aternos.org/servers page (e.g. using Chrome DevTools)?

Python 3.10.5 (main, Jun  6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from python_aternos import Client
>>> at = Client.from_credentials('world35g', 'world35g')
>>> at
<python_aternos.atclient.Client object at 0x7fb553d69780>
>>> srv = at.list_servers()
>>> srv
[<python_aternos.atserver.AternosServer object at 0x7fb55818c970>]
>>> srv[0].subdomain
'world35g'

Also, try logging in to my test account: world35g, password world35g.
There must be one server.

Will do, I'll get back to you

More detailed issue: #29
This one will be closed.


Enhance Reducer.ifLet child effect cancellation

Right now, ifLet checks the presented state before and after it runs the parent reducer, and if it changes, it cancels any in-flight effects for the previous state. It will not, however, detect when child state changes outside the parent reducer, e.g.:
Reduce { state, action in
  // ...
  state.child = nil // or `= .someOther(child)`
}

Reduce { state, action in
  // ...
}
.ifLet(\.$child, action: /Action.child) {
  Child()
}

While we generally recommend structuring reducers in a way in which this doesn't happen, as a library we should attempt to improve the situation. In our case @PresentationState already uses some internal state to detect if it needs to install the child's dismiss effects, e.g. if it was deep-linked into at app launch. We can leverage this same state to detect if it needs to tear down the previous child's effects.
This PR's solution should improve cancellation in these edge cases, but it may not (and may not be able to) handle every case.
We should explore an equivalent solution for .forEach.

Added support for forEach. Both have the problem where if the internal state is fully replaced (e.g. a parent of a parent resets the presentation or stack state), the child reducer won't have access to the before state, but we'll need to make some more foundational changes before we can address that.


Entries with title.length < 10 are ignored

https://github.com/ndaidong/feed-reader/blob/master/src/main.js#L55
Any idea why?

It's not easy to find an article with title < 10 letters. So if I get an entry as such, there is often an issue somewhere.


Make sensitive fields pseudo-password fields to avoid password managers hijacking values

initially reported by @thegulshankumar and evidenced as likely affecting many users in https://staticword.press/t/issues-pushing-to-s3-after-24-48-hours/73
Ideally, we shouldn't surface the credentials in the browser at all, but due to the current way we allow for a user to input settings and start an export without first needing to save options/refresh screen, there would need to be bigger task to AJAX post sensitive fields while being input.
Hmm, the latter sounds like a better solution for the long-term, so will leave this issue open to decide on which approach to take short/long term.

Can we try autocomplete="new-password"  to let browser treat as new credential for the specific page?
source: Mozilla

Looks perfect, thanks @thegulshankumar!


RSI contract

Add RSI contract
Add rsi unit tests
Fix accumulation to set 0.5 percent change

LGTM


[SR-12849] Inefficient/broken .prefix() implementation on .lazy collection views

Previous ID
SR-12849

Radar
rdar://problem/63487263

Original Reporter
@ktoso

Type
Bug

Additional Detail from JIRA

Votes
1

Component/s
Standard Library

Labels
Bug

Assignee
None

Priority
Medium

md5: 6ecff5e3f62cd93e9d95eb3621436f7f

Issue Description:
There's two issues here but they are very related to each other.
Consider the following snippet (will be simplified more below):
var alreadySeen: Set<Int> = [3, 2, 1]

func take(_ ss: [Int]) -> [Int] {
    let x = ss.lazy.filter { s in
        print("already seen: \(alreadySeen)")
        print("s = \(s)")
        let ins = alreadySeen.insert(s).inserted
        print("ins = \(ins)")
        return ins
    }.prefix(1)

    return Array(x)
}
take([222,333])

This program results in a crash (and other not nice effects, explained below):
{{ already seen: [3, 2, 1]}}
{{ s = 1221}}
{{ ins = true}}
{{ already seen: [1, 3, 222, 2]}}
{{ s = 23}}
{{ ins = true}}
{{ already seen: [1, 3, 222, 2, 333]}}
{{ s = 1221}}
{{ ins = false}}
{{ already seen: [1, 3, 222, 2, 333]}}
{{ s = 23}}
{{ ins = false}}
Fatal error: Can't form Range with upperBound < lowerBound: file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1<IP_ADDRESS>/swift/stdlib/public/core/Range.swift, line 709
{{ 2020-05-21 16:35:43.692653+0900 repl_swift[35798:2288596] Fatal error: Can't form Range with upperBound < lowerBound: file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1<IP_ADDRESS>/swift/stdlib/public/core/Range.swift, line 709}}
{{ Execution interrupted. Enter code to recover and continue.}}
Problems with this output:

The crash. Sure, one may argue that the collection view should side effect in the filter, but the crash is pretty nasty and a result of:

The collection gets iterated twice

Last but not least: the lazy...prefix combination does not stop the iteration when n elements are found, rather, ALL elements are traversed each time.

More mini examples:
func test(_ arr: [Int]) -> [Int] {
     var invocationCount = 0
     let x: LazyFilterCollection<Array<Int>> = arr.lazy.filter { s in
         invocationCount += 1
         return s == 1 // "search for 1"
     }
     defer {
         print("invoked \(invocationCount) times")
     }
     return Array(x.prefix(1)) // we only want 1 element
}

> test(Array(1...10000))
invoked 20001 times
$R6: [Int] = 1 value {
  [0] = 1
}

That is a lot of extra iterations for finding the first element in this array.
Expected:

when prefix(1) is used, there should not be a need to iterate over the rest of the collection once `n` elements are collected

there should not be a need to traverse the collection twice.

—
We did some digging with @Lukasa, and the troublesome places for this behavior are around:

LazyFilterSequence not specializing prefix()

and thus defaulting to use the Collection's impl which does:
@inlinable
public _consuming func prefix( maxLength: Int) -> SubSequence {
_precondition( maxLength >= 0, "Can't take a prefix of negative length from a collection")
let end = index(startIndex, offsetBy: maxLength, limitedBy: endIndex) ?? endIndex
return self[startIndex..<end]
}

which calls startIndex multiple times (we suspect that's the "multiple times" traverse), since the startIndex is implemented as:
 public var startIndex: Index {
   var index = _base.startIndex
   while index != _base.endIndex && !_predicate(_base[index]) {
     _base.formIndex(after: &index)
   }
   return index
 }

on the lazy filter view.
And that explains the crasher as well – since the contents of the view changed depending on how many times it's run (it collects the "seen" elements), the indexes don't align anymore and we get the Range crash.
Fixing the lazy view's prefix to correctly iterate only once should fix this behavior.
Also, it should stop iteration once enough elements are collected.

For reference, a similar feature in Scala exhibits the correct behavior:
scala> var i = 0; val v = (1 until 10000).view.filter { x =>
     |   i +=1; x == 1
     | }.take(1).toList
var i: Int = 1
val v: List[Int] = List(1)

I had a look at the "more mini examples" part, and it does indeed call this Collection method:
https://github.com/apple/swift/blob/1ecd9388eca329fecf03904032875b08ce47445f/stdlib/public/core/Collection.swift#L1324-L1332
As a result, Array(Array(1...10000).lazy.filter({ $0 == 1 }).prefix(1)) invokes its closure 20001 times:

1x to find the startIndex
10000x to find the next index end (it does not exist, so endIndex)
10000x to copy each element in self[startIndex..<end] to the array

The problem in this case is that .prefix(1) returns a SubSequence. Luckily, there's a different overload:
var a = 0
var b = 0

Array(Array(1...10000).lazy.filter({ a += 1; return $0 == 1 }).prefix(1) as LazyFilterSequence<[Int]>.SubSequence)
Array(Array(1...10000).lazy.filter({ b += 1; return $0 == 1 }).prefix(1) as PrefixSequence<LazyFilterSequence<[Int]>>)

print(a) // 20001
print(b) // 1

I thought I'd solve this issue with some collection algorithm, but it appears to be about overload resolution.


[Bug]Meet IB problem in single node experiment?

Hi developers,
It is a really nice work and I try to reproduct in one node with 8 gpus. However, I meet the IB problems below in both UT and collective communication case.
The UT
command:
mpirun -np 2 ./test/mp_unit_tests

The all_reduce_test in c++
command:
mpirun --bind-to numa -np 8 ./test/mscclpp-test/allreduce_test_perf -b 3m -e 48m -G 100 -n 100 -w 20 -f 2 -k 5

In my view, the gpu communication intra a single node is unrelated to IB, right?
Could you help fix this problem or maybe some walkarounds?

Please refer this comment: https://github.com/microsoft/mscclpp/issues/254#issuecomment-1926355914


Update release date for network-traversal and common package

Update release date for network-traversal and common package

In my previous PR I changed communication-identity to be 1.1.2 assuming they would release today, Sep 7. Since they won't release today, I'm undoing my changes over communication identity to be 1.1.1 which is the latest released version. It is ok to do that since I'm the one that changed to 1.1.2 and that wasn't released.

/azp run java - azure-communication-networktraversal - tests


prefer crypto:strong_rand_bytes/1

I just see the cowlib use the strong_rand_bytes/1 to replace the rand_bytes/1.
So I add the code here, see
Fix #39

merged and reverted again strong bytes can throw exceptions.

Mate I appreciate your contributions and enthusiasm but I must ask you to be a bit more diligent before opening a PR. It's neither fun for you to have your changes reverted nor is it fun for me to nit pick over every change and investigate every function.
If you read the documentation of strong_random_bytes it will throw errors of the random source is out of data this can be quite fatal and doesn't sound like a very great idea.

Sorry. I had read the doc before I made a PR, and I know to add the catch before the function,  but I think it is worth doing it. A little change must be made.


[Impeller] AHB swapchains on emulators are not functional.

Rendering to AHB swapchains on emulators via a Vulkan command buffer doesn't populate the buffer.

linux AHB will swap connections.

While this worked on my local emulator it did not work on the CI emulator.


Describe Persona Overviews

Describe personas and ways they'll use this product

Persona 1: KDNK
Problem/Pain points:
-Looks at multiple calendar and event providers to filter out events for the day
-Needs mainly Carbondale-specific events
-Community/public events as a priority
-No religious events
Needs:
-Event aggregator to see all events in one place
-Ability to single out Carbondale events
-Ability to identify community and public events
-Ability to filter out religious events
-They need a one-liner description of each event
-They need the venue, time, and date of each event

Persona 2: Carbondale Arts
Problem/ Pain points:

Needs:
-Event aggregator to see all events in one place
-Ability to single out Carbondale events
-Ability to identify artistic events
-They need the venue, time, and date of each event
-Shareability of events


performance in sched_yield (multisocket)

Hi!!!
I'm using mumps with openblas 0.2.18 compiled from sources with this options:

gcc 5.3.0
USE_THREAD = 1
NUM_THREADS = 128
NO_WARMUP = 1
#NO_AFFINITY = 1
#BIGNUMA = 1
MAX_STACK_ALLOC = 8128

I'm running my code in some machines multisocket (2 or 4) with 24 until 128 cores
The problem is that most of the time is executed by the system. To be more acurate is doing not I/O is doing Context switch. You can see it in the below pictures

This doesn't happend in 1 socket machine, but if I force to use just one CPU (taskset -c 0-31 MyAPP) the performance is also poor.
What can I do to give you more information and try to help¿¿¿

How big is data sample? What CPU? Maybe all the time is spent ripping tiny data sample between CPU caches or NUMA nodes?

sched_yield is that descheduling your flawed automated debugger is recommending.
man sched_yield ?

@phirus2 What is are the size of the GEMM ? Could you get a sample of them with adding a trace in interface/gemm.c or with a debugger ?
 Anyway if blocks are small we should not even enter in blas_thread_server so that's odd.

There is no 32-core intel CPU being manufactured
Results are fake at best. There is no issue.

hwloc-info
depth 0:        1 Machine (type #1)
 depth 1:       4 NUMANode (type #2)
  depth 2:      4 Socket (type #3)
   depth 3:     4 L3Cache (type #4)
    depth 4:    64 L2Cache (type #4)
     depth 5:   64 L1dCache (type #4)
      depth 6:  64 L1iCache (type #4)
       depth 7: 64 Core (type #5)
        depth 8:        128 PU (type #6)

cat /proc/cpuinfo | grep -i "model name" -B4 | tail -n5
processor       : 127
vendor_id       : GenuineIntel
cpu family      : 6
model           : 63
model name      : Intel(R) Xeon(R) CPU E7-8860 v3 @ 2.20GHz

model CPU
@brada4 As you can see it is not a fake CPU.
@jeromerobert Ok i'm execute a bigger problem and give you the sizes of my sistem to analize what is happening

I'm resolving an sparse matriz equation with this sizes:

A ==> [(505050) x (505050) ] == [125k x 125k]. For each row there is 7 nz value. So the matriz has aprox 7MB
B /X ==> [505050] == [125k] ~= 1MB

But internally is doing LU decomposition and I guess it' is using dens matriz. because the total ram used by the program is ~1GB. Changing the size to 100x100x100 the total size of the problem went up to ~15GB. I think is enough big to share avoid that context switch
The profiler info of openBlas is
        ====== BLAS Profiling Result =======

  Function      No. of Calls   Time Consumption   Efficiency  Bytes/cycle  Wall Time(Cycles)
idamax        :    5306040            0.19%           0.000%      2.75   875257291
dgemm         :    9533360           91.66%           2.334%      0.85   353009864
dtrsm         :    6395160            8.15%           3.402%      0.75   -425599732
 --------------------------------------------------------------------
Total         :   21234560                            2.416%      0.85

The extra info of mumps is ....
 =================================================
 MUMPS compiled with option -Dmetis
 =================================================
L U Solver for unsymmetric matrices
Type of parallelism: Working host

 ****** ANALYSIS STEP ********

 Resetting candidate strategy to 0 because NSLAVES=1

 ... Structural symmetry (in percent)=   98
 ... No column permutation
 Ordering based on METIS
 ELAPSED TIME SPENT IN METIS reordering  =      0.9891

Leaving analysis phase with  ...
INFOG(1)                                       =               1
INFOG(2)                                       =          208155
 -- (20) Number of entries in factors (estim.) =        85425349
 --  (3) Storage of factors  (REAL, estimated) =        85425349
 --  (4) Storage of factors  (INT , estimated) =         2406061
 --  (5) Maximum frontal size      (estimated) =            3644
 --  (6) Number of nodes in the tree           =           52849
 -- (32) Type of analysis effectively used     =               1
 --  (7) Ordering option effectively used      =               5
ICNTL(6) Maximum transversal option            =               0
ICNTL(7) Pivot order option                    =               7
Percentage of memory relaxation (effective)    =              20
Number of level 2 nodes                        =               0
Number of split nodes                          =               0
RINFOG(1) Operations during elimination (estim)=   1.449D+11
 ** Rank of proc needing largest memory in IC facto        :         0
 ** Estimated corresponding MBYTES for IC facto            :       964
 ** Estimated avg. MBYTES per work. proc at facto (IC)     :       964
 ** TOTAL     space in MBYTES for IC factorization         :       964
 ** Rank of proc needing largest memory for OOC facto      :         0
 ** Estimated corresponding MBYTES for OOC facto           :       278
 ** Estimated avg. MBYTES per work. proc at facto (OOC)    :       278
 ** TOTAL     space in MBYTES for OOC factorization        :       278
 ELAPSED TIME IN ANALYSIS DRIVER=       1.2585
Entering DMUMPS 5.0.1 driver with JOB, N, NZ =   5      132651        1061208

 ****** FACTORIZATION STEP ********

 GLOBAL STATISTICS PRIOR NUMERICAL FACTORIZATION ...
 NUMBER OF WORKING PROCESSES              =             1
 OUT-OF-CORE OPTION (ICNTL(22))           =             0
 REAL SPACE FOR FACTORS                   =      85425349
 INTEGER SPACE FOR FACTORS                =       2406061
 MAXIMUM FRONTAL SIZE (ESTIMATED)         =          3644
 NUMBER OF NODES IN THE TREE              =         52849
 MEMORY ALLOWED (MB -- 0: N/A )           =             0
 Convergence error after scaling for ONE-NORM (option 7/8)   = 0.85D+00
 Maximum effective relaxed size of S              =     116410103
 Average effective relaxed size of S              =     116410103
 GLOBAL TIME FOR MATRIX DISTRIBUTION       =      0.0203
 ** Memory relaxation parameter ( ICNTL(14)  )            :        20
 ** Rank of processor needing largest memory in facto     :         0
 ** Space in MBYTES used by this processor for facto      :       964
 ** Avg. Space in MBYTES per working proc during facto    :       964

 ELAPSED TIME FOR FACTORIZATION           =      7.0425
 Maximum effective space used in S   (KEEP8(67))  =      97008403
 Average effective space used in S   (KEEP8(67))  =      97008403
 ** EFF Min: Rank of processor needing largest memory :         0
 ** EFF Min: Space in MBYTES used by this processor   :       805
 ** EFF Min: Avg. Space in MBYTES per working proc    :       805

 GLOBAL STATISTICS
 RINFOG(2)  OPERATIONS IN NODE ASSEMBLY   = 1.642D+08
 ------(3)  OPERATIONS IN NODE ELIMINATION= 1.449D+11
 INFOG (9)  REAL SPACE FOR FACTORS        =      85425349
 INFOG(10)  INTEGER SPACE FOR FACTORS     =       2406061
 INFOG(11)  MAXIMUM FRONT SIZE            =          3644
 INFOG(29)  NUMBER OF ENTRIES IN FACTORS  =      85425349
 INFOG(12)  NUMBER OF OFF DIAGONAL PIVOTS =            15
 INFOG(13)  NUMBER OF DELAYED PIVOTS      =             0
 INFOG(14)  NUMBER OF MEMORY COMPRESS     =             0
 ELAPSED TIME IN FACTORIZATION DRIVER=       7.0875

 ****** SOLVE & CHECK STEP ********

 STATISTICS PRIOR SOLVE PHASE     ...........
 NUMBER OF RIGHT-HAND-SIDES                    =           1
 BLOCKING FACTOR FOR MULTIPLE RHS              =           1
 ICNTL (9)                                     =           1
  --- (10)                                     =           0
  --- (11)                                     =           0
  --- (20)                                     =           0
  --- (21)                                     =           0
  --- (30)                                     =           0
 ** Rank of processor needing largest memory in solve     :         0
 ** Space in MBYTES used by this processor for solve      :       961
 ** Avg. Space in MBYTES per working proc during solve    :       961

 TIME to scatter right-hand-sides =       0.002222
 TIME in solution step (fwd/bwd)  =       0.383480
  .. TIME in forward (fwd) step   =          0.237609
  .. TIME in backward (bwd) step  =          0.145850
 TIME to gather solution          =       0.001802
 ELAPSED TIME IN SOLVE DRIVER=       0.4491
Entering DMUMPS 5.0.1 driver with JOB, N, NZ =   5      132651        1061208

.

@phirus2 I'm not sure how to deduce the size (m x n) of the gemm blas calls from this information. I (we ?) don't the MUMPS internal and don't know how it use GEMM. You have to get this information from OpenBLAS it self with adding trace or using gdb.

Do you see an improvement when you limit the number of threads to the count of full-featured cores ? Hyperthreading is not going to help for compute-intensive tasks, what you see could be each two threads competing for access to the floating-point hardware.

I thought that but decreasing the number of threads (64, 32, 16) the performance efficiency is the same. Even fixing to same cores using taskset to avoid the context switch. But I still have the poor performance efficiency.
@jeromerobert have modified the src to print the headers of dgemm. First of all... there are soooo many calls in just one iteration of mumps solver (110k) and seems that many of them are matrix of ¿1x1?
TRANSA:N  TRANSB:N  M:1  N:1  K:1 alpha:-1.000000 a:-0.140344  ldA:2 b:1.572134 ldb:2  beta:1.000000  c:0.000000  ldc:2
TRANSA:N  TRANSB:N  M:1  N:1  K:1 alpha:-1.000000 a:-0.141675  ldA:2 b:1.583998 ldb:2  beta:1.000000  c:0.000000  ldc:2
TRANSA:N  TRANSB:N  M:1  N:1  K:1 alpha:-1.000000 a:-0.142773  ldA:2 b:1.593849 ldb:2  beta:1.000000  c:0.000000  ldc:2
TRANSA:N  TRANSB:N  M:1  N:1  K:1 alpha:-1.000000 a:-0.142272  ldA:2 b:1.589344 ldb:2  beta:1.000000  c:0.000000  ldc:2
TRANSA:N  TRANSB:N  M:1  N:1  K:1 alpha:-1.000000 a:-0.140708  ldA:2 b:1.575375 ldb:2  beta:1.000000  c:0.000000  ldc:2
TRANSA:N  TRANSB:N  M:1  N:1  K:1 alpha:-1.000000 a:-0.140055  ldA:2 b:1.569573 ldb:2  beta:1.000000  c:0.000000  ldc:2
TRANSA:N  TRANSB:N  M:1  N:1  K:1 alpha:-1.000000 a:-0.142308  ldA:2 b:1.589665 ldb:2  beta:1.000000  c:0.000000  ldc:2

Actually there are:

~45k calls with N * M == 1
~71k calls with N * M < 36
~100k calls with N * M < 1000
~10k calls with 1000<N*M<10000
~2k calls with 10000<N*M<244000

So the problem is of mumps an his partitioning????

So the problem is of mumps an his partitioning????

Yes and that was expected. I don't think any sparse solver could rely on BLAS for parallelization. OpenBLAS dgemm will only enable threading when M* N * K > 8192 * GEMM_MULTITHREAD_THRESHOLD (= 32768 most of the time). So in your case very few of them will be run in parallel.
The problem is that in OpenBLAS does not select the number of threads very smartly. If you have a matrix with MNK = 32769 it will run on all the core. In your case it will be very inefficient because 32769 is much to small for 64 cores. I guess that even 244000 is much too small for 64 cores. That's why sched_yield takes so much time in your profiling. Too be more efficient we should select the right number of threads between 1 and 64 depending on the size of the matrix (ex: 4 or 6 for MNK=24400). But this is not implemented.
To get good performance with MUMPS you should use MPI not multi-threading. If you absolutely want a shared memory solution, try PaStiX.

You have 4 10-core cpus
7mb is microscopic, best results are in 10 cores and less

45k calls to m.n=1 should not call gemm but gemv instead

Absolutely agree. Thousands of gemm with 1x1 'matrix' is a mistake.
Thanks for the advise and the explanation of the limits of parallelization. I will take a look to that library pastix and also report the results to mumps

You can see NUMA stride in sysctl. You need at least a stride per multicore CPU in node, never less

Hi,
I just spoke with some of the mumps developpers : to him, it seems impossible that mumps calls so many GEMMs of size 1x1 (unless you have a very specific matrix). During factorization, a sparse matrix will progressively become dense (because of the fill-in) , so sparse solvers (like mumps or pastix) actually manipulate dense matrices (maybe not big enough to be efficient on large number of cores). Is it possible that these 1x1 GEMM actually come from openblas himself (wrapped from gemv or axpy or...) ?

@gsylvand I don't know where come from. I just know is that function was launched such times with these params. The matrix which we work is a tridiagonal with 4 more diagonals (2 upper and 2 lower).
I would appreciate know how to open a bug or an issue in mumps. Because in the website I didn't see it. Just contact info

AFAIK, there is no bugtracker for mumps, but there is a mailing list<EMAIL_ADDRESS>where developpers are responding quite quickly. This is where I go when I have a bug with mumps...

Perhaps put a breakpoint on gemm (or more specific, add a conditional somewhere in gemm that does a printf when matrix size is just 1x1 and put the breakpoint on that printf line) and trace that invocation back "up" to see if it an OpenBLAS function that split it up like that, or if the matrix was 1x1
all the way back to mumps ?

Lets set up some debug code
add 2 lines to interface/gemm.c
Index: interface/gemm.c
===================================================================
--- interface/gemm.c    (revision 6436)
+++ interface/gemm.c    (working copy)
@@ -38,6 +38,7 @@

 #include <stdio.h>
 #include <stdlib.h>
+#include <signal.h>
 #include "common.h"
 #ifdef FUNCTION_PROFILE
 #include "functable.h"
@@ -387,6 +388,7 @@
 #endif

   if ((args.m == 0) || (args.n == 0)) return;
+  if ((args.m==1)&&(args.n==1)&&(args.k==1)) raise(SIGABRT);

 #if 0
   fprintf(stderr, "m = %4d  n = %d  k = %d  lda = %4d  ldb = %4d  ldc = %4d\n",

Then run your program from gdb (i.e 'gdb ./yourprogram', inside gdb 'r')
It will bail out when it reaches suboptimal case you pointed out
once gdb catches the break run

bt
c
few times to find unique call chains leading there (and check where 1x1 matrix starts)
Once done with that and still with time also check cases where m or k == 1 and it should be vector-to-matrix op, and where n==1 it should be vector-to-vector op

Oops. You also need to skip building of 'tests' in toplevel makefile as this code will make them bail out too...

Note that sched_yield() creates a set of interesting OS level issues. I've noticed a > 10% throughput increase by doing
--- OpenBLAS-0.2.16/common.h~   2016-03-15 18:49:10.000000000 +0000
+++ OpenBLAS-0.2.16/common.h    2016-06-12 16:12:41.864694505 +0000
@@ -349,7 +349,7 @@
*/
#ifndef YIELDING
-#define YIELDING       sched_yield()
+#define YIELDING       usleep(10)
#endif

@phirus2 did this ever get resolved ? I looked through the archives of the mumps-users mailing list since june but did not see anything that appeared to match your problem.

This change seems to be a particularly bad for the performance of small and especially medium-sized matrices.    While it's true that sched_yield() is a hot spot (in the above benchmark it's taking 20% of the runtme), if you look at traces with usleep it's not doing any better (and in many cases worse).  I believe the issue with sched_yield() is that it causes synchronization in the kernel, but I'm not sure how to get around that.  At the very least usleep (also pthread_yield) are worse.
I'd strongly recommend reverting this change.

That is the first time I have seen anybody in favor of sched_yield... in my tests with smaller numbers of cpus, the performance difference seemed negligible - except on one particular laptop where sched_yield led to serious thermal throttling. Intel cpus were the only ones to use sched_yield() while ARM,POWER, and even AMD/x86 all have some variation of "asm(nop);"  I believe "fenrus75" who commented above is a senior engineer on Intel's Linux team.
Perhaps there is something peculiar about our GEMM threading or this particular benchmark that skews the numbers ? (BTW; what is your hardware and operating system - if you happen to be on
*BSD or something else non-Linux, perhaps the scheduler behaves differently there and the change
should have been made for Linux only ?)

This is a debian-like linux distro that we use here at Google (so not BSD-based) with Intel CPUs (Xeon E5-1650, to be precise).  It's possible that this benchmark skews things, but I'm curious why OpenBLAS doesn't use something like select, (e)poll, or even a condition to wait rather than yielding.  Looping over a yield is generally not a good pattern to use for waiting until there is work to be done, and the kernel is quite good at fd-based triggers (Android, for example, does this extensively via epoll for very high-performance triggering, though I'm running these benchmarks on a desktop).

openmp does the same (poll) so there's some precedent.
doing a "rep nop" (aka pause) is great for very short delays,
for longer delays it's better to put the cpu into an idle state (so that
the power budget can be re-allocated)
one of the interesting questions is if the matrix blocks for threading are
too small for newer cpu systems
On Mon, Jun 11, 2018 at 7:06 AM oon3m0oo<EMAIL_ADDRESS>wrote:

This is a debian-like linux distro that we use here at Google (so not
BSD-based) with Intel CPUs (Xeon E5-1650, to be precise). It's possible
that this benchmark skews things, but I'm curious why OpenBLAS doesn't use
something like select, (e)poll, or even a condition to wait rather than
yielding. Looping over a yield is generally not a good pattern to use for
waiting until there is work to be done, and the kernel is quite good at
fd-based triggers (Android, for example, does this extensively via epoll
for very high-performance triggering, though I'm running these benchmarks
on a desktop).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/xianyi/OpenBLAS/issues/900#issuecomment-396255686,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPeFbKX0FneXWn3XZ4bnepWgPTvOfBMks5t7nl0gaJpZM4Iql30
.

@oon3m0oo could you try usleep(0) and usleep(1) instead of usleep(10) and tell the result?
It looks like useless sleep gets just added to each call when it is meant to be sched_yield but with less waste.

OpenMP calls sched_yield from kmp_yield (I'm looking at llvm's version), but that is a very small fraction of trace time in what I'm seeing.  It's worth noting that OpenBLAS's choice of YIELDING shows up a large fraction of the time for both OpenMP and non-OpenMP builds.  I'm actively looking into this now. =)
It's possible the profiles are wrong,  They're telling me that the calls to routine() (line 296) in blas_server_omp are causing yielding, and I'm not sure I understand that.

I'll readily admit that I had next to zero experience with multithreading and associated topics before I got trapped in OpenBLAS maintenance (hence my lame "appeal to authority" above). "#define YIELDING sched_yield()" goes back to GotoBLAS2-1.13 (the 1.08 version even had "YIELDING" defined to nothing).
OpenMP is "believed to be" slower but "mostly" thread safe, while the pure pthreads build may still house some bugs (although I believe to have fixed the major ones in the past two years with the help of valgrind and thread sanitizer, but this brings us back to the first sentence of this comment). Pure pthreads with USE_SIMPLE_THREADED_LEVEL3 set may be a safe(r) option.

multithreading topics are a few PhD's worth of stuff.
so to be more pragmatic, how about

revert the change for now until we collect better data
we figure out which benchmarks matter
collect data

I will either do this myself or find help in my team with this, hopefully
oon3mm0oo can help as well
On Mon, Jun 11, 2018 at 7:33 AM Martin Kroeker<EMAIL_ADDRESS>wrote:

I'll readily admit that I had next to zero experience with multithreading
and associated topics before I got trapped in OpenBLAS maintenance (hence
my lame "appeal to authority" above). "#define YIELDING sched_yield()" goes
back to GotoBLAS2-1.13 (the 1.08 version even had "YIELDING" defined to
nothing).
OpenMP is "believed to be" slower but "mostly" thread safe, while the pure
pthreads build may still house some bugs (although I believe to have fixed
the major ones in the past two years with the help of valgrind and thread
sanitizer, but this brings us back to the first sentence of this comment).
Pure pthreads with USE_SIMPLE_THREADED_LEVEL3 set may be a safe(r) option.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/xianyi/OpenBLAS/issues/900#issuecomment-396265115,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPeFRPDI_henDCSBxwRFSZ2sPJfg-8Qks5t7n_UgaJpZM4Iql30
.

@fenrus75 I suspect just fixed delay is added with 10us, maybe even twice since it gets called in main thread too. 0us would hide the issue for some time to come.
Lets wait if it helped (in previous discussion around sched_yield i suspect nobody tested with high precision timers.

On rereading #923 and my earlier PR #1051 I am ashamed to notice that partial results back then already pointed to a performance decrease from using usleep rather than rep(no). (What brought me back to the topic was seeing the usleep patch in the clearlinux repo...) I'll revert this in a minute.

the hybrid would be an exponential-backoff style... sleep 0 for a bit, then
1 then 2 .. upto 10
putting the cpu into an idle state has system level performance benefits,
the other cores can run faster, so I do not want to discount the value of
that.
(this is not universal across all possible CPUs)
On Mon, Jun 11, 2018 at 7:58 AM Andrew<EMAIL_ADDRESS>wrote:

@fenrus75 https://github.com/fenrus75 I suspect just fixed delay is
added with 10us, maybe even twice since it gets called in main thread too. 0us
would hide the issue for some time to come
https://github.com/xianyi/OpenBLAS/issues/900#issuecomment-396259664.
Lets wait if it helped (in previous discussion around sched_yield i
suspect nobody tested with high precision timers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xianyi/OpenBLAS/issues/900#issuecomment-396273814,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPeFTLZyDFv0U7QrmtCKhlO_NlR4zukks5t7oV-gaJpZM4Iql30
.

FWIW I see more consistent performance when using __builtin_ia32_pause() rather than usleep() for those mid-sized matrices.  @fenrus75, what's your take on that?  I recall Intel recommended using that for busy loops a while back, though I have no idea if it's still a good thing on modern architectures (though it removed the bump in medium-sized matrices for me).    It just uses https://github.com/google/benchmark and runs through various sizes as shown in my comments, generates three random matrices, and calls [sd]gemm_ many times in a loop.  I can see about uploading it to OpenBLAS, but we'd need to clean it up a bit (using an internal library for something minor).

builtin_ia32_pause probably corresponds to the asm "pause" or "rep(nop)" instruction ? With the very small matrices, how many threads are there (or who is yielding to whom ? I assume you do not count the time spent setting up the random matrices)

(I'd love a standardized benchmark)
pause (aka "rep nop") is a good instruction for polling busy wait. It is
basically a "bubble" in the cpu pipeline of between 100 to 500 cpu cycles
(varies a little by cpu model).
This bubble means that a hyperthreading sibling gets to core to itself, but
it also means power consumption is reduced for this period (and reduced
power consumption may lead to other cores being able to go faster)
sched_yield() is sort of the worst, it makes the cpu busy (including cross
cpu locks in the kernel) while not getting any useful work done.
for very small matrixes I am surprised we even get down these code paths..
any synchronization costs likely outweigh the threading benefits
On Mon, Jun 11, 2018 at 8:24 AM oon3m0oo<EMAIL_ADDRESS>wrote:

I should say, my benchmark is pretty simple. It just uses
https://github.com/google/benchmark and runs through various sizes as
shown in my comments, generates three random matrices, and calls [sd]gemm_
many times in a loop. I can see about uploading it to OpenBLAS, but we'd
need to clean it up a bit (using an internal library for something minor).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xianyi/OpenBLAS/issues/900#issuecomment-396283113,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPeFXzwn4dkkZ8kwRY8ShVCaq9D9kCHks5t7ovHgaJpZM4Iql30
.

What's odd is there should really be no threads for small matrices.  I've been wondering about this for a few days now, why performance gets worse for very small matrices when there are no threads (that is, we are definitely under the threshold) but threading is enabled in the build.  I'll have to profile just the small matrices, but I'm bogged down by something else right now.  Should we open up a new issue just for this or keep it all here?

I think having a separate issue for "threading is used for too small
matrixes" makes sense, I'd like to be on it tho ;)
On Mon, Jun 11, 2018 at 8:41 AM oon3m0oo<EMAIL_ADDRESS>wrote:

What's odd is there should really be no threads for small matrices.
I've been wondering about this for a few days now, why performance gets
worse for very small matrices when there are no threads (that is, we are
definitely under the threshold) but threading is enabled in the build. I'll
have to profile just the small matrices, but I'm bogged down by something
else right now. Should we open up a new issue just for this or keep it all
here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xianyi/OpenBLAS/issues/900#issuecomment-396288791,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPeFUQewABrH8VNA9VkzvIjFBFAnACxks5t7o-zgaJpZM4Iql30
.

I'm building with #define MONITOR in blas_server.c now. Maybe there are lingering threads created during initialization of the library (there is a timeout variable in Makefile.rule for these) that somehow manage to interfere. The curious difference between running with and without OPENBLAS_NUM_THREADS=1 for a workload that should use only one thread is also noted in #1544 (but that issue thread is pretty much frogged, so feel free to start a new one)

Given that this is a closed issue, I am going to go ahead and start a new thread for small matrix performance with threading enabled (@oon3m0oo and I are colleagues).

https://github.com/xianyi/OpenBLAS/issues/1614 started.


feat(artifact): add "references" support

Signed-off-by: Ramkumar Chinchani<EMAIL_ADDRESS>
What type of PR is this?

Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

# artifact media-type
regctl artifact put --media-type "application/vnd.oci.artifact.manifest.v1+json" --annotation demo=true --annotation format=oci --artifact-type "application/vnd.example.icecream.v1" localhost:8080/artifact:demo <<EOF
test artifact
EOF

regctl manifest get localhost:8080/artifact:demo

regctl artifact get localhost:8080/artifact:demo

regctl artifact list localhost:8080/artifact:demo

regctl artifact put --subject localhost:8080/artifact:demo << EOF
test reference
EOF

regctl artifact list localhost:8080/artifact:demo

+ regctl artifact list --filter-artifact-type application/vnd.example.icecream.v1 localhost:8080/artifact:demo
Subject:                                        localhost:8080/artifact:demo

Referrers:

  Name:                                         localhost:8080/artifact@sha256:d1516843be4ee55eefd1a2a3edcb4eb98e49e638e8f914490a5bcd70231b2aff
  Digest:                                       sha256:d1516843be4ee55eefd1a2a3edcb4eb98e49e638e8f914490a5bcd70231b2aff
  MediaType:                                    application/vnd.oci.image.manifest.v1+json
  ArtifactType:                                 application/vnd.example.icecream.v1
  Annotations:
    demo:                                       true
    format:                                     oci
Annotations:
  org.opencontainers.references.filtersApplied:

regctl artifact list localhost:8080/artifact:demo
Subject:        localhost:8080/artifact:demo

Referrers:
Name:         localhost:8080/artifact@sha256:d1516843be4ee55eefd1a2a3edcb4eb98e49e638e8f914490a5bcd70231b2aff
Digest:       sha256:d1516843be4ee55eefd1a2a3edcb4eb98e49e638e8f914490a5bcd70231b2aff
MediaType:    application/vnd.oci.image.manifest.v1+json
ArtifactType: application/vnd.example.icecream.v1
Annotations:
format:     oci
demo:       true

That output looks reversed. The listing of artifacts that refer to demo shouldn't be the demo artifact itself. From my own testing:
$ regctl image copy localhost:5000/regclient/regctl:edge localhost:5207/regclient/regctl:edge

$ echo "hello artifact" | regctl artifact put --artifact-type application/example.demo --media-type application/vnd.oci.artifact.manifest.v1+json localhost:5207/regclient/regctl:artifact

$ echo "hello image" | regctl artifact put --artifact-type application/example.demo localhost:5207/regclient/regctl:image

$ echo "hello subject" | regctl artifact put --artifact-type application/example.demo --subject localhost:5207/regclient/regctl:edge

$ regctl tag ls localhost:5207/regclient/regctl
artifact
edge
image

$ regctl artifact list localhost:5207/regclient/regctl:edge
Subject:   localhost:5207/regclient/regctl:edge

Referrers:

$ regctl artifact get localhost:5207/regclient/regctl:image
hello image

$ regctl artifact get localhost:5207/regclient/regctl:artifact
hello artifact

The listing of artifacts that point to edge shouldn't be empty.

Latest change works for me. 👍🏼


Inconsistent UI for problem webpage

Describe the bug
The web page colour seems to be changing whenever I scroll down the page of any problem.
To Reproduce
Steps to reproduce the behavior:
Go to any problem and scroll down.
Screenshots
If applicable, add screenshots to help explain your problem.

Contexts
Please complete the following information:

Codewars username (if account related): ganeshtata
OS: Ubuntu 16
Browser: firefox
Browser Version:72.0b10

Did this appear not long ago? Does the issue persist in older Firefox versions, or other browsers? Are there any errors in the console or anything weird happening with CSS? Without this information the issue is as good as "something bad, please fix".

Are there any errors in the console or anything weird happening with CSS?

@FArekkusu I am not really sure as to what you mean by "anything weird happening with CSS". I am not very familiar with CSS. I see this in the console -

@ganeshtata Can you try in Incognito/Private Window with all extensions disabled? Also, is there anything logged in console?
Some extensions are known to cause issues like #1979.

@kazk Thank you for the suggestions! It was a problem with one of my extensions - https://addons.mozilla.org/en-US/firefox/addon/night-mode-pro-w/.
Thank you! Closing this issue.


Template

Current coverage is 96.55% (diff: 91.30%)

Merging #22 into master will decrease coverage by 1.90%

@@             master        #22   diff @@
==========================================
  Files             2          3     +1
  Lines            65         87    +22
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits             64         84    +20
- Misses            1          3     +2
  Partials          0          0

Powered by Codecov. Last update dc75790...884b2d8