Add the ability give artifact sizes

tested in gavelci:
[doanac@xps15 ~]$ curl https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/
{
  "data": {
    "run": {
      "artifacts": [
        "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/dockerd.log",
        "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/console.log"
      ],
      "completed": "2023-05-23T13:15:12+00:00",
      "created": "2023-05-23T13:12:20+00:00",
      "host_tag": "amd64",
      "log_url": "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/console.log",
      "name": "build-container",
      "status": "PASSED",
      "status_events": [
        {
          "status": "RUNNING",
          "time": "2023-05-23T13:12:20+00:00"
        },
        {
          "status": "UPLOADING",
          "time": "2023-05-23T13:15:11+00:00"
        },
        {
          "status": "PASSED",
          "time": "2023-05-23T13:15:12+00:00"
        }
      ],
      "url": "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/",
      "web_url": "https://gavelci.us/projects/gavel-ci/builds/55/build-container",
      "worker_name": "doanac-reckless"
    }
  },
  "status": "success"
}
[doanac@xps15 ~]$ curl https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/?version=v2
{
  "data": {
    "run": {
      "artifacts": [
        {
          "size_bytes": 11486,
          "url": "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/dockerd.log"
        },
        {
          "size_bytes": 20057,
          "url": "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/console.log"
        }
      ],
      "completed": "2023-05-23T13:15:12+00:00",
      "created": "2023-05-23T13:12:20+00:00",
      "host_tag": "amd64",
      "log_url": "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/console.log",
      "name": "build-container",
      "status": "PASSED",
      "status_events": [
        {
          "status": "RUNNING",
          "time": "2023-05-23T13:12:20+00:00"
        },
        {
          "status": "UPLOADING",
          "time": "2023-05-23T13:15:11+00:00"
        },
        {
          "status": "PASSED",
          "time": "2023-05-23T13:15:12+00:00"
        }
      ],
      "url": "https://api.gavelci.us/projects/gavel-ci/builds/55/runs/build-container/",
      "web_url": "https://gavelci.us/projects/gavel-ci/builds/55/build-container",
      "worker_name": "doanac-reckless"
    }
  },
  "status": "success"
}

@MiloCasagrande - would this work for you. I've staged an example of how it can work - https://gavelci.us/projects/jobserv/builds/349/flake8/


PROD-135: Shadcn customized alert component

Description
Shared customized alert component.
What are the steps to test that this code is working?
New alert dialog on Deck
Screen shots or recordings for UI changes

Additonal Notes: Primary button will be automaticaly be changed to the default varient when this PROD-219 will be merged.

added some design review comments in the deploy preview. i am also noticing a bug where clicking "proceed" after timer runs out does not close dialog when it goes to the next question. unsure if this is artifact of deploy preview env but should double check.
https://github.com/user-attachments/assets/c1239ee9-3edc-448d-9fb6-442e2d19138b

@Yihwan I am fixing the design request meanwhile I find out that the bug you mentioned exist in our production PWA as well. I think it is better if we can create a seperate ticket for the bug.
https://github.com/user-attachments/assets/c263d87f-e745-4454-99db-ec04b98b15f5

@Yihwan Can you please review the updated design changes?

still only seeing 12px top margin above description when mocks specify 24px

@Yihwan, sorry for the confusion earlier. I misinterpreted the 24px value, but I've just updated the code now.


Initial pipes implementation

Resolves https://github.com/concierge/Concierge/issues/249

@Awarua- I agree it is hard logic to follow. Its a non-optimal solution to the problem where the best way to deal with it would be to get the integrations themselves to implement loopback and piping. That isn't going to happen because then everything would be inconsistent.
Instead this works by implementing the decorator pattern, where the decorator generates new decorators on the fly as needed (so we can keep track of recursion depth while still allowing commands at the current recursion depth). If you have any better ways I'm open to suggestions?

I don't have a better solution, at this time.


wlr/taskbar hide specific windows based on app_id and title

will it be possible to extend the functionality of #1029 , to use app_id and title simultaneously for window identification
There are a lot of sub windows for apps like open/save/properties  file/folder dilogues, which are opened for a limited time and should not appear on taskbar as they serve no purpose. more to add will be firefox microphone and pip windows.
@Anakael  could you please look into it

@Iss-in
Merged in master.

awesome, thanks a lot 😀


build error "Could not find a declaration file for module 'vite-plugin-wasm'"

My development and testing are working fine, but an error occurs during the build, which says:
Could not find a declaration file for module 'vite-plugin-wasm'. '/project/path/node_modules/vite-plugin-wasm/exports/import.mjs' implicitly has an 'any' type.
  There are types at '/project/path/node_modules/vite-plugin-wasm/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'vite-plugin-wasm' library may need to update its package.json or typings.

Ive bumped into this before when l bundled my rust to wasm with wasm-pack. If you are in that spot do, the following worked for me.

first build with wasm-pack  build
then wasm-pack pack


fix(list): remove default connotation

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

the activated state is broken:

the activated state is broken:  was:

fixed

So now we do not support cta connotation in list-item?
https://tmp.dev.vivid.vonage.com/1256/index.html?path=/story/components-list-list-item--connotation&args=connotation:primary;activated:;shape:rounded;graphic:icon

So now we do not support cta connotation in list-item? https://tmp.dev.vivid.vonage.com/1256/index.html?path=/story/components-list-list-item--connotation&args=connotation:primary;activated:;shape:rounded;graphic:icon isn't it kind of a breaking design change?

according to @jshenkman it's actually a fix as we shouldn't have supported it

@yinonov @rachelbt
exactly, no product uses CTA connotation is list or side navigation

something looks a bit off with the icon that is not white:

also when pressed the ripple is hiding the icon

here

@jshenkman mind reviewing if this is tolerable? it's an issue with the side-navigation variant, which will deprecate following the new sidenav

Ok, so a few problems -

list item - activated - the activated item shouldn't be bold, the text style should stay the same.
list item - connotation the list item is a bit different, it's all black (text + icon) and on selection, it turns white. only on item can be selected and the last one is supposed to be disabled so it shouldn't be activated.

I'm not sure what you would want to fix now and what to leave as is and fix in vivid-3, but in my opinion, the list needs to be prioritized over the side nav if they collide.

@jshenkman mind reviewing @rachelbt comments and guide on design?

sorry for being a nag but when there are 2 lines option & connotation primary + active the bottom line is unreadable:

This option should be able to get the primary connotation as it's not a side-nav list item.
So can we block this? or remove this property from all list items?
Active connotation is only for side-nav list item

sorry for being a nag but when there are 2 lines option & connotation primary + active the bottom line is unreadable:

This option shouldn't be able to get the primary connotation as it's not a side-nav list item.
So can we block this? or remove this property from all list items?
Active connotation is only for side-nav list item

Not really, the only indication list-item is used as sidenav-item is it is set with connotation. We haven't added  any explicit interface. Tech debt we bought into.
Can hide secondary line for items with connotation but this can result in a very confusing interface

sorry for being a nag but when there are 2 lines option & connotation primary + active the bottom line is unreadable:

This option shouldn't be able to get the primary connotation as it's not a side-nav list item.
So can we block this? or remove this property from all list items?
Active connotation is only for side-nav list item

Not really, the only indication list-item is used as sidenav-item is it is set with connotation. We haven't added any explicit interface. Tech debt we bought into. Can hide secondary line for items with connotation but this can result in a very confusing interface

ok got it, so the list item should act like in dark theme, the secondary line should switch from neutral-70 to neutral-40


werid render when using computed and h function

Vue version
3.2.33
Link to minimal reproduction
https://codesandbox.io/s/xenodochial-dijkstra-b55ltd?file=/src/components/HelloWorld.vue
Steps to reproduce
using above link, using case 2
What is expected?
just msg turn to 2, other elements do not rerender
What is actually happening?
arrow is rerender, and also disappear
System Info
No response
Any additional comments?
No response

More streamlined reproduction.

More simplified reproduction.
The _unref(HelloWorld) causes the HelloWorld component to be treated as a dynamic node of the Comp component.

i find that just render
  <div>
       <t-node :content="HelloWorld" />
  </div>
  {{ num }}

when 1000ms later,it show error "Uncaught (in promise): Cannot read properties of null (reading 'insertBefore')"
Is this also a bug?

further investigate.
The dynamicChildrens amount are different In two updates,this will cause bug.
the main reason is computed will cache node, computed gets called the first time, but not the second time.so dynamicChildren will just collect HelloWorld in the first Time

a workaround see https://github.com/vuejs/core/issues/8203#issuecomment-1531347186


adapt null-safety

Hello.
This library causes trouble in latest stable flutter(popular dart framework).
I just run dart migrate, in dart 2.13 following official migration document.
I checked

pass test
run in flutter application

please review!

Thanks for the PR, and sorry for the slow response. The dart migrate migration wasn't correct, so I did this a different way in https://github.com/zanderso/kmeans.dart/pull/6 and published as package version 1.0.0.


It's best for use actions/tool-cache not actions/cache

actions/tool-cache is for tools, actions/cache is for build.
https://github.com/actions/toolkit/blob/main/packages/tool-cache/README.md

Rather, it looks like @actions/tool-cache is not being maintained, so we'd rather stick with the@actions/cache. Other actions like setup-node do this aswell.

We're already using @actions/tool-cache for downloading, extracting and @actions/cache for the actual cache. Other actions do the same thing.

It can use @actions/tool-cache to actual cache, because @actions/cache will be cleaned unexpectedly.


Fix liquid URLs

Please confirm this pull request meets the following requirements:

[x] I followed the contributing guidelines: https://github.com/github/explore/blob/main/CONTRIBUTING.md.
[x] I am not the sole author or employee of a company who created the topic or collection I'm changing.

Which change are you proposing?

[ ] Suggesting edits to an existing topic or collection
[ ] Curating a new topic or collection
[x] Something that does not neatly fit into the binary options above

Editing an existing topic or collection
I'm suggesting these edits to an existing topic or collection:

[ ] Image (and my file is *.png, square, dimensions 288x288, size <= 75 kB)
[ ] Content (and my changes are in index.md)

Please replace this line with an explanation of why you think these changes should be made.

Curating a new topic or collection

[ ] I've formatted my changes as a new folder directory, named for the topic or collection as it appears in the URL on GitHub (e.g. https://github.com/topics/[NAME] or https://github.com/collections/[NAME])
[ ] My folder contains a *.png image (if applicable) and index.md
[ ] All required fields in my index.md conform to the Style Guide and API docs: https://github.com/github/explore/tree/main/docs

Please replace this line with an explanation of why you think this topic or collection should be curated.

Something that does not neatly fit into the binary options above

[x] My suggested edits are not about an existing topic or collection, or at least not a single one
[x] My suggested edits are not about curating a new topic or collection, or at least not a single one
[ ] My suggested edits conform to the Style Guide and API docs: https://github.com/github/explore/tree/main/docs

Current:
{
    "topic_name": "3ds-homebrew",
    "created_by": "Nintendo",
    "display_name": "Nintendo 3DS Homebrew",
    "github_url": null,
    "logo": "https://explore-feed.explore-feed.github.com/topics/3ds-homebrew/3ds-homebrew.png",
    "released": 2011,
    "short_description": "3DS Homebrew is the task of producing and running custom code for the Nintendo 3DS system.",
    "url": "https://explore-feed.github.com/topics/3ds-homebrew",
    "wikipedia_url": "https://en.wikipedia.org/wiki/Homebrew_(video_games)#3DS",
    "related": [
        "custom-firmware",
        "nintendo-3ds"
    ],
    "aliases": [
        "nintendo-3ds-homebrew",
        "3ds-custom-firmware"
    ],
    "content": "
Homebrew, when applied to video games, refers to games produced by hobbyists for proprietary video game consoles which are not intended to be user-programmable. 3DS Homebrew specifically refers to producing and running custom code on the Nintendo 3DS system. This may include custom firmware, emulators, and other applications not authorized by Nintendo.
\n"
}

Expected:
{
    "topic_name": "3ds-homebrew",
    "created_by": "Nintendo",
    "display_name": "Nintendo 3DS Homebrew",
    "github_url": null,
    "logo": "https://explore-feed.github.com/topics/3ds-homebrew/3ds-homebrew.png",
    "released": 2011,
    "short_description": "3DS Homebrew is the task of producing and running custom code for the Nintendo 3DS system.",
    "url": "https://github.com/topics/3ds-homebrew",
    "wikipedia_url": "https://en.wikipedia.org/wiki/Homebrew_(video_games)#3DS",
    "related": [
        "custom-firmware",
        "nintendo-3ds"
    ],
    "aliases": [
        "nintendo-3ds-homebrew",
        "3ds-custom-firmware"
    ],
    "content": "
Homebrew, when applied to video games, refers to games produced by hobbyists for proprietary video game consoles which are not intended to be user-programmable. 3DS Homebrew specifically refers to producing and running custom code on the Nintendo 3DS system. This may include custom firmware, emulators, and other applications not authorized by Nintendo.
\n"
}

Differences
"logo": "https://explore-feed.explore-feed.github.com/topics/3ds-homebrew/3ds-homebrew.png",
"url": "https://explore-feed.github.com/topics/3ds-homebrew",

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.

Failure:
collections::voxel-editors collection#test_0013_fails if a user, organization, or repository has been renamed or removed [/home/runner/work/explore/explore/test/collections_test.rb:197]:
Expected ["voxel-editors: mgerhardy/vengi has been renamed to vengi-voxel/vengi"] to be empty.

This change should probably be addressed in a separate PR

I don't understand this change, has it been broken for a long time? (How does one even use the json feed?)

How does one even use the json feed?

I use it and that's why I even noticed it. However, I didn't rely on links yet and rather focussed on related and aliases.

has it been broken for a long time?

Something, I was also wondering in #4019 😂
It appears to be broken since 2fabae9 from Sep 8, 2022


monaco.languages.css === undefined

We experienced console errors after upgrading monaco-editor from 0.20.0 to 0.21.0 in our application. We access monaco.languages.css.cssDefaults, which was failing because monaco.languages.css is undefined.
Possible cause:
It looks like esm/vs/language/css/monaco.contribution.js contains the line
languages.json = { cssDefaults: cssDefaults, lessDefaults: lessDefaults, scssDefaults: scssDefaults };

(note that it is setting languages.json and not languages.css)
monaco-editor version: 0.21.0+
Browser: Firefox/Electron
OS: macOS
Playground code that reproduces the issue:
console.log({ css: monaco.languages.css, html: monaco.languages.html });

console output:
> Object { css: undefined, html: {…} }

You might want to check with version 0.21.0 since that came out recently.

Sorry that was a typo, it should have said 0.21.0+. I've tried both 0.21.0 and 0.21.1.

published<EMAIL_ADDRESS>with the fix.


How to get my team on my onshape?

I am trying to get all of my team on onshape so that we can collaborate and work on our robot together. I cannot find anywhere that this is discussed and cannot find out how to go about this. Any help would be appreciated. Thank you, John A. O'Brien Team Tesla 4998.

@johnalleO Hey John,
Sorry about the large delay in response - it seems that neither of us were notified of your message, so I'm seeing it for the first time just now.
Are you still having trouble getting Onshape setup for your team, or were you all able to figure it out? Let us know and we can point you in the correct direction if needed!


Expose types in package.json

Leopard is written in Typescript, and the type definitions are already part of the Leopard package. However, they aren't actually set in the package.json, so Typescript doesn't see them.
    "main": "dist/index.umd.js",
    "module": "dist/index.esm.js",
+   "types": "dist/index.d.ts",

@adroitwhiz Pinging you for attention on this, is that all there is to providing Leopard's types to package consumers (what I'm assuming this issue is about)? Pretty much normal for TypeScript projects, no additional changes needed?

Yup, pretty much.

@mybearworld Would you like to make a pull request? 👾✨

Sure, I made one.


Manage enabling/disabling all major features/behaviors from single pane

Description of the new feature / enhancement

Update UX to add section to General (or new pane) to manage enabling/disabling all PowerToy features. (ie: a checkbox list)
Update UX to automatically opt-in or opt-out based on user configuration/preference for new features/updates/behaviors. (Currently behavior is opt-in)

Scenario when this would be used?
When installing PowerToys onto a new Windows OS or user profile, it is a frustrating UX to have to go through every single PowerToys feature page and flip through all the toggles to turn off capabilities that I do not want enabled.
In addition, PowerToys will often automatically force users to opt-in to new features/behaviors without user consent.
Supporting information
Example:
PowerToys Settings

[ ] Always On Top
[x] Awake
[x] Color Picker
[ ] Crop And Lock
[ ] FancyZones
[x] File Locksmith
[ ] File Explorer add-ons
[ ] Hosts File Editor
[ ] Image Resizer
[ ] Keyboard Manager
[ ] Mouse utilities
[ ] Mouse Without Borders
[x] Paste As Plain Text
[ ] Peek
[ ] PowerRename
[x] PowerToys Run
[ ] Quick Accent
[ ] Registry Preview
[x] Screen Ruler
[x] Shortcut Guide
[x] Text Extractor
[ ] Video Conference Mute

/dup #26816


Add encode-picaxml

In context of lobid-organisation we get an pica binary dump and need to transform this to picaxml. But there seems to be no encode-picaxml.
Would be nice to include this.

we get an pica binary dump and need to transform this to picaxml

I would have expected that we will process the dump with a different decoder (decode-pica?) instead of converting it to picaxml.

So this can be closed then?

Nope, picaxml encoder is still a valid feature. Just the usecase is not urgent anymore.


Fix tag detection

Why is this PR needed?
The previous approach for detecting if we were in a tag was not
supporting annotated tags. With this method we are supporting both
lightweight and annotated tags.
Merge restrictions
(Please do not edit this)
We are in v4-maintenance phase, so we will restrict what can be merged to prevent unexpected surprises:
What can be merged (merge criteria):
    2 approvals:
        1 developer: code is fine
        1 QA: QA is fine
    there is a PR for updating documentation (or a statement that this is not needed)

I make a lightweight tag git tag test123 and run make. Both skuba.Tag and skuba.AnnotatedTag are test123. Is this an expected behavior?

Is this an expected behavior?

Yes, both with a lightweight and annotated tag, when running make, skuba.Tag and skuba.AnnotatedTag should be the tag contents.
When we are not in a tag, when running make, skuba.Tag should be empty, and skuba.AnnotatedTag should contain something of the form v1.0.0-34-ga75eaaaf (last tag-number of commits since last tag-HEAD).

Is this an expected behavior?

Yes, both with a lightweight and annotated tag, when running make, skuba.Tag and skuba.AnnotatedTag should be the tag contents (in your case test123).
When we are not in a tag, when running make, skuba.Tag should be empty, and skuba.AnnotatedTag should contain something of the form v1.0.0-34-ga75eaaaf (last tag-number of commits since last tag-HEAD).

Hmmm, but git tag test123 is a lightweight tag, right?
I am not sure why provides both lightweight and annotated tag in Makefile. Maybe we could restrict to use annotated tag only in GitHub setting.

Hmmm, but git tag test123 is a lightweight tag, right?

Yes, maybe the confusion comes from the ANNOTATED_TAG env name, this will have whatever git describe --tags return (it always return something), I didn't have a better name, but it certainly has no direct relationship with git tag -a kind of annotated tag.
The idea is that we always have ANNOTATED_TAG populated, and TAG only when we are in a lightweight or annotated tag.

@jenting, I think it's more clear now. ANNOTATED_TAG was renamed to CLOSEST_TAG.
Now we always pass the skuba.ClosestTag and skuba.Version (inferred from CLOSEST_TAG) to the go build environment.
skuba.Tag is only passed to the go build environment if we are in a lightweight or annotated tag. With this change, we can always build a valid package with make suse-package, because Version will always be populated.


Update GOVERNANCE.md

I've left Ambassador, and Alex Gervais will be taking my place on the SC.
cc @alexgervais

Thanks for everything @richarddli !
@Xunzhuo, as an active SC member, can I ask you to add me to the proper groups such as @envoyproxy/gateway-steering-committee and communication channels/meeting invites?

Hi @alexgervais I already kindly ask @mattklein123 to help on it.


pip install rpa or tagui? - use pip install rpa, but you can also use tagui. both same

It looks there're 2 version of this package on pip?

pip install tagui: https://pypi.org/project/tagui/
pip install rpa: https://github.com/tebelorg/RPA-Python

strangely the 1st also refer to 2nd in the project page.
What's the difference, which one is updated?

Oh that's a good question. Originally, this package is named tagui and it is pip install tagui. After I got the rpa package name, I renamed the project to rpa. For backward compatibility reason, I still publish to tagui package for every rpa release. The recommended one is pip install rpa, but you can pip install rpa or pip install tagui. Both are the same.

rpa package has a dependency on tagui package because I structure it that way so that the source code only needs to be housed at tagui package. So this allows old users' script with import tagui as t; t.init() to work seamlessly.


A problem with datatypes

I try to run the following simple code
# Import a backend
import tensorflow
# Import the corresponding geometric_kernels backend
import geometric_kernels.tensorflow
# Import a space and an appropriate kernel
from geometric_kernels.spaces.hypersphere import Hypersphere
from geometric_kernels.kernels.geometric_kernels import MaternKarhunenLoeveKernel

# Create a manifold (2-dim sphere)
hypersphere = Hypersphere(dim=2)

# Generate 3 random points on the sphere
xs = hypersphere.random_point(3)

# Initialize kernel, use 100 terms to approximate the infinite series.
kernel = MaternKarhunenLoeveKernel(hypersphere, 100)
params, state = kernel.init_params_and_state()
params["nu"] = tf.convert_to_tensor(5/2)
params["lengthscale"] = tf.convert_to_tensor(1.)

# Compute and print out the 3x3 kernel matrix.
print(kernel.K(params, state, tf.convert_to_tensor(xs)))

And get InvalidArgumentError: cannot compute AddV2 as input #1(zero-based) was expected to be a float tensor but is a double tensor [Op:AddV2].
Here is the full traceback:
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-12-4a21cbf866ec> in <module>
     20
     21 # Compute and print out the 3x3 kernel matrix.
---> 22 print(kernel.K(params, state, tf.convert_to_tensor(xs)))

~/.local/lib/python3.8/site-packages/geometric_kernels/kernels/geometric_kernels.py in K(self, params, state, X, X2, **kwargs)
    119         assert "eigenvalues_laplacian" in state
    120
--> 121         weights = self.eigenvalues(params, state)  # [M, 1]
    122         Phi = state["eigenfunctions"]
    123

~/.local/lib/python3.8/site-packages/geometric_kernels/kernels/geometric_kernels.py in eigenvalues(self, params, state)
    106
    107         eigenvalues_laplacian = state["eigenvalues_laplacian"]  # [M, 1]
--> 108         return self._spectrum(
    109             eigenvalues_laplacian ** 0.5,
    110             nu=params["nu"],

~/.local/lib/python3.8/site-packages/geometric_kernels/kernels/geometric_kernels.py in _spectrum(self, s, nu, lengthscale)
     82         elif nu > 0:
     83             power = -nu - self.space.dimension / 2.0
---> 84             base = 2.0 * nu / lengthscale ** 2 + from_numpy(nu, s ** 2)
     85             return base ** power
     86         else:

~/.local/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py in error_handler(*args, **kwargs)
    151     except Exception as e:
    152       filtered_tb = _process_traceback_frames(e.__traceback__)
--> 153       raise e.with_traceback(filtered_tb) from None
    154     finally:
    155       del filtered_tb

~/.local/lib/python3.8/site-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
   7184 def raise_from_not_ok_status(e, name):
   7185   e.message += (" name: " + name if name is not None else "")
-> 7186   raise core._status_to_exception(e) from None  # pylint: disable=protected-access
   7187
   7188

InvalidArgumentError: cannot compute AddV2 as input #1(zero-based) was expected to be a float tensor but is a double tensor [Op:AddV2]

Thanks for the issue! I close it as fixed with PR #35.


Model is rendered in error when palyer at middle distance

It could be a level of detail (LOD) issue. What file path are you replacing?

She's a DLC character and the file path is "romfs\chr\ch\ch33003110.wimdo".If this is a LOD issue ,may be every replaced model has this error. I'll test it later.

I have tested the other Models, included other heros and kevis soldiers. They all have this error.

That should make it easier for me to test. Thanks.

Does the issue go away after you get close to the model? It looks like the high resolution textures haven't been loaded yet. If you get close to the model at least once, the textures should look normal after moving far away again.

Yes. After i get close to the model once, it renders correctly.But if i'm far form it enough, the issue shows up again when i'm getting close to it.

Is this fixed for you on the latest release?
https://github.com/ScanMountGoat/xenoblade_blender/releases/tag/v0.14.0

Yes, it's fixed.I really appreciate your quickly reply and new release.


Code hints are sometimes displayed in reverse

Sometimes, the code hints appear in reverse order when compared to JS code hints:

That is how I expect the order to be, but sometimes (not all the time) the PHP hints are like this:

The weird thing is, recreating the JS case will produce the desired order, but in my (learning) PHP scripts, it occasionally appears as the image above or the desired order.
I can the homework script this is occurring in if you need me to.

I have seen this before and I think I had tried to address it but never really figured out what the problem is.  I have .sort() as the last thing I do before returning the word list arrays, so I would have thought this was covered but apparently it doesn't always work :)
Let me have another look and I will put updates to my findings in this issue.
Thanks for the bug report.

@le717 I was looking at this and noticed something about your two screen shots:
In the JS one you have:
addresses
addressesCount

in the PHP you don't compare the same.  You have:
$addressCount
$addresses

so that appears correct in that C comes before e.
Is this just a mistake in your example or are there other anomalies that need to be looked at?

...
My bad. I just tried it again now with matching variables and it's correct. I saw this last night, and I apparently was not fully comprehending the issue is my fault.
Sorry about that.


Invalid URI

IF they get that error, have them builder.Configuration["KeyVaultName"] as it's probably null.

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

ID: 2cc0b77a-df21-7007-5cec-4399d98c6dc6
Version Independent ID: efe5ae5e-ff64-f1c7-6920-4512fc8f36d1
Content: Azure Key Vault configuration provider in ASP.NET Core
Content Source: aspnetcore/security/key-vault-configuration.md
Product: aspnet-core
Technology: aspnetcore-security
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Associated WorkItem - 86704

Helped customer debug this. Yes, they didn't have config set up right so the return was null.


BBS Requirements gathering

Decide on what we want, and split it into Must haves, Should haves, Could Haves. And then we work on them by time.

I imagine the most basic setup would be a forum.
Do we want it to be purely command line only? Or do we want to kind of emulate command line where it looks like a terminal but the buttons are clickable.

We could also have a latest news gatherer (Could just use the hackernews api)

Some boards also had games, it might be too much trouble, but we could implement a very basic tic tac toe game. Nothing special, but has network capabilities to link with another user searching/play against a robot

Yeah, a newsfeed, discussion threads, and direct chat would be good starting features.
Given time, add in some upload/download features.
I do ahve a command line tictactoe game I wrote a while back as part of a tutorial, I could polish it a little :D

Yeah, rules say all code has to be writtin within this time frame. But I imagine it wouldn't be too nmuch trouble to write it again.

Fair point, I can start from scratch with it as inspiration.
If we made a BBS command line only, wouldn't that mean we don't use this framework?

User management
Calender
Chat function (?)
news feed
Some kind of mail thing?

If we made a BBS command line only, wouldn't that mean we don't use this framework?
As in, I think the frontend should be html and js anyway, but do we want to disable the ability to click things, so they would type into a html input, or do we allow them to click the links

Calender

As in, let people book appointments, or just a frontend calendar with the current date? Because the latter would be rather simple to implement

Calender

As in, let people book appointments, or just a frontend calendar with the current date? Because the latter would be rather simple to implement

I am not sure how hard all these things would become. I was only giving ideas at this point :p

Calender

As in, let people book appointments, or just a frontend calendar with the current date? Because the latter would be rather simple to implement

I am not sure how hard all these things would become. I was only giving ideas at this point :p

We could do a list of upcoming events or something? Or let people

I think

User management (must have)
news feed (must have)
Chat function (should have)
Some kind of mail/private message thing (should have)
Calender (could have)
upload/download  (could have)
Simple Games (could have)


Error while running rn_clm_flax.py huggingface training script

Ran the run_clm_flax script with the following parameters.
./run_clm_flax.py
--output_dir="${MODEL_DIR}"
--model_type="gpt2"
--config_name="${MODEL_DIR}"
--tokenizer_name="${MODEL_DIR}"
--dataset_name="oscar"
--dataset_config_name="unshuffled_deduplicated_sv"
--do_train --do_eval
--block_size="512"
--per_device_train_batch_size="64"
--per_device_eval_batch_size="64"
--learning_rate="5e-3" --warmup_steps="1000"
--adam_beta1="0.9" --adam_beta2="0.98" --weight_decay="0.01"
--overwrite_output_dir
--num_train_epochs="20"
--push_to_hub
The script ran for one epoch around 7 hours before crashing.
Traceback (most recent call last):
File "./run_clm_flax.py", line 625, in
main()
File "./run_clm_flax.py", line 572, in main
state, train_metric = p_train_step(state, batch)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/_src/traceback_util.py", line 183, in reraise_with_filtered_traceback
return fun(*args, **kwargs)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/_src/api.py", line 1647, in f_pmapped
out = pxla.xla_pmap(
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/core.py", line 1620, in bind
return call_bind(self, fun, *args, **params)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/core.py", line 1551, in call_bind
outs = primitive.process(top_trace, fun, tracers, params)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/core.py", line 1623, in process
return trace.process_map(self, fun, tracers, params)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/core.py", line 606, in process_call
return primitive.impl(f, *tracers, **params)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/interpreters/pxla.py", line 637, in xla_pmap_impl
return compiled_fun(*args)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/interpreters/pxla.py", line 1152, in execute_replicated
out_bufs = compiled.execute_sharded_on_local_devices(input_bufs)
jax._src.traceback_util.UnfilteredStackTrace: RuntimeError: Resource exhausted: Attempting to allocate 121.12M. That was not possible. There are 127.34M free. Due to fragmentation, the largest contiguous region of free memory is 120.12M.; (0x0x0_HBM0): while running replica 0 and partition 0 of a replicated computation (other replicas may have failed as well).
The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.

The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./run_clm_flax.py", line 625, in
main()
File "./run_clm_flax.py", line 572, in main
state, train_metric = p_train_step(state, batch)
File "/home/bmoell/gpt2/lib/python3.8/site-packages/jax/interpreters/pxla.py", line 1152, in execute_replicated
out_bufs = compiled.execute_sharded_on_local_devices(input_bufs)
RuntimeError: Resource exhausted: Attempting to allocate 121.12M. That was not possible. There are 127.34M free. Due to fragmentation, the largest contiguous region of free memory is 120.12M.; (0x0x0_HBM0): while running replica 0 and partition 0 of a replicated computation (other replicas may have failed as well).
Here is the training script file.
#!/usr/bin/env python
coding=utf-8
Copyright 2021 The HuggingFace Team All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
Pre-training/Fine-tuning the library models for causal language modeling (GPT, GPT-2, CTRL, ...) on a text file or a dataset.
Here is the full list of checkpoints on the hub that can be fine-tuned by this script:
https://huggingface.co/models?filter=causal-lm
"""
You can also adapt this script on your own causal language modeling task. Pointers for this are left as comments.
import logging
import math
import os
import sys
import time
from dataclasses import dataclass, field
from pathlib import Path
from typing import Callable, Optional
import datasets
from datasets import Dataset, load_dataset
from tqdm import tqdm
import jax
import jax.numpy as jnp
import optax
import transformers
from flax import jax_utils, traverse_util
from flax.jax_utils import unreplicate
from flax.training import train_state
from flax.training.common_utils import get_metrics, onehot, shard, shard_prng_key
from transformers import (
CONFIG_MAPPING,
FLAX_MODEL_FOR_CAUSAL_LM_MAPPING,
AutoConfig,
AutoTokenizer,
FlaxAutoModelForCausalLM,
HfArgumentParser,
TrainingArguments,
is_tensorboard_available,
)
from transformers.testing_utils import CaptureLogger
logger = logging.getLogger(name)
Cache the result
has_tensorboard = is_tensorboard_available()
if has_tensorboard:
try:
from flax.metrics.tensorboard import SummaryWriter
except ImportError as ie:
has_tensorboard = False
print(f"Unable to display metrics through TensorBoard because some package are not installed: {ie}")
else:
print(
"Unable to display metrics through TensorBoard because the package is not installed: "
"Please run pip install tensorboard to enable."
)
MODEL_CONFIG_CLASSES = list(FLAX_MODEL_FOR_CAUSAL_LM_MAPPING.keys())
MODEL_TYPES = tuple(conf.model_type for conf in MODEL_CONFIG_CLASSES)
@dataclass
class ModelArguments:
"""
Arguments pertaining to which model/config/tokenizer we are going to fine-tune, or train from scratch.
"""
model_name_or_path: Optional[str] = field(
    default=None,
    metadata={
        "help": "The model checkpoint for weights initialization."
        "Don't set if you want to train a model from scratch."
    },
)
model_type: Optional[str] = field(
    default=None,
    metadata={"help": "If training from scratch, pass a model type from the list: " + ", ".join(MODEL_TYPES)},
)
config_name: Optional[str] = field(
    default=None, metadata={"help": "Pretrained config name or path if not the same as model_name"}
)
tokenizer_name: Optional[str] = field(
    default=None, metadata={"help": "Pretrained tokenizer name or path if not the same as model_name"}
)
cache_dir: Optional[str] = field(
    default=None, metadata={"help": "Where do you want to store the pretrained models downloaded from s3"}
)
use_fast_tokenizer: bool = field(
    default=True,
    metadata={"help": "Whether to use one of the fast tokenizer (backed by the tokenizers library) or not."},
)
dtype: Optional[str] = field(
    default="float32",
    metadata={
        "help": "Floating-point format in which the model weights should be initialized and trained. Choose one of `[float32, float16, bfloat16]`."
    },
)

@dataclass
class DataTrainingArguments:
"""
Arguments pertaining to what data we are going to input our model for training and eval.
"""
dataset_name: Optional[str] = field(
    default=None, metadata={"help": "The name of the dataset to use (via the datasets library)."}
)
dataset_config_name: Optional[str] = field(
    default=None, metadata={"help": "The configuration name of the dataset to use (via the datasets library)."}
)
train_file: Optional[str] = field(default=None, metadata={"help": "The input training data file (a text file)."})
validation_file: Optional[str] = field(
    default=None,
    metadata={"help": "An optional input evaluation data file to evaluate the perplexity on (a text file)."},
)
max_train_samples: Optional[int] = field(
    default=None,
    metadata={
        "help": "For debugging purposes or quicker training, truncate the number of training examples to this "
        "value if set."
    },
)
max_eval_samples: Optional[int] = field(
    default=None,
    metadata={
        "help": "For debugging purposes or quicker training, truncate the number of evaluation examples to this "
        "value if set."
    },
)
overwrite_cache: bool = field(
    default=False, metadata={"help": "Overwrite the cached training and evaluation sets"}
)
validation_split_percentage: Optional[int] = field(
    default=5,
    metadata={
        "help": "The percentage of the train set used as validation set in case there's no validation split"
    },
)
block_size: Optional[int] = field(
    default=None,
    metadata={
        "help": "Optional input sequence length after tokenization. "
        "The training dataset will be truncated in block of this size for training. "
        "Default to the model max input length for single sentence inputs (take into account special tokens)."
    },
)
overwrite_cache: bool = field(
    default=False, metadata={"help": "Overwrite the cached training and evaluation sets"}
)
preprocessing_num_workers: Optional[int] = field(
    default=None,
    metadata={"help": "The number of processes to use for the preprocessing."},
)

def __post_init__(self):
    if self.dataset_name is None and self.train_file is None and self.validation_file is None:
        raise ValueError("Need either a dataset name or a training/validation file.")
    else:
        if self.train_file is not None:
            extension = self.train_file.split(".")[-1]
            assert extension in ["csv", "json", "txt"], "`train_file` should be a csv, a json or a txt file."
        if self.validation_file is not None:
            extension = self.validation_file.split(".")[-1]
            assert extension in ["csv", "json", "txt"], "`validation_file` should be a csv, a json or a txt file."

class TrainState(train_state.TrainState):
dropout_rng: jnp.ndarray
def replicate(self):
    return jax_utils.replicate(self).replace(dropout_rng=shard_prng_key(self.dropout_rng))

def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: int, shuffle: bool = False):
"""
Returns batches of size batch_size from truncated dataset, sharded over all local devices.
Shuffle batches if shuffle is True.
"""
steps_per_epoch = len(dataset) // batch_size
if shuffle:
    batch_idx = jax.random.permutation(rng, len(dataset))
else:
    batch_idx = jnp.arange(len(dataset))

batch_idx = batch_idx[: steps_per_epoch * batch_size]  # Skip incomplete batch.
batch_idx = batch_idx.reshape((steps_per_epoch, batch_size))

for idx in batch_idx:
    batch = dataset[idx]
    batch = {k: jnp.array(v) for k, v in batch.items()}

    batch = shard(batch)

    yield batch

def write_metric(summary_writer, train_metrics, eval_metrics, train_time, step):
summary_writer.scalar("train_time", train_time, step)
train_metrics = get_metrics(train_metrics)
for key, vals in train_metrics.items():
    tag = f"train_{key}"
    for i, val in enumerate(vals):
        summary_writer.scalar(tag, val, step - len(vals) + i + 1)

for metric_name, value in eval_metrics.items():
    summary_writer.scalar(f"eval_{metric_name}", value, step)

def create_learning_rate_fn(
train_ds_size: int, train_batch_size: int, num_train_epochs: int, num_warmup_steps: int, learning_rate: float
) -> Callable[[int], jnp.array]:
"""Returns a linear warmup, linear_decay learning rate function."""
steps_per_epoch = train_ds_size // train_batch_size
num_train_steps = steps_per_epoch * num_train_epochs
warmup_fn = optax.linear_schedule(init_value=0.0, end_value=learning_rate, transition_steps=num_warmup_steps)
decay_fn = optax.linear_schedule(
init_value=learning_rate, end_value=0, transition_steps=num_train_steps - num_warmup_steps
)
schedule_fn = optax.join_schedules(schedules=[warmup_fn, decay_fn], boundaries=[num_warmup_steps])
return schedule_fn
def main():
# See all possible arguments in src/transformers/training_args.py
# or by passing the --help flag to this script.
# We now keep distinct sets of args, for a cleaner separation of concerns.
parser = HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments))
if len(sys.argv) == 2 and sys.argv[1].endswith(".json"):
    # If we pass only one argument to the script and it's the path to a json file,
    # let's parse it to get our arguments.
    model_args, data_args, training_args = parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]))
else:
    model_args, data_args, training_args = parser.parse_args_into_dataclasses()

if (
    os.path.exists(training_args.output_dir)
    and os.listdir(training_args.output_dir)
    and training_args.do_train
    and not training_args.overwrite_output_dir
):
    raise ValueError(
        f"Output directory ({training_args.output_dir}) already exists and is not empty."
        "Use --overwrite_output_dir to overcome."
    )

# Make one log on every process with the configuration for debugging.
logging.basicConfig(
    format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
    datefmt="%m/%d/%Y %H:%M:%S",
    level=logging.INFO,
)
# Setup logging, we only want one process per machine to log things on the screen.
logger.setLevel(logging.INFO if jax.process_index() == 0 else logging.ERROR)
if jax.process_index() == 0:
    datasets.utils.logging.set_verbosity_warning()
    transformers.utils.logging.set_verbosity_info()
else:
    datasets.utils.logging.set_verbosity_error()
    transformers.utils.logging.set_verbosity_error()

# Set the verbosity to info of the Transformers logger (on main process only):
logger.info(f"Training/evaluation parameters {training_args}")

#  Get the datasets: you can either provide your own CSV/JSON/TXT training and evaluation files (see below)
# or just provide the name of one of the public datasets available on the hub at https://huggingface.co/datasets/
# (the dataset will be downloaded automatically from the datasets Hub).
#
# For CSV/JSON files, this script will use the column called 'text' or the first column if no column called
# 'text' is found. You can easily tweak this behavior (see below).
#
# In distributed training, the load_dataset function guarantees that only one local process can concurrently
# download the dataset.
if data_args.dataset_name is not None:
    # Downloading and loading a dataset from the hub.
    dataset = load_dataset(
        data_args.dataset_name, data_args.dataset_config_name, cache_dir=model_args.cache_dir, keep_in_memory=False
    )

    if "validation" not in dataset.keys():
        dataset["validation"] = load_dataset(
            data_args.dataset_name,
            data_args.dataset_config_name,
            split=f"train[:{data_args.validation_split_percentage}%]",
            cache_dir=model_args.cache_dir,
        )
        dataset["train"] = load_dataset(
            data_args.dataset_name,
            data_args.dataset_config_name,
            split=f"train[{data_args.validation_split_percentage}%:]",
            cache_dir=model_args.cache_dir,
        )
else:
    data_files = {}
    if data_args.train_file is not None:
        data_files["train"] = data_args.train_file
    if data_args.validation_file is not None:
        data_files["validation"] = data_args.validation_file
    extension = data_args.train_file.split(".")[-1]
    if extension == "txt":
        extension = "text"
    dataset = load_dataset(extension, data_files=data_files, cache_dir=model_args.cache_dir)
# See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at
# https://huggingface.co/docs/datasets/loading_datasets.html.

# Load pretrained model and tokenizer

# Distributed training:
# The .from_pretrained methods guarantee that only one local process can concurrently
# download model & vocab.
if model_args.config_name:
    config = AutoConfig.from_pretrained(model_args.config_name, cache_dir=model_args.cache_dir)
elif model_args.model_name_or_path:
    config = AutoConfig.from_pretrained(model_args.model_name_or_path, cache_dir=model_args.cache_dir)
else:
    config = CONFIG_MAPPING[model_args.model_type]()
    logger.warning("You are instantiating a new config instance from scratch.")

if model_args.tokenizer_name:
    tokenizer = AutoTokenizer.from_pretrained(
        model_args.tokenizer_name, cache_dir=model_args.cache_dir, use_fast=model_args.use_fast_tokenizer
    )
elif model_args.model_name_or_path:
    tokenizer = AutoTokenizer.from_pretrained(
        model_args.model_name_or_path, cache_dir=model_args.cache_dir, use_fast=model_args.use_fast_tokenizer
    )
else:
    raise ValueError(
        "You are instantiating a new tokenizer from scratch. This is not supported by this script."
        "You can do it from another script, save it, and load it from here, using --tokenizer_name."
    )

if model_args.model_name_or_path:
    model = FlaxAutoModelForCausalLM.from_pretrained(
        model_args.model_name_or_path, config=config, seed=training_args.seed, dtype=getattr(jnp, model_args.dtype)
    )
else:
    model = FlaxAutoModelForCausalLM.from_config(
        config, seed=training_args.seed, dtype=getattr(jnp, model_args.dtype)
    )

# Preprocessing the datasets.
# First we tokenize all the texts.
if training_args.do_train:
    column_names = dataset["train"].column_names
else:
    column_names = dataset["validation"].column_names
text_column_name = "text" if "text" in column_names else column_names[0]

# since this will be pickled to avoid _LazyModule error in Hasher force logger loading before tokenize_function
tok_logger = transformers.utils.logging.get_logger("transformers.tokenization_utils_base")

def tokenize_function(examples):
    with CaptureLogger(tok_logger) as cl:
        output = tokenizer(examples[text_column_name])
    # clm input could be much much longer than block_size
    if "Token indices sequence length is longer than the" in cl.out:
        tok_logger.warning(
            "^^^^^^^^^^^^^^^^ Please ignore the warning above - this long input will be chunked into smaller bits before being passed to the model."
        )
    return output

tokenized_datasets = dataset.map(
    tokenize_function,
    batched=True,
    num_proc=data_args.preprocessing_num_workers,
    remove_columns=column_names,
    load_from_cache_file=not data_args.overwrite_cache,
)

if data_args.block_size is None:
    block_size = tokenizer.model_max_length
    if block_size > config.max_position_embeddings:
        logger.warning(
            f"The tokenizer picked seems to have a very large `model_max_length` ({tokenizer.model_max_length}). "
            "Picking 1024 instead. You can change that default value by passing --block_size xxx."
        )
        block_size = 1024
else:
    if data_args.block_size > tokenizer.model_max_length:
        logger.warning(
            f"The block_size passed ({data_args.block_size}) is larger than the maximum length for the model"
            f"({tokenizer.model_max_length}). Using block_size={tokenizer.model_max_length}."
        )
    block_size = min(data_args.block_size, tokenizer.model_max_length)

# Main data processing function that will concatenate all texts from our dataset and generate chunks of block_size.
def group_texts(examples):
    # Concatenate all texts.
    concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
    total_length = len(concatenated_examples[list(examples.keys())[0]])
    # We drop the small remainder, we could add padding if the model supported it instead of this drop, you can
    # customize this part to your needs.
    total_length = (total_length // block_size) * block_size
    # Split by chunks of max_len.
    result = {
        k: [t[i : i + block_size] for i in range(0, total_length, block_size)]
        for k, t in concatenated_examples.items()
    }
    result["labels"] = result["input_ids"].copy()
    return result

# Note that with `batched=True`, this map processes 1,000 texts together, so group_texts throws away a remainder
# for each of those groups of 1,000 texts. You can adjust that batch_size here but a higher value might be slower
# to preprocess.
#
# To speed up this part, we use multiprocessing. See the documentation of the map method for more information:
# https://huggingface.co/docs/datasets/package_reference/main_classes.html#datasets.Dataset.map

lm_datasets = tokenized_datasets.map(
    group_texts,
    batched=True,
    num_proc=data_args.preprocessing_num_workers,
    load_from_cache_file=not data_args.overwrite_cache,
)

if training_args.do_train:
    if "train" not in tokenized_datasets:
        raise ValueError("--do_train requires a train dataset")
    train_dataset = lm_datasets["train"]
    if data_args.max_train_samples is not None:
        train_dataset = train_dataset.select(range(data_args.max_train_samples))

if training_args.do_eval:
    if "validation" not in tokenized_datasets:
        raise ValueError("--do_eval requires a validation dataset")
    eval_dataset = lm_datasets["validation"]
    if data_args.max_eval_samples is not None:
        eval_dataset = eval_dataset.select(range(data_args.max_eval_samples))

# Enable tensorboard only on the master node
if has_tensorboard and jax.process_index() == 0:
    summary_writer = SummaryWriter(log_dir=Path(training_args.output_dir))

# Initialize our training
rng = jax.random.PRNGKey(training_args.seed)
rng, dropout_rng = jax.random.split(rng)

# Store some constant
num_epochs = int(training_args.num_train_epochs)
train_batch_size = int(training_args.per_device_train_batch_size) * jax.device_count()
eval_batch_size = int(training_args.per_device_eval_batch_size) * jax.device_count()
steps_per_epoch = len(train_dataset) // train_batch_size
total_train_steps = steps_per_epoch * num_epochs

# Create learning rate schedule
linear_decay_lr_schedule_fn = create_learning_rate_fn(
    len(train_dataset),
    train_batch_size,
    training_args.num_train_epochs,
    training_args.warmup_steps,
    training_args.learning_rate,
)

# We use Optax's "masking" functionality to not apply weight decay
# to bias and LayerNorm scale parameters. decay_mask_fn returns a
# mask boolean with the same structure as the parameters.
# The mask is True for parameters that should be decayed.
# Note that this mask is specifically adapted for FlaxGPT2.
# For other models, one should correct the layer norm parameter naming
# accordingly.
def decay_mask_fn(params):
    flat_params = traverse_util.flatten_dict(params)
    flat_mask = {
        path: (path[-1] != "bias" and path[-2:] not in [("ln_1", "scale"), ("ln_2", "scale"), ("ln_f", "scale")])
        for path in flat_params
    }
    return traverse_util.unflatten_dict(flat_mask)

# create adam optimizer
adamw = optax.adamw(
    learning_rate=linear_decay_lr_schedule_fn,
    b1=training_args.adam_beta1,
    b2=training_args.adam_beta2,
    eps=training_args.adam_epsilon,
    weight_decay=training_args.weight_decay,
    mask=decay_mask_fn,
)

# Setup train state
state = TrainState.create(apply_fn=model.__call__, params=model.params, tx=adamw, dropout_rng=dropout_rng)

def loss_fn(logits, labels):
    shift_logits = logits[..., :-1, :]
    shift_labels = labels[..., 1:]
    loss = optax.softmax_cross_entropy(shift_logits, onehot(shift_labels, shift_logits.shape[-1]))
    return loss.mean()

# Define gradient update step fn
def train_step(state, batch):
    dropout_rng, new_dropout_rng = jax.random.split(state.dropout_rng)

    def compute_loss(params):
        labels = batch.pop("labels")
        logits = state.apply_fn(**batch, params=params, dropout_rng=dropout_rng, train=True)[0]
        loss = loss_fn(logits, labels)
        return loss

    grad_fn = jax.value_and_grad(compute_loss)
    loss, grad = grad_fn(state.params)
    grad = jax.lax.pmean(grad, "batch")

    new_state = state.apply_gradients(grads=grad, dropout_rng=new_dropout_rng)

    metrics = {"loss": loss, "learning_rate": linear_decay_lr_schedule_fn(state.step)}
    metrics = jax.lax.pmean(metrics, axis_name="batch")

    return new_state, metrics

# Define eval fn
def eval_step(params, batch):
    labels = batch.pop("labels")
    logits = model(**batch, params=params, train=False)[0]
    loss = loss_fn(logits, labels)

    # summarize metrics
    metrics = {"loss": loss}
    metrics = jax.lax.pmean(metrics, axis_name="batch")
    return metrics

# Create parallel version of the train and eval step
p_train_step = jax.pmap(train_step, "batch", donate_argnums=(0,))
p_eval_step = jax.pmap(eval_step, "batch")

# Replicate the train state on each device
state = state.replicate()

logger.info("***** Running training *****")
logger.info(f"  Num examples = {len(train_dataset)}")
logger.info(f"  Num Epochs = {num_epochs}")
logger.info(f"  Instantaneous batch size per device = {training_args.per_device_train_batch_size}")
logger.info(f"  Total train batch size (w. parallel & distributed) = {train_batch_size}")
logger.info(f"  Total optimization steps = {total_train_steps}")

train_time = 0
epochs = tqdm(range(num_epochs), desc=f"Epoch ... (1/{num_epochs})", position=0)
for epoch in epochs:
    # ======================== Training ================================
    train_start = time.time()

    # Create sampling rng
    rng, input_rng = jax.random.split(rng)
    train_metrics = []

    # Generate an epoch by shuffling sampling indices from the train dataset
    train_loader = data_loader(input_rng, train_dataset, train_batch_size, shuffle=True)
    steps_per_epoch = len(train_dataset) // train_batch_size
    # train
    for _ in tqdm(range(steps_per_epoch), desc="Training...", position=1, leave=False):
        batch = next(train_loader)
        state, train_metric = p_train_step(state, batch)
        train_metrics.append(train_metric)

    train_time += time.time() - train_start

    train_metric = unreplicate(train_metric)

    epochs.write(
        f"Epoch... ({epoch + 1}/{num_epochs} | Loss: {train_metric['loss']}, Learning Rate: {train_metric['learning_rate']})"
    )

    # ======================== Evaluating ==============================
    eval_metrics = []
    eval_loader = data_loader(input_rng, eval_dataset, eval_batch_size)
    eval_steps = len(eval_dataset) // eval_batch_size
    for _ in tqdm(range(eval_steps), desc="Evaluating...", position=2, leave=False):
        # Model forward
        batch = next(eval_loader)
        metrics = p_eval_step(state.params, batch)
        eval_metrics.append(metrics)

    # normalize eval metrics
    eval_metrics = get_metrics(eval_metrics)

    eval_metrics = jax.tree_map(jnp.mean, eval_metrics)

    try:
        eval_metrics["perplexity"] = math.exp(eval_metrics["loss"])
    except OverflowError:
        eval_metrics["perplexity"] = float("inf")

    # Print metrics and update progress bar
    desc = f"Epoch... ({epoch + 1}/{num_epochs} | Eval Loss: {eval_metrics['loss']} | Eval Perplexity: {eval_metrics['perplexity']})"
    epochs.write(desc)
    epochs.desc = desc

    # Save metrics
    if has_tensorboard and jax.process_index() == 0:
        cur_step = epoch * (len(train_dataset) // train_batch_size)
        write_metric(summary_writer, train_metrics, eval_metrics, train_time, cur_step)

    # save checkpoint after each epoch and push checkpoint to the hub
    if jax.process_index() == 0:
        params = jax.device_get(unreplicate(state.params))
        model.save_pretrained(
            training_args.output_dir,
            params=params,
            push_to_hub=training_args.push_to_hub,
            commit_message=f"Saving weights and logs of epoch {epoch+1}",
        )

if name == "main":
main()

Thanks for the issue @BirgerMoell - that looks very similar to what we've seen with @patil-suraj before

@jheek pointed out that the fragmentation/OOM is caused by storing training metrics (on device) in the training_metrics list. If the number of steps per epoch is really large (which is the case bigger datasets) then we should periodically fetch the metrics to memory or do logging periodically rather than at the end of epoch so the device metrics won't get accumulated in training_metrics. (cf https://github.com/huggingface/transformers/pull/12023#discussion_r648949187)
This is not an issue with flax, please open it in transformers repo. Thanks!

Closing this since as @patil-suraj says, this issue should be filed in the transformer repo.


Migrated to latest dependencies

Part of the effort for issue #45.
Do not merge until https://github.com/spring-cloud/spring-cloud-task/pull/408 has been merged

Closing this in favor of #5.


Next/Previous month arrows missing

I'm seeing that the next and previous arrows are missing.  On your demo site, the chevrons depend on font-awesome.css.  Does this plugin have an undocumented dependency on font-awesome?

In case anyone wants to fix this without Font Awesome, just use this CSS:
.fa-chevron-left::before {
  content: "<";
}

.fa-chevron-right::before {
  content: ">";
}

i.fa-chevron-left::before, i.fa-chevron-right::before {
  font-style: normal !important; // override wrapping <i>
}


checkov: 3.2.256 -> 3.2.257

Diff: https://github.com/bridgecrewio/checkov/compare/refs/tags/3.2.256...3.2.257
Changelog: https://github.com/bridgecrewio/checkov/releases/tag/3.2.257

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 347034 run on x86_64-linux 1

2 packages built:

checkov
checkov.dist


change default resource class from small to medium

free customers are unable to utilize resource_class: small therefore are blocked due to free-plan-resource-class-unavailable, changing resource_class: medium will allow free customers to utilize the orb
Checklist

[x] All new jobs, commands, executors, parameters have descriptions
[x] Examples have been added for any significant new features
[x] README has been updated, if necessary

Motivation, issues
free customers are unable to utilize resource_class: small therefore are blocked due to free-plan-resource-class-unavailable, changing resource_class: medium will allow free customers to utilize the orb
Description
change default resource_class from small to medium

This issue has been resolved. Thank you.


pip19 removed process_dependency_links.

Add a check to see if process_dependency_links is supported.
Fixes #140, #141

thanks for trying to fix issue
this fix didn't workout for me
Chef Development Kit Version: 3.3.23
chef-client version: 14.5.33
delivery version: master (6862f27aba89109a9630f0b6c6798efec56b4efe)
berks version: 7.0.6
kitchen version: 1.23.2
inspec version: 2.2.112

    * python_runtime[2] action install
      * poise_languages_system[python2.7] action install
        - install version 2.7.12-1ubuntu0~16.04.4 of package python2.7
        - install version 2.7.12-1ubuntu0~16.04.4 of package python2.7-dev
      * apt_package[python2.7, python2.7-dev] action nothing (skipped due to action :nothing)

    * python_runtime_pip[2] action install
      - Bootstrapping pip latest from https://bootstrap.pypa.io/get-pip.py
    * python_package[setuptools] action install^[[B

      ================================================================================
      Error executing action `install` on resource 'python_package[setuptools]'
      ================================================================================

      Mixlib::ShellOut::ShellCommandFailed
      ------------------------------------
      Expected process to exit with [0], but received '1'
      ---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
      STDOUT:
      STDERR: Traceback (most recent call last):
        File "<stdin>", line 43, in <module>
      AttributeError: type object 'InstallRequirement' has no attribute 'from_line'
      ---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
      Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1

      Cookbook Trace:
      ---------------
      /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
      /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
      /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
      /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:330:in `pip_command'
      /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:354:in `pip_outdated'
      /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:222:in `check_package_versions'
      /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:201:in `load_current_resource'
      /var/tmp/chef/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
      /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

      Resource Declaration:
      ---------------------
      # In /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb

      138:         python_package 'setuptools' do
      139:           parent_python new_resource
      140:           version setuptools_version if setuptools_version.is_a?(String)
      141:         end
      142:       end

      Compiled Resource:
      ------------------
      # Declared in /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:138:in `install_setuptools'

      python_package("setuptools") do
        package_name "setuptools"
        action [:install]
        default_guard_interpreter :default
        declared_type :python_package
        cookbook_name "_buildbot"
        parent_python python_runtime[2]
        timeout 900
      end

      System Info:
      ------------
      chef_version=14.5.33
      platform=ubuntu
      platform_version=16.04
      ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
      program_name=/usr/bin/chef-client
      executable=/opt/chefdk/bin/chef-client

    ================================================================================
    Error executing action `install` on resource 'python_runtime[2]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    python_package[setuptools] (/var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 138) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
    ---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
    STDOUT:
    STDERR: Traceback (most recent call last):
      File "<stdin>", line 43, in <module>
    AttributeError: type object 'InstallRequirement' has no attribute 'from_line'
    ---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
    Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1

    Cookbook Trace:
    ---------------
    /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
    /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
    /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
    /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:330:in `pip_command'
    /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:354:in `pip_outdated'
    /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:222:in `check_package_versions'
    /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:201:in `load_current_resource'
    /var/tmp/chef/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
    /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

    Resource Declaration:
    ---------------------
    # In /var/tmp/chef/cookbooks/buildbot/resources/master.rb

     35:     python_runtime '2' #do
     36: #      setuptools_version false

    Compiled Resource:
    ------------------
    # Declared in /var/tmp/chef/cookbooks/buildbot/resources/master.rb:35:in `block in class_from_file'

    python_runtime("2") do
      action [:install]
      updated true
      updated_by_last_action true
      default_guard_interpreter :default
      subresources [python_package[buildbot, buildbot-www, buildbot-waterfall-view, buildbot-console-view, buildbot-grid-view], python_runtime_pip[2], python_package[setuptools], python_package[wheel], python_package[virtualenv]]
      declared_type :python_runtime
      cookbook_name "_buildbot"
      get_pip_url "https://bootstrap.pypa.io/get-pip.py"
      pip_version true
      setuptools_version true
      version "2"
      virtualenv_version true
      wheel_version true
    end

    System Info:
    ------------
    chef_version=14.5.33
    platform=ubuntu
    platform_version=16.04
    ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
    program_name=/usr/bin/chef-client
    executable=/opt/chefdk/bin/chef-client

  ================================================================================
  Error executing action `install` on resource 'buildbot_master[buildmaster]'
  ================================================================================

  Mixlib::ShellOut::ShellCommandFailed
  ------------------------------------
  python_runtime[2] (/var/tmp/chef/cookbooks/buildbot/resources/master.rb line 35) had an error: Mixlib::ShellOut::ShellCommandFailed: python_package[setuptools] (/var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 138) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
  ---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
  STDOUT:
  STDERR: Traceback (most recent call last):
    File "<stdin>", line 43, in <module>
  AttributeError: type object 'InstallRequirement' has no attribute 'from_line'
  ---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
  Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1

  Cookbook Trace:
  ---------------
  /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
  /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
  /var/tmp/chef/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
  /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:330:in `pip_command'
  /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:354:in `pip_outdated'
  /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:222:in `check_package_versions'
  /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:201:in `load_current_resource'
  /var/tmp/chef/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
  /var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

  Resource Declaration:
  ---------------------
  # In /var/tmp/chef/cookbooks/_buildbot/recipes/default.rb

    9: buildbot_master 'buildmaster' do
   10:   user    node['buildbot']['user']
   11:   group   node['buildbot']['user']
   12:   basedir node['buildbot']['basedir']
   13:   template_cookbook '_buildbot'
   14:   variables({
   15:     title_url: node['buildbot']['project']['title_url'],
   16:     buildbot_url: node['buildbot']['project']['buildbot_url'],
   17:     git_url: node['buildbot']['project']['git_url']
   18:   })
   19:   action [:install, :configure, :run]
   20: end
   21:

  Compiled Resource:
  ------------------
  # Declared in /var/tmp/chef/cookbooks/_buildbot/recipes/default.rb:9:in `from_file'

  buildbot_master("buildmaster") do
    action [:install, :configure, :run]
    updated true
    updated_by_last_action true
    default_guard_interpreter :default
    declared_type :buildbot_master
    cookbook_name "_buildbot"
    recipe_name "default"
    user "buildbot"
    group "buildbot"
    basedir "/home/buildbot"
    template_cookbook "_buildbot"
    variables {:title_url=>nil, :buildbot_url=>"http://playground.kitchen.it.taocloud.org:8010/", :git_url=>""}
  end

  System Info:
  ------------
  chef_version=14.5.33
  platform=ubuntu
  platform_version=16.04
  ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
  program_name=/usr/bin/chef-client
  executable=/opt/chefdk/bin/chef-client

* template[update ssh known hosts file /etc/ssh/ssh_known_hosts] action create (up to date)

Running handlers:
[2019-03-07T17:56:28+00:00] ERROR: Running exception handlers
[2019-03-07T17:56:28+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-03-07T17:56:28+00:00] ERROR: Exception handlers complete
[2019-03-07T17:56:28+00:00] ERROR: Exception handlers complete
Chef Client failed. 10 resources updated in 31 seconds
[2019-03-07T17:56:28+00:00] FATAL: Stacktrace dumped to /var/tmp/chef/chef-stacktrace.out
[2019-03-07T17:56:28+00:00] FATAL: Stacktrace dumped to /var/tmp/chef/chef-stacktrace.out
[2019-03-07T17:56:28+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-03-07T17:56:28+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-03-07T17:56:28+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: buildbot_master[buildmaster] (_buildbot::default line 9) had an error: Mixlib::ShellOut::ShellCommandFailed: python_runtime[2] (/var/tmp/chef/cookbooks/buildbot/resources/master.rb line 35) had an error: Mixlib::ShellOut::ShellCommandFailed: python_package[setuptools] (/var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 138) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
STDOUT:
STDERR: Traceback (most recent call last):
  File "<stdin>", line 43, in <module>
AttributeError: type object 'InstallRequirement' has no attribute 'from_line'
---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1
[2019-03-07T17:56:28+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: buildbot_master[buildmaster] (_buildbot::default line 9) had an error: Mixlib::ShellOut::ShellCommandFailed: python_runtime[2] (/var/tmp/chef/cookbooks/buildbot/resources/master.rb line 35) had an error: Mixlib::ShellOut::ShellCommandFailed: python_package[setuptools] (/var/tmp/chef/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 138) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
STDOUT:
STDERR: Traceback (most recent call last):
  File "<stdin>", line 43, in <module>
AttributeError: type object 'InstallRequirement' has no attribute 'from_line'
---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1

chef-client version: 14.5.33

i confirm the fix is working

Desperately need this fix.  And the worst part about this cookbook is we can't just point at your fork in Berksfile because it does some kinda precompile against the repo to make it into a Chef cookbook.  And that process is not documented.

@coderanger are you able to merge this?

@coderanger I would like this too, that would be great

@coderanger please merge this.

In the absence of this fix is there any workaround to this problem to get chef to run?

@gene1wood https://github.com/poise/poise-python/issues/144
This cookbook is essentially dead.  Might as well start shelling out to pip install:
Example:
execute 'pip3.7 install boto3'

@et304383 good point. Ya, I'm converting now away

@gena01 thanks for contributing this fix.
Could you or @salsa-dev , offer any help, tips, or instructions for building poise-python with this fix?  I'd like to try it out, but don't see a way from the merged code to a cookbook.  Thanks!


Multistore -> nested routes names duplicated

Current behavior
When create a children route, it duplicates without language prefix.
Expected behavior
Nested routes names should be prefixed by each language.
Steps to reproduce the issue
Use multistore and create children route.
Can you handle fixing this bug by yourself?

[x ] YES
[ ] NO

Which Release Cycle state this refers to? Info for developer.
Pick one option.

[ ] This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
[ ] This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
[x ] This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

Browser: Chrome
OS: Windows
Node: 10
Code Version: 1.10.1

Hi! Thanks, can you paste example routing config to show the case please?

setupMultistoreRoutes from multistore.ts is adding the localized routes

Of course. Code below:
{     name: 'account',     path: '/my-account',     component: MyAccount,     meta: { requiresAuth: true },     children: [       {         name: 'account-settings',         path: 'settings',         component: AccountSettings,         props: { page: 'lorem', title: 'Account settings' },         meta: { requiresAuth: true }       }     ]   },

yeah, we forgot about this :) can you please fix it? thanks!

I just wanted to check up the status? The 1.11rc1 is planned for 19th of September

It seems that the problem is a little bit more complicated. I have to study it more.


Fix typo

Coverage increased (+0.02%) to 85.937% when pulling ea5b1a08a60669c596cd0edaccb642ad6688a823 on apupier:patch-1 into 93c9c6cf7e1ccfd92e4dcdc1fd9a9d926655ef03 on apache:master.

merged, thanks for spotting this!


create aggregation functions

Should be able to write aggregation functions (such as sum) and register them into the system

It would be cool if scala-js can help us here testing the functions locally


Revisit operator permissions

This PR:

Removes unneeded for the operator permissions
Moves definitions of some permissions from manually managable role_build.yaml to kubebilder annotations

https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-appstudio_build-service/43/pull-ci-redhat-appstudio-build-service-main-build-service-e2e/1550464330355445760 hit the spi issue @psturc is tracking

/retest


This is article and other not working with Hybrid configuration AD and AD Azure. Every time, when I read this fake. I have problem with update user alias on Hybrid AD configuration. Why you on information on first line? It's working only for Azure AD

This is article and other not working with Hybrid configuration AD and AD Azure. Every time, when I read this fake. I have problem with update user alias on Hybrid AD configuration. Why you on information on first line? It's working only for Azure AD

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

ID: 50963b73-8563-f99a-72f7-bf4037965cde
Version Independent ID: 5daa29ed-8092-3a79-c011-8bcbe0225b2c
Content: Add another email alias for a user
Content Source: Office365-Admin/email/add-another-email-alias-for-a-user.md
Service: o365-administration
GitHub Login: @KwekuA
Microsoft Alias: kwekua

@OlegKP THank you for your feedback. This document pertains only to O365 cloud-only customers. if you are trying to change the proxy addresses on-prem, you can follow https://support.microsoft.com/en-in/help/3190357/how-the-proxyaddresses-attribute-is-populated-in-azure-ad
Hope this helps!
Thanks
Sri

@OlegKP - Thank you for submitting feedback.
From our understanding, the issue you raised has been answered by msbemba so we will close this issue.
Thank you for your contribution to make the docs better! Much appreciated!


Update to 0.2 breaks

After updating to 0.2, none of my requests are fired anymore, loading prop is always false and data always undefined.

Thanks for the report - I'll look into it. Jump back to 0.1 in the mean time

@esphen Yeah already reverted to 0.1 and it works fine

I tried to reproduce this today, but no luck. 0.2 seems to work fine in my tests. See this repo.
Can you please provide a minimal reproduction repo?

maybe here:{this.props.data ? JSON.stringify(this.props.data, null, 2) : 'no error' }
i use stateless component,and if simplely use {this.props.data},it will crash,and data is undefine.

Yes the problem seems to come from stateless components. I'm only using stateless component with fetch-hoc.

Guys, rendering in a stateless component works fine for me.
import React from 'react';
import ReactDOM from 'react-dom';
import fetch from 'fetch-hoc';
import App from './App';

let FooComponent = props => {
  if (props.error) {
    return
An error occured! {props.error.toString()}
;
  }
  if (props.loading) {
    return
Loading...
;
  }

  return (

      {JSON.stringify(props.data, null, 2)}

  );
}

FooComponent = fetch('http://httpbin.org/get')(FooComponent);

ReactDOM.render(<FooComponent />, document.getElementById('root'));

Can you please post a minimal reproducible case? A gist or something?

I did some hacking, and may have an idea what your issue is. There was a change in the loading prop in 0.2.0 which changed its initial state to false. That change was not documented, that's my bad. I'll add it to the changelog.
Here's the loading states as present:

Object { loading: false, success: undefined, error: undefined }
Object { loading: true, success: undefined, error: undefined, response: undefined }
Object { loading: false, success: true, error: undefined, response: Response, data: {…} }

My theory is that you're throwing on step 1 because data is not yet assigned. Is this correct?
The reasoning behind changing step 1 to be loading=false is because it's has not actually started fetching yet, and if you pass a function like fetch(props => props.url || null), that should not enter a loading state if props.url is not defined.
I realize this makes the API harder to use, so I'll look into calculating initial loading state based on what is passed to fetch(). I think that is the most correct solution here.

I released 0.3.0 with the above change, try it out

Thanks ! That was it ! 0.3 fixed the issue for me.


chef_version convergence option is ignored for windows machines

Unlike the Linux install.sh convergence strategy, the Windows install.msi strategy does not take into account the chef_version in convergence_options, so Windows nodes always have the latest Chef client installed. Of course, this can be problematic when the latest version introduces bugs as is sometimes the case.

Same as #327

Closing this as a duplicate of #327 since we are tracking it there - thanks for the original report @joelwilson!


Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

My partial code was something like the belows, it works for display and addition, deletion but not works for dragging and dropping.

  handleRLDDChange = (reorderedItems) => {
    this.setState({ items: reorderedItems });
  };

  itemRenderer = (item, index) => {
    return (
      <Card className={this.props.classes.card} key={`${item.search}-${item.replace}`}>
        <CardContent className={this.props.classes.cardContent}>

{item.search}

{' -> '}

{item.replace}

            <Button variant="contained" color="primary" onClick={this.handleDelete(item)}>删除</Button>

        </CardContent>
      </Card>
    );
  };

  render() {
    const { classes } = this.props;
    return (

          <RLDD
            cssClasses="list-container"
            items={this.state.searchMode ? this.state.searchItems : this.state.items}
            itemRenderer={this.itemRenderer}
            onChange={this.handleRLDDChange}
          />

    );
  }

I got the following error.
The above error occurred in the <RLDDFloatingItemComponent> component:
    in RLDDFloatingItemComponent (created by RLDD)
    in div (created by RLDD)
    in RLDD (at Configuration.js:205)
    in div (at Configuration.js:204)
    in div (at Configuration.js:171)
    in Configuration (created by WithStyles(Configuration))
    in WithStyles(Configuration) (created by Route)
    in Route (at App.js:39)
    in div (at App.js:37)
    in div (at App.js:35)
    in Router (created by HashRouter)
    in HashRouter (at App.js:34)
    in App (created by WithStyles(App))
    in WithStyles(App) (at withRoot.js:35)
    in MuiThemeProvider (at withRoot.js:32)
    in WithRoot (at src/index.js:12)

Consider adding an error boundary to your tree to customize error handling behavior.
 Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
    at invariant (react-dom.development.js:57)
    at reconcileChildFibers (react-dom.development.js:13675)
    at reconcileChildren (react-dom.development.js:14081)
    at finishClassComponent (react-dom.development.js:14326)
    at updateClassComponent (react-dom.development.js:14270)
    at beginWork (react-dom.development.js:15106)
    at performUnitOfWork (react-dom.development.js:17903)
    at workLoop (react-dom.development.js:17944)
    at renderRoot (react-dom.development.js:18022)
    at performWorkOnRoot (react-dom.development.js:18919)
    at performWork (react-dom.development.js:18826)
    at performSyncWork (react-dom.development.js:18799)
    at requestWork (react-dom.development.js:18676)
    at scheduleWork (react-dom.development.js:18480)
    at Object.enqueueSetState (react-dom.development.js:12143)
    at RLDD.push../node_modules/react/cjs/react.development.js.Component.setState (react.development.js:386)
    at RLDD._this.handleDragBegin (RLDD.js:74)
    at Signal.js:32
    at Array.forEach (<anonymous>)
    at Signal.dispatch (Signal.js:31)
    at RLDDLogic.handleDragBegin (RLDDLogic.js:43)
    at RLDDItemComponent.handleMouseMove (RLDDItemComponent.js:106)
invariant @ react-dom.development.js:57
reconcileChildFibers @ react-dom.development.js:13675
reconcileChildren @ react-dom.development.js:14081
finishClassComponent @ react-dom.development.js:14326
updateClassComponent @ react-dom.development.js:14270
beginWork @ react-dom.development.js:15106
performUnitOfWork @ react-dom.development.js:17903
workLoop @ react-dom.development.js:17944
renderRoot @ react-dom.development.js:18022
performWorkOnRoot @ react-dom.development.js:18919
performWork @ react-dom.development.js:18826
performSyncWork @ react-dom.development.js:18799
requestWork @ react-dom.development.js:18676
scheduleWork @ react-dom.development.js:18480
enqueueSetState @ react-dom.development.js:12143
push../node_modules/react/cjs/react.development.js.Component.setState @ react.development.js:386
RLDD._this.handleDragBegin @ RLDD.js:74
(anonymous) @ Signal.js:32
Signal.dispatch @ Signal.js:31
RLDDLogic.handleDragBegin @ RLDDLogic.js:43
RLDDItemComponent.handleMouseMove @ RLDDItemComponent.js:106
[Violation] 'mousemove' handler took 83965ms

@eddiemarovich, I almost gave up about this problem, and I will try another component https://github.com/react-dnd/react-dnd.

Hi @liudonghua123! I'm so sorry, I never got a notification from github about your issue.
I've only seen it today.
I'm trying to understand where your error comes from, but I don't have access to see what your Card and CardContent components do.
If you haven't given up on this component yet, here's a few things you can try:

Try rendering something simpler in the itemRenderer function instead of your <Card> and <CardContent> components. You could start with a
, or with <Card> without <CardComponent> and start adding back things until it breaks.
Alternatively, try to create a demo in CodeSandbox, so I can see the error live.
This is the JS example I made, perhaps you can modify it and add your components there: https://codesandbox.io/s/18050jnp27

Hi Julian, I am also getting the same error and was able to re-create it in the codesandbox example by changing the data that is being rendered to an array of strings, rather than the bananas.bananas. I'm not sure why that would be an issue, do you have any insight?

@liudonghua123 @JulianG  I was able to get this working, and I think it had something to do with the the RLDD expecting an object with an ID. @liudonghua123 I'm not sure if you are still trying to mess around with this, but what I did was just created a new array in my constructor and assigned each item I wanted to render an id, and that seems to be working.

@eddiemarovich yes. that is correct.
if you look at the bananas.json file in my example, every item has an id which is a number.
So the first argument to the itemRenderer prop function, which is typically the item, needs to have an id property. I can see that information is missing from the example at npm. I'll try to add it as soon as I can.

@liudonghua123 I have managed to reproduce your "Nothing was returned from render." issue when trying to drag an item which doesn't have an id property, so @eddiemarovich solution would probably work for you.
I have now added this to the documentation at v0.8.2, but I've also released v0.9.0 which throws an error when the item is not of type object, and when it doesn't contain an id property of type number.

I hope this helps, and again, apologies for having missed your initial message a month ago.

@JulianG As far as you know, would it be possible to have multiple RLDDs where you could drag and drop different items between them?

@JulianG @eddiemarovich Thanks for you quickly replies, I will try and reply soon.

Yes, I tried to add the id attribute to the data record then it worked. Thanks again. 😃

I recommend to add some tips about this, so anyone else could skip this problem.

@liudonghua123 I have added the requirements in the README.md which appears in github and npm as an HTML.
Also I've released a new version 0.9.0 which gives a more readable error when items don't contain an id property.
Can you think of anything else we could do to help avoid this problem in the future?


Name of the Windows binary

Hi,
when I download the Windows binary release the .exe-file is named windows_amd64.zip. This is very generic. Can you maybe rename the file to contain the project name gogs or maybe even to contain the version number?
Best,
Bernhard Döbler

Hi, when you download, the URL already contains the version number, which means you know which version you're trying to download.


Update documentation on the existence of the python openroad interpreter

In issue #685 a user asked about the python support in OpenROAD. Since OpenROAD put in the effort to enable this feature we should publicize it in the documentation and explain its current limitations.

@osamahammad21 would you take care of this?  We just need a short entry in the docs about it and the limitations (ie only opendb apis are present)


Split instance locking into 4 output locks

This PR contains one primary change and four drive-bys:

We now lock packages, buildtrees, installed, and downloads instead of a single instance lock. This enables "read-only" vcpkg instances by redirecting all output folders.
I've added an --x-lock-instance workaround in case this is insufficient; users can pass this to reenable the previous behavior (even in classic mode!) while waiting for a tool update that fixes the bug.
Push the cmake version required to 3.15 to support CMAKE_MSVC_RUNTIME_LIBRARY on the configure cli
Fix propagation of disable metrics to actually propagate the bool instead of assuming true
Add explicit guards against performing file locks inside a recursive vcpkg invocation.

I've tested this locally by doing:
$ vcpkg install --debug >log1 & vcpkg install --debug >log2

which results in log2 containing the expected extra line:

[DEBUG] Waiting to take filesystem lock on /workspaces/vcpkg/downloads/.lock...

Note that since we're now using multiple locks, lock ordering is important. Future tool updates must either preserve the lock order or implement a "safe multiple locking" algorithm.

Unfortunately, this implementation has a critical flaw that the four folders must exist for the locks to be taken. The correct improvement (which avoids creating the folders for read-only commands like "help") requires splitting out parts of VcpkgPaths to be deferred to the commands that require them.
That refactoring is complex because:

Big Ball of Mud Syndrome
Lock ordering (we can't acquire the resources in a random order because we would deadlock with a concurrent vcpkg that acquires them in a different order) - I plan to solve this by simply having a hierarchy of locks and gratuitously taking all locks before the desired one:
i. Downloads (eventually to be removed)
ii. Installed
iii. Buildtrees
iv. Packages

Closing to be re-developed after teasing apart VcpkgPaths further.


qt6Packages.fcitx5-qt: init

Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Preparation for https://github.com/NixOS/nixpkgs/pull/279683, would in the future allow to drop qt5 from system closures.

Result of nixpkgs-review pr 292232 run on x86_64-linux 1

7 packages built:

fcitx5-chinese-addons
fcitx5-configtool
fcitx5-skk-qt
fcitx5-unikey
fcitx5-with-addons
kdePackages.fcitx5-qt
libsForQt5.fcitx5-qt

Tested text input in both qt5 and qt6 apps.


docs(transactions): Inconsistency in SUI token typing

Link to original documentation
In the Transactions section, there is (what I think it is) an inconsistency when using sui::coin::Coin<sui::sui::SUI> and sui::coin::Coin<SUI>. I'm being super picky here, but wouldn't be better to just adopt one or the other variation for the documentation?
Both instances appear when talking about the SUI native token, but maybe standardizing one variation would be more adequate?

Closing stale issues, please reopen if the issue still exists


More unit tests (for cssSpecial.py)

As our coverage is still pretty low, I'm trying to increase it.
I've gone through the file cssSpecial.py and wrote several unit tests for it.
Coverage increased from 35.7% up to 92.6% for that file. 🚀
As well I've added some few tests for testing tables (th, tr, td properties). Most of them are cases, that haven't been covered yet.
I've also fixed a small bug, that caused that the "background-image" property wasn't detected properly.

Coverage increased (+2.4%) to 59.681% when pulling 4982cf3e85c0d0c31c0014ca37dbc01b1a4829a6 on fbernhart:more_unittests into c9e934d3a853119e965f23740016aca0c5be98b1 on xhtml2pdf:master.