Update gpsnav app to 0.03 with waypoint editor

This version has a waypoint editor that uses the interface mechanism. Consequently, it is invoked by clicking on the download data icon from app icon in the app loader. This is a little misleading as the waypoint editor both downloads and then updates the edited waypoints.json data to the Bangle.

Wow, nice - thanks!
This has come up before - it seems the 'interface' system itself works ok, but the icon/'download' name is wrong? I'm very happy to get that changed, but spectre's out of the box icons aren't that great: https://picturepan2.github.io/spectre/elements/icons.html

Yes, it’s the icon. What about using the same  ‘icon-menu’ used for the customised apps? It would not be confusing as it is in a different place and both actions result in interacting with a new pane/window.
Sent from my iPad

On 18 May 2020, at 09:18, Gordon Williams<EMAIL_ADDRESS>wrote:

Wow, nice - thanks!
This has come up before - it seems the 'interface' system itself works ok, but the icon/'download' name is wrong? I'm very happy to get that changed, but spectre's out of the box icons aren't that great: https://picturepan2.github.io/spectre/elements/icons.html
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I guess... I bet people will still get confused :) What about icon-edit or icon-more-horiz?

Icon-edit is good for me, however, icon-more-horiz might be more general. Of course, it’s probably better to leave it as is - people do not like change:-)
Sent from my iPad

On 18 May 2020, at 10:01, Gordon Williams<EMAIL_ADDRESS>wrote:

I guess... I bet people will still get confused :) What about icon-edit or icon-more-horiz?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


Linux testing

this is for misc linux testing

Click to see more
Got a Linux Distro? Test Arroost here! using specifications from here

the base of a reply that I would use

click here to see reply base
I'm testing using [insert linux distro]
Camera controls
Carrying
Clicking
Targeting
Connecting
Open questions

When you're 'targeting', what do you expect to happen if you click-and-drag something?
[answer]

When you're 'targeting' with a cell, should you be able to 'cancel' or 'leave' the targeting? How would you try to do that?
[answer]

------------------------------------------------------------------------------------------------------------------------------------------------

click here to see reply base without formatting, for easy copy paste
# I'm testing using [insert linux distro]
## Camera controls
## Carrying
## Clicking
## Targeting
## Connecting
## Open questions

 When you're 'targeting', what do you expect to happen if you click-and-drag something?
 [answer]

  When you're 'targeting' with a cell, should you be able to 'cancel' or 'leave' the targeting? How would you try to do that?
 [answer]

i'm testing using SteamOS 3
Camera controls
everything works how it should, and it feels good
Carrying
everything works how it should, and it feels good
Clicking
everything works how it should, and it feels good
Targeting
everything works how it should
Connecting
everything works how it should
Open questions

When you're 'targeting', what do you expect to happen if you click-and-drag something?
I would expect to be able to drag something when I click and drag it, even when targeting

When you're 'targeting' with a cell, should you be able to 'cancel' or 'leave' the targeting? How would you try to do that?
yes, i would probably try to press esc to get out of it

Brill! That's great to hear! Thanks for your thoughts on the two open questions. I've opened two issues for them: #155 #154
Also, on linux, I assume that middle-click still works for pointer interactions 🤔 At this point, I don't expect that pasting would interfere with it 🤔

yeah, middle click works the same at left click

@allcontributors please add @loglot for test


BUG:Card style changed in responsive

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
@VanshKing30
in responsive phone design card widht increase
check this image:

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Can you solve this issue ??

@VanshKing30 I would like to work on that please assign me


Make it responsive

Setting the height and width, should set the render size, but it should still resize to the parent container.

Should already be responsive


When I use the bot I can't play at all, any idea why?

I removed Adblock Plus and it still didn't work... So I don't know why.. It just stays at this empty screen
http://i.imgur.com/GAP3Jq4.jpg
using latest version of chrome

Did you see any errors in the console? Right Click -> Inspect Element -> Console.

http://i.imgur.com/MVgf0Be.jpg

Disable the loader if you're gonna use the other two.

I did and now I get this
http://i.imgur.com/P8yRE10.jpg


How to export zet type back to array?

I can use the zet, now it return zet, how to export it as array?

I found it. Use Array.from(zet) works.


PUT http://fhirtest.uhn.ca/baseDstu2/Slot/23552?_format=xml&_pretty=true returns error 500

When I tried to update Slot resource - I've got the HTTP/1.1 500 Internal Server Error
Yesterday it worked.

The same picture with Appointment update
<Appointment xmlns="http://hl7.org/fhir">
   <id value="23586"/>
   <meta>
      <versionId value="1"/>
      <lastUpdated value="2015-09-24T11:26:20.049-04:00"/>
   </meta>
   <status value="booked"/>
   <start value="2015-09-25T09:00:00"/>
   <end value="2015-09-25T09:30:00"/>
   <participant>
      <actor>
         <reference value="Practitioner/23274"/>
      </actor>
   </participant>
   <participant>
      <actor>
         <reference value="Patient/23576"/>
      </actor>
      <status value="accepted"/>
   </participant>
</Appointment>

HI there, same issue as #229 . Can you try it again?

Hello James,
It seems service is down - I've got 503 message - 503 Service Temporarily Unavailable
Thanks,
Andrew

Man, what remarkable bad luck.
We've been up without any interruption for months and months, then an upgrade screws it up. Yesterday we were knocked offline for about 12 hours yet again because of a power outage in our data centre. Do you mind to try once more? :)

Hello James,
Thank you for the quick turn around. I tried operations I had mentioned and it seems that everything works as needed.
Thanks,
Andrew

Hello James,
Regretfully after some period of time update was broken again...I started to get 500 error.
Thanks,
Andrew

Argh, thanks for letting me know!
I thought I had reset the database sequence back to the correct value but it looks liike I had not. It should be fixed now.


Type 'T' does not satisfy the constraint 'TypedDocumentData

Hello, thank you for the awesome library :D I actually started my own version tonight but then came across yours!
I am making a wrapper function over my calls that constrains what document interfaces are available, basically making a compile time schema check
import * as admin from 'firebase-admin';
import { TypedCollectionReference, TypedQuery } from 'typesafe-node-firestore';

interface Author {
  penName: string;
  shortBiography: string;
  posts: string[];
}

interface Comment {
  id: string;
  text: string;
}

export type IDatabaseSchema = Author | Comment;

export const getDocsFromCollection = async <T extends IDatabaseSchema>(collection: string) => {
  const collectionRef = admin
    .firestore()
    .collection(collection) as TypedCollectionReference<T>;

  let whereQuery: TypedQuery<T>;
};

The error is on the last line
Type 'T' does not satisfy the constraint 'TypedDocumentData<T>'.
  Type 'IDatabaseSchema' is not assignable to type 'TypedDocumentData<T>'.
    Type 'Author' is not assignable to type 'TypedDocumentData<T>'.
      Index signature is missing in type 'Author'.

It seems that a type alias can't be used, it will only work for an interface? Is there a way to constrain it to certain interfaces? Thank you for help!

So, a caveat first, I am a beginner in TypeScript. Someone that knows more may have a better answer, but based on the error I think the problem is that you're not extending the right type. The T used here must extend firestores DocumentData. I played with your example and made the error go away by changing your getDocsFromCollection like so:
import * as firestore from '@google-cloud/firestore'
export const getDocsFromCollection = async <T extends IDatabaseSchema & firestore.DocumentData>(collection: string) => {

This is because the T used in TypedDocumentData extends firestore.DocumentData.

Yesss that worked perfectly, thank you for the help!


Wait time between playlist

Checklist

[x] I'm reporting a feature request
[x] I've verified that I'm running youtube-dl version 2019.05.20
[x] I've searched the bugtracker for similar feature requests including closed ones

Description

It would be desirable for YouTube DL to have the option to set a timeout between each download video. When using the --batch-file command you can not configure wait times between each link, this would be useful for some sites that can block you from accessing the API.

--sleep-interval SECONDS         Number of seconds to sleep before each
                                 download when used alone or a lower bound
                                 of a range for randomized sleep before each
                                 download (minimum possible number of
                                 seconds to sleep) when used along with
                                 --max-sleep-interval.
--max-sleep-interval SECONDS     Upper bound of a range for randomized sleep
                                 before each download (maximum possible
                                 number of seconds to sleep). Must only be
                                 used along with --min-sleep-interval.

--sleep-interval and --max-sleep it's used (in pluralsight) to wait between each VIDEO, but what i want is to wait between each video collection (in pluralsight case is a course). For example, if i want to download a course, wihc is compose by many videos, the parameters is used to wait between EACH video, not between each course i put into my batch video list. I think this two parameters arn't for this....

you can use windows pc timeout command

Linux sleep command

youtube-dl www.
timeout 300 (second)
youtube-dl www.

this function can cause youtube premium worth nothing ...

To be fair, there ain't much of a point to YT Premium anyway.


com.alipay.sofa.rpc.core.exception.SofaRouteException

Describe the bug
A clear and concise description of what the bug is.
Expected behavior
Actual behavior
Steps to reproduce
Minimal yet complete reproducer code (or GitHub URL to code)
Environment

SOFARPC version:
JVM version (e.g. java -version):
OS version (e.g. uname -a):
Maven version:
IDE version:

已经提了


Improve docs to better explain how to procedurally set values

Let's assume that we don't want to use the zoom tool, but we wanted to click a button and have it zoom in. Obviously this can be done because we control value and pass it to viewer. But how should it be done?

Hi,
With the version 1.* you have to use ViewerHelper, there are a lot of available methods and with this you have also a method to perform zoom.
import {ViewerHelper} from 'react-svg-pan-zoom';
...
let zoom = 1.1;
let viewerX = viewerWidth / 2;
let viewerY = viewerHeight / 2;
let nextValue = ViewerHelper.zoom(value, zoom, viewerX, viewerY);

At this moment I'm working on react-svg-pan-zoom 2.0.0 and I'm improving remote controls (I know that now it's not well explained).

Perfect! Thanks so much!

You're welcome

released with version 2.0


Added vars for registration to the tests

Autoupdate test lacked of vars to perform the registration. This commit adds the variables.

[citest]


Adding deprecation warning for using package in deployment file

Closes issue #393
Fix 1: Produce WARNING when deployment file has package instead of packages:
wskdeploy -p /Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/flagstests/
==> Output: 2017/08/30 01:42:19 Unmarshal Openwhisk info from internet
2017/08/30 01:42:19 Using /Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/flagstests/manifest.yaml for deployment
2017/08/30 01:42:19 The URL is https://openwhisk.ng.bluemix.net/api, selected from .wskprops
2017/08/30 01:42:19 The auth key is set, selected from .wskprops
2017/08/30 01:42:19 The namespace is ****, selected from .wskprops
2017/08/30 01:42:19 WARNING: The package YAML key in deployment file will soon be deprecated. Please use packages instead as described in specifications.
2017/08/30 01:42:19 Deploying package helloWorldFlags ...
2017/08/30 01:42:20 Done!
2017/08/30 01:42:20 Deploying action helloWorldFlags/greeting ...
2017/08/30 01:42:20 Done!
Done!
Deploying rule myRule ... Done!
2017/08/30 01:42:20
Deployment completed successfully.

Fix 2: Update all the deployment files we have, replacing package with packages:
Original:
application:
  name: sampleApp
  package:
    name: samplePackage
    actions:

Updated to:
application:
  name: sampleApp
  packages:
    samplePackage:
      actions:

Fix 3: wskdeploy was failing to provide parameters from deployment file while deploying actions, they were inserted as "string" instead of actual value:
/wskdeploy -m tests/src/integration/flagstests/manifest.yaml -d tests/src/integration/flagstests/deployment.yml -i -v
2017/08/30 13:16:27 Unmarshal Openwhisk info from internet
2017/08/30 13:16:27 The URL is https://openwhisk.ng.bluemix.net/api, selected from .wskprops
2017/08/30 13:16:27 The auth key is set, selected from .wskprops
2017/08/30 13:16:27 The namespace is *****, selected from .wskprops
         ____      ___                   _    _ _     _     _
        /\   \    / _ \ _ __   ___ _ __ | |  | | |__ (_)___| | __
   /\  /__\   \  | | | | '_ \ / _ \ '_ \| |  | | '_ \| / __| |/ /
  /  \____ \  /  | |_| | |_) |  __/ | | | |/\| | | | | \__ \   <
  \   \  /  \/    \___/| .__/ \___|_| |_|__/\__|_| |_|_|___/_|\_\
   \___\/              |_|

Packages:
Name: helloWorldFlags
    bindings:

  * action: greeting
    bindings:
        - place : "string"
        - name : "string"
    annotations:

Triggers:
* trigger: locationUpdateFlags
    bindings:
    annotations:

 Rules
* rule: myRule
    - trigger: locationUpdateFlags
    - action: helloWorldFlags/greeting

Do you really want to deploy this? (y/N):

With this PR:
./wskdeploy -m tests/src/integration/flagstests/manifest.yaml -d tests/src/integration/flagstests/deployment.yml -i -v
2017/08/30 13:11:04 Unmarshal Openwhisk info from internet
2017/08/30 13:11:04 The URL is https://openwhisk.ng.bluemix.net/api, selected from .wskprops
2017/08/30 13:11:04 The auth key is set, selected from .wskprops
2017/08/30 13:11:04 The namespace is ****, selected from .wskprops
         ____      ___                   _    _ _     _     _
        /\   \    / _ \ _ __   ___ _ __ | |  | | |__ (_)___| | __
   /\  /__\   \  | | | | '_ \ / _ \ '_ \| |  | | '_ \| / __| |/ /
  /  \____ \  /  | |_| | |_) |  __/ | | | |/\| | | | | \__ \   <
  \   \  /  \/    \___/| .__/ \___|_| |_|__/\__|_| |_|_|___/_|\_\
   \___\/              |_|

Packages:
Name: helloWorldFlags
    bindings:

  * action: greeting
    bindings:
        - name : "Bernie"
        - place : "Vermont"
    annotations:

Triggers:
* trigger: locationUpdateFlags
    bindings:
    annotations:

 Rules
* rule: myRule
    - trigger: locationUpdateFlags
    - action: helloWorldFlags/greeting

Do you really want to deploy this? (y/N):

this is ready to review :)

@pritidesai @lzbj
Please do not use log. any more. We need to get rid of it for our message management.


Remove assert from ShardedDeviceArray staging.

This would erroneously fail on Cloud TPU because the TPU client has its own buffer type.

It looks like travis failed spuriously and I can't imagine how this change would introduce failures specific to 32-bit mode, so I'm gonna submit this anyway.


Files with the same name in different paths override each other in temp folder

This will avoid overlapping.

Any update on this? Larger projects are bound to have files with duplicate names within separate folders (like the one I'm working on right now).
Is there a config option I'm not aware of that can have the tmp folder be structured like the source folder?

Fixed in v0.2.9


GH-234: fix TypeScript declarations

Please ensure your pull request adheres to the following guidelines:

[x] make sure to link the related issues in this description
[x] when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues
#234
This PR fixes #234 by removing a reference to ./fetch/errors in api.d.ts and providing a definition for the SystemError type (extracted from a JSDoc block of fetch/errors.js)

Closing/reopening to trigger the CLA check.

Thanks for the PR!


Smoke test bits

Run DB and GIT based tests in parallel rto save time.
Output was "12 out of 10 tests passed", reversed those figures...
Renamed file to remove trace of 'newdeploy' command.

LGTM!
No errors, no warnings. :shipit:

  Generated by :no_entry_sign: Danger

Codecov Report

Merging #742 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #742   +/-   ##
=======================================
  Coverage   56.07%   56.07%
=======================================
  Files         259      259
  Lines       14990    14990
=======================================
  Hits         8405     8405
  Misses       5886     5886
  Partials      699      699

Continue to review full report at Codecov.

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

The TeamCity failure was caused by it trying to run the old make test-smoke-nofail I've just altered the config for that to make test-smoke

The CodeCov report is bogus, so this is mergeable as-is @opentable/sous

@nyarly I see this line in the Makefile https://github.com/opentable/sous/blob/master/Makefile#L453 setting limit to 1000... I think if this is an issue we need some way to limit connections in the code itself, on a per-server basis, so we can make sure the tests don't fail because of this, and also for use in production. Is there any mechanism like this already in place, or would that be a totally new feature?


Hzzh11856 patch 1

Thanks for your contribuition!
I'm did changes for append  --python_path=${TF_PYTHON_VERSION} in bazel extra arguments.
So, can build tensorflow passing version of python executable TF_PYTHON_VERSION=3.5 ./build_tensorflow.sh configs/rpi.conf.
You can modify only Dockerfile?


Changes to the workbox-cli interface in v3

Library Affected:
workbox-cli
Here are few ideas for changing the workbox-cli interface. Some might be controversial, so feel free to push back.

Move from generate:sw and inject:manifest to generateSW and injectManifest.
No longer infer whether we should be in "wizard" mode or not. Developers can use wizard as the command to enter wizard mode.
Get rid of the --config-file optional flag in favor of making it a required argument for all the modes. For "wizard" mode, it would be the file to write to, and for the other modes, it would be the file to read from.
No longer take in build configuration via command-line flags. It's always been confusing understanding whether the flags or the config file options took precedence, and it's also not ideal that CLI flags can only be strings, while the underlying config options might be arbitrary JS types. Developers who need to use different configurations for different modes can specify different config files rather than using different flags.

Here's the help text that I was thinking of, which should make the changes described above a bit more concrete:
$ ./bin.js --help

  The command line interface for the workbox-build module.

  Usage:
  $ workbox command path/to/workbox-config.js

  Arguments:
    command  Can be one of:
             - wizard: Runs the configuration wizard, which will generate a config
               file based on your local build environment.
             - generateSW: Creates a new service worker file based on the
               options in the config file. See
               https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.generateSW
             - injectManifest: Takes an existing service worker file as a
               starting point and creates a service worker file with precaching
               manifest "injected", based on the options in the config file. See
               https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.injectManifest

    path/to/workbox-config.js  In 'wizard' mode, this will be used as the
                               destination for saving your configuration.
                               In 'generateSW' or 'injectManifest' mode, it should
                               be an existing file, in CommonJS module format.
                               The exported object's properties should follow
                               https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.Configuration

  Examples:
    $ workbox wizard new-workbox-config.js
    $ workbox generateSW workbox-config.js
    $ workbox injectManifest config/workbox-config.js

I'm in favor of all of the above.

Will wizard mode still read the default values from the config file?
This will pretty much ruin the straight convert story from sw-precache to Workbox. I'm personally ok with this, but it's worth keeping in mind.

My gut is to have the wizard use some hardcoded default values, and then treat the config file as something that gets written to, but I might have more to say once I start porting over the wizard code. I'm going to focus on the other modes first.

At this point, I'm happy to make a break from trying to coerce command line flags into the correct types, which plagued sw-precache. We've also officially deprecated the staticFileGlobs and dynamicUrlToDependency names, so the sw-precache => workbox v3 conversion would require some changes anyway. I think the automatic option validation in v3 + the links directly to the configuration docs should help here.

@jeffposnick can this be closed now?

Yup.


upsert function documented but not yet working

Laravel Version: 8.0
PHP Version: 7.2.5
Database Driver & Version: mysql

Description:
On the official documentation, an upsert function is documented here but is not yet working. I think it should be removed from documentation or explicitly mention that it is not yet implemented.
Steps To Reproduce:
run DB::table("table name")->upsert([], [], []);

@hamzamogni the new version isn't yet tagged. It will be available as soon as its tagged.

Will be released on Tuesday.


Change Ansible scripts to account for change of configuration

Need to adjust Ansible script to account for WSGI updates. The following changes need to be made:

[x] Add mod_wsgi to pip install list
[x]  Remove s6 configuration for BCRHP, BCFMS
[x] Run python manage.py collectstatic after build_development (will do build_production in PROD after MVP)
[x] Remove s6 start/stop tasks in both arches and arches-data roles
[ ] ~Add systemctl restart task to boot arches and arches-data roles~

Need to figure out why application-only deployment (no db) doesn't happen cleanly (#815). Last point here doesn't fix the issue resolving this one.

Completed.


Check pr can be merged when check run completed

Call can be merged check when check run report completed
Check GitHub API rate limit before starting
Fix some logs

Report bugs in Issues
The following are automatically added:

Add reviewers from OWNER file (in the root of the repository) under reviewers section.
Set PR size label.
New issue is created for the PR. (Closed when PR is merged/closed)
Run pre-commit if .pre-commit-config.yaml exists in the repo.

Available user actions:

To mark PR as WIP comment /wip to the PR, To remove it from the PR comment /wip cancel to the PR.
To block merging of PR comment /hold, To un-block merging of PR comment /hold cancel.
To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
verified label removed on each new commit push.
To cherry pick a merged PR comment /cherry-pick <target branch to cherry-pick to> in the PR.

Multiple target branches can be cherry-picked, separated by spaces. (/cherry-pick branch1 branch2)
Cherry-pick will be started when PR is merged

To re-run tox comment /retest tox in the PR.
To re-run build-container command /retest build-container in the PR.
To re-run python-module-install command /retest python-module-install in the PR.
To build and push container image command /build-and-push-container in the PR (tag will be the PR number).
To add a label by comment use /<label name>, to remove, use /<label name> cancel

Supported labels

hold
verified
wip
lgtm

/hold

/retest build-container

/retest sonarqube


Allow touch scrolling while layerEvents are active

The same big canvas that I mentioned in #40 is, when it isn't too big, still too big to be seen in one full iPhone screen, but scrolling past it becomes a challenge as layerEvents are active and that seems to be preventing touch scrolling completely.
Any idea what could be done to help here?

Great point. The library has been calling preventDefault on all touch handlers, but I think it's reasonable to remove those calls and tell users to call e.detail.originalEvent.preventDefault() if they want to prevent scroll when interacting with a specific layer. Just resolved this in #43.


Chapters not updating in Arabs Hentai

Source information
Arabs Hentai 1.4.2
Source language
Arabic
Steps to reproduce

open Arabs Hentai source and I try updating but no new chapters
I open source in webview and the same no new chapters
But when I open source in browser the new chapters appear.

Expected behavior
When I update the manhwa on Arabs Hentai source it must updating
Actual behavior
But the new chapters not updating just in this source, another source working good.
Mihon/Tachiyomi version
Mihon/tachiyomi and aniyomi
Android version
Android 12
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version 0.15.3.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

Duplicate of #3925


Still seeing stray phantomjs processes in 0.20.0

Issue
As the title says.
Interesting to notice: neither killing the wrapper script nor phantomjs itself helps. killing with -9 is necessary to get rid of the processes.
Environment:
Docker container derived from elixir:1.6.6-slim, phantomjs installed via
RUN curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | \
    tar xjfC - /usr/local/bin/ --strip-components=2 --wildcards ''*/bin/phantomjs''

I'm now using chromedriver


Sanity check LightningModule without create trainer

🐛 Bug
Hi, I want to do a sanity check to a LightningModule, in the previous version 1.3.8 everything works fine with the following code, but with the latest version 1.4.5, the test fails because of trainer is NoneType, I do not want to create a whole trainer just to assert some properties of my model.
To Reproduce
import torch
from torch import nn
from torch.nn import functional as F
import pytorch_lightning as pl
import torchmetrics
from torchvision.models import resnet50

class MyResNet(nn.Module):
    def __init__(self, num_classes, pretrained=True):
        super(MyResNet, self).__init__()
        model = resnet50(pretrained)
        self.num_ftrs = model.fc.in_features  # 512

        self.shared = nn.Sequential(*list(model.children())[:-1])
        self.target = torch.nn.Sequential(nn.Linear(self.num_ftrs, num_classes))

    def forward(self, x):
        x = self.shared(x)
        x = torch.squeeze(x)  # dimensions of input of size 1 removed.
        return self.target(x)

class Classifier(pl.LightningModule):

    def __init__(self, num_classes):
        super().__init__()
        self.save_hyperparameters()
        self.backbone = MyResNet(num_classes)
        self.train_accuracy = torchmetrics.Accuracy()

    def forward(self, x):
        embedding = self.backbone(x)
        return embedding

    def training_step(self, batch, batch_idx):
        x, y, _ = batch
        y_hat = self.backbone(x.float())
        loss = F.cross_entropy(y_hat, y)
        self.log('train_loss', loss, on_epoch=True)
        return loss

    def validation_step(self, batch, batch_idx):
        x, y, _ = batch
        y_hat = self.backbone(x.float())
        loss = F.cross_entropy(y_hat, y)
        acc = self.train_accuracy(y_hat, y)
        self.log('valid_loss', loss, on_step=True)
        self.log('accuracy', acc, on_epoch=True, prog_bar=True)
        return acc

    def test_step(self, batch, batch_idx):
        x, y, _ = batch
        y_hat = self.backbone(x.float())
        loss = F.cross_entropy(y_hat, y)
        self.log('test_loss', loss)
        return loss

if __name__ == '__main__':
    model = Classifier(10, )
    batch = (torch.ones(16, 3, 30, 20), torch.zeros(16).long(), None)
    print(model.training_step(batch, 0))

Expected behavior
the code should return a scalar loss instead of
AttributeError: 'NoneType' object has no attribute '_results'

Environment

CUDA:

GPU:

GeForce RTX 2070 with Max-Q Design

available:         True
version:           10.2

Packages:

numpy:             1.21.1
pyTorch_debug:     False
pyTorch_version:   1.7.1
pytorch-lightning: 1.4.5
tqdm:              4.62.0

System:

OS:                Windows
architecture:

64bit
WindowsPE

processor:         Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
python:            3.8.8
version:           10.0.19041

Additional context

You didn't provide a stacktrace but I assume this is where it's failing:
https://github.com/PyTorchLightning/pytorch-lightning/blob/645eabe11055b210f0865aad142d1c26b7827012/pytorch_lightning/core/lightning.py#L407
The message for this error has improved in master:
https://github.com/PyTorchLightning/pytorch-lightning/blob/6892d533ea1c743f7e05171846a28e685db85f51/pytorch_lightning/core/lightning.py#L394-L398
This is not supported right now, there's a feature request for it in #8509. You'll have to avoid the log call until then.
Closing, feel free to comment your thoughts on the feature request.


Can't import for some reason

all I see is this:

I tried looking at "help"->"show log", but there is no "show log" there .

you can add an empty credential.properties for the time being to avoid getting this error. I'll add a solid solution soon for this.

I also changed the gradle file. Can you try again by pulling the new changes?

I don't understand what you mean by "add an empty credential.properties", but I've re-imported the project and it seems like it works now.
How come other people succeeded importing the project, while I didn't?

L animation is still on progress, an issue is created for this animation. It will be added soon.

what animation?
I'm talking about the sharing dialog. if you scroll it from bottom->top, it gets larger till it covers the whole screen.

that's why I was talking about

that's what I was talking about it. Couldn't edit the previous comment from phone

oh ok. thank you for this cool library. if you wish, you can look at my libraries too:
https://github.com/AndroidDeveloperLB?tab=repositories

Thanks! I'll certainly check it out your repos


Use last part of path to find specific timeline in 'Dialogic.start()'

Changes the 'find timeline' part of Dialogic.start() to filter timelines from DialogicUtil.get_timeline_list() by current_data['files'], leaving only the relevant ones. Then find the the timeline where name equals end of the path (at this point p).
Fixes #451

Actually, just need to add && t['name'] == p to fix it...

Happy to merge this one in after testing, but was it not working in a particular instance?

oh, nevermind, just saw the issue 😓  https://github.com/coppolaemilio/dialogic/issues/451


systemd opentrons-robot-server.service

local.conf also requires changes to setup systemd as runtime init manager. Those changes would go under oe-core repo.

moved in with pr9


[WIP] [ENG-865] Add Redis to OSF docker-compose for local development

Purpose
(This PR replaces https://github.com/CenterForOpenScience/osf.io/pull/9119 that accidentally got closed and can't be reopened.)
Add Redis to OSF docker-compose for local development, where WB uses the wb_redis server to rate-limit its API. The main feature is implemented at the WB side and the dedicated Redis servers for stagings/prod are managed by the DevOps.

Waterbutler takes care of the rate-limiting using Redis. See WB-PR#380 for the naive solution.

Update this ticket with DevOps side change including docker-library and helm-charts. Out of scope, DevOps task.

Update the local config for docker and docker-compose once the above DevOps task are done. Out of scope, either another ticket or included in the above one.

Changes
Add Redis to OSF docker-compose for local development.

[ ] Double check port conflicts as mentioned in @TomBaxter 's previous work
[ ] Investigate and decide which redis image we want to use and explain why.
[x] The proper way of configuring and running redis (e.g. use a config file, secure the connection and the data, restrict access, take care of distributed scenario, etc.) is out of the scope of local development.

QA Notes
N/A
Documentation
N/A
Side Effects
N/A
Ticket
https://openscience.atlassian.net/browse/ENG-865

Can be closed in favor of #9844

PR closed and replaced by https://github.com/CenterForOpenScience/osf.io/pull/9844


Use transaction_event_data to set interval

Overview
Previously, the 5-second harvest cycle value for transaction_events.max_samples_stored was being applied every 60 seconds because the NewRelic::Agent::StartWorkerThread#interval_for method was still using analytic_event_data as a reference point. Since that value was no longer being set with the updates made in https://github.com/newrelic/newrelic-ruby-agent/pull/952, the transaction events were falling back to the default 60-second cycle. This caused the rate of sampling to be too high, so customers using the default values would be limited to 100 transactions per minute before sampling instead of 1200 transactions per minute.
Related Github Issue
GTSE-14220 (Internal)
Testing
To be added in #1115

Hey, @kaylareopelle, sorry to disturb you, especially about such old commit, but my colleagues and I are struggling to figure out one thing, related to this.
So after upgrading newrelic_rpm to 8.7.0 our NewRelic ingest grew 12 times bigger than on 8.6.0. We tried to investigate the whole 8.6.0...8.7.0 diff, but the only thing that is at least somehow related is this commit. I wanted to ask you to help us to understand, how exactly changes, introduced in this commit affect max_samples_stored. We really dug into it, tried to understand the code for hours, but still no luck. Our NewRelic config never modified analytic_event_data, neither transaction_event_data, so that we have values set to 60 for both of those keys, according to the config. It seems like this commit shouldn't have change anything for us, but it seems like it did.
I would be really grateful if you will find a minute to explain this to us, we really want to figure this out. Thank you in advance!

Hi @eiskrenkov! In agent version 8.5.0, we introduced a bug with PR#952 that caused the agent to over-sample transactions (only sending 100 transactions/minute instead of the intended 1200 transactions/minute).
The reason this happened is that in 8.5.0, we deprecated the term analytic_events in favor of transaction_events, but missed that update for the method NewRelic::Agent::StartWorkerThread#interval_for, which caused us to fallback to the default 60-second cycle (instead of the intended 5-second cycle). PR#1093 corrects this and returns sampled transactions to 1200 transactions/minute. The sampled transactions/minute going from 100 to 1200 explains the 12x increase you are seeing.
By default, the agent is supposed to sample 1200 transactions/minute. But if you would like to return the agent to the behavior you were seeing before the bugfix, you can set the config option transaction_events.max_samples_stored to 100.

Thank you @hannahramadan! Will try to set transaction_events.max_samples_stored to 100


chore: added logic to enable 0 in table cells

Linked Issue
Closes #2147
Description
The integer 0 should not be replaced with '-'. in Table cells This PR aims to fix that.
Changsets
Instructions: Changesets automate our changelog. If you modify files in /packages/skeleton, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.
Checklist
Please read and apply all contribution requirements.

[x] This PR targets the dev branch (NEVER master)
[x] Documentation reflects all relevant changes
[x] Branch is prefixed with: docs/, feat/, chore/, bugfix/
[x] Ensure Svelte and Typescript linting is current - run pnpm check
[x] Ensure Prettier linting is current - run pnpm format
[x] All test cases are passing - run pnpm test
[x] Includes a changeset (if relevant; see above)

Thank you @steffenvan. I've been handling PR reviews on Fridays, so expect an update on this soon. At a quick glance all looks well, so I would expect this will be accepted. Thanks!


Weird behaviour of computed setter/getter while using it with ref

Vue version
3.3.4
Link to minimal reproduction
https://play.vuejs.org/#eNp9UstOwzAQ/JXFF4pUWiFuIVQCxAEOgADBxRc32RSDY1t+hKIo/87GbVKQChfL3sfszKxbdmHtrInIMpb7wkkbwGOIFpTQq3POgudswbWsrXEBwpdFaOHVySCWCq9MbWPA8hEr6KBypoZDwjo8GxtacFhNodgW/qrimuvCaE+w6MOLcHDeV08qoTweEcaQlv45Oo3lvc72jc6XxigUekH9w6BJyzXACsPkKINtHlIMaEYgODjYTp01QkWkcQDdtD9J/0Tj50sfHpsJpjGyHDB+9dLcoX6E6TYC8vnGVLKQHgFrq0RAegHkbyeLtv0hDroun1MwJaUmHclvWkLxhsXH0qw5g+a4NiUqCu4a04by+YjOprQ2sq6Sq9m7N5p2m2gTENkjFbp7GyRZy1k2COJMKGU+b1MsuIjJitTTD98Tf/fEJ6PLg0OPrkHOxlwQjrzfpK+f7nBN9zFJAqKi6n+Sj+iNij3HTdll1CXR/lGX2N6kTyb16tlfrwNqP4jqie4Wyhl9t/7D/CV9R/d0dpr6aIGs+wbRYg7o
Steps to reproduce

Create computed getter / setter
Bind it to ref boolean variable
In get method, return the neglected boolean ref variable
Make a checkbox element with v-model bound to the computed setter/getter
Click / unclick

What is expected?
The value should change from false to true on every click to checkbox element
What is actually happening?
It looks like the computed getter registers only every second click.
System Info
No response
Any additional comments?
I know that this is not real world scenario, the way I am using this computed getter is that I have a checkbox which you can uncheck but before it became unchecked, there is some more logic behind it.
What I did is a really minimal repro on playground. Thanks for understanding.

TLDR；when u  first click checkbox. the testVar not change . so the computed getter not be invoked !
——————————————————————
let`s figure out why does this happen.
at first. when the page render.
<input type="checkbox" v-model="isTurnedOn">

the checkbox get the isTurnedOn value. so it invoke  get(): boolean {     return !testVar.value;   },. the testVar is false. so the isTurnedOn value is true. so the checkbox is selected. although the isTurnedOn is true. but the testVar is false.
and then. when u first click checkbox . the set is invoked .  set(newValue: boolean): void {     testVar.value = newValue;   },.  the newValue. ( the param !) is false. at this time. the testVar also is false . so the testVar not change.
https://github.com/vuejs/core/blob/3be4e3cbe34b394096210897c1be8deeb6d748d8/packages/reactivity/src/ref.ts#L155C1-L160C4
if the value not be changed. Reactive functions related to it will not trigger. so the computed getter not invoke

As a TLDR for what @yangliguo7 correctly explained: you would need to also invert the newValue in the setter:
https://play.vuejs.org/#eNp9Uk1PwzAM/SsmF4Y0NiFupUwCxAEOgADBJZesdUcgTaJ8lKGq/x03WzuQBpcosf2e/Z7TsgtrZ01ElrHcF07aAB5DtKCEXp1zFjxnC65lbY0LEL4sQguvTgaxVHhlahsDlo9YQQeVMzUcEtfh2QhowWE1hWJb+KuKa64Loz3Rog8vwsF5Xz2phPJ4RBxDWvrn6DSW9zrb1zpfGqNQ6AXhh0aTlmuAFYbJUQbbPKQYUI9AdHCw7TprhIpI7QC6aX+S/onGz5c+PIKJpjGyHDh+YanvwQAYebqNgny+cZU8pEfA2ioRkF4A+dvJom1/qIOuy+cUTEmpSUgynLZQvGHxsTRrzqA5rk2JioI7YFpRPh/Z2ZT2Rt5VcjV790bTctPcRET+SIXu3gZJ3nKWDYo4E0qZz9sUCy5i8iJh+uZ74u+e5sno8uDQo2uQszEXhCPzN+nrpztc031MkoCoqPqf5CN6o2I/46bsMuqSxv5Rl6a9Sb9M6tWzv14H1H4Q1Q+62yhn9N/6H/OX9N24p7PThKMFsu4bgZAPCQ==


[Task]: Anomaly heat map not generated correctly for DFM model in classification

What is the motivation for this task?
When running inference on a custom dataset for a DFM model with the classification task I found out that the anomaly heatmaps were not generated properly, they are just empty. I reproduced this problem with the MVtec dataset using the default config.yaml file for the model only changing task from segmentation to classification and save_images to True. Here are two examples.

Describe the solution you'd like
However when using the task segmentation the anomaly heatmaps are generated as expected. Would it be possible to have them for the classification task for the DFM model instead of empty ones? Just like it is the case for other models in anomalib. Here are the two corresponding images using segmentation.

Additional context
No response

There is some work in progress in https://github.com/openvinotoolkit/anomalib/pull/1378 to also add classification score to segmentation visualization.
The mask is still displayed in visualizer, so that's not a bug. But I identified the reason for mask being all zeros in case of classification. It is because of these lines:
https://github.com/openvinotoolkit/anomalib/blob/1f50c952fc65a165884b2b94e178821dcebfbbef/src/anomalib/models/components/base/anomaly_module.py#L164-L167
Since mask is not added to batch in classification, mask threshold is set to same value as image threshold, which is completely wrong. So when normalization happens, all masks become 0.
I think a solution would be to add mask to dataset even in case of classification here:
https://github.com/openvinotoolkit/anomalib/blob/1f50c952fc65a165884b2b94e178821dcebfbbef/src/anomalib/data/base/dataset.py#L123-L125
skipping the separate if branch and loading mask for all types.
@samet-akcay I'm not sure what to do about this, we could include mask even in classification, since visualizer displays the heat map?


react tree

react tree
https://github.com/gildata/RAIO/issues/47#issuecomment-320967459

https://react.rocks/tag/TreeView


Chip Clicks Not Working Properly Only On Safari

I am working with the Chip components and I have to click exactly in the middle of the Chip for it to change state. It's only on Safari and works fine on Chrome and Firefox.

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
I am using Chip components to display some Card components I have based on category. If the Chip has been selected, its color changes indicating to the user it has been selected. The problem is, when using Safari the Chip will not change color unless it has been clicked precisely in the middle of the component. When using Google Chrome or Firefox I don't seem to have this issue.
Expected Behavior 🤔
The Chip component should change color if I click on it wherever in Safari.
Steps to Reproduce 🕹
https://codesandbox.io/s/quirky-davinci-gk577?file=/src/Demo.js
Your Environment 🌎

```
  System:
    OS: macOS 11.4
  Binaries:
    Node: 14.17.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.15.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 79.0.3945.88
    Edge: Not Found
    Firefox: 89.0.2
    Safari: 14.1.1
  npmPackages:
    @emotion/react:  11.4.0
    @material-ui/core: ^4.11.4 => 4.11.4
    @material-ui/icons: ^4.11.2 => 4.11.2
    @material-ui/styles:  4.11.4
    @material-ui/system:  4.11.3
    @material-ui/types:  5.1.0
    @material-ui/utils:  4.11.2
    @types/react:  17.0.9
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    styled-components: ^5.3.0 => 5.3.0
```

codesandbox.io/s/quirky-davinci-gk577?file=/src/Demo.js

The demo does not contain any chips. Did you forget to save the codesandbox?

@eps1lon Yes, my bad. It should be saved now!

@eps1lon Yes, my bad. It should be saved now!

The codesandbox is crashing at the moment. Make sure to pin the dependencies to exact versions and migrate from makeStyles.

Closing since no working reproduction has been provided.


Multi option select control in Composer

Is there a way we can given a user input control where the user can select multiple options

Thank you for the question, @aparnaji
What channel are you using (Web Chat, Teams, etc.)?

Web Chat is what we are planning to use.

@aparnaji - You're in luck because Web Chat supports Adaptive Cards, and Adaptive Cards allow multi-select inputs that will render as checkboxes.
You can read more in this Stack Overflow answer: https://stackoverflow.com/a/66285161/2122672
Does this resolve your issue?

@aparnaji - Can you provide the JSON of the Adaptive Card you're using?

{
"type": "Input.ChoiceSet",
"id": "myColour",
"isMultiSelect": true,
"value": "1",
"style": "expanded",
"label": "Please select the colour",
"choices": [
{
"title": "Green",
"value": "1"
},
{
"title": "Red",
"value": "2"
},
{
"title": "Blue",
"value": "3"
},
{
"title": "Yello",
"value": "4"
},
{
"title": "Orange",
"value": "5"
},
{
"title": "gray",
"value": "6"
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "OK"
}
]
}

@aparnaji - You can retrieve the action data using turn.activity.value or turn.activity.value.myColour. There's a discussion of this here: https://github.com/microsoft/BotFramework-Composer/issues/1820
In the future, it may be a good idea for you to inspect the bot state traces when testing your code in Emulator to see how data can be accessed in incoming activities:

To understand Adaptive Cards better, you may be interested in my blog post: https://blog.botframework.com/2019/07/02/using-adaptive-cards-with-the-microsoft-bot-framework/
If you have any further questions, please ask them on Stack Overflow. I will close this issue as resolved.


storage: add dedupe support for s3 backend

We have currently left dedupe=off when using s3 backend. This needs to be addressed so users don't pay cloud costs if there is a way to avoid it.

This is currently done.


Use unversioned CentOS image

While testing the new OpenStack installation /cc @joshmoore @manics

Looks good to me


renaming Google_check to web_check for clarity, updating documentation…

… with run information, adds a requirements file, closes #10, #9, #8

@kgudel a few comments on the readme.


All these bridges look kind of bad when dusk arrives

No need to pull images overnight.  The bad ones will need to cut.
Two things come to mind

modify the crontab to stop at dusk and resume at dawn.  The drawback is we miss the one the camera which is well lit.
modify the webscrape script. create two sets of scripts.  one that runs 24h and the one which runs dusk to dawn. see above.

Looks like you have the timestamp in the filename. What is the format? We can drop / ignore the images outside of the desired time frame during training. Keep it grabbing as is.

The cron script pulls dawn to dusk.  In process of getting ground truth and rekognition to build first level classifier of images to determine if the camera is showing a valid image capable of prediction.


Remove unnecessary interfaces

Some interfaces exist only to hold concrete methods. In languages like Java and Scala this is necessary, but Kotlin supports top level functions, so this code can be slightly reduced by removing the interfaces.
The following interfaces could be removed: Inspectors, Eventually, CollectionMatchers, ExceptionMatchers, IntMatchers, LongMatchers, MapMatchers, StringMatchers, TypeMatchers. This would be a breaking change.

Would it be a breaking change? Is that becausr they'd need to add an
import?
On 16 Jun 2016 21:40, "Christian Helmbold"<EMAIL_ADDRESS>wrote:

Some interfaces exist only to hold concrete methods. In languages like
Java and Scala this is necessary, but Kotlin supports top level functions
https://kotlinlang.org/docs/reference/functions.html#function-scope, so
this code can be slightly reduced by removing the interfaces.
The following interfaces could be removed: Inspectors, Eventually,
CollectionMatchers, ExceptionMatchers, IntMatchers, LongMatchers,
MapMatchers, StringMatchers, TypeMatchers. This would be a breaking change.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kotlintest/kotlintest/issues/33, or mute the thread
https://github.com/notifications/unsubscribe/AAtZGiVW9u2m1kNVKtd52lLgzfKzQ7cGks5qMbSngaJpZM4I3ybP
.

Yes, the code on the user site would have to be changed due to the required imports.

Is there anyway you can inherit imports in Kotlin?
On 16 Jun 2016 21:46, "Christian Helmbold"<EMAIL_ADDRESS>wrote:

Yes, the code on the user site would have to be changed due to the
required imports.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kotlintest/kotlintest/issues/33#issuecomment-226608779,
or mute the thread
https://github.com/notifications/unsubscribe/AAtZGnQPYmbDoTZS5QBpxMSqDSOYVFTKks5qMbYogaJpZM4I3ybP
.

At least I'm not aware of such a possibility. But you could place the functions to be inherited in interfaces and add them to the test base class :-D

I only did it as interfaces because I like them to be in scope automatically, and because its quite "scalay". I've been a Scala developer for 5 years at work, and I haven't touched Java since, so a lot of my opinions are influenced by that.

When I was writing this issue, I haven't thought of the convenience aspect. I think it is ok, to just close this ticket.


remove teamcity reporter warning (#3634)

Requirements

Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
All new code requires tests to ensure against regressions.

Description of the Change
#3634 suggests removing this warning because this warning has been around for 5 years (see https://github.com/mochajs/mocha/commit/1a4ab63f55b0af7305361396a520058e3779203d) so it is unlikely anyone still depends on it.
Alternate Designs
N/A
Why should this be in core?
N/A
Benefits
Fewer branches to cover and less unnecessary code.
Possible Drawbacks
Someone upgrading directly from 1.x to 6.x may be confused where their reporter went.
Applicable issues
#3634, patch release

Coverage increased (+0.03%) to 90.759% when pulling 8766fb11c27aaa566d58802a0346024e717bd0a5 on issue/3634 into 1f325e746033f698c6a040329a2fd7670daaf274 on master.

LGTM, thanks!

@vkarpov15 btw, we're using namespaces on our branches.  please prepend your branch name with vkarpov15/ in the future.  thanks!


Increased code coverage for the unit tests

I did the unit tests for the error handling bits, so everything is now 100% covered. The unit tests for the normal scenario on GooglePlay are still missing, but the errors are handled.
I also updated the AppStore example in the README

Thanks, @bogdanconstantinescu!


Analytics for WhatsNew

Description
LEARNER-1166

Codecov Report

Merging #958 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master     #958      +/-   ##
============================================
- Coverage     16.75%   16.71%   -0.04%
  Complexity     1012     1012
============================================
  Files           471      471
  Lines         20102    20150      +48
  Branches       2310     2311       +1
============================================
  Hits           3369     3369
- Misses        16352    16400      +48
  Partials        381      381

Impacted Files
Coverage Δ
Complexity Δ

...ava/org/edx/mobile/module/analytics/Analytics.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...edx/mobile/module/analytics/AnalyticsRegistry.java
5.64% <0%> (-0.27%)
7 <0> (ø)

...edx/mobile/module/analytics/FirebaseAnalytics.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...java/org/edx/mobile/whatsnew/WhatsNewFragment.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

.../edx/mobile/module/analytics/SegmentAnalytics.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


gtirb-semantics-nix Fatal error

gtirb-semantics-nix fails for the following gtirb file: cntlm.gtirb.txt with the error:

Fatal error: exception Failure("int_of_expr: cannot coerce to int mul_int.0 {{  }} ( cvt_bits_uint.0 {{ 8 }} ( Exp6__5 [ 0 +: 8 ] ),8 )")

I was just looking at this bug! Seems to be a regression in aslp.

This is obviously the fault of https://github.com/UQ-PAC/aslp/commit/fc60f76057a35538b7e43c6e128a1b0983b868b8

Do you know which instruction caused this error? (knowing gtirb-semantics, probably not). In the aslp tests, this was blamed on tbx v1.16b, {v31.16b, v0.16b}, v31.16b which is a rather complex SIMD instruction.
Snippet before:
if slt_bits.0 {{ 9 }} ( Cse16__5,'000100000' ) then {
    assert and_bool.0 {{  }} ( sle_bits.0 {{ 9 }} ( '000000000',Cse16__5 ),sle_bits.0 {{ 13 }} ( ZeroExtend.0 {{ 12,13 }} ( mul_bits.0 {{ 12 }} ( ZeroExtend.0 {{ 9,12 }} ( add_bits.0 {{ 9 }} ( Cse16__5,'000000001' ),12 ),'000000001000' ),13 ),'0000100000000' ) ) ;
    result__4 = append_bits.0 {{ 120,8 }} ( __array _Z [ 1 ] [ 8 +: 120 ],lsr_bits.0 {{ 256,12 }} ( Cse14__5,ZeroExtend.0 {{ 11,12 }} ( mul_bits.0 {{ 11 }} ( ZeroExtend.0 {{ 8,11 }} ( __array _Z [ 31 ] [ 0 +: 8 ],11 ),'00000001000' ),12 ) ) [ 0 +: 8 ] [ 0 +: 8 ] ) ;
}

After:
if ( cvt_bits_uint.0 {{  }} ( Exp6__5 [ 0 +: 8 ] ) < 32 ) then {
    assert ( ( cvt_bits_uint.0 {{  }} ( Exp6__5 [ 0 +: 8 ] ) >= 0 ) && ( ( ( cvt_bits_uint.0 {{  }} ( Exp6__5 [ 0 +: 8 ] ) + 1 ) * 8 ) <= 256 ) ) ;
    result__4 = ( Exp13__5 [ 8 +: 120 ] : ( Exp11__5 [ 0 +: 128 ] : Exp9__5 [ 0 +: 128 ] ) [ ( cvt_bits_uint.0 {{  }} ( Exp6__5 [ 0 +: 8 ] ) * 8 ) +: 8 ] ) ;
}

So we can see the slice of a register with a non-static slice was previously lowered to a shift+truncate, but this was not done in the new output.

Fixed by https://github.com/UQ-PAC/aslp/commit/a2b5cf4002417faef7920bc9b22dda5faccc91d8. The Nix packages will take some time to update.


Instructions to customize the styles? Where do I find them here?

Woah. Realised I’d not seen this comment at all. What would you like to modify?


remove html tag on transl bahasa

Description
Remove html tag on transliteration bahasa json files
Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

[ ] Test A (add screenshot, or videos to help understand the changes)
[ ] Test B

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[ ] I have checked my code and corrected any misspellings

Deploy Notes

Codecov Report

Merging #18 (066eaab) into main (f23eb3d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage   96.51%   96.51%
=======================================
  Files           5        5
  Lines         201      201
=======================================
  Hits          194      194
  Misses          7        7

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


[Core] Cleanup

added Cleanup class to remove old files
remove old files for CSharp ext
remove old game exts
fix extentions build versions not replaced
added Remove method to DynamicConfigFile
small Console cleanup

Files cleanup every start


[DOCS] Add link to Hadoop docs

What changes were proposed in this pull request?
Add link to Writable in Hadoop docs.
Why are the changes needed?
The python card of of the blue talks about Writables with no explanation what it is and the meaning of the whole paragraph is lost. While the Scala card links to Hadoop docs, the python card did not.
Does this PR introduce any user-facing change?
Help docs readability.
How was this patch tested?
Link is tested accessible.

Can we create corresponding JIRA ticket here, and add a JIRA number to the title??
e.g. [SPARK-12345][DOCS] Add link to Hadoop docs
or we can just add [MINOR] tag without creating ticket to JIRA, when the change is small enough.
e.g. [MINOR][DOCS] Add link to Hadoop docs

Also please check https://github.com/apache/spark/pull/39941/checks?check_run_id=11190702189 out to enable GitHub Actions in your forked repository

Anyway, seems fine to me when the test passed.

Fixed by https://github.com/apache/spark/commit/c9c3880e3ad6f57a359f1de05b7e772c06660d0b


Consumers appearing twice

API Services Portal Issue
User Story
As an Access Manager,
I want to be able to filter a list of consumers, find a consumer and get detail on a consumer's access to a product
so that I can manage access effectively .
Test Case
ENV

[ ] DEV
[ ] TEST
[X] PROD

TESTCASE

Go to a namespace that has a user consumer accessing two different products
Go to Consumer list and filter by one of the Products

EXPECTED

A single row for that particular user

ACTUAL

Two rows with duplicate information

ERROR

Notes

Additional Scope of Change

From the consumer detail, clicking on the Product Edit brings up the dialog but fails to retrieve details.
The Service Accounts list is showing Consumer records for legacy “client” consumers

A couple examples: dbcols, blueinc.
Alix is concerned that some people have access that shouldn't.
Sort by name not working properly.

Recreating the issue in Test - using moh-proto namespace:
Consumer: After requesting access to the Pharmanet API, I received a new consumer "535C4DF2-070C92957B1".  Then took that consumer and manually created a new "ServiceAccess" record in postgres to replicate a production migration of legacy consumers.
keystonejs=# insert into "ServiceAccess" (name, namespace, consumer, application, "productEnvironment", active, "aclEnabled", "consumerType") values ('535C4DF2-070C92957B1 for sandbox', 'moh-proto', 16885, 401, 428, false, false, 'client');
INSERT 0 1
keystonejs=# select * from "ServiceAccess" where name = '535C4DF2-070C92957B1 for sandbox';
keystonejs=# update "ServiceAccess" set "updatedAt_utc" = '2023-09-21 22:35:41.667', "createdAt_utc" = '2023-09-21 22:35:41.667', "updatedAt_offset" = '+00:00', "createdAt_offset" = '+00:00' where id = 1050;
UPDATE 1

As a result of adding another "ServiceAccess" record for the particular consumer, two records now appear on the Consumers page.
Private Zenhub Image

Steps to reproduce:

Create a product
Enable dev environment and require approval
Request access to product and approve
Perform similar database modifications as Aidan mentioned above, with name, namespace, consumer, application, and productEnvironment modified to match local portal instance

Connecting to Docker database:
docker exec -it kong-db psql -U postgres -W postgres
\c keystonejs


add to the list of default web browsers on Windows 10

This is to share. Not a question or bug.
The .reg file below will not set the Ungoogled Chromium as default browser, it only shows it in Control Panel > Default Programs > Set default programs
Windows Registry Editor Version 5.00

; Infamous capabilities:

[HKEY_LOCAL_MACHINE\SOFTWARE\ungoogled-chromium\Capabilities]
"ApplicationDescription"="ungoogled-chromium"
"ApplicationIcon"="C:\\Program Files\\ungoogled-chromium\\chrome.exe,0"
"ApplicationName"="ungoogled-chromium"

[HKEY_LOCAL_MACHINE\SOFTWARE\ungoogled-chromium\Capabilities\FileAssociations]
".htm"="ungoogled-chromiumURL"
".html"="ungoogled-chromiumURL"
".shtml"="ungoogled-chromiumURL"
".xht"="ungoogled-chromiumURL"
".xhtml"="ungoogled-chromiumURL"

[HKEY_LOCAL_MACHINE\SOFTWARE\ungoogled-chromium\Capabilities\URLAssociations]
"ftp"="ungoogled-chromiumURL"
"http"="ungoogled-chromiumURL"
"https"="ungoogled-chromiumURL"

; Register to Default Programs

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"ungoogled-chromium"="Software\\ungoogled-chromium\\Capabilities"

; ungoogled-chromiumURL HANDLER:

[HKEY_LOCAL_MACHINE\Software\Classes\ungoogled-chromiumURL]
@="ungoogled-chromium Document"
"FriendlyTypeName"="ungoogled-chromium Document"

[HKEY_LOCAL_MACHINE\Software\Classes\ungoogled-chromiumURL\shell]

[HKEY_LOCAL_MACHINE\Software\Classes\ungoogled-chromiumURL\shell\open]

[HKEY_LOCAL_MACHINE\Software\Classes\ungoogled-chromiumURL\shell\open\command]
@="\"C:\\Program Files\\ungoogled-chromium\\chrome.exe\" \"%1\""

Thanks for sharing! To reduce clutter, issues are not for submitting tips. Instead, please consider submitting a PR to the ungoogled-chromium-wiki.

After running this script, Chromium still can't tell that it is the default browser. What to do?

it wont tell you anything please read the issue in the first post

So there's this lovely freeware tool
https://kolbi.cz/blog/2017/11/10/setdefaultbrowser-set-the-default-browser-per-user-on-windows-10-and-server-2016-build-1607/
But because UNgoogled chromium prebuilt binary was a zip file it's not hooked into all the right places so more magic required
There is this other tool that references the first tool which explains that a hash must be generated to bind new associations prossibly explaining why OP does not result in satisfaction
https://kolbi.cz/blog/2017/10/25/setuserfta-userchoice-hash-defeated-set-file-type-associations-per-user/
which itself cryptically references GPO  (not for  win 10 home users).  Good thing I have pro?

So there's this lovely freeware tool
https://kolbi.cz/blog/2017/11/10/setdefaultbrowser-set-the-default-browser-per-user-on-windows-10-and-server-2016-build-1607/
But because UNgoogled chromium prebuilt binary was a zip file it's not hooked into all the right places so more magic required
There is this other tool that references the first tool which explains that a hash must be generated to bind new associations prossibly explaining why OP does not result in satisfaction
https://kolbi.cz/blog/2017/10/25/setuserfta-userchoice-hash-defeated-set-file-type-associations-per-user/
which itself cryptically references GPO (not for win 10 home users). Good thing I have pro?

Does nothing for me, window opens briefly and then closes, no changes.

Hello,
Found a solution if none of these others are working.
I had an issue where window's default browser directory for chromium (portable version at chromium.woolyss.com) was at the downloads folder and windows had not detected the missing executable for the default browser, icon was missing too in w10 settings.
After trying many things I eventually got a fix, updating the directory values at
Computer\HKEY_CLASSES_ROOT\Chromium(randomstring)\shell\open\command
at "\HKEY_CLASSES_ROOT\Chromium(randomstring)" the random letters/numbers at the end of chromium will be different for everyone im assuming so just look for chromium and you'll see it.
good luck


pretrained-weights

hello, this is a very nice work. I am wondering where I can download the pretrained weights ? I could not find ckpt in the provided gdrive link.

In gdrive link's Checkpoint/ARTrack_seq_base_256_full/ you will find the pth file, the specific link is https://drive.google.com/drive/folders/1w93eQ4stfwdHrmWWnABXQrSsX7phtAd0


feat: implemented onBeforeTextEdit and onBeforeTextSubmit callbacks

Would these changes do the trick to resolve #3779?

Hi @ad1992: Do I need to do anything further with this PR? What does it depend on whether this PR will be merged into the next release or not? How can I help the process?

Hi @ad1992: Do I need to do anything further with this PR? What does it depend on whether this PR will be merged into the next release or not? How can I help the process?

Hey @zsviczian  you don't need to make any more changes in this PR as of now, can you revert yarn.lock? There might be some API changes that are not finalized yet so will merge once the changes are finalized. Should be able to merge it over the weekend.

Hi @ad1992: Do I need to do anything further with this PR? What does it depend on whether this PR will be merged into the next release or not? How can I help the process?

Hey @zsviczian you don't need to make any more changes in this PR as of now, can you revert yarn.lock? There might be some API changes that are not finalized yet so will merge once the changes are finalized. Should be able to merge it over the weekend.

Sorry... I am not familiar enough with git. I now deleted yarn.lock while looking for the action to revert 😳. How?


generate typescript declarations during build

fixes https://github.com/jacktuck/unfurl/issues/60

Coverage remained the same at 98.452% when pulling 7a1048bbaa1cd01ca466bde4a224284f87fbc8eb on ravenscar:master into bfc190004c7a3c0e285934e1c7e7788a6e69c5dd on jacktuck:master.

Thanks for this!


does work with xbox one controller with some issues

this is copied from the curse project page (comment by spyeedy)
This mod supports Xbox One Controller with the Xbox Wireless Adapter! (I suspect it's the work of the Gamepad library, but :shrug: ).
I'm not too sure if it's a bug, but there's camera and/or player movement even tho the thumbsticks aren't moved. But when I move the thumbsticks slightly, it stops this movement.
Also, I'm not sure if it's intentional, but i'm unable to bring up the pause menu.
As for the icons, I feel that the icons should change depending on the controller connected/selected, as the Xbox One and PS4 controller icons differ from each other.
Still, great mod nonetheless! And I tried it with Vehicle Mod, the controls were great, tho I feel that the accelerate and brake buttons should be RT (R2) and LT (L2) respectively.
Played with Controllable 0.3.1.

I have the SAME problem I really need help with this.

I still need to implement a feature called deadband. Basically it means "how far do I have to move the thumbstick before it detects input". Often thumbsticks don't reset exactly to the center and that's why you get the camera movement without even touching it.
Does pressing start not bring it up? I will look into it.
Custom icons will be coming soon.
You can actually use the triggers in the Vehicle Mod. You just need to go into the config (of the Vehicle Mod) and toggle triggers on. I might make it on by default in a future update as it's more natural for controller users.

Download 0.4.0, this has been fixed.


Getting "Exception: out of bounds memory access" when upgrading from older commit

I am having problems updating my code to the newest version of WAMR.
I am running WAMR inside of SGX.
My code worked on commit cfcaca3.
I run into Exception: out of bounds memory access
Possibly caused by No aux stack info for this module, can't create thread
My code is mostly the SGX example from cfcaca3 mixed with the example on passing buffers to WASM.
#include <bh_platform.h>
#include <wasm_export.h>
#include "Enclave_t.h"

extern "C" {
    typedef void (*os_print_function_t)(const char* message);
    extern void os_set_print_function(os_print_function_t pf);

    void
    enclave_print(const char *message)
    {
        ocall_print(message);
    }
}

/* TODO: Dynamically allocate with regard to data size */
static char global_heap_buf[100 * 1024 * 1024] = { 0 };

static int app_argc;
static char **app_argv;

static void
set_error_buf(char *error_buf, uint32 error_buf_size, const char *string)
{
    if (error_buf != NULL)
        snprintf(error_buf, error_buf_size, "%s", string);
}

uint8_t* execute(char *executor, char *code, size_t code_size, char *data, size_t data_size, char *enclave_uuid) {
    uint8_t *wasm_file_buf = NULL;

    /* TODO: Dynamically allocate with regard to data size */
    uint32_t stack_size = 64 * 8092, heap_size = 64 * 8092;
    wasm_function_inst_t wasm_func_execute;
    wasm_exec_env_t exec_env;
    wasm_module_t wasm_module = NULL;
    wasm_module_inst_t wasm_module_inst = NULL;
    char error_buf[128];
    char *wasm;
    size_t size_wasm;
    bool alloc_with_pool;
    uint32 max_thread_num;
    RuntimeInitArgs init_args;

    os_set_print_function(enclave_print);
    bh_log_set_verbose_level(5);

    alloc_with_pool = true;
    max_thread_num = 1;
    memset(&init_args, 0, sizeof(RuntimeInitArgs));
    init_args.max_thread_num = max_thread_num;
    init_args.mem_alloc_type = Alloc_With_Pool;
    init_args.mem_alloc_option.pool.heap_buf = global_heap_buf;
    init_args.mem_alloc_option.pool.heap_size = sizeof(global_heap_buf);

   if (!wasm_runtime_full_init(&init_args)) {
        ocall_print("Init runtime environment failed.\n");
        return (uint8_t *) "";
    }

    /* read wasm file into bytes and store in "wasm" */
    ocall_read_file("test.wasm", (unsigned char **) &wasm, (size_t * ) & size_wasm);

    /* initialize runtime environment */
    if (!wasm_runtime_init())
        goto fail1;

    /* load WASM module */
    if (!(wasm_module = wasm_runtime_load((uint8_t *) wasm, size_wasm,
                                          error_buf, sizeof(error_buf)))) {
        ocall_print(error_buf);
        ocall_print("\n");
        goto fail2;
    }

    /* instantiate the module */
    if (!(wasm_module_inst = wasm_runtime_instantiate(wasm_module,
                                                      heap_size,
                                                      stack_size,
                                                      error_buf,
                                                      sizeof(error_buf)))) {
        ocall_print(error_buf);
        ocall_print("\n");
        goto fail3;
    }

    /* create wasm execution environment with specified stack size */
    exec_env = wasm_runtime_create_exec_env(wasm_module_inst, stack_size);

    wasm_func_execute = wasm_runtime_lookup_function(wasm_module_inst, "execute_function", NULL);

    int32_t runtime_allocated_code;
    int32_t runtime_allocated_data;

    runtime_allocated_code = wasm_runtime_module_dup_data(wasm_module_inst, code, code_size);
    runtime_allocated_data = wasm_runtime_module_dup_data(wasm_module_inst, data, data_size);

    ocall_print(std::to_string(runtime_allocated_code).c_str());
    ocall_print(std::to_string(runtime_allocated_data).c_str());

    ocall_print("Copied data into runtime");

    if (runtime_allocated_code != 0) {

        ocall_print("Setting args");

        uint32_t argv[5];
        argv[0] = 8; // return pointer in Wasm address space
        argv[1] = runtime_allocated_code;    // pass the buffer offset for the code in WASM space.
        argv[2] = code_size;
        argv[3] = runtime_allocated_data;  // pass the buffer offset for the input data in WASM space.
        argv[4] = data_size;

        ocall_print("Set args");

        wasm_runtime_call_wasm(exec_env, wasm_func_execute, 5, argv);

        ocall_print("Ran Wasm function");

        const char *wasm_runtime_exception = wasm_runtime_get_exception(wasm_module_inst);
        if (wasm_runtime_exception != NULL) {
            ocall_print("Printing wasm_exception");
            ocall_print(wasm_runtime_exception);
        }

        uint32_t wasm_return_pointer = argv[0];

        uint32_t wasm_result_pointer_address = wasm_return_pointer;
        uint32_t wasm_length_address = wasm_return_pointer + 4;

        uint32_t length = *(uint32_t *) wasm_runtime_addr_app_to_native(wasm_module_inst,
                                                                        wasm_length_address);
        uint32_t result_pointer = *(uint32_t *) wasm_runtime_addr_app_to_native(wasm_module_inst,
                                                                                wasm_result_pointer_address);
        uint8_t *result = (uint8_t *) wasm_runtime_addr_app_to_native(wasm_module_inst, result_pointer);

        ocall_print((char *) result);

        // it is runtime responsibility to release the memory,
        // unless the WASM app will free the passed pointer in its code
        wasm_runtime_module_free(wasm_module_inst, runtime_allocated_code);
        wasm_runtime_module_free(wasm_module_inst, runtime_allocated_data);

        return result;

    } else {
        ocall_print("Could not instantiate runtime buffers in wasm environment");
        ocall_print(wasm_runtime_get_exception(wasm_module_inst));
        goto fail2;
    }

    /* destroy the module instance */
    wasm_runtime_deinstantiate(wasm_module_inst);

    fail3:
    /* unload the module */
    wasm_runtime_unload(wasm_module);
    return (uint8_t *) "";

    fail2:
    /* destroy runtime environment */
    wasm_runtime_destroy_exec_env(exec_env);
    wasm_runtime_destroy();
    return (uint8_t *) "";

    fail1:
    return (uint8_t *) "";

}

My Enclave Configuration is the exact same as the new SGX example:
<!-- Please refer to User's Guide for the explanation of each field -->
<EnclaveConfiguration>
  <ProdID>0</ProdID>
  <ISVSVN>0</ISVSVN>
  <StackMaxSize>0x100000</StackMaxSize>
  <HeapMaxSize>0x1000000</HeapMaxSize>
  <ReservedMemMaxSize>0x400000</ReservedMemMaxSize>
  <ReservedMemExecutable>1</ReservedMemExecutable>
  <TCSNum>10</TCSNum>
  <TCSPolicy>1</TCSPolicy>
  <DisableDebug>0</DisableDebug>
  <MiscSelect>0</MiscSelect>
  <MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>

It seems like much of the API i used on the old commit is still supported so the only thing i changed was the initialisation of the runtime.
With the highest log level, the  code prints:
[00:00:00:000 - 0]:
Load type section success.

[00:00:00:000 - 0]:
warning: fail to link import function (wbg, __wbindgen_throw)

[00:00:00:000 - 0]:
Load import section success.

[00:00:00:000 - 0]:
Load function section success.

[00:00:00:000 - 0]:
Load table section success.

[00:00:00:000 - 0]:
Load memory section success.

[00:00:00:000 - 0]:
Load global section success.

[00:00:00:000 - 0]:
Load export section success.

[00:00:00:000 - 0]:
Load table segment section success.

[00:00:00:000 - 0]:
Load code segment section success.

[00:00:00:000 - 0]:
Load data segment section success.

[00:00:00:000 - 0]:
Load custom section success.

[00:00:00:000 - 0]:
Load custom section success.

[00:00:00:000 - 0]:
Load module success.

[00:00:00:000 - 0]:
Memory instantiate:

[00:00:00:000 - 0]:
  page bytes: 65536, init pages: 28, max pages: 16392

[00:00:00:000 - 0]:
  heap offset: 1310720, heap size: 523264

[00:00:00:000 - 0]:
No aux stack info for this module, can't create thread

1311280
1311952
Copied data into runtime
Setting args
Set args
Ran Wasm function
Printing wasm_exception
Exception: out of bounds memory access

This indicates to me that the initialisation and the duplication of data buffers into WASM went well (since it returned and printed the pointer addresses).
It seems like the error comes from: wasm_runtime_call_wasm(exec_env, wasm_func_execute, 5, argv);
Has there been any change to passing buffers to WASM or is there anything that i used that is no longer supported?
Furthermore can you give me some pointers on what the error message:
No aux stack info for this module, can't create thread
Might mean? Or any way that i might be able to better debug this?
If there is a more suitable communication channel for this, i will delete the issue and post it there.
All in all i have been very impressed when working with WAMR for SGX, so thanks in advance!

Hi, thanks for reporting this issue.

Has there been any change to passing buffers to WASM or is there anything that i used that is no longer supported?

The APIs you used are supported, I can't figure out the root cause of this issue from the information you provided, maybe we need to get more detailed information about this. Is there any global classes in your app code? Could you provide a simple wasm module which can reproduce this problem ?
I noticed that you called both wasm_runtime_full_init and wasm_runtime_init, actually you only need to use one of them. However, this may not be the root cause of this issue.

Furthermore can you give me some pointers on what the error message:
No aux stack info for this module, can't create thread

This is not the reason. This is just a warning to indicate that you can't execute this wasm module in multiple threads, or create thread in wasm app, because there are no aux stack information in this module. If you are interested in WAMR pthread library, please refer to pthread library guide for more details.

Makes sense.
I am now only running wasm_runtime_full_init, but the error still persists.
I figured out that it came from CHECK_MEMORY_OVERFLOW(bytes) in iwasm/interpreter/wasm_interp_classic.c:229
It checks that i do not try to allocate outside of the runtime memory it seems.
#define CHECK_MEMORY_OVERFLOW(bytes) do {
    uint64 offset1 = (uint64)offset + (uint64)addr;
    if (offset1 + bytes <= (uint64)linear_mem_size)  {
      /* If offset1 is in valid range, maddr must also be in valid range,
         no need to check it again. */
      maddr = memory->memory_data + offset1;
    } else  {
      goto out_of_bounds;
    }
}

The way i expect this to fail is if i might use up all of my memory and then try to allocate 4 bytes more, then it would fail.
Though through some debug statements i find that the addr it tries to allocate 4 bytes at is 538970715, while the linear_mem_size is only 18219008 so it does not indicate that i have used all my memory and am stepping outside of it.
For debugging purposes, here are the values when the function fails:
bytes = 4
offset = 12
addr = 538970715
offset1 = 538970727
linear_mem_size = 18219008

Could this have something to do with the warning: fail to link import function (wbg, __wbindgen_throw) warning?
I might be able to mock it using the Native Symbols API.
Is there anything else that could cause WAMR to suddenly operate with an address that is so far away from what is expected?
Thanks for the quick response btw.

bytes = 4
offset = 12
addr = 538970715
offset1 = 538970727
linear_mem_size = 18219008

538970715 is not a valid address in linear memory.
In your code, a hard coded address 8 is used as return pointer:
uint32_t argv[5];
argv[0] = 8; // return pointer in Wasm address space
          ^
argv[1] = runtime_allocated_code;    // pass the buffer offset for the code in WASM space.
argv[2] = code_size;
argv[3] = runtime_allocated_data;  // pass the buffer offset for the input data in WASM space.
argv[4] = data_size;

Do you write anything to the return pointer (address 8)? The layout of linear memory in most compilers looks like:
-------------------------------------------------------------
|    data area    |        stack area      |    heap area   |
-------------------------------------------------------------

In this case the data area may be destroyed by your app code. If the original data in address 8 is the base address of a global array, then any further reference to this array will use a wrong address.
Could you please malloc a space for return pointer by wasm_runtime_module_malloc and try again?

Could this have something to do with the warning: fail to link import function (wbg, __wbindgen_throw) warning?
I might be able to mock it using the Native Symbols API.

No, if your app try to call an unlink function, you will get Exception: fail to call unlinked import function. In your case, __wbindgen_throw is not called during execution.

Is there anything else that could cause WAMR to suddenly operate with an address that is so far away from what is expected?

The most common case I can imagine is described above.
Hope this help.

Okay i will try that.
Passing 8 was just to pass something arbitrary that would get overwritten with the real return address when executing the WASM function. This worked on the old commit but does seem very strange and error prone.
Should i then provide the return pointer offset (The value returned from wasm_runtime_module_malloc) or the native pointer given by wasm_runtime_module_malloc?
Is this what you are referring to?
   void* native_return_ptr;
   int32_t runtime_allocated_return_ptr = wasm_runtime_module_malloc(wasm_module_inst, sizeof(int64_t), &native_return_ptr);

   uint32_t argv[5];
   argv[0] = runtime_allocated_return_ptr;
   argv[1] = runtime_allocated_code;    // pass the buffer offset for the ONNX Model in WASM space.
   argv[2] = code_size;
   argv[3] = runtime_allocated_data;  // pass the buffer offset for the input data in WASM space.
   argv[4] = data_size;

This still fails, but seems more correct than passing 8.

It does get pretty far into executing the WASM function.
It fails on a WASM_OP_I32_STORE opcode inside of wasm_interp_call_func_bytecode.
Looking at the I32_STORE opcodes it definitely sticks out.
(The last one is the one that fails)
[00:00:00:000 - 0]:
I32 STORE: 18153472

[00:00:00:000 - 0]:
I32 STORE: 18153472

[00:00:00:000 - 0]:
I32 STORE: 1330236

[00:00:00:000 - 0]:
I32 STORE: 538970715

I don't know if this is of any help, but i will continue debugging.

@mdamgaard-biolib do you use the fast interpreter, could you try classic interpreter? You can add -DWAMR_BUILD_FAST_INTER=0 for cmake when building iwasm lib. And is there any method to reproduce the issue? Or could you please upload the wasm binary file?

I get an unreachable error using the classic interpreter.
I will see if i can make something reproducable, most of the parameters and wasm is proprietary.

I am not sure how to debug wasm_interp_call_func_bytecode itself, as it is just a switch of Opcodes.
What can i do to help while trying to make something reproducable?

I spent some time figuring out how to make it reproducible.
I have made a repo (https://github.com/damgaard22/wamr-test).
The repo is made to look as close to the WAMR linux SGX example as possible, to hopefully make it easier for you.
It is made to work on a Linux computer with SGX installed.
The repo includes 2 branches.
old_commit:  Everything needed to run using wamr on the  cfcaca3 commit. (This is working and produces the expected result)
new_commit: What i think is everything needed to run on the newest wamr commit (This fails with the out of bounds memory access error, that was seen before.
To see what changed between the two commits i have made a pull request so you can see a diff
https://github.com/damgaard22/wamr-test/pull/2/files
The new_commit branch is on the left and the old_commit branch is on the right. (Admittedly it probably should be the other way around.)
I have included a reproducible step by step guide below, but it is pretty easy to figure out from the repo.
Just remember to always run the build_wamr.sh script everytime you clone or change branch.
To reproduce this:
Clone the repo recursively to get the WAMR submodule
git clone --recursive https://github.com/damgaard22/wamr-test
This places you on the old_commit branch
Enter the repo and build wamr with the old commit
./build_wamr.sh
(You possibly need to run chmod +x build_wamr.sh)
This should checkout the old commit and build wamr
Now simply go into SimpleTest, make and run the generated app.
cd SimpleTest
make
./SimpleTest
Running the app executes an ONNX (https://onnx.ai/) function and should print some JSON.
Going to the new commit requires you to checkout new commit
git checkout new_commit
Go back to the root dir
cd ..
and run the build script again to build wamr with newest main
./build_wamr.sh
Now do the same process as before to make and run the app.
This should produce the aforementioned out of bounds memory access error.
I am very appreciative of all your help so far!
Please don't hesitate to ask if something with the repo seems wrong or if it does not make sense to you.

@damgaard22
Hi, thanks for your repo, we can reproduce the issue in our environment now.
I noticed that in your wasm bytecode, the address of your data (runtime_allocated_data) is passed to __rust_dealloc function, which cause the memory overflow exception. Have you freed this buffer in your app code?

Can you expand on what you mean by: "Have you freed this buffer in your app code?"
I am not sure what app code you are referring to?
The code that compiles into WASM?

Yes, I mean the code compiles into WASM.

I noticed that we are actually using a newer version of the tensor.wasm.
I pushed this newer wasm file (tensor_new.wasm) to both branches.
How can i check if __rust_dealloc is still the one to cause the error?

It is really hard to check it without source code, there are thousands of __rust_dealloc in the wasm bytecode. We find this problem by stepping into the interpreter and evaluate most function calls && opcodes, we find that most __rust_dealloc works well, but the one which cause the memory overflow exception takes runtime_allocated_data as an input, which means you freed the runtime_allocated_data in your application code.
The same problem exists in the new wasm file, I'd suggest you to check the application source code to see if  runtime_allocated_data and runtime_allocated_code are freed in it.

@damgaard22
We find another issue in app heap and fixed it in PR #368, could you please update WAMR to the newest version?

Note: The other issue in app heap is not the root cause of your issue. You still need to check the source code to ensure that  runtime_allocated_data and runtime_allocated_code are not freed in your application code.

Thanks

I updated build_wamr.sh to always pull the newest commit before building.
Though the issue still persists.
Rust automatically deallocates variables when they go out of scope unless you borrow them.
So i think i will try to "borrow" the input buffers and hopefully not dealloc them.
Just to be clear:
Is the problem during the deallocation or is the problem that i am accessing runtime_allocated_data after free?

Rust automatically deallocates variables when they go out of scope unless you borrow them.
So i think i will try to "borrow" the input buffers and hopefully not dealloc them.

That sounds reasonable, maybe this is the root cause.

Is the problem during the deallocation or is the problem that i am accessing runtime_allocated_data after free?

It's during the deallocation.

When you say that you step into the debugger.
Do you use sgx-gdb or some other debugging tool?

I am going to try and rewrite the wasm to use wasi over the weekend, and see if that helps.
Do you have any example of running wasi in WAMR?
I tried using the iwasm SGX example:
./iwasm --dir=helloworld hello_world.wasm
Where helloworld is a directory at the same level as iwasm.
I get the Rust error:
failed to find a pre-opened file descriptor through which "helloworld/helloworld.txt" could be opened
The source code is very simple:
use std::io::prelude::*;
use std::fs;

fn main() {
    println!("Hello world!");
    let mut file = fs::File::create("/helloworld/helloworld.txt").unwrap();
    write!(file, "Hello world!\n").unwrap();
}

I am thinking this is just me formatting the --dir= option incorrectly.
I could not find any example of how to provide a directory for WASI in the docs, outside of the help text from iwasm.
Hopefully using WASI and files can fix the issue of deallocating the input buffers :)

@damgaard22 Rust wasi sometimes doesn't work, see #278 , we are not sure why, it might be compiler issue.
For your workload, there might a way to hack the wasi deallocate: module_malloc larger memory with extra 8 leading unused bytes, set them to 0, and pass offset = allocated_offset + 8 to wasm function, see the attachment. It works, but it is just tricky.
Enclave.zip

That is awesome!
The small example seems to work perfectly now!
For the actual example i am trying to get working i will need to use more memory than a 16 MB stack and heap.
With the newest code i get "unreachable" when changing the stack and heap size to 32MB. Is that something to do with the new offset logic or should i try debugging it with sgx-gdb?

Could you confirm that the wasm app needs 32M stack to run? It is really large, meaning that the function call chain is very long, are there recursive calls? If it really needs 32M stack, then we doubt another stack is not enough: the stack area inside linear memory, which is setup by compiler, generally we call it auxiliary stack:
-------------------------------------------------------------
|    data area    |        stack area      |    heap area   |
-------------------------------------------------------------

In your wasm app, seems that it is no larger than 1M:
(global $92  (mut i32) (i32.const 1048576))
Here the mutable global should be the stack top pointer, and it is decreased when function calling.
Not sure how to configure it in your compiler. In wasi-sdk clang, it can be configured with option "-z stack-size=n". Could you please enlarge it and try again?

Yeah you seem to have a point. A large stack is not needed.
When testing, what i would classify as a low to medium sized example (pushed to the new_commit branch) i get "unreachable" as well. You can try for yourself if you want on the new_commit branch.
I want to be able to debug this but i am not really able to figure out the good breakpoint placements etc. to do this.
As you have actually solved the issue at hand i would propose that i thank you and Xu Jun for your amazing work, and i will open an issue on how to effectively debug WAMR using gdb (sgx-gdb in this case) and print statements.
Splitting it out into a new issue should hopefully help people searching for debugging of WAMR.
Do you agree with that?


Create _true-client-ip-additional-resources.md

Added Additional Resources to https://developers.cloudflare.com/network/true-client-ip-header/

Closing in favor of the edits I'm leaving on #14855


How can I fine-grained profile the quantized model?

I trained, quantized, and compiled the resnet50 model on vitis ai 2.5.
I want to use <python3 -m vaitrace_py --fine_grained> to resnet50 but  I got errors.
Without fine_grained option, It works well.
I think the tracing tool can profile only unquantized models or no fine-grained option.
How can I fine-grained profile the quantized model?
Or please tell me another tool. help me..

I also encounter the same issue.