Add new options baseDir

There were problems with metro bundler while working with the monorepository. "file.opts.filename" came as "/Users/username/Documents/project/packages/native/packages/native/src/styles/index.js" and the path was doubled.
In my case help baseDir : "../../"
{
	"file where import scss": "packages/native/src/styles/index.js",
	"import scss": "import vars from '../../../shared/styles/_var.scss';"
}

// baseDir: "../../"
{
	"file.opts.filename": '/Users/project/packages/native/packages/native/src/styles/index.js',
	"path.resolve(file.opts.filename, baseDir)": '/Users/project/packages/native/packages/native/src',
	absPath: '/Users/project/packages/shared/styles/_var.scss' // right path
}

Hi, thanks for the patch. This seems like a reasonable addition to me, but it causes tests to fail. Looks like maybe just a missing import. Apologies for not having CI set up before. I've pushed a temporary branch so you can see:
https://github.com/kchmck/babel-plugin-sass-vars/commit/76d367a30e9c2e599d801b122bc503588cf6455b/checks?check_suite_id=247231632
If you rebase on master now you should have that available.
You can also run the tests locally with make test.
Could you also add a test case with this option in use?


Get Started Presentation Template for Everyone

Description
Aaron Krueger (me) wants to put together a default presentation for getting absolutely new users into the network. Currently, we don't have a good standard for people to present or even new users to follow in a succinct way. I propose we create an accessible powerpoint presentation with all the initial steps to get people into the network and provide an easy tutorial to get them staked in some sort of way. This could be on a dex or with a validator. We also will need a FAQ part as well that is well documented and sensible. We want to give people enough to get started but not enough to confuse anyone. This must be HarmonyONE centric to maintain simplicity.
Context
A lot of the dev captains have already been getting people signed up but we have been running into some struggles. Let's alleviate those struggles and make this process seamless. I believe this is high-value because we should be working towards getting more people into the network and using it. The more participation the better we will become! :)
Acceptance Criteria

[ ] A solid presentation that is easy to follow and add to for custom presentations
[ ] An informative FAQ slide/page to not have to reiterate commonly asked questions
[ ] Must be accessible and readily available

Reward
[amount of tokens in ONE]

Where should this be implemented ?


error in dr2tot data for HEI 2015

FPED_PATH1 = "/2005_2006/fped_dr2tot_0506.sas7bdat"
NUTRIENT_PATH1 = "/dietary/dr2tot_d.xpt"
DEMO_PATH = "/demo/demo_d05_06.xpt"
hei0506_2 <- HEI2015_NHANES_FPED(FPED_PATH1, NUTRIENT_PATH1, DEMO_PATH)
Error in filter():
! Problem while computing ..1 = DR1DRSTZ == 1.
Caused by error in mask$eval_all_filter():
! object 'DR1DRSTZ' not found
Run rlang::last_error() to see where the error occurred.
rlang::last_error()
<error/rlang_error>
Error in filter():
! Problem while computing ..1 = DR1DRSTZ == 1.
Caused by error in mask$eval_all_filter():
! object 'DR1DRSTZ' not found

Backtrace:

dietaryindex::HEI2015_NHANES_FPED(...)
dplyr:::filter.data.frame(., DR1DRSTZ == 1)
dplyr:::filter_rows(.data, ..., caller_env = caller_env())
dplyr:::filter_eval(dots, mask = mask, error_call = error_call)
mask$eval_all_filter(dots, env_filter)
Run rlang::last_trace() to see the full context.

Thanks for reaching out! Sorry, HEI2015_NHANES_FPED currently only supports the first-day nutrition data. In the next update, I will make it available to use the second-day nutrition data, and perhaps merge it with the first-day data if needed.

Thanks for reaching out! Sorry, HEI2015_NHANES_FPED currently only supports the first-day nutrition data. In the next update, I will make it available to use the second-day nutrition data, and perhaps merge it with the first-day data if needed.

Thank you for your contributions in this field. Look forward to your update.

Thanks for reaching out! Sorry, HEI2015_NHANES_FPED currently only supports the first-day nutrition data. In the next update, I will make it available to use the second-day nutrition data, and perhaps merge it with the first-day data if needed.

Thank you for your contributions in this field. Look forward to your update.

Hi, I just updated the HEI2015_NHANES_FPED function. Now it supports day 1, day 2, or day 1 + day 2 data input. If you provide day 1 and day 2 data, the mean values will be returned. If you provide day 2 only, the day 2 values will be returned. See this example:
data("NHANES_20172018")
HEI2015_NHANES_FPED(FPED_PATH=NHANES_20172018$FPED, NUTRIENT_PATH=NHANES_20172018$NUTRIENT, DEMO_PATH=NHANES_20172018$DEMO, FPED_PATH2=NHANES_20172018$FPED2, NUTRIENT_PATH2=NHANES_20172018$NUTRIENT2)

Let me know if you have other questions. Glad to help. If you find the dietaryindex package helpful, please consider giving it a Star on GitHub. It helps recognize my work. Also, if you publish the paper, please cite the package as GitHub “dietaryindex”. The package will be written as a paper soon.

Thanks for reaching out! Sorry, HEI2015_NHANES_FPED currently only supports the first-day nutrition data. In the next update, I will make it available to use the second-day nutrition data, and perhaps merge it with the first-day data if needed.

Thank you for your contributions in this field. Look forward to your update.

Hi, I just updated the HEI2015_NHANES_FPED function. Now it supports day 1, day 2, or day 1 + day 2 data input. If you provide day 1 and day 2 data, the mean values will be returned. If you provide day 2 only, the day 2 values will be returned. See this example:
data("NHANES_20172018")
HEI2015_NHANES_FPED(FPED_PATH=NHANES_20172018$FPED, NUTRIENT_PATH=NHANES_20172018$NUTRIENT, DEMO_PATH=NHANES_20172018$DEMO, FPED_PATH2=NHANES_20172018$FPED2, NUTRIENT_PATH2=NHANES_20172018$NUTRIENT2)

Let me know if you have other questions. Glad to help. If you find the dietaryindex package helpful, please consider giving it a Star on GitHub. It helps recognize my work. Also, if you publish the paper, please cite the package as GitHub “dietaryindex”. The package will be written as a paper soon.

After updating the R package, all errors were resolved. Thank you very much for your efforts and contributions. This R package will be referenced in the later article publication.


调用notifyItemRemoved()动态remove item的时候, 没有动画效果

如题, 需要来回切换页面才能看到item remove.

workaround https://stackoverflow.com/questions/36495009/force-recyclerview-to-redraw-its-items

workaround https://stackoverflow.com/questions/36495009/force-recyclerview-to-redraw-its-items

Trying to update a single item of the recyclerview. Used all combinations of notify...APIs. Didn't work. Am I missing something?


Adjusting cards dimensions and avoiding user's info break up in a small screen

Just started reviewing :) :octocat: Sent from GH.

Hey @jessuircleydson, I'll start reviewing this PR today

Just started reviewing :) :octocat: Sent from GH.

Pull request submitted to https://github.com/interaminense/react-portfolio-behance/pull/15. See changes here. :octocat: Sent from GH.


Add support for merge and archive options

Hello,
Thanks for this very useful Github action.
Do you think it's possible to support the two missing CLI options merge and archive?
I'm in a situation where my layout is not updated in the cloud when I push because the merge is by default true I guess.
I don't want to create a fork for this so here is the code just in case:
  merge:
    description: 'Whether to merge layout information from the remote workspace (optional: defaults to true)'
    required: false
  archive:
    description: 'Whether to store the previous version of the remote workspace (optional; default to true)'
    required: false

...

    - '-merge'
    - ${{ inputs.merge }}
    - '-archive'
    - ${{ inputs.archive }}

Hey, thanks for reaching out )
I have added these options.
Also, I have aligned versioning with the upstream so you can use @v1 or @v1.30.0 for this action.


Clojure CLI tools deps.edn support?

Support for tools deps? (see #12)

Can you be more specific in what you mean?

Would be cool if we could run the checks from a project using the deps.edn format from Clojure CLI tools.

I'm also interested in this. Has anyone found a tool to scan deps.edn or ClojureScript dependencies?

I'm also looking for the same. Did anyone find a tool to scan deps.edn dependencies?

You can use this library/plugin with Clojure CLI right now.
In your deps.edn, add:
 :aliases   {:nvd {:extra-deps {lein-nvd/lein-nvd {:mvn/version "1.4.1"}
                                org.slf4j/slf4j-nop {:mvn/version "1.7.30"}}
                   :main-opts ["-m" "nvd.task.check"]}}

On the command line run it:
$ clj -M:nvd

The only issue that I've noticed is that nvd.task.check/make-classpath is not playing nicely with > Java 8, due to the way classpath is generated. But that's a separate issue, but one that you should be aware when trying the above.

The only issue that I've noticed is that nvd.task.check/make-classpath is not playing nicely with > Java 8, due to the way classpath is generated. But that's a separate issue, but one that you should be aware when trying the above.

Took care of that in #56

Considering that #57 & #58 were merged and that the README shows how to use this library with Clojure CLI tools deps.edn, maybe this issue is no longer relevant and can be closed?

@dotemacs agreed.


Release v2.0.0 the annotator can also download data

version Release v2.0.0

I make a super users，names admin123
and make a common users, names worker01

use super users admin123 make an organization
invite worker01 as a Worker member

use super users admin123 create a task，assigned to worker01

then login out admin123， login in worker01，choose the task
export task dataset

it look export data successful

it can look the task belong to

@fanasite , it is by design. Please look at permissions in the file (look at export:dataset scope): https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/iam/rules/tasks.csv
If you see how to improve the default choice, let me know.

@fanasite , it is by design. Please look at permissions in the file (look at export:dataset scope): https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/iam/rules/tasks.csv
If you see how to improve the default choice, let me know.

so, I can understand it, didn't solve this issue https://github.com/openvinotoolkit/cvat/issues/3318?
the assignee also can download dataset.

@fanasite , an assignee for a job cannot download the dataset. It was the fix. An assignee for a task is a person, who is responsible for the task. Basically it is the owner's delegate to manage the task (including the ability to download the dataset). If you don't need to have an assignee for a task, just reset the field. Also you can easily fix these permissions if you don't like the default behaviors. Just modify https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/iam/rules/tasks.rego as needed and restart OPA container.

@fanasite , an assignee for a job cannot download the dataset. It was the fix. An assignee for a task is a person, who is responsible for the task. Basically it is the owner's delegate to manage the task (including the ability to download the dataset). If you don't need to have an assignee for a task, just reset the field. Also you can easily fix these permissions if you don't like the default behaviors. Just modify https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/iam/rules/tasks.rego as needed and restart OPA container.

ok, I try to change tasks.rego this file.
before

I delete [utils.EXPORT_DATASET]  [utils.EXPORT_ANNOTATIONS]  [utils.EXPORT_BACKUP]

then restart OPA container, use worker01 login in cvat
successful, worker01 cannot download dataset.

thank very much!

@fanasite , just for your information. The change delete rights for other people as well (e.g. the task owner).


Create image collection for validation script

should include clear and cloudy images

and band-boosted images, if Sen-2 makes ID-ing of blooms possible


Add if-while-let_multiple_patterns RFC

This has already been implemented in rust-lang/rust#23034

cc @Manishearth, @pcwalton

Rendered

Discussed in #935

Should this RFC also propose that exhaustive lets should also work? It seems like that's the last place where | wouldn't work, which is sort of random.
e.g.
fn main() {
    let x: Result<u32, u32> = Ok(1);
    let Ok(y) | Err(y) = x;
    println!("{}", y);
}

@Gankro: I agree that that would be more consistent, but I think that would make more sense to open as a seperate RFC.
Alternatively, a RFC could change PAT | PAT in general to become a pattern, which would make both ìf let, while let, let and function arguments be able to use the | form.

@Kimundi: The more general approach (eg. also allowing alternations (|) in function arguments) has been discussed a bit in #99.
I hadn't considered alternations in normal lets, but I guess we could create another RFC for that case?

I would opt for a separate RfC for that.

(I agree with this RfC, btw)

We could consider extending if let and while let to also include guards, but that has opens up the question about syntax (if let Some(n) = x if n > 0 is not extremely pretty), so we should probably save that for an RFC of its own.

In fact if we also if let as the syntax for Haskell-style pattern guards, then it seems like we could end up with if let Some(b) = a if let Some(c) = b, which is even more awesome, in a very particular sense. (This seems to also be an infinite regress?)

@glaebhoerl Couldn't all of those be written with @ (e.g. if let Some(b @ Some(c)) = a?

@pcwalton Sure; I only meant to point out that if we change the if let expression to allow guards, and also generalize guards to allow pattern guards with the syntax if let, then a pattern guard on an if let would result in if let ... if let. This actually feels logical to me, but could also be considered unusual. The example was just to illustrate the syntax. (tl;dr it's not at all an objection on my part, just an observation)

In fact if we also use if let as the syntax for Haskell-style pattern guards (which I think would be logical), then it seems like we could end up with if let Some(b) = a if let Some(c) = b, which is even more awesome, in a very particular sense. (This seems to also be an infinite regress?)

That's a very interesting question, and it doesn't seem like it would hurt the language as such. However, this seems like an orthogonal issue.

What's the verdict on this? Most people here and in #935 seem to be in agreement that this is a useful addition to the language, but it also opens up various questions regarding additional constructs such as nested if lets and guards. Most of those questions/suggestions represent larger additions to the language, whereas I feel like the feature proposed in this particular RFC has more straightforward implications.

@Munksgaard my inclination is that this is a nice-to-have feature that we don't need presently. It's very tempting to add to Rust every nice convenience, but we have to exercise restraint.

I'm not convinced that this is something we should do. In general, I'm in favor of making if let more powerful, but I'm concerned that making changes like this right now will prevent us from doing other useful stuff in the future.
For example, if let was inspired by Swift, and Swift 1.2 extends if let with some useful functionality that we don't currently have an analogue for in Rust, which is basically chained expressions. In Swift 1.2 you can say something like:
if let a = foo(), let b = a.bar(), let c = b.baz() where c > 2, let d = c.quux() {
    // do something with d
} else {
    // some expression in that chain failed
}

(this can actually be shortened slightly by dropping the 2nd and 3rd lets, it's only required on chained expressions after a where clause)
This is equivalent to
var success = false
if let a = foo() {
    if let b = a.bar() {
        if let c = b.baz() where c > 2 {
            if let d = c.quux() {
                success = true
                // do something with d
            }
        }
    }
}
if !success {
    // some expression in that chain failed
}

This turns out to be a useful construct, and I'd like to eventually get something similar into Rust. But if we loosen the if let syntax today, it's not clear if that will interfere with the ability to extend the syntax like this in the future.
More generally, making changes to make if let be able to do more stuff that match can do just seems like something being done for the sake of doing it. If you want to do stuff that match can do, then go ahead and use match. if let today is just a convenience for a simple form of match, but there's no reason why it needs to be equivalent to a single match in the future.

@kballard That seems similar to https://github.com/rust-lang/rfcs/issues/929 which used && instead of commas, though where clauses never occurred to me.

For example, if let was inspired by Swift

https://github.com/rust-lang/rust/issues/1529
Credit goes to @kballard

@mahkoh I wrote the if let RFC. It was directly inspired by Swift. I can believe that a similar concept was talked about internally at Mozilla before then, but if so, it was never made publicly known.

That just means that the RFC was inspired by swift. The idea to destructure in if is much older. It might even be so that someone working on swift got the idea from the linked issue.

To contribute something on-topic: I share @kballard's concerns. The following constructs seem interesting too and one would have to think about how they interact with this RFC:
if let Some(x) = x1 || let Some(x) = x2
if (let Some(ref x) = x1 && x > 0) || let Some(ref x) = x2

Although this is a cool feature, per general concerns about feature creep, I'm closing this RFC without accepting it. Thank you.


Is it possible for form data value save as string and not array for radio and select options

Currently, with select tag and radio type store user's chosen value in an array. Is there an option to store this chosen value as a string opposed to an array?

Is this possible?


hacky workaround for when task_id is too long for table_updates

TEXT is converted by Redshift to VARCHAR (256).  Some of our task_id values are coming up longer than that which result in mortar job errors (which are false positives; tasks are succeeding but the marker table update is failing so the tasks are being retried anyway).
the PR that purports to fix this issue for real will be dauntingly difficult to merge.   I propose that this change would suffice, as long as there aren't any negative impacts I haven't considered.
This code change is inert in and of itself - we will have to create a new version of the table in Redshift, and then rename old and new ones.  There is a risk of a race condition causing a problem during that operation.

It feels to me that we will have to migrate all update_table tables. Do we have a full list?

@gzussa Good point. I thought there was just one per (Redshift) instance in public..
This is not a problem for postgres (non-Redshift) databases because TEXT is TEXT there (variable unlimited length).
Hm.  Maybe the fix is simply modifying table_updates in Redshift, but leaving this code alone.  I'll try to think about alternatives.

Closing this.  I went ahead and made the column wider on the one redshift instance affected by this problem (usage prod).  It's fairly easy to do this for other instances if the problem recurs.


Very tiny doc error

At: [https://docs.microsoft.com/en-us/office/vba/api/office.iribbonui]
In the following example, a dot is placed after (...)?"
(…) and search for "How can I determine the correct signatures for each callback procedure?".
I am not sure what applies to American-English grammar, but to Dutch grammar, if a quote concludes a sentence, no extra point is used to close the sentence.
It's a small matter, but perhaps also a good tip if this happens more often.

@PeterVanLoosbroek Thanks, Peter. I moved the string to the middle of the sentence so we didn't have to deal with double punctuation. Changes will be live later today.
For information about the callback functions available for each UI element, search for "How can I determine the correct signatures for each callback procedure?" in Customizing the 2007 Office Fluent Ribbon for Developers.

OK Linda. I respect you because you have an open mind to improve even such small things.


Improve status sync

Summary
We were not listening to the status change websocket event, so we were not updating correctly our own status.
We also were not getting the status of the rest of the users on load, but would wait one minute to get the statuses. If we have short sessions of less than one minute, we would never get the statuses.

Cherry pick is scheduled.


Automate documentation syncing to odo.dev

The current process for updating documentation is quite confusing.
Especially when someone updates docs/public in master it is not apparent that there is manual process that needs to be followed in order to update those files in odo.dev webpage.
This needs to be automated so the only thing that is needed is just modifying the markdown or asciidoc files.
This could be done by Prow or Travis-CI job running whenever there is change on the master branch.
/priority medium
/kind documentation

/area documentation

/kind documentation

/lifecycle frozen

/lifecycle frozen


Support for Laravel 8?

Problem 1
- Root composer.json requires alex-hnydiuk/laracent ^1.0 -> satisfiable by alex-hnydiuk/laracent[1.0.0].
- alex-hnydiuk/laracent 1.0.0 requires guzzlehttp/guzzle ^6.2 -> found guzzlehttp/guzzle[6.2.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0).

fork, support laravel 5.6 - 8
https://github.com/denis660/laravel-centrifuge


About the newly added HMR implementation

Hi @ruifigueira,
I just saw you implementing the HMR on the recorder-crx, The way you build the vite dev config is very interesting, thanks for providing such useful strategy.
I have a question though, when I clone the repo and operate it, I found myself ending up with a weird spot, which, when I use dev mode, the debug recording highlighter will show up, but no matter how I click here or there, the recorded codegen actions didn't show up in the recorder.
But when I use the build mode, it work naturally like before.
I would like to know whether you have experienced the same thing?
Thanks again!

Can you try to delete playwright/packages/playwright-core/src/generated, run npm run generate:pw and try again?

hi @ruifigueira Thanks for your reply!
I try to delete the generated folder you mentioned and run the generated script again but without luck, under dev mode it is still showing the playwright highlight red selector and when click the recorder didn't show up the codegen script.
I am wondering how to debug this, since the services worker didn't spilt out error, and crxApplication is attached to new page

You can debug the service worker, setting some breakpoints into recorderCollection.ts functions. When you are in recording mode, that class is the one that intercepts those events on the service worker side.
Nevertheless, I did try to run in a clean environment:

I did a git clone of the project
I ran:

npm ci
npm run build:crx
npm run dev

and it worked that way.

@ruifigueira Thanks for your hint, I will try to debug it, I suspect that is due to some of my configuration or stuff. I will return to this issue if I find anything new 👌

@ruifigueira I found why, somehow, the whole recorder is attached but the mode is still standby. I think I know how to resolve my problem, thank for your help!

That's great!


import_realm: Update incorrect comment about emoji dir in exported data.

The emoji dir is present in the data from our export tool. This was added in 468afe4840fbac0ca93643d1c8fc11c31a687528.
This comment hasn't been updated since
c4b886d8aee2503a03cfbffd30676ee0d4aba933, so probably we just forgot to refresh it when custom emoji export was added.

Sure, this seems helpful, merged, thanks @mateuszmandera!


UnicodeDecodeError when running 'python 1_extract_mimic3.py'

Hi, thanks very much for your work and your code!
Error
I was trying to run python 1_extract_mimic3.py and I encountered this error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 18312: invalid continuation byte.
  File "/Users/xinyuezhang/BlendedICU/database_processing/dataprocessor.py", line 36, in __init__
    self.ohdsi_med = self._read_json(self.med_file)

Environment
Code: latest version
Environment: latest version specified by env.yml
Possible Reason
JSON file (medications_v10.json) the function trying to load is not encoded in UTF-8, which is the default encoding expected by Python's json.load function.
Possible Solution
Solution 1
encode medications_v10.json in UTF-8
Solution 2
Revise _read_json function to include automatic encoding detection using the chardet library. This function first opens the file in binary mode ('rb') to detect the encoding using chardet. Then it re-opens the file in text mode with the correct encoding to parse the JSON.
import json
import chardet

def _read_json(self, pth):
    # Detect encoding
    with open(pth, 'rb') as file:
        detected_encoding = chardet.detect(file.read())['encoding']

    # Now read the file with the detected encoding
    with open(pth, 'r', encoding=detected_encoding) as file:
        return json.load(file)

For some reason I have no trouble running json.load(file) when the file is encoded in ISO-8859-1... Anyways I like solution 2 and just committed it.
Thank you for your interest in our work !


Flapping windows on start

Hello!
I'm trying to use Speedy2D in my new UI project, and stumbled upon windows flap.
You can see it in this short video: https://up.agrd.eu/2NbRso.mp4
It seems that the window is shown before it is resized and moved to needed position. Very annoying :)

Thanks for the report!
It looks like the ability to set the window position during creation has just been added to the winit library:
https://github.com/rust-windowing/winit/pull/1866
I'm happy to make use of this in Speedy2D, however we need to wait for that commit to be integrated in a winit release (0.25.0?), which will then need to be integrated into glutin :)
One concern is that we won't have access to the size of the window borders at that time, and so can't take that into account for the centering, and the window would be slightly offset.

Thanks! I'll bear with it for now. There is so much work for me ahead for time being :)

I think we're ready to set position during creation ;)

Thanks, looks like you're right. I might wait for the WebGL work to be finished before doing this -- it's in the Glutin-specific code, and so it'll create a merge conflict due to splitting window.rs into multiple files. If WebGL still isn't ready a few weeks from now, I'll just add it anyway and manually deal with the conflict :)

Looking at this again, I think they're only exposing the ability to set the outer position of the window. There's a distinction between:

Inner size: The size of your framebuffer/content area
Outer size: The inner size, plus the title bar and window borders
Inner position: The position of the top left corner of the inner area (framebuffer) on the screen
Outer position: The position of the top left corner of the title bar on the screen

Currently we:

Create the window at an arbitrary position
Get the outer size of the window
Use the outer size to find the central outer position
Set the outer position on the window

The above process causes the flapping, but it also means we're able to correctly center the window on the screen. If we did this before the window first appears, I don't think there's a way to get the outer size (only the inner size), so we wouldn't actually know where to put the window. If we used the inner size, the window wouldn't be centered, it would be offset by the title bar/left window border.
So I'm not sure if there's a way to do this even after that API has been added. I'm open to suggestions though :)
Winit ticket for centering window: https://github.com/rust-windowing/winit/issues/38

@Revertron Could you confirm that #57 fixes the issue for you please?

@QuantumBadger, yes, it works perfectly!


Dynamic import with catch block fails in test

Describe the bug
An await import statement with a catch block runs well in NodeJS but fails in vitest
node --eval "require('./index').run().then(console.log)"
false # console output

Reproduction
// index.js
exports.run = async () => {
    try {
        await import('./404.js');
    }
    catch (ex) {
        if (ex.code === 'MODULE_NOT_FOUND' || ex.code === 'ERR_MODULE_NOT_FOUND') {
            return false;
        }
        throw ex;
    }
};

// index.test.js
import {test, expect} from 'vitest';
import {run} from './index';

test('run', async () => {
    const value = await run();
    expect(value).toBe(false);
});

Running vitest produces errors:
RUN  /Users/otakustay/Downloads/vi

 ❯ index.test.js (0)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  index.test.js [ index.test.js ]
Error: Failed to resolve import "./404.js" from "index.js". Does the file exist?
 ❯ formatError node_modules/vite/dist/node/chunks/dep-4a9cff06.js:42631:46
 ❯ TransformContext.error node_modules/vite/dist/node/chunks/dep-4a9cff06.js:42627:19
 ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-4a9cff06.js:81376:26
 ❯ async TransformContext.transform node_modules/vite/dist/node/chunks/dep-4a9cff06.js:81516:57
 ❯ async Object.transform node_modules/vite/dist/node/chunks/dep-4a9cff06.js:42847:30
 ❯ async doTransform node_modules/vite/dist/node/chunks/dep-4a9cff06.js:57929:29

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

Test Files  1 failed (1)
     Tests  no tests
      Time  355ms (in thread 0ms, Infinity%)

System Info
System:
    OS: macOS 12.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 8.58 GB / 64.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - /var/folders/hm/3h2qtx2x2jddg130mktcrztm0000gn/T/fnm_multishells/79464_1640586000170/bin/node
    Yarn: 1.22.15 - /var/folders/hm/3h2qtx2x2jddg130mktcrztm0000gn/T/fnm_multishells/79464_1640586000170/bin/yarn
    npm: 8.3.0 - /var/folders/hm/3h2qtx2x2jddg130mktcrztm0000gn/T/fnm_multishells/79464_1640586000170/bin/npm
  Browsers:
    Chrome: 96.0.4664.110
    Safari: 15.2
  npmPackages:
    vite: ^2.7.7 => 2.7.7
    vitest: ^0.0.115 => 0.0.115

Used Package Manager
npm
Validations

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

I have another usecase that's related if it's helpful. (I know in https://github.com/vitejs/vite/issues/7010 there was some "what is the usecase" conversation)
I'm the maintainer of PlopJS and am looking to move to Vitest for our tests. However, because we're a CLI that utilizes ESM, I'm looking to check that we're throwing helpful error messages when an incorrectly configured ESM file (either via a type="common" with ESM export or via a type="module" with non-.cjs module.exports file)


Implement kotlin setup-payload phase II

This is the second phase of setuppayload implementation in kotlin, which convert ManualSetupPayloadGenerator and ManualSetupPayloadParser to kotlin, the final goal is to implement setup payload completely in kotlin and deprecate the existing src/setup_payload implemented in java/c++.
Testing:
Leverage the existing CI tests using java_matter_controller, unit tests will be added in a separate PR after adding kotlin unit test in CI

@yufengwangca in https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/java-tests.yaml#L93 we now have the ability to run java unit tests.
Would we be able to add unit tests for these classes and functionality as well?

@yufengwangca in https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/java-tests.yaml#L93 we now have the ability to run java unit tests.
Would we be able to add unit tests for these classes and functionality as well?

Per sync, we plan to add unit tests after kotlin conversion so that we don't worry about how to link and load native lib to JUnit framework


Linting: enforce unix line endings. Closes #2800

Changes Unknown when pulling 72e91126cfdc3b66ea07ca5275e61570e1330a61 on enforce-unix-newlines into ** on master**.

Changes Unknown when pulling 72e91126cfdc3b66ea07ca5275e61570e1330a61 on enforce-unix-newlines into ** on master**.

Per our .editorconfig we want unix newlines on everything. This is just an enforcement of this policy, which happens to also completely cover your error case

Interesting; well, if we want to go that way, we should really eliminate the Git settings issue in the first place by adding the same effect to .gitattributes too. Then nothing has to happen manually.
My vague impression is that Windows development is smoothest with per-OS newlines rather than always-Unix/Linux newlines, but I don't use a lot of fancy software most of the time either, so I am not sure just how much of a difference it makes to the typical Windows developer. I know Notepad is one thing that still can't handle other OSes' line endings, but there's Gitpad (basically a blocking Notepad with 'nix newline support) for people hacking on a Git repo...

Sorry @Munter, don't these config files inherit from those found higher in the file hierarchy? I'd just like to avoid redundancy, if possible. Not sure if it's the case, just asking.

Apparently they do inherit: http://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy.
Having those rules in our main .estlinrc file should be enough. Do you agree?

Yes.

Coverage remained the same at 88.395% when pulling 285623435d6473fa8d29f74bc13be732e5d6a5d7 on enforce-unix-newlines into f20de56637b2223f614ce40adc0d41a58030f042 on master.

Thanks! 😊


ModuleNotFoundError: No module named 'hok'

Why do I import the hok module and still show an error?
Traceback (most recent call last):
File "test_env.py", line 5, in
from hok.hok1v1 import HoK1v1
ModuleNotFoundError: No module named 'hok'

The corresponding system variables can be added to solve

Please follow the README carefully. You need to install the hok before running.

Install hok_env in python
## after git clone this repo
cd hok_env/hok_env
pip install -e .


Add examples to the doc folder

I have a simple Ruby app that I would like to compile to WebAssembly or just run on Artichoke for fun/benchmarking.
It would be really helpful if you could add some instructions on how to do that after setting up a build environment.

You're right, we do need docs. Sorry this isn't easier today. Below is my best attempt at the steps to get started. Let me know if they work for you.
The best example of how to build an app is the spec-runner crate.
The steps are:

Create a new crate.
 cargo new [package name]

Add the rust-embed crate to the crate dependencies. rust-embed enables us to easily embed Ruby sources into the project.

https://github.com/artichoke/artichoke/blob/763c7d50b3f4e59f3d19f47fc0554a8014e4c7ea/spec-runner/Cargo.toml#L15-L17

Embed Ruby sources into crate.

https://github.com/artichoke/artichoke/blob/763c7d50b3f4e59f3d19f47fc0554a8014e4c7ea/spec-runner/src/mspec.rs#L16-L18

Load Ruby sources into an interpreter.

https://github.com/artichoke/artichoke/blob/763c7d50b3f4e59f3d19f47fc0554a8014e4c7ea/spec-runner/src/mspec.rs#L8-L14

Execute the Ruby entry point in main.

https://github.com/artichoke/artichoke/blob/763c7d50b3f4e59f3d19f47fc0554a8014e4c7ea/spec-runner/src/main.rs#L14-L54
For WebAssembly, you'll need the best example is the Artichoke playground. You'll need to:

Depend on stdweb and wire up the event loop in main.
Expose functions to JS with FFI that initialize the interpreter and call the Ruby entrypoint.
Ensure these functions get exported with Emscripten.
Wire things up in JS with webpack.

Hi @lopopolo,
I followed along your instructions, looking at mspec code in artichoke and updating according and I was able to embed a fragment of Ruby code into a binary.
The code is on https://github.com/abinoam/binrubyscript
And a blog post at https://abinoam.tl1n.com/embedding-ruby-code-in-an-executable-using-artichoke/
Congratulations for Artichoke!


[feature request]can not move node to another nodepool by label modification

What would you like to be added:
the nodepool label of node can not be updated after node creation, this means we can not move a node into another nodepool by changing node label simply.
if end users want to move a node to another nodepool, they should drain all pods on the node at first, and then delete and reset this node from cluster, and re-join this node into the cluster.
so we will add a webhook in yurt-manager to prevent updating nodepool label of node.
Why is this needed:
Because the NodePool is the first class citizen in OpenYurt, and node must belong to a NodePool and only one NodePool, it is not secure to move a node into another NodePool by label changing.
others
/kind feature

@rambohe-ch I want to try this, does this mean adding a validation webhook for node updates?

@rambohe-ch I want to try this, does this mean adding a validation webhook for node updates?

@y-ykcir yes, we need to add a validate webhook to handle this. maybe we need to discuss this feature on community meeting because this feature will bring some changes to end users.

@y-ykcir by the way, we also need to prevent nodepool to be deleted if there are nodes in the nodepool.

@y-ykcir Do you have any time to work on this issue: https://github.com/openyurtio/openyurt/issues/1080 in this week? @YTGhost is a little busy on other works.

@y-ykcir Do you have any time to work on this issue: #1080 in this week? @YTGhost is a little busy on other works.

OK, I'll take a look.

@y-ykcir welcome you to apply OpenYurt community member,  and you can take me as sponsor.
you can make a apply issue in openyurtio/community, and example looks like: https://github.com/openyurtio/community/issues/62

@y-ykcir welcome you to apply OpenYurt community member, and you can take me as sponsor.
you can make a apply issue in openyurtio/community, and example looks like: openyurtio/community#62

Thx a lot! I'll apply after tackling the issue #1080


No signature of method: static org.akhikhl.gretty.ProjectUtils.getClassPath()

Hello,
I'm using default gradle wrapper in Intellij IDEA CE 2018.1
When I start the appStart task of gretty I get the error :
Caused by: groovy.lang.MissingMethodException: No signature of method: static org.akhikhl.gretty.ProjectUtils.getClassPath() is applicable for argument types: (org.gradle.api.internal.project.DefaultProject_Decorated, null, java.lang.String) values: [project ':myProject', null, runtime]
My projects directory structure is different from the default one expected by gradle. I checked the gretty source code and the exception comes from;
gretty/libs/gretty/src/main/groovy/org/akhikhl/gretty/StartBaseTask.groovy:212
resolvedClassPath.addAll(ProjectUtils.getClassPath(proj, wconfig.inplace, runtimeConfig))
The wconfig.inplace part returns null. Do I need to set something in my build.gradle or is this a bug? Contents of my file:
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.akhikhl.gretty:gretty:+'
    }
}

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'ear'
apply plugin: 'org.akhikhl.gretty'

repositories {
    jcenter()

    flatDir {
        dirs '../Libs'
    }
}

sourceSets {
    main {
        java {
            srcDirs = ["src"]
        }

        resources {
            srcDir 'WebContent/resources'
        }
    }

    test{
        java {
            srcDirs=["test"]
        }
    }
}

dependencies {
    compile 'javax.servlet:javax.servlet-api:3.1.0'

    testCompile 'junit:junit:4.12'

    compile 'junit:junit:4.12'
    // more dependencies...
}

gretty {
    httpPort = 8080
    contextPath = '/myProject'
    servletContainer = 'jetty9'
    webAppDirName = '/WebContent'
}

Thanks in advance

Hi, it's been a long time since this problem, but I still want to suggest a solution. Changing the system language to english was the solution for me.

Thank you @fyalcincosar. I can't remember but my system language may not be English at that time.

thank you @yalcincosar . this solved my problem.


us/wa/king has many empty values for city

Yay, my second contribution!  I want to dig deeper and learn to write better issues and help fix things, but I am still finding my way around.  Please point me in the right direction!
us/wa/king has a significant portion of rows with an empty city value.
The source type seems to be an ESRI file, which I have no experience with.  Where should I go to learn enough about ESRI to look at the original data and start to be helpful?
-Peter

actually @trescube, it looks like you already added it!  I'm seeing a "first_non_empty" function in the openaddresses/machine code and the tests confirm it does what it sounds like: https://github.com/openaddresses/machine/blob/d06c1f1dc46b1ff72ed16dfc8fdfd99c10b633f8/openaddr/tests/conform.py#L1295
I don't see it being used by any other sources, but if it's okay to use, let me know and I can put in a PR to fix this issue.

Ha! I completely forgot about that


After update to v1.9.0 - CL Lightning Wallet can not be unlocked

This message I get:
A dependency job for lightningd.service failed. See 'journalctl -xe' for details.
This shows my command line:

The correct password C was used and I restarted the raspiblitz already via command line.
Any ideas what could help? Thanks a lot for your help!

The following log lines would help a lot. Please share here if not sensitive.

The following log lines would help a lot. Please share here if not sensitive.
Are these the right logs you need to look through? Thanks a lot!

Are these the right logs you need to look through? Thanks a lot!

Not really. When you enter the CLN menu after a minute there is there are the last lines of the journal for CLN and cl.log are shown. Have a look at and paste thise please.

Looks like I get the same message...
Is any fix for this already available?

I ended up with doing a backup of the CLN data, deleting all data from the HDD besides the blockchain, and then reinstalling the node as a "fresh" node. After the reinstall I restored the CLN node with the backup file. Seems to work just fine now.

@openoms is in this issue still something relevant for v1.10.0?

Didn't get to reproduce this problem. Closing, please reopen if comes up again.


When creating a game, default to the number of players specified in the command

For example, if I were to use this command,
!play cantstop that_one_dude theOtherGuy

It should make the max player count 3 (you inviting + 2 more people). This jives well with auto open and setting restrictgroup to your friends or your BGA server. If player count is manually specified as an option with players:4-4, then that should override this default.
Note: This does not prevent you from just using the +/- buttons on the BGA game to add more player spots as necessary.

This has been implemented. Noting here that if you enter an invalid number of players for a game (i.e. 5 for can't stop), the game will have min players = max players = number of players specified with command (+ command author).


Unable to set up 4.1 using new UI

The new setup UI looks great! But it's not working for me, I get stuck on this screen, the gear just turns and turns.

I am running Homebridge 1.1.6, Node.js v14.15.1, and Npm v6.14.8.  I have 11 other plug-ins installed, all working fine.
The error in my homebridge logs says this:
 [21/11/2020, 22:11:02] [Homebridge UI] [homebridge-bravia-tvos] internal/modules/cjs/loader.js:883
  throw err;
  ^Error: Cannot find module '@homebridge/plugin-ui-utils'
Require stack:
- /usr/local/lib/node_modules/homebridge-bravia-tvos/homebridge-ui/server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-bravia-tvos/homebridge-ui/server.js:1:38)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/homebridge-bravia-tvos/homebridge-ui/server.js'
  ]
}

Any pointers appreciated!

@Fofer
Aah sry, forgotten to add plugin ui utils as dependency 😑
Should be fixed with v4.1.1

Thanks for the quick reply!  I just updated to 4.1.1 and it's still not working.  Now the gear goes away but the setup window stays blank.

I uninstalled and reinstalled the plugin, I rebooted Homebridge, and I also reboot the Raspberry Pi, all to no avail.  The error logs only say this:
[21/11/2020, 23:08:37] [Homebridge UI] [homebridge-bravia-tvos] Terminating child process... [21/11/2020, 23:08:37] [Homebridge UI] [homebridge-bravia-tvos] Child process ended

@Fofer
Config ui x version?

@SeydX
homebridge-config-ui-x v4.34.0

@Fofer
Anything in the browser debugging console?

This is what I see in the javascript console:

@Fofer
can u try reinstalling the plugin pls?
sudo npm i -g homebridge-bravia-tvos@latest --unsafe-perm

I tried that, and restarted homebridge, and am still unable to access the new setup UI via this laptop.
I get the same frozen blank screen.
However, I've figured out a big clue.  It DOES work in Safari on my iPhone running iOS 14.2.  It also works in Google Chrome v86.0.4240.198.
Where it doesn't work is my MacBook Pro, running Safari 12.1.2 and macOS Mojave 10.14.6.  (I need to keep this particular machine on this older version for now.)
So I'm able to handle the new configuration so long as I use another browser / device.
Hopefully this is helpful information or you and other potential users.
As an aside, "Catagory" under "Display Order" should be spelled "Category."
Thank you for all the help and attention, and for sharing your work on this great plugin.

Ahh, ok. I forwarded this to oznu (developer of config-ui-x)
thx

No problem, hopefully oznu can help.
I will note that I've had no other issues with config-ui-x on this laptop, everything has worked brilliantly. This is the first homebridge plugin that's posed a problem.
Perhaps you can introduce a failsafe mechanism, if the new setup wizard doesn't work, the user could click a button to revert to the older "manual" method? (which worked fine for me too.)
Anyway, thanks for the great plugin, your work is greatly appreciated.

@Fofer
There is already a fallback for user with homebridge-config-ui-x  < v4.34.0
Already tried a another plugin with custom ui support?
Maybe you could install, just for testing purposes, homebridge-electra-smart or homebridge-gsh which also supports custom ui

I did some testing as you requested.
For starters, this homebridge-bravia-tvos plugin does work in Safari 13.2, just not the older version of Safari 12.1.2 I use as my default browser.  (I was able to test version 13.2 by way of the "Safari Technology Preview" I have installed as an alternate browser.)
It also works in Google Chrome and presumably, the current Safari 14.
The same goes for homebridge-electra-smart.  Same exact issue.
However, homebridge-gsh works fine in all browsers I tried, even Safari 12.1.2.
Perhaps for older browser versions there can be a fallback as well?  Or at the very least, explanatory text that says "if this screen remains blank, try a newer browser." ;)

I talked to oznu about it and the new custom ui is only compatible with iOS 14 and two most recent major versions of Safari/Chrome/Firefox Browser
https://github.com/oznu/homebridge-config-ui-x#supported-browsers

A fix for older browsers is now in the @test tag of the Homebridge UI.
https://github.com/oznu/homebridge-config-ui-x/wiki/How-To-Test-Upcoming-Changes

Hi, this has been addressed in homebridge-config-ui-x v4.35.0
"Plugins: Custom plugin user interfaces now work correctly in older browsers that do not support the EventTarget constructor."


Insert datetime for each build data

Signed-off-by: Johnson George<EMAIL_ADDRESS>

Cherry-picked as c2431747d2fdc5cb6129b252a47fba222053666b, fixed the conflict and flake8 warning.
thanks.


fails at 07-bootstrapping-etcd.md

when trying to start the service it times out on all nodes with cert errors. I followed the guide exactly.
Job for etcd.service failed because a timeout was exceeded. See "systemctl status etcd.service" and "journalctl -xe" for details.
 controller-0 etcd[4160]: rejected connection from "<IP_ADDRESS>:41884" (error "remote error: tls: bad certificate", ServerName "")

I'm having the same issue. Tried recreating the controller-* instances and installing etcd again, but still no luck.
When I list the members I get that:
2fe2f5d17fc97dab, started, controller-3, https://<IP_ADDRESS>:2380, , false
3a57933972cb5131, started, controller-2, https://<IP_ADDRESS>:2380, https://<IP_ADDRESS>:2379, false
ffed16798470cab5, started, controller-1, https://<IP_ADDRESS>:2380, https://<IP_ADDRESS>:2379, false

(I'm using controller-1, -2 and -3 with IPs .11, .12 and .13)

The step 07-bootstrapping-etcd.md makes it very hard... But that's good!
Here're some tips for those who hit the same issue,

Check the internal IP address of each controller node by running ip a | grep 10.240.0 - they must show <IP_ADDRESS>, <IP_ADDRESS>, or <IP_ADDRESS>.
Check SANs by running openssl x509 -in /etc/etcd/kubernetes.pem -text -noout | grep 'X509v3 Subject Alternative Name' -A1 - the three internal IP addresses must be listed there.
Check CA's hash by running openssl x509 -subject_hash -noout -in /etc/etcd/ca.pem and openssl x509 -issuer_hash -noout -in /etc/etcd/kubernetes.pem - they must be identical.

If the above ones don't help, let's try redoing 07-bootstrapping-etcd.md > Configure the etcd Server after running sudo systemctl stop etcd.service and sudo rm -rf /var/lib/etcd/member, which resolved my issue magically. :)


acess denied

says acess denied i have made sure the profile is admin and earthing dont know what to do

and now i have no audio sound when trying to troubleshoot can someone walk me through?

says acess denied i have made sure the profile is admin and earthing dont know what to do

See https://github.com/stascorp/rdpwrap/issues/101

and now i have no audio sound when trying to troubleshoot can someone walk me through?

Not in this thread. If you think this is related to RDP Wrapper, you can ask in Telegram chat (link in README of the repository)


Scaleway provider

Hi @mholt
I created the Scaleway provider here -> https://github.com/dirien/scaleway and would like to donate to this organisation, so we can use it in Caddy-DNS 8https://github.com/caddy-dns)
Would like to create a provider for Civo too, so interessted to see how the transfer process is working.

Ok, I found the instructions -> https://github.com/libdns/libdns/wiki/Implementing-providers
Will create an PR 😅

Created PR #84

Thanks! Reviewed.


Feature request: Linkedin picture

First of all, awesome work! This is exactly what I was looking for, simple yet effective avatar implementation.
I think adding Linkedin profile picture reference would make this perfect. There are only a few big social networks that people maintain pictures on, and Linkedin is the last that hasn't been implemented!

I tried to find an open solution for LinkedIn, but at the moment there is no way (that I know of) to fetch a LinkedIn user profile image based on a LinkedIn user ID. The problem is that you need to use the LinkedIn API to fetch this kind of info. And to be able to query the API you need an API key which would make this component less plug and play.
Let me know if you know about any open endpoints to do this and I would happily implement this.


WIP: Switch to mysql2

Switch to mysql2 to support newer authentication methods, like caching_sha2_password.
As mysql2 is the continuation of the mysql-repo, a switch to mysql2 is recommended in my point of view. Especially the lack of current authentication methods of the mysql repo makes it a kind of bad dependency.
Note: I had to keep mysql as a devDependency because the db-meta module (which is used to verify the content of the tables in the tests) requires mysql as dependency.

Released db-migrate-mysql8 as a substitute
Just use "driver": "mysql8" in database.json.

this module is on mysql2 by now (some time )


feat(next): routes resolved hook

Description (required)
https://github.com/withastro/astro/pull/1232
Related issues & labels (optional)

Closes #
Suggested label:

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File
Note

en/guides/upgrade-to/v5.mdx
Source changed, localizations will be marked as outdated.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Oh, and are we documenting this on the Integrations API page too? Is that coming later?

There you go :smile:

I think we can still take care of https://github.com/withastro/docs/pull/10077#discussion_r1850759057 in this one tho!

Sure! Can you propose an example that would go there?

@sarah11918 i tried to add a little example, let me know what you think!


[CON-239] Gemini Embeddings Provider

Validations

[X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
[X] I'm not able to find an open issue that requests the same enhancement

Problem
Google Gemini offers text embeddings, and we don't yet have (built-in) support!
Solution
https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding-and-embedding is their documentation.
The implementation of this feature would consist of

Copy the CohereEmbeddingsProvider into a new adjacent file, and rename GeminiEmbeddingsProvider
Alter the fetch request to fit what Google expects
Parse the response data to match the format that Continue expects
Add the class to the list here
Update extensions/vscode/config_schema.json

CON-239

@sestinj mind assigning this one to me?

You got it!


out of bounds memory access

I am running a standalone wasm file by using  wasmtime  --dir=.  mainWasi.wasm
The wasm needs to read some local files, the size of local files in total  is 10MB
Error: failed to run main module mainWasi.wasm
Caused by:
0: failed to invoke command default
1: wasm trap: out of bounds memory access
wasm backtrace:
0: 0x29cb - !Predict
1: 0x346d - !testing
2: 0x38ef - !foo
3: 0x39eb - !__original_main
4:  0x2c1 - !_start
I wonder if I can allocate more memory for wasmtime? In lucet, i can use --min-reserved-size, but haven't found similar in wasmtime, but even when i use  lucetc-wasi --min-reserved-size<PHONE_NUMBER> -o mainLucet.so mainWasi.wasm to compile in lucet, I still get the error in lucet run: thread 'main' panicked at 'instance can be created: ModuleError(IncorrectModule("heap spec sizes would overflow: HeapSpec { reserved_size:<PHONE_NUMBER>, guard_size: 4194304, initial_size: 131072, max_size: None }"))', lucet-wasi/src/main.rs:239:24
What I am running is a standalone lenet inference task. I dont think it can be called a large app. Maybe I should try to read just one image from the file system, rather than the whole t10k-images-idx3-ubyte which is 7.8MB.
Thank you!

I think this is probably unrelated to the memory limits for the wasm module but rather this looks like a "segfault" in the wasm module itself where it's reading/writing memory out of bounds. Are you sure though this is related to memory allocation?

I think this is probably unrelated to the memory limits for the wasm module but rather this looks like a "segfault" in the wasm module itself where it's reading/writing memory out of bounds. Are you sure though this is related to memory allocation?

@alexcrichton I do not think there is a problem of the wasm module itself. I have tried emcc and nodejs, the LeNet dnn reference task works fine: (I have to  allow_memory_growth to make it work, and I also use --embed-file so that nodejs can access local file: model and image file)
emcc -s ALLOW_MEMORY_GROWTH=1 --embed-file ./ -I ./ main.c lenet.c -lm -o
In wasmtime, I did
wasm32-wasi-clang   -I ./ lenet.c main.c -lm -o mainWasi.wasm
Then I run with
wasmtime --dir=. mainWasi.wasm
Maybe is the file I read too large, (around 10MB), so i need somehow more space?

I'd recommend going from the backtrace and looking in the wasm module, for example in the wasm file what instruction is at offset 0x29cb in the Predict function? Is that a memory allocation function or just a normal load/store? If it's the latter then this is likely a bug with the wasm module itself.

I'd recommend going from the backtrace and looking in the wasm module, for example in the wasm file what instruction is at offset 0x29cb in the Predict function? Is that a memory allocation function or just a normal load/store? If it's the latter then this is likely a bug with the wasm module itself.

@alexcrichton  Thank you Alex, but I dont know how can I debug and trace in wasmtime (. There is no access to the local file in Predict function, because it was done before that,  Predict(lenet, test_data[i], 10); where lenet and test_date[] are model and image that has been loaded from local file.
The main.c called 	Predict function:
https://github.com/ZW007/lenet5/blob/245d95cdc141eb46fc5e58193e239f8cb8245e15/main.c#L46
Here is Predict() function:
https://github.com/ZW007/lenet5/blob/6b60eb9fd8233e4503c5ff9b637229810ec4b719/lenet.c#L269
And in Predict(), we have:
https://github.com/ZW007/lenet5/blob/6b60eb9fd8233e4503c5ff9b637229810ec4b719/lenet.c#L150

wasm module
https://github.com/ZW007/lenet5/blob/45d809876f4b9b707cf992b80576f1b41cb69c3b/mainWasi.wat#L4028

I tested a new lenet5 code, again, it works fine for nodejs and emscripten, but not wasmtime. This time, code is similar, and I also use the command
wasm32-wasi-clang  -I ./ mat.c net.c -lm -o net.wasm
wasmtime --dir=. net.wasm
But, I got a different error, not out of bounds memory access error, but a unreachable (
I was wondering if this could also be caused by module itself @alexcrichton
Error: failed to run main module net.wasm
Caused by:
0: failed to invoke command default
1: wasm trap: unreachable
wasm backtrace:
0:  0x1f3 - !unreachable:main
1: 0x25d8 - !__main_argc_argv
2: 0x2654 - !__main_void
3: 0x26bc - !__original_main
4:  0x1ff - !_start

Sorry it sounds like there's a lot of moving parts here and there's perhaps more than a few scenarios in play. Would you be able to share a set of instructions along with code of how to reproduce the issue you're currently having?

Sorry it sounds like there's a lot of moving parts here and there's perhaps more than a few scenarios in play. Would you be able to share a set of instructions along with code of how to reproduce the issue you're currently having?

@alexcrichton Thank you. Does wasm support struct, I have tested by printf,  before this line, it is OK
https://github.com/ZW007/lenet5/blob/6b60eb9fd8233e4503c5ff9b637229810ec4b719/lenet.c#L271
Where Feature is a struct defined here:
https://github.com/ZW007/lenet5/blob/245d95cdc141eb46fc5e58193e239f8cb8245e15/lenet.h#L60
To reproduce the error, In readme, you can find the error I had in runing inside wasmtime.
https://github.com/ZW007/lenet5

Sorry it sounds like there's a lot of moving parts here and there's perhaps more than a few scenarios in play. Would you be able to share a set of instructions along with code of how to reproduce the issue you're currently having?

@alexcrichton Thank you. Does wasm support struct, I have tested by printf, before this line, it is OK
https://github.com/ZW007/lenet5/blob/6b60eb9fd8233e4503c5ff9b637229810ec4b719/lenet.c#L271
Where Feature is a struct defined here:
https://github.com/ZW007/lenet5/blob/245d95cdc141eb46fc5e58193e239f8cb8245e15/lenet.h#L60
To reproduce the error, In readme, you can find the error I had in runing inside wasmtime.
https://github.com/ZW007/lenet5

Sorry for taking a bit to get back, but running that wasm file I get "Dataset File Not Find!Please Copy Dataset to the Floder Included the exe", so I think I'm missing some files?
Also have you seen this file work in other wasm environments? Is there anything in particular that makes you think wasmtime is at fault?

Sorry for taking a bit to get back, but running that wasm file I get "Dataset File Not Find!Please Copy Dataset to the Floder Included the exe", so I think I'm missing some files?

@alexcrichton  Hi Alex! Sorry for the mess. I have deleted the wasm file in that repo. Please refer to the new repo.
You could clone that repo, get the wasm file, and run the wasm (need to give --dir=. permission) using  :
wasm32-wasi-clang   -I ./ lenet.c main.c -lm -o mainWasi.wasm
wasmtime --dir=. mainWasi.wasm
It should work if you have downloaded the mnist dataset, extra it and put them in the same dir: http://yann.lecun.com/exdb/mnist/
The extracted  files need to named by:
t10k-images.idx3-ubyte
t10k-labels.idx1-ubyte
train-images.idx3-ubyte
train-labels.idx1-ubyte

Also have you seen this file work in other wasm environments? Is there anything in particular that makes you think wasmtime is at fault?

Yes, I ran it in Nodejs and worked fine. That is how I ran it, first generate wasm file and glue code,
emcc -s ALLOW_MEMORY_GROWTH=1 -s NODERAWFS=1 -I ./ lenet.c main.c -lm -o
After that, there  is an   a.out.index.js file create by me, https://github.com/ZW007/lenet5/blob/main/a.out.index.js
node a.out.index.js
You should find node works fine then,

I believe the issue you're running into is stack overflow. If during the linking phase you tell LLD to create a larger stack then it makes more progress. I believe the reason why it seems emscripten works and C doesn't is that presumably emscripten allocates a larger stack by default. You can allocate a larger stack by passing -Wl,-z,stack-size=1048576 to the compilation.

I believe the issue you're running into is stack overflow. If during the linking phase you tell LLD to create a larger stack then it makes more progress. I believe the reason why it seems emscripten works and C doesn't is that presumably emscripten allocates a larger stack by default. You can allocate a larger stack by passing -Wl,-z,stack-size=1048576 to the compilation.

@alexcrichton Thank you Alex! I asked a silly question again, sorry (
I suspected the problem is from memory and read the wasmtime tutorial http://docs.wasmtime.dev/introduction.html
but i did not find anything about stack allocation. I know it is clang usage, not wasmtime, maybe you could add some about clang, to make it nicer to the newbie like me )

No worries, and makes sense that we should add it to the tutorial!


Attempted to POST /register with<EMAIL_ADDRESS>shuts down server

Attempted to POST /register with<EMAIL_ADDRESS>instead of<EMAIL_ADDRESS>$ sails lift

info: Starting app...

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

 Excuse my interruption, but it looks like this app
 does not have a project-wide "migrate" setting configured yet.
 (perhaps this is the first time you're lifting it with models?)

 In short, this setting controls whether/how Sails will attempt to automatically
 rebuild the tables/collections/sets/etc. in your database schema.
 You can read more about the "migrate" setting here:
 http://sailsjs.org/#/documentation/concepts/ORM/model-settings.html?q=migrate

 In a production environment (NODE_ENV==="production") Sails always uses
 migrate:"safe" to protect inadvertent deletion of your data.
 However during development, you have a few other options for convenience:

 1. safe  - never auto-migrate my database(s). I will do it myself (by hand)
 2. alter - auto-migrate, but attempt to keep my existing data (experimental)
 3. drop  - wipe/drop ALL my data and rebuild models every time I lift Sails

What would you like Sails to do?

info: To skip this prompt in the future, set `sails.config.models.migrate`.
info: (conventionally, this is done in `config/models.js`)

warn: ** DO NOT CHOOSE "2" or "3" IF YOU ARE WORKING WITH PRODUCTION DATA **

prompt: ?:

 Temporarily using `sails.config.models.migrate="safe"...
 (press CTRL+C to cancel-- continuing lift automatically in 0.5 seconds...)

info:
info:                .-..-.
info:
info:    Sails              <|    .-..-.
info:    v0.11.0             |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------'
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info:
info: Server lifted in `/Users/dan/sails-auth-test`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.

debug: --------------------------------------------------------
debug: :: Fri May 15 2015 20:29:45 GMT-0400 (EDT)

debug: Environment : development
debug: Port        : 1337
debug: --------------------------------------------------------
crypto.js:119
  this._handle.update(data, encoding);
               ^
TypeError: Not a string or buffer
    at TypeError (native)
    at Hash.update (crypto.js:119:16)
    at module.exports.attributes.getGravatarUrl (/Users/dan/sails-auth-test/node_modules/sails-auth/api/models/User.js:26:11)
    at module.exports.attributes.toJSON (/Users/dan/sails-auth-test/node_modules/sails-auth/api/models/User.js:33:31)
    at Object.stringify (native)
    at ServerResponse.res.json (/usr/local/lib/node_modules/sails/node_modules/express/lib/response.js:217:19)
    at ServerResponse.jsonx (/usr/local/lib/node_modules/sails/lib/hooks/responses/index.js:218:21)
    at Object.sendOK (/Users/dan/sails-auth-test/api/responses/ok.js:28:16)
    at ServerResponse.bound [as ok] (/usr/local/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
    at /Users/dan/sails-auth-test/node_modules/sails-auth/api/controllers/UserController.js:13:11
    at /Users/dan/sails-auth-test/node_modules/sails-auth/api/services/protocols/local.js:71:7
    at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/create.js:241:9
    at /usr/local/lib/node_modules/sails/node_modules/async/lib/async.js:157:25
    at bound.<anonymous> (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/schema.js:151:44)
    at fn (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/callbacksRunner.js:60:10)
    at iterate (/usr/local/lib/node_modules/sails/node_modules/async/lib/async.js:149:13)

 20:29:48  ✘ 1  dan@elise:~/sails-auth-test   master ✘ ✹ 
$

Attempted to POST /register with<EMAIL_ADDRESS>instead of<EMAIL_ADDRESS>
What is identifier?

I don't think it's used by /register. It was an accident; my intention was to use email instead which /register picks up. However the fact that not including email brought down the server is cause for a Github issue. :P

However the fact that not including email brought down the server is cause for a Github issue. :P

Indeed


Way to increase time out period?

Hi again @gushonorato
So far the library has been very useful for my needs, thanks again for making this! One of the sites I am crawling has very slow response times. Is there a way to increase the time limit before Mechanize exits with a time out?

Hello @paultannenbaum. Unfortunately, some "low level" features of the HTTP protocol are not implemented yet. I've reserved the opts params on the request! function (https://github.com/gushonorato/mechanize/blob/master/lib/mechanize/browser.ex#L527) to pass these lower-level options to the HTTP client adapter, but it's working in progress. I'll implement that when working on the cookies feature, probably with a rewrite on adapter API too.
Under the hood, Mechanize is using HTTPoison, which uses hackney. Have you checked if there is an option to pass these recv_timeout option to hackney globally (probably using something like Application.get_env())?
Another way is to pass these options to hackney using opts param in request! function, as I said before. I'd love to add this feature, but I'm working on tight deadlines for the next couple weeks. If you in a hurry, you can send me a pull request. I think it’s not a very complicated change to make.

@gushonorato Thanks for the response, I'll take a stab at it and open up a PR. Cheers!

Closed by #33


"Incorrect description" for Create CoE Archival Doc Lib in SP

[Enter feedback here]

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

ID: e14181d4-574f-95e3-c2c9-545116549c9b
Version Independent ID: bf449b92-6756-e08a-a58c-d561e36947cb
Content: Set up governance components - Power Platform
Content Source: power-platform/guidance/coe/setup-governance-components.md
Service: power-platform
GitHub Login: @manuelap-msft
Microsoft Alias: mapichle

This has been fixed with the latest release.


JDA Socket take times to load

Hi,
I'm having some problems why loading my bot (It's a self bot created by me).
The problem is that he take so many time to load.
[18:00:09] [Info] [JDA]: Login Successful!
[18:00:09] [Info] [JDASocket]: Connected to WebSocket
[18:02:23] [Info] [JDA]: Finished Loading!
I have try on my ide, on a jar executable and on a vps and same problem.
I don't have connection problems.
Can someone help me ?

I don't see an issue here.
You are using a client account on an api that is made for general bots. JDA will make attempts to load everything accordingly which can take a bit longer if you are connected with a client account to guilds that reach specific online limits.
Such guilds cause JDA to take longer to allocate the cache for that guild and thus will stop the setup from progressing.
It is not currently possible to change that behaviour and we are unable to change it for now.


Moving file atomic way?

I'm using s3fs and fastparquet to write parquet files to s3. I've configured presto to read from s3 using hive external table.
Problem here is, presto will read from the file where fast parquet is writing, so it is failing saying invalid parquet file. To outcome this problem, I'll be writing to a temporary path, lets say, i'm supposed to write to
filename = 'bucket_name/account_type/yr=2017/mn=10/dt=8/19/de86d8ed-7447-420f-9f25-799412e377adparquet.json'
# let's write to temp file
tmp_file = filename.replace('account_type', 'tmp-account_type')
fastparquet.write(filename, df, open_with=opener)
fs.mv(tmp_file, fllename)

But even in this case, it looks like sometimes, rarely presto is reading incomplete file. How's this possible? How can we make this atomic/isolated with s3fs?

Although maned after the posix mv command, for S3, this is actually copy-and-delete. How this is implemented internally within S3, I don't know, but it does not in general promise immediate consistency, so I am not totally surprised that either presto is reading the file before it is all available, or possibly that mv is copying a file which is not yet available. I am open to suggestions, but I can't suggest more than to add sleep statements into your workflow.
As a side note, what does presto offer to you that you are not able to accomplish in python, since the data already passes through the memory of your machine(s) as pandas dataframes ?

@martindurant thanks for suggestion. But I couldn't able to understand the usage of sleep here.
Coming presto part, we have clickstream data, which flows into our system. We will be writing to JSON files and then converting them to parquet and then will store them in s3. So, we use presto heavily to run multiple queries on previous data along with current flowing data.
When we query existing data, there  won't be a problem. But if we query the current hour data, then it might cause problem and it happens a bit rarely. Predicting this is almost impossible.

Just in case calling mv too soon after writing has an effect, I would put a time.sleep() between the two calls. The probability of this fixing things isn't enormous, but it's worth a go as the simplest thing.
Are you certain that the files are indeed complete and valid? We have seen with GCS cases where some files were truncated at times of heavy usage.

May be, I guess so. I'll try keep sleep and check once.
As per my understanding and simple test, the files are complete. As soon as presto throws the error, I checked with fastparquet which is able to read the file. So, I guess presto is failing exactly at the time of copying the file.

 The REST documentation suggests behaviour may be different above 5GB than below http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html .

No, the files are hardly around 500 Mb (JSON File). To be precise, it will never cross 490 Mb on disk and 50 mb (Parquet File) in in s3 (After converting to Parquet file)

@martindurant
I believe we are doing copy_object only when we are using s3fs mv. For reference: presto-groups

Yes, we are calling the server's copy object command, not downloading and rewriting the data - that would be very expensive!

@martindurant
I'm little bit confused with block_size.
Looks like our file uploads all are multi parts upload. If it is the case, the error seems quite natural as, at some point of time there is chance for partial data to present.
Correct me, if I'm wrong.

Correct that they are multi-part uploads, but the final key should not be created until the multi-part-upload is finalised.

Yes, you are right. Just ran a simple test, the file is not created unless the upload is done. Not sure what is causing this issue.

@martindurant what do you mean by upload is finalised.
Because if you remember I've raised issue in fast parquet. I am just trying to understand what is the meaning of finalised, and how the invalid parquet file (s3 Key) is created when the process is killed  (signal 9) due to memory issue. I trying to figure out is there any relation between this invalid parquet file, final key creation and current issue I have.

@martindurant
Thanks for your time and patience. I'm overwriting the existing files in s3 wen running one minute cron job. This overwriting is causing the issue when reading from presto. I think we can close this issue.
Would you like to share your inputs in avoiding s3 consistency when overwriting ?

Here is the reference: http://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html#ConsistencyModel
Amazon claims never to give partial or corrupted data, you either get the old version or the new. That could be enough to break presto, if the versions are not compatible. Another failure mode would be one action to get the file-list, then the next to download data, but the file size of the new file is different from the old one.
If you write your own code, you can check the generation of a key to make sure it hasn't changed, or download a specific generation (old data may still be available), or be sure to match each file of a batch by time-stamp.
I cannot, however, give any advice on how you might implement any of this for presto, sorry.


Road to first release

[ ] GUI clean-up and unit tests
[ ] Add in lifecycle support (sync with internal workspace)
[ ] Simulator test case for PLC (maybe, in CI)
[ ] Code comments and Doxygen
[ ] Sanitizer and memory management
[ ] Take a harder look at the message type interface
[ ] Better documentation and a use case design to show how this can be implemented in a packing workflow.

@dejaniraai I will be doing the above from time-to-time, please let me know if you would like to work on any of these.

It has been a while since. It looks like there has not been any progress on these points.
Are these points still valid? Are there new insights?


[FEATURE REQUEST]Calculate topK on GPU with k-selection algos

Hi,
I am currently using tf.nn.top_k in my code. However, I found this operation is calculated on CPU and it is quite slow.
So I am wondering if it is possible to calculate topK on GPU?
Here are the papers and cuda codes about k-selection on GPU:
http://www.math.grin.edu/~blanchaj/Research/ABGS_KSelection.pdf
https://code.google.com/p/ggks/
Hope someday this feature will be added to tensorflow.

Hello, I'd love to contribute by working on an implementation of this. I'm considering the in-place radix k-select, pivot to cut problem size, then sort, or perhaps a full sort if that turns out to be quicker.
@lagoon0o0, do you have a history of runtimes for certain size/shape tensors for this algorithm you'd like to see improvement on?
I'm fairly new to TensorFlow, and would appreciate some insight into the shapes that tensors take in production applications. Thanks!

+1

This mixture of experts paper (https://arxiv.org/pdf/1701.06538.pdf) from google brain seems to heavily use topk, so maybe we can hope for an update soon?

I'm also interested in implementing this as it's currently bottlenecking me. If there is already an implementation internally at Google brain (seems likely) or if @eth-n has already started then there probably isn't much point though.

For those interested, I've started attempting an implementation of this. Unfortunately I'm having to learn CUDA as I go, so it's slow going. I figure if I make something suboptimal that avoids D2H/H2D transfers then that is still a good starting point.
The GGKS code would need some modification so it couldn't just be placed in the third_party folder. That presumably would mean we'd need to get the original authors to sign the CLA in addition to myself - perhaps @prb12 or @aselle can confirm my assumption there? Given that the paper referenced above has enough detail to implement it from scratch, I've decided to go that route for now (making sure not to look at the original code to avoid plagiarism).
The fact that this op also requires a sort at the end makes things a little messier. That is probably something that could best be achieved using a third_party lib such as Nvidia's thrust (licensed under Apache 2.0). This could also be used to make a dedicated sort op (see issue #288). I'll focus on the selection algorithm for now, perhaps others might have some input?

Update: I have a working GPU implementation but based on some very informal benchmarking, performance is only really better for huge tensors. Still need to clean it up a lot, but after that I might upload it to see if anyone has any tips on how to improve it.

@ed-alertedh May I see your code? I'm doing something similar, for Theano. Thanks.

You could use a GPU cuda radix sort sample that comes with standard CUDA distribution as a starting point for implementing topK (even though there's probably a simpler way to do it in CUDA)

I've ported PyTorch implementation for Theano at here, which uses radix selection. I mostly works but still need some cleanup.

Well, it looks like we got what we wanted! @ebrevdo looks to have implemented this and it's in 1.3.0rc0!
Interestingly, it's a heap-based algorithm: code here
I'm a little sad that I didn't manage to release my code in time due to unforeseen "red tape" at work. But OTOH, I'm a newbie with CUDA and my thrust-based implementation wasn't really that great anyway :P

@ebrevdo @ed-alertedh I tried running the new top_k operator as an intermediate layer on the gpu, and am still getting cpu-like speeds. Any idea what could be going on? I logged the device placement, and it does seem like the operator is still getting placed on the gpu.
I tested a script with the operator in between two convolutional layers on both 1.3.0-rc2 (gpu) and 1.2.1 (cpu), and the cpu version was faster. Any idea what the bottleneck could be?

@yliapis What shape are the tensors you're running top_k on? They're probably just too small to benefit from the GPU op. I've just been using the CPU op, although in my use-case I've found k=1 is often sufficient so in that case I can just use the max op instead.
On another note, I tried to run the new GPU op on a tensor of shape [1, 10,000] and got some obscure CUDA error. Haven't had time to track down possible cause or file a bug report yet. I know with thrust I had a lot of fun trying to integrate with TF's memory allocator - as far as I could tell, it doesn't allow kernels to dynamically allocate memory so if CUB is using malloc inside kernels it could just be running out of memory because TF has grabbed it all...

@ed-alertedh The tensors I am using the op on are generally [256, 20] up to [3600, 20]. Note that I am using tf.map_fn to map a tensorflow operator using top_k to a batch (32-128 usually) of matrices, so the top_k function is getting called batch_sz times by map_fn. I haven't been getting any cuda errors, but the performance makes me question whether the gpu is being properly utilized.

I guess it just isn't scaling well for that number of rows. Not really what you'd expect given it should be an "embarassingly parallel" problem, but maybe you just need to throw a huge number of rows at it to start seeing the benefit. Perhaps concatenating the matrices rather than using map_fn would change performance? Would likely eat up too much memory though....
Hard to say for sure because the benchmarks were all run with 128 rows.  Your case of [256,20] is roughly comparable to the benchmarks on [128,10] and [128,100] which all ran faster on CPU. In case you hadn't found them, benchmark results here: https://github.com/tensorflow/tensorflow/commit/0b5cce367cf95a5d7fbb6b037e7a8646f6c47b70

@ed-alertedh @ebrevdo I tried top_k by itself on the gpu and the cpu with m=10**6, n=20. The cpu version was twice as fast. Are the rows being sorted in parallel?

It does seem counter-intuitive that performance would be that much worse than CPU on that many rows...
If it helps, I was using the following to force a DtoH/HtoD transfer when benchmarking the CPU op so I could better compare CUDA overheads versus the overhead of transferring to CPU:
from tensorflow.python.platform import benchmark
from tensorflow.python.platform import test
import tensorflow as tf

class TopKBenchmark(test.Benchmark):
    def benchmark_topk_gpu(self, dims, k, sorted=False):
        with tf.device('/gpu:0'):
            test_data = np.random.uniform(size=dims)
            data = tf.constant(test_data, dtype=tf.float64)
            k_in = tf.constant(k)

        with tf.device('/gpu:0'):
            op_under_test = tf.nn.top_k(data, k_in, sorted=sorted)

        # Creates a session with log_device_placement set to True.
        conf = tf.ConfigProto(log_device_placement=True, allow_soft_placement=False)
        # Don't perform optimizations for tests so we don't inadvertently run
        # gpu ops on cpu
        conf.graph_options.optimizer_options.opt_level = -1
        sess = tf.Session(config=conf)
        with sess:
            return self.run_op_benchmark(
                sess, op_under_test, min_iters=1000, store_trace=False, name="op_benchmark")

    def benchmark_topk_cpu(self, dims, k, sorted=False)):
        with tf.device('/gpu:0'):
            test_data = np.random.uniform(size=dims)
            data = tf.constant(test_data, dtype=tf.float64)
            k_in = tf.constant(k)

        with tf.device('/cpu:0'):
            op_under_test = tf.nn.top_k(data, k_in, sorted=sorted)

        # Creates a session with log_device_placement set to True.
        conf = tf.ConfigProto(log_device_placement=True, allow_soft_placement=False)
        # Don't perform optimizations for tests so we don't inadvertently run
        # gpu ops on cpu
        conf.graph_options.optimizer_options.opt_level = -1
        sess = tf.Session(config=conf)
        with sess:
            return self.run_op_benchmark(
                sess, op_under_test, min_iters=1000, store_trace=False, name="op_benchmark")

bm = TopKBenchmark()
dims = (1e6, 20)
k=5
cpu_res = bm.benchmark_topk_cpu(dims, k)
gpu_res = bm.benchmark_topk_gpu(dims, k)
print('***** CPU TIME:')
print(cpu_res)
print('***** GPU TIME:')
print(gpu_res)

I won't pretend to fully understand the current implementation since I've only skim-read it, but the sort implementation looks like it should be parallel on the rows: https://nvlabs.github.io/cub/structcub_1_1_device_segmented_radix_sort.html

You don't have that many rows to be fair, you do have a big batch dimension, however.
Try maybe (20,10**6), so 20 batches a 1 million rows. The GPU topk implementation launches one thread block per batch, so with the original (10**6,20), it will perform a topk on 20 elements over a 1 million batches. Probably not what you want. (Or at least I don't think that is the general use-case).
Thanks,
Andreas

Yeah, I think it is just inherent in how this problem scales to GPU - "small" inputs don't overcome the fixed costs of kernel launch. I hope it doesn't come across that we're criticising your implementation! Just figuring out what the scaling behaviour is.
For the sake of clarity, in my above statements I was using the convention [rows, columns] whereas @BlackHC seems to be using the convention [batch size, rows].
If it only launches one thread block per batch (=1024 threads on most devices), wouldn't that mean the implementation scales well to large batch sizes and doesn't scale well to large numbers of rows? (using your convention [batch size, rows]).

There are two different implementations, depending on the input sizes.
Code is here
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/topk_op_gpu.cu.cc#L545.
We use cub sort followed by copy of the top k for one range of parameters
and we use @BlackHC's heap for another range.
There may actually be a bug where we decide to use cub for num_cols <=
1000; but perhaps that should have been use cub for num_cols >= 1000
instead.
On Wed, Aug 23, 2017 at 6:03 PM, Edward Bordin<EMAIL_ADDRESS>wrote:

Yeah, I think it is just inherent in how this problem scales to GPU -
"small" inputs don't overcome the fixed costs of kernel launch. I hope it
doesn't come across that we're criticising your implementation! Just
figuring out what the scaling behaviour is.
For the sake of clarity, in my above statements I was using the convention
[rows, columns] whereas @BlackHC https://github.com/blackhc seems to be
using the convention [batch size, rows].
If it only launches one thread block per batch (=1024 threads on most
devices), wouldn't that mean the implementation scales well to large batch
sizes and doesn't scale well to large numbers of rows? (using your
convention [batch size, rows]).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/5719#issuecomment-324503437,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtim9nNvXbjQect7wv9UN3tBW7qt3A8ks5sbMvMgaJpZM4K3RGK
.

Ah right, forgot about that detail. So for [20, 10 ** 6] the heap will be used whereas for [10**6, 20] the cub sort will be used.
Using cub for num_cols<=1000 seems intuitive to me - use a heap for larger problem sizes to save the effort of sorting the whole thing. But once k gets large enough it approaches a heapsort, hence why you'd switch to a more performant sorting algo. For non-parallel versions of the algorithms I believe the complexity comparison is O(n + k log(n)) for heap versus O(n log(n)) for sort. Obviously you can't directly apply that comparison to the parallel algorithms, but you'd expect the heap to become faster at some point where  k << n.
I think my previous comment still makes sense - the heap implementation currently shards into a maximum of 1024 threads per batch all in one thread block. Each thread builds its own heap on a subset of the data. If the shards were split over multiple blocks you could increase the parallelism. But that would require a parallel merge to gain any benefit and it would be merging between blocks which means you risk getting bottlenecked by global memory. I can see why you'd want to keep it within a single block. If you had large enough num_cols, it would eventually become worth it to use multiple blocks.

I tried using top_k on multiple GPU's using TensorFlow 1.3.0, and it failed with this message:
Cannot assign a device for operation 'gradients/TopKV2_grad/sub_1': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
This suggests to me that top_k still does not have GPU kernel support, and hence must still run on the CPU. But this thread mentioned that the problem had been solved by @ebrevdo back in 1.3.0rc0. Did I misunderstand?

Does it work in tf nightlies?
On Wed, Oct 11, 2017 at 2:26 PM, nitaidean<EMAIL_ADDRESS>wrote:

I tried using top_k on multiple GPU's using TensorFlow 1.3.0, and it
failed with this message:
Cannot assign a device for operation 'gradients/TopKV2_grad/sub_1': Could
not satisfy explicit device specification '/device:GPU:0' because no
supported kernel for GPU devices is available.
This suggests to me that top_k still does not have GPU kernel support, and
hence must still run on the CPU. But this thread mentioned that the problem
had been solved by @ebrevdo https://github.com/ebrevdo back in
1.3.0rc0. Did I misunderstand?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/5719#issuecomment-335953353,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtim3Qc38Gk8PCKhoQ7tcpe-sQz0ieyks5srTKTgaJpZM4K3RGK
.

Just tried it - nope. Same error. Is it supposed to work?

Peanut gallery chiming in: What datatype is the tensor you're trying to run top_k on? Practically none of the GPU ops are defined for int types (see #9506)

Yeah, I read that, but no - it's a tensor of floats.

After looking more closely at the error message, my guess would be that one or more of the ops in the gradient definition here can't run on GPU due to the limitation on ints

Ah, so the problem was never fixed in the first place then? Has anyone else succeeded in getting top_k to run on GPU under any scenario?

It will still be useful in scenarios where you don't need the gradient. As a workaround I'd suggest enabling soft placement so the gradient ops can be placed on CPU.
I did get some CUDA kernel launch errors with the new implementation but that would be a totally separate issue. Still haven't had time to prepare a proper bug report (it could have been fixed in the meantime anyway)

It should work in the nightlies, if you have a full stack trace and minimal
graph/code to replicate that would be helpful.
On Sun, Oct 15, 2017, 8:54 PM Edward Bordin<EMAIL_ADDRESS>wrote:

It will still be useful in scenarios where you don't need the gradient. As
a workaround I'd suggest enabling soft placement so the gradient ops can be
placed on CPU.
I did get some CUDA kernel launch errors with the new implementation but
that would be a totally separate issue. Still haven't had time to prepare a
proper bug report (it could have been fixed in the meantime anyway)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/5719#issuecomment-336774021,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtimx_OTN9_wal9uCLxARrv6Uf42cihks5sstNzgaJpZM4K3RGK
.

OK, looks like you've made significant changes since I last tried it, but I'm still seeing the same behaviour on tf-nightly-gpu==1.4.0.dev20171013. Info below but let me know if I can gather any more - sorry for not reporting earlier!
Minimal working example for my machine:
import tensorflow as tf
import numpy as np

FLAGS = tf.flags.FLAGS

tf.flags.DEFINE_integer('m', 1, 'batch size')
tf.flags.DEFINE_integer('n', 1, 'data length')
tf.flags.DEFINE_integer('k', 1, 'pick the top k')

dims = (FLAGS.m, FLAGS.n)

with tf.device('/gpu:0'):
    test_data = np.random.uniform(size=dims)
    data = tf.constant(test_data, dtype=tf.float64)
    k_in = tf.constant(FLAGS.k)
    op_under_test = tf.nn.top_k(data, k_in, sorted=False)

conf = tf.ConfigProto(log_device_placement=True, allow_soft_placement=False)
# Don't perform optimizations for tests so we don't inadvertently run
# gpu ops on cpu
conf.graph_options.optimizer_options.opt_level = -1
with tf.Session(config=conf) as sess:
    sess.run(op_under_test)

Error log for input of size [1, 6140]
error_log.txt
Normal execution for input of size [1,6139]
normal_execution.txt

In a Differentiable Neural Computer (DNC) model, top_k is used in memory write access, which is in the RNN while loop, and this degrades performance tremendously. I'm looking forward to the implementation of GPU top_k, too.

I submitted a PR #21436 which attempts to workaround the issue of gradient execution on CPU, waiting for code review. If anybody is still interested...

Thanks!
On Tue, Aug 7, 2018, 8:11 AM Jonathan Zhang<EMAIL_ADDRESS>wrote:

I submitted a PR #21436
https://github.com/tensorflow/tensorflow/pull/21436 which attempts to
workaround the issue of gradient execution on CPU, waiting for code review.
If anybody is still interested...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/5719#issuecomment-411091264,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtim0sD81DJzAD0caghdsiFfqMO8iApks5uOa4fgaJpZM4K3RGK
.

FYI the error I reported above was addressed in https://github.com/tensorflow/tensorflow/commit/6bcc00668094be8daf8465b8689bbed5ab285b2d and running the script I posted in the same windows env with tf 1.10 no longer throws an error.


v0.12.0 generates invalid code for non-null enum fields

I actually haven't been able to isolate this to only non-null fields, but initial analysis seems to show that's the case.
The code generated by the new genGetters function seems to be broken for those; the method signature looks something like:
func (t *SomeLongTypeName) GetChatStatus() *com/myGithubOrg/myRepo/path/to/the/package.Type{

Instead of:
func (t *SomeLongTypeName) GetChatStatus() package.Type{

The generated code is also very weirdly formatted.
Sorry that I can't share our code, generated or not. I'll see if I can come up with a small test case that shows the problem. v0.11.4 works fine, and genGetters seems to be the only addition in 0.12.

Tried a few things and I nailed it down to a query that looks like this:
query QuerySomething($input: QueryInput!) {
	getSomeEntity(input: $input) {
		contactPoints {
			type
		}
	}
}

That type field is a non-null enum (type : ContactPointType!). Other non-null fields work fine, but that one generates code like this:
func (t *QuerySomething_GetSomeEntity_ContactPoints) GetType() *com/githubOrg/githubRepo/path/to/generated.ContactPointType{

Which does not compile.

@vanzin
Do you have any suggestions for modifications? Or do I need to take action?

I'm not familiar enough with the code to suggest modifications. Just reporting the bug.

now relase v0.13.0.
See how it works in your use case

v0.13.0 still generates invalid code for us.
The code now looks like:
func (t *LongTypeName) GetChatStatus() *repo-name-with-dashes.ContactPointType{

repo-name-with-dashes is the name of the repository where the code is hosted, not the name of any package within that repository. So not only that doesn't compile because of the dashes, but also because it seems to be the wrong package name. The type itself seems to be declared in the models_gen.go file created by gqlgenc, which is in the generated package (somewhere under that repo's root).

@vanzin
now, new release is v0.13.4. It has been fixed up to the bug I found. Please check it!

That release seems to solve both problems (broken code, and the weird formatting). Thanks!


Disabling creation of microservice

Summary

Disable creation of microservice, whilst we fix a few bugs

Info

Linked to https://app.asana.com/0/1201525109550416/1201643726513049/f


Bandwidth options don't match portal

Bandwidth options don't match portal

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

ID: fe411166-7001-5d28-c286-def540fa690d
Version Independent ID: 224e81f0-7093-2f50-cf57-92470f77055a
Content: Azure ExpressRoute circuits and peering
Content Source: articles/expressroute/expressroute-circuit-peerings.md
Service: expressroute
GitHub Login: @mialdrid
Microsoft Alias: mialdridm

@jtuliani I know this is a very old issue. Please let me know if there is still a problem on that page that you want me to look into. If not, I'll close this issue out in a few days. Thank you!

#please-close


Collision detector before slice

This runs a collision detector before slicing.  If there are models that overlap in the z axis or stick out of the printing volume, they are colored red and a modal dialog appears to ask the user if he wants to continue.

Do you think you can revise the PR to minimize the changes you made to STLViewPort.js and slicer.js? These 2 files are major sources of bugs right now, and I just don't feel confident about changing 100+ lines for a feature that no user has asked for.

I don't think that it could be made much smaller.  That's okay, probably best without.  Now that arranging is automatic, it probably won't get requested anyway.


Limited the options for the number of words per felt

This change is

Current dependencies on/for this PR:

03-30-Packing_code_words_by_divmod_not_aligning_to_bits

PR #2693   👈

This comment was auto-generated by Graphite.


Update stale deps

Fixes #20

Thanks! There was a problem indeed. I have bumped the requirements a bit more after pushing a new tag in liform-bundle.