text:
Entity property configuration: The following attributes are already set in customize.yaml

Home Assistant release with the issue
0.98.2
Last working Home Assistant release (if known):
unknown
Operating environment (Hass.io/Docker/Windows/etc.):
Docker on Debian Busterb
Component/platform:
Entity configuration in "Settings -> Configuration"
Description of problem:
See https://community.home-assistant.io/t/entity-property-configuration-the-following-attributes-are-already-set-in-customize-yaml/135444
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
See the linked forum thread above, i have provided some snippets there.
Traceback (if applicable):
not applicable

Anyone? This is still a problem on 0.100 for me.

Is this still an issue?
I have read through your forum thread and would suggest that you try out the given solution:
homeassistant:
  customize: !include customize.yaml

You may be right about YAML indentation, however I would always follow the official documentation.
In this case: customize entities

I have solved it by moving the "customize" dictionary key to the beginning of the dict. It's strange since yaml dicts shouldn't be ordered, but it works for me now.

Oh okay that is great to hear 👍
Please mark this issue as solved :)

authors: simonszu springstan


text:
hass becomes unresponsive after a few hours

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.39.2
Python release (python3 --version):
3.5.3
Component/platform:
HASS Docker image
Description of problem:
after a few hours, the docker container and hass are unresponsive. The front end shows disconnected. the log no longer reports anything. The log is full of errors like this:
17-03-02 02:27:39 ERROR (Thread-3) [homeassistant.components.sensor.command_line] Timeout for command: python3 /config/sensor/getBIProfile.py
17-03-02 02:27:39 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
17-03-02 02:27:44 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
17-03-02 02:27:48 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
17-03-02 02:27:52 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
17-03-02 02:28:05 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
17-03-02 02:28:11 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
17-03-02 02:28:32 WARNING (Thread-13) [pychromecast.socket_client] Heartbeat timeout, resetting connection
17-03-02 02:28:50 WARNING (Thread-17) [pychromecast.socket_client] Error communicating with socket, resetting connection
Full log here:  https://hastebin.com/gabikeyayo.sql
Expected:
Problem-relevant configuration.yaml entries and steps to reproduce:

Traceback (if applicable):

Additional info:

Also noticed this running on Docker as well.
Think it is related to #6253 with too many events causing things to slow down to a crawl, and eventually unresponsive.

This has nothing to do with too many events. I think that something is causing high CPU usage, not sure what it could be.

@balloob When #6369 goes live, are there any specific logs/experiments you'd like if I can replicate?

I'm not using the Z-wave component... so it can't be that for me.
I am using nmap device tracker and/or asus router device tracker. I've tried using only one or the other and the issue persists. Could it be either of those? Anything you want to know from my setup or anything you want me to do?

I turned off both nmap and Asus device trackers and I haven't seen the timer out of sync error in a while.

I spoke too soon. It crashed overnight :(

Same issue. Previously running 0.35.3 which was solid. Reverting now to 0.39.2 to reproduce.

Reproduced within hours. Back to 0.38.4.

@markferry did you use pip to downgrade?

Nope, setup.py. Working from git.

In gdb: #0  0x76f51b30 in __pthread_cond_timedwait (cond=0x3c3f68, mutex=0x3c3f98, abstime=0x7ef0d4a4) at pthread_cond_timedwait.c:199
which I'll admit is not exactly surprising.

Backtrace for all threads:
bt.txt
Almost all waiting on OpenZWave.

0.37.0dev0 lasted longer but still died. Should probably also drop my DB tables before the next run.
Back to 0.36.0dev0 (64800fd).

Died again. Bisected back to 0.36.0.dev0 (c14a5fa) now. If this proves fruitless there's also bisecting the config. What joy.

I'm getting the same issue in a docker as well! It is driving me nuts!

These issues have been resolved. Don't want to create a catch all issue so closing this.

source: gharchive/issue

authors: 370gt KptnKMan balloob iambdud markferry philhawthorne

repo: home-assistant/home-assistant

license_type: permissive

license_source: github-api


text:
Flux LED - Scene with multiple platforms cannot be called while Flux controller is powered off

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.49.0
Python release (python3 --version):
3.5.2
Component/platform:
Flux LED
Description of problem:
When HA starts and the Flux LED device controller is powered off, the error:
ERROR (Thread-1) [homeassistant.components.light.flux_led] Failed to connect to bulb 192.168.0.15, TV LEDs
is shown in the info panel and the light entity is not created.
If this entity is part of a HA Scene with other platforms/entities the scene can no longer be called.
WARNING (MainThread) [homeassistant.helpers.state] reproduce_state: Unable to find entity light.tv_leds ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: two or more values in the same group of exclusion 'Color descriptors' @ data[<Color descriptors>]. Got None
In my configuration the scene in question contains a Hue bulb and a Flux LED strip.
Expected:
The Hue bulb to respond to the scene call while the Flux LED controller is powered off.
Problem-relevant configuration.yaml entries and steps to reproduce:
  - platform: hue
    host: 192.168.0.150
    allow_unreachable: true

  - platform: flux_led
    devices:
      192.168.0.15:
        name: TV LEDs

scene.yaml
- name: Warm
  entities:
    light.lamp:
      state: on
      brightness: 223
      color_temp: 443
      xy_color: [ 0.5015, 0.4153 ]
    light.tv_leds:
      state: on
      brightness: 60
      rgb_color: [ 255, 123, 9 ]

Start/restart HA with the Flux LED controller powered off.
Call the scene "Warm" either from an automation or the web interface.

Traceback (if applicable):

Additional info:
Prior to version 0.44.0 (approx) the Scene worked as expected with the Flux LED controller powered off.
The Yeelight platform creates the light entity with a state of "unavailable" if HA is started while the controller is powered off. This allows scenes containing other platforms to be successfully used.

You can no longer have color_temp and xy_color in the same setting so try removing one of them from light.lamp.

I removed color_temp which allows the scene to work. Not quite what I expected because my original config above works when the Flux LED controller is powered on and available in HA.

That does sound unexpected. Would you mind double-checking that the color_temp/ xy_color combination really does work in that scenario (with a current HA)? If so, I will try replicating your configuration.

I just double checked and I can confirm that when HA starts with the Flux LED Controller powered off, the Scene with both color_temp and xy_color does not work. When HA starts with the Flux LED Controller powered on the the Scene does work with both keys. By removing either of the keys the Scene works with the Flux LED Controller powered off.

I have tried your scene now, it always fails for me (as expected). However, I only have LIFX to test with.
As I cannot reproduce the inconsistent behavior, I will not try fixing it :)

authors: amelchio rossffs


text:
Added website authentication

Description:
Added website authentication so you can also scrape data which is behind a login.
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):
- platform: scrape
    resource: http://example.com
    name: Website-auth-scrape
    username: user
    password: password
    authentication: basic
    select: 'h1'

Checklist:
If user exposed functionality or configuration variables are added/changed:

[x ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Hi @ufulu,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Isn't this a duplicate of #10079 ?

Duplicate of #10079.
To avoid exactly this, did I link the Pull Request in the forum thread.

source: gharchive/pull-request

authors: fabaff fanaticDavid homeassistant ufulu


text:
Cast return values and add unit tests.

Description:
Cast return values according to their type returned from yahoo.
Add unit test for yahoo weather component.
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:
If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] Tests have been added to verify that the new code works.

Could you write the tests in a way that mocks out the library instead of mocking out the network response and using the library?

@andrey-git I can give it a try. What would be the benefit of that?

Everyone who runs test won't need to install the library. Also the tests will be more hermetic - if library implementation would change without changing the providing API - the tests won't break.

I think you no longer need the json file and can just return whatever values needed in the mock.

@pvizeli maybe the lib should return numeric values in the first place?

@andrey-git what is wrong with have a whole set of data is a separate file instead of small chunks of data inline? Is there a special reason? The json could eventually be reused for testing the yahoo weather sensor component.

I don't feel strongly about this. Lets's wait for @pvizeli as lib author

@fabaff ?

@pvizeli Are you talking about the lib returning numeric values rather than strings?

I added a temporary fix to work around the yahoo weather API issue (#10640).

authors: andrey-git cgtobi pvizeli


text:
Restore input_* states on startup

Description:
This PR enables HASS to restore the last state of an input_boolean, an input_slider and an input_select on a restart.
This is pretty useful if you have e.g. input booleans or sliders for dynamic settings on your HASS.
Example:
Let's say you have an alarm clock setup with hass. The target time ist set by an input_slider and will now survive a reboot.
The feature is optional and can be set by restore: startup for each entity of the named domains above.
I have chosen 'restore' as the attribute, because you could re-use it for further functionalities/implementations later on (e.g. "reset value after 24hours")
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#1911
Example entry for configuration.yaml (if applicable):
input_boolean:
  is_home:
    name: 'Is Home'
    initial: on
  nightmode:
    name: 'Alarm Clock enabled'
    initial: off
    restore: startup

input_select:
  radio_channel:
    name: 'Radio Channel'
    options:
      - 'a'
      - 'b'
    initial: 'a'
    icon: 'mdi:import'
    restore: startup

input_slider:
  alarm_hour:
    name: 'Alarm Hour'
    icon: 'mdi:timer'
    initial: 8
    min: 0
    max: 23
    step: 1
    restore: startup

Checklist:
If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Hi @FREImedia,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Duplicate of https://github.com/home-assistant/home-assistant/pull/4614

Hey, sorry the CLA link was wrong, it's now been fixed. Please sign the CLA here.

I am closing this in favor of #4614

authors: Danielhiversen FREImedia homeassistant robbiet480


text:
Add 'entity_picture' property to DarkSkySensor component

Description:
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:
If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New dependencies are only imported inside functions that use them (example).
[x] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Hi @aronsky,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

I attempted to run tox tests, and had one failure (in the test_darksky.py module, suspicious!) - but this failure seems to happen prior to my changes, as well. Looks like something about a mock load_fixture, which has nothing to do with the changes in this pull request.

I don't think that is a good idea to add base64 icons to code. But I can also not say what the alternative sultion is. I'm not a frontend developer. CC @balloob

@pvizeli I agree that it's not perfect, far from it. I just wanted it to be both self-contained, and not dependent on 3-rd party repositories, which might change and/or disappear at any moment, breaking the module.
I looked around on the Dark Sky website, hoping to find some sort of permalinks to the icons, but their official icons are dynamic and use Javascript - I don't know how to cleanly integrate those into Home Assistant.
If there's a more elegant solution, I'll be happy to do it.

One idea of the weather component was to be able to display the conditions in a visual way. Unfortunately the frontend part is not done yet.

@aronsky Could you use the Skycons library?  It's self contained JS, public domain and created for DarkSky.  Plus the icons are animated.
https://github.com/darkskyapp/skycons

@rpitera - yep, I saw those icons. They definitely look cool - but integrating them requires changes in the front-end, and without that - I have no idea how a specific module can influence the front-end extensively (and this is required, since the front-end doesn't currently support Javascript-based icons)

I'm btw a big fan of the skycons. We should consider adding those to the frontend.

OK. So, updating the frontend proved to be more complicated than I thought. I have, in fact, made a small patch to the frontend, that would show the state's icon property (instead of the currently used entity_picture). But this behavior is only desirable for weather forecast sensors. Unfortunately, by the time the state arrives to the frontend, there's nothing to differentiate it from other sensors, even other monitored conditions from the weather sensor (such as the temperature, which should display the value, not the icon). As a temporary hack, I enabled this only for sensors that have an icon containing the word weather, but obviously it's not a proper solution.
I ended up doing what @balloob suggested for now, and will try to come up with a more robust solution to the frontend in the future.
Speaking of the frontend, what are the guidelines to making changes to that component, since it compiles into files that are part of this repo? Do I make a pull request in the frontend's repository, and once it is accepted, compile and make a pull request here?

You just make PRs against the frontend repo. I add new builds from frontend to this repo.
Please add your images in a subfolder under images.
Also a heads up that this is the last change that we will allow for the darksky sensor. Future efforts will have to be focussed on the weather component. This sensor will be removed in a future release.

I had no idea there's a weather component in the works - I didn't see anything in the documentation. I'll look into it (it does make sense to have those unified somehow, as opposed to different sensors with different images and weather states).
I'll move the images to a subfolder.
And finally, regarding the frontend repo. I understand that this might be a headache to keep track of, but any chance you can tag frontend commits with versions matching the home-assistant tags that use those commits? It's a lot less clear on which version to work on in that repo.

Every Home Assistant commit already contains a version of Home Assistant Polymer via a submodule: https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/frontend/www_static
That being said, you still always have to work on the latest version no matter what commit it is based off.

Can you remove the png versions since they are not being used ?

You also broke the tests.

Hello @aronsky,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:

01f346ccee1f62f354b0ee239ee9c42c38a43437 - No email found attached to the commit.
b2cbde31945d9bf0e9ccc87c3e9259da781cde1a - No email found attached to the commit.

Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:

If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

If you only made a single commit you should be able to rungit commit --amend --author="Author Name <email@address.com>"

(substituting Author Name and email@address.com for your actual information) to set the authorship information.
If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:

You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.

Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! :heart:

Hello @aronsky,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:

01f346ccee1f62f354b0ee239ee9c42c38a43437 - No email found attached to the commit.
b2cbde31945d9bf0e9ccc87c3e9259da781cde1a - No email found attached to the commit.

Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:

If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

If you only made a single commit you should be able to rungit commit --amend --author="Author Name <email@address.com>"

(substituting Author Name and email@address.com for your actual information) to set the authorship information.
If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:

You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.

Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! :heart:

I'm not sure what broke the build... Any chance it has been broken in the dev branch that I merged into my code? It seems like it, because that's the first commit that seems to break the build. I merged the current dev branch, and hopefully it'll work - I'm not on my work computer, and can't run tox from here. If it still fails, it'll have to wait until tomorrow.
P.S. Sorry for the mess with the commits without e-mail addresses, I haven't used my home computer for development before, and didn't notice that git hasn't had an e-mail set up.

Seeing that this is using a subfolder of SVG icons, would this support putting in your own SVG icons as long as the naming matched the DarkSky naming conventions?   Also, if you replaced them, would they get overwritten on subsequent HA updates?   I'm assuming no, since this will be the final update (barring hot-fixes of course) allowed for this platform.

@rpitera yes, if this pull request is accepted, you'll be able to switch to your own SVGs, as long as you replace the files (i.e., the names match). Your assumption about the subsequent updates sounds correct to me, but your guess is as good as mine in that regard.

Thanks!

It seems that you have added some commits to your branch unrelated to this change. Please clean it up.

Hi @balloob, I'm not sure which commits you're referring to. There were a couple of commits I've pushed without properly signing them with my email, and I had to do some git history rewriting to fix that. Other than that, there are only commits relevant to the change, and the merges from dev I did from time to time to stay up to date with the code. If that's not something I should've done, I'll avoid it in the future, but at this point I don't know how to unravel those merges - and not sure how critical it is, since those are all commits accepted into the dev branch, anyway.
Do you prefer that I redo my changes in a separate, clean pull request, and abandon this one?

Have a look at commits or files changed to see what I mean:

Yup, that's the mess with the authoring I referred to previously, sorry about that. I'm not sure how to fix that properly - if I start afresh, rebase my dev branch on the original commit where it diverged from the upstream repo, cherry-pick the commits with my changes, and then push - will it clean everything up and avoid the need for a new pull request?
Again, sorry about the mess.

Yes, that will work. You will have to force-push to overwrite the bad commits in your current branch.
To be safe, you can also create a new branch that branches off latest dev and cherry-pick your changes.

That sounds like the best idea. Will there be an option to update this pull request to point to the new branch, or do I check its correctness and then force-push it onto the current branch in question?

Can't change the source branch. It will be easiest to just close this PR and open a new one.

I'll do that. Once again, sorry about the mess with the branches and stuff. The new pull request, #6141, is just one clean commit :)

authors: aronsky balloob fabaff homeassistant pvizeli rpitera


text:
Updated pyhomematic

Description:
Updating pyhomematic dependency to fix wired devices.
Related issue (if applicable): fixes #7708

@danielperna84 you are allowed to merge dependency upgrade PRs yourself 👍


text:
Add some more light control sentences

Fix #2319

Summary by CodeRabbit

New Features

Introduced new commands for controlling lights, allowing users to specify actions like turning lights off or on in designated areas, as well as flexible phrasing without area specifications.

Tests

Added test cases to ensure the system recognizes new phrases for turning lights off and on, enhancing the robustness of the natural language processing for lighting commands.

Looks good

authors: TheFes tetele

repo: home-assistant/intents


text:
Compile a fast LP solver to Wasm

The best LP solvers such as CBC or Highs are written in C/C++. So if we want to use them in our project (#508), we need to compile them in Wasm using emscripten. Nick made some progress on this.

This is great. Has it improved the performance of the layout algorithm?

To be determined, there are some issues to address with layout tests that currently depend on minilp to address before we can move to good_lp+highs.

Thanks Chiara. So is this new solver currently being used in the production
layout code?
On Fri, 29 Jul 2022, 14:38 Chiara Sarti, @.***> wrote:

To be determined, there are some issues to address with layout tests that
currently depend on minilp to address before we can move to good_lp+highs.
—
Reply to this email directly, view it on GitHub
https://github.com/homotopy-io/homotopy-rs/issues/509#issuecomment-1199297520,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACQ4OHUO6U3OZYEJLXGFCMTVWPNFTANCNFSM5ZDK2OMQ
.
You are receiving this because you commented.Message ID:
@.***>

Not yet, but the idea is to either use this solver only for production or to just bin the tests altogether.
I think @calintat is the best position to figure out what to do on this front, but once that is sorted moving to highs should be relatively straightforward.

authors: calintat jamievicary regular-citizen

repo: homotopy-io/homotopy-rs


text:
Flutter run error: Could not complete submission of dSYM

I meet this issue when I am trying running the code to deploy in my iPhone.
Here is the detail info:
Project /Users/dadachen/workspace/FEhViewer built and packaged successfully.
Uploading dsym file
error: Could not complete submission of dSYM at
/Users/dadachen/workspace/FEhViewer/build/ios/Debug-iphoneos/fehviewer.app.d
SYM: Error Domain=com.crashlytics.mac.error-domain.process-dsym Code=2 "File
no longer exists at (null)" UserInfo={NSLocalizedFailureReason=File no
longer exists at (null)}
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
Could not build the precompiled application for the device.

I do not have any ideas of that. Could you give me a help?

I have replaced the google firebase plist with mine. So can I do something to solve this?

You can try to configure Runner.xcodeproj in xcode. left click on TARGETS, Runner, right select Build Phases ,
expand Run Script,
comment out this line
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp ${GOOGLESERVICE_INFO_LOCATION} -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_ FILE_NAME}"
There may be something wrong with this script, I'll try to fix it

It works for me. Thank you so much! ☺

repo: honjow/FEhViewer


text:
Add documentation on how to use HonoX outside of Cloudflare

What is the feature you are proposing?
Projects created by selecting x-basic with npm create hono@latest support Cloudflare Workers & Pages, but it would be beneficial to have documentation on how to adapt the code to run on other platforms.

I don't think this is currently possible as the Vite plugin built into HonoX is only adapted for Cloudflare Pages.
There was some discussion on this in #42 where someone built their own plugin. If not, I'm not sure if it would be helpful, but Cloudflare have open-sourced the runtime for their Workers (https://github.com/cloudflare/workerd) so if you're looking to self-host, that might be helpful.

Hi.
You can run the HonoX app on other runtimes like Node.js and Bun instead of Cloudflare/workerd. To do it, you must build your app with the proper Vite settings. It would be good if the setting were written in the README.

authors: 3w36zj6 chrisyalamov yusukebe

repo: honojs/honox

license: MIT


text:
多个主机名相同时设置解析

在DNS服务器中为同一个主机记录配置多个IP地址，在应答DNS查询时，所有IP地址按照预先设置的权重进行返回不同的解析结果，将解析流量分配到不同的服务器上，从而达到负载均衡的目的。

那么如何指定修改某个记录的IP呢

not a DDNS designed usage?

authors: Dreamupers honwen

repo: honwen/aliyun-ddns-cli


text:
Bug: lualine goes blank after calling NvimTreeToggle

Self Checks

[X] I'm using the latest lualine and neovim nightly.
[X] I didn't find the issue in exsisting issues or prs.

How to reproduce the problem

install both nvim-tree and lualine plugins.
open a file in nvim.
call :NvimTreeToggle.
lualine gets into the tree buffer.
call :NvimTreeToggle again.
lualine shows blank in current buffer.

Actual behaviour
lualine goes blank.
Expected behaviour
lualine should appears again after toggle nvimtree.
Aditional information
Minimal config to reproduce the issue

Config

This happens if any buffer where lualine is deactivated is focused and gets closed while focused.

@dragondove Which colorscheme are you using?

@dragondove Which colorscheme are you using?

I'm using zephyr . Does it relate to this issue? The config of lualine I used is from evil_lualine.

what's most likely happening is the active status isn't being enabled due to none of the event we look for being triggured
We probably need aditional event to catch this case here:
https://github.com/hoob3rt/lualine.nvim/blob/9726824f1dcc8907632bc7c32f9882f26340f815/lua/lualine/init.lua#L173
@dragondove evil_lualine doesn't configure inactive_status that's why you're probably seeing lualine disapear . Does leaving the window and entering it again bring back lualine ?

what's most likely happening is the active status isn't being enabled due to none of the event we look for being triggured
We probably need aditional event to catch this case here:
https://github.com/hoob3rt/lualine.nvim/blob/9726824f1dcc8907632bc7c32f9882f26340f815/lua/lualine/init.lua#L173
@dragondove evil_lualine doesn't configure inactive_status that's why you're probably seeing lualine disapear . Does leaving the window and entering it again bring back lualine ?

yes, If I firstly switch to the editing buffer(By C-w w), lualine will be there.

It seems this bug disapears, but I don't know why, maybe it is caused by a specific version of neovim. Anyway, it works fine now.

authors: dragondove ful1e5 oblitum shadmansaleh


text:
🛑 FWAw is down

In 5b3d6b9, FWAw ($FWA_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FWAw is back up in d51ca66 after 24 minutes.

repo: hoopybe/uptime


text:
뷰어 페이지에 파일 상세정보 표시하는 옵션 추가

왼쪽 상단이나 뭐 그런 곳?

[ ] 이미지가 해당 위치까지 침범할 경우 자동숨김 (마우스 커서를 움직이면 표시)
[ ] 투명도 조절

취소 ㅜ.ㅜ

repo: hoppang/purpleeye


text:
[HOPS-808] Fix performance degradation due to safemode and enable nam…

…enode resource monitoring
Make sure there is no duplicate PR for this issue

Please check if the PR fulfills these requirements

[ ] Tests for the changes have been added and passed (for bug fixes / features)
[x] HOPS JIRA issue has been opened for this PR
[x] All commits have been squashed down to a single commit
[x] The commit message has the following format: [HOPS-XXX] message

Post a link to the associated JIRA issue
https://hopshadoop.atlassian.net/browse/HOPS-808

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:
https://github.com/hopshadoop/hops-metadata-dal/pull/137
https://github.com/hopshadoop/hops-metadata-dal-impl-ndb/pull/170

Can one of the admins verify this patch?

@berthoug i was benchmarking hopsFS with 4 namenodes and i found that my solution for avoiding reading the safemode variable from the database at every request only works for one namenode. So i fixed this one, and pushed it.

There is some errors in this pull request (ex: "<<<<HEAD" ;) ) and I think I identified some potential bugs. I fixed them in the following pull request  #580.

authors: HopsworksJenkins berthoug maismail

repo: hopshadoop/hops

license_source: bigquery


text:
Removed isEqualNode comparison

Proposal to fix https://github.com/hopsoft/cable_ready/issues/70

I think we should retain the isEqualNode check for performance reasons; however, I'd be ok to skip this check for SELECT and OPTION elements. @adank92 Do you think this compromise would address the problems you faced in #70?

That is a clever suggestion, if the issue is restricted to just select/option.

@hopsoft @leastbad that would work for the first issue, but for the second one we would also need to skip INPUT

Talk to me like I'm distracted and less confident... what is it about form elements that they need special care? Is it because the user can change their state?
Should TEXTAREA be added to the list?
Are there others we're not thinking about because "nobody" ever uses them?
What are the gotchas? eg. what about the input type="numeric" that is forced to display the value abc, putting it in violation of the half-baked pattern validation built into some elements? is "equal but not valid" something that matters in this context? I'm just trying to brainstorm and still feeling haunted by the abstract thinking required to get to an outcome on https://github.com/patrick-steele-idem/morphdom/pull/206

Talk to me like I'm distracted and less confident... what is it about form elements that they need special care? Is it because the user can change their state?

SELECT elements need to have one option with the selected attribute set in order for morphdom to work as expected. The library will ensure this by running code to sync the attribute (syncBooleanAttrProp(fromEl, toEl, "selected");). Using isEqualNode prevents this from happening. This is explained more in detail in the original issue #70
INPUT elements do not update their value attribute in the HTML definition when users type in it. If the page is loaded with an empty input, the user types in something, and then the backend returns an empty input again, ìsEqualNode will always return true because both HTML elements are still the same.

Should TEXTAREA be added to the list?

Yes, TEXTAREA has the same issue as INPUT. If we want to retain isEqualNode, it should be skipped too.

Are there others we're not thinking about because "nobody" ever uses them?

There might be others but I can only confirm these 3 elements. I don't think the other form elements in this list would have issues https://www.w3schools.com/html/html_form_elements.asp. But then again, there's a reason why morphdom doesn't use isEqualNode.

What are the gotchas? eg. what about the input type="numeric" that is forced to display the value abc, putting it in violation of the half-baked pattern validation built into some elements? is "equal but not valid" something that matters in this context? I'm just trying to brainstorm and still feeling haunted by the abstract thinking required to get to an outcome on patrick-steele-idem/morphdom#206

Numeric inputs suffer from the same issue, their values are not updated if changed in the backend. I've tested it without isEqualNode and it works fine. If the backend clears the value, the UI clears it. If the backend changes the number, the UI changes it. And if the backend changes the value to a string, the UI just clears the value out.

Interestingly, in my testing with a draft PR that doesn't use isEqualNode if the tagName is an input/select/textarea...
I am finding that it's not select that is the problem, but option. So far as I can tell, @adank92's first MCVE works fine if I filter for option but still breaks if I filter for select.
Does that make sense to you, Adan?
Works:
  if (fromEl.tagName != 'OPTION' && fromEl.isEqualNode(toEl)) return false

Doesn't work:
  if (fromEl.tagName != 'SELECT' && fromEl.isEqualNode(toEl)) return false

I was/am worried that this bug will impact DATALIST elements as well, but if indeed it's the OPTION that is relevant, this could kill two birds with one stone.

Yes, you are right. select itself is not a problem, it's option. Since morphdom can't find an option with a selected attribute, it ends up resetting the select.
Thanks for taking care of it in a new PR.

authors: adank92 hopsoft leastbad

license: mit


text:
CB-15245:Fix NPE in create-aws-cluster when encryption type set to null

Master PR: https://github.com/hortonworks/cloudbreak/pull/11840/files
2.49 PR: https://github.com/hortonworks/cloudbreak/pull/11841

I think this PR should be closed, and so should #11841. The right solution is to

Repurpose #11840 for CB-2.49.0 (rebase the branch, force push, then change the target branch with the Edit button).
Once #11840 gets merged, open a merge PR for CB-2.49.0 -> CB-2.50.0.
Once the latter PR is merged, open another merge PR for CB-2.50.0 -> master (2.51).

Please follow the merge process mentioned (here)[https://github.com/hortonworks/cloudbreak/pull/11809#pullrequestreview-814882747] and here.

I think this PR should be closed, and so should #11841. The right solution is to

Repurpose CB-15245:Fix NPE in create-aws-cluster when encryption type set to null #11840 for CB-2.49.0 (rebase the branch, force push, then change the target branch with the Edit button).
Once CB-15245:Fix NPE in create-aws-cluster when encryption type set to null #11840 gets merged, open a merge PR for CB-2.49.0 -> CB-2.50.0, using a feature branch based off CB-2.50.0.
Once the latter PR is merged, open another merge PR for CB-2.50.0 -> master (2.51), using a feature branch based off master.

Please follow the merge process mentioned here and here.

Changed the target branch for master PR to CB-2.50.0, and we are skipping the merge to 2.49 as discussed in https://jira.cloudera.com/browse/CB-15245?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel. Once the 2.50 PR is merged , will port that change to master.

authors: lajosrodek satyabollineni

repo: hortonworks/cloudbreak


text:
CB-16388 RDSConfig calculation take long time, refactor the RdsConfig select by clusterId

The rds config fetch is too expensive because the hibernate fetch all of the attached clusters as references.
This is a backport from 2.55.0

@topolyai5 can you check why CI jobs seem stucked?

@lajosrodek @topolyai5 what's the status of this PR? is this still targeted to 2.54? if yes, please either resolve comments or modify the change accordingly


text:
DISTX-421 DISTX-427 Recommendation for host groups' scalability

Added recommendations for auto-scalability and manual scalability.
Implemented both CM service based recommendations and fallback recommendations.

./gradlew build

ping @keyki

Thanks @bergerdenes for taking a look. I have addressed those comments.

@bergerdenes could you please merge this?

Merged


text:
Permission with fragment @NeedsPermission method never called

Hello,
I have a very simple application using the PermissionsDispatcher. The main activity contains a fragment annotated with @RuntimePermissions.
When I run the application on the emulator, the dialog are displayed but my method is never called.
The project has the following configurations:

minSdkVersion: 16
targetSdkVersion: 23

The generated code look like that:
final class MessageListPermissionsDispatcher {
  private static final int REQUEST_ONSTARTLOADERLIST = 0;

  private static final String[] PERMISSION_ONSTARTLOADERLIST = new String[] {"android.permission.READ_SMS","android.permission.READ_CONTACTS","android.permission.RECEIVE_SMS","android.permission.BROADCAST_SMS"};

  private static GrantableRequest PENDING_ONSTARTLOADERLIST;

  private MessageListPermissionsDispatcher() {
  }

  static void onStartLoaderListWithCheck(MessageList target, View view, Bundle savedInstanceState) {
    if (PermissionUtils.hasSelfPermissions(target.getActivity(), PERMISSION_ONSTARTLOADERLIST)) {
      target.onStartLoaderList(view, savedInstanceState);
    } else {
      PENDING_ONSTARTLOADERLIST = new OnStartLoaderListPermissionRequest(target, view, savedInstanceState);
      if (PermissionUtils.shouldShowRequestPermissionRationale(target.getActivity(), PERMISSION_ONSTARTLOADERLIST)) {
        target.showRationaleList(PENDING_ONSTARTLOADERLIST);
      } else {
        target.requestPermissions(PERMISSION_ONSTARTLOADERLIST, REQUEST_ONSTARTLOADERLIST);
      }
    }
  }

  static void onRequestPermissionsResult(MessageList target, int requestCode, int[] grantResults) {
    switch (requestCode) {
      case REQUEST_ONSTARTLOADERLIST:
      if (PermissionUtils.getTargetSdkVersion(target.getActivity()) < 23 && !PermissionUtils.hasSelfPermissions(target.getActivity(), PERMISSION_ONSTARTLOADERLIST)) {
        target.showDeniedForList();
        return;
      }
      if (PermissionUtils.verifyPermissions(grantResults)) {
        if (PENDING_ONSTARTLOADERLIST != null) {
          PENDING_ONSTARTLOADERLIST.grant();
        }
      } else {
        if (!PermissionUtils.shouldShowRequestPermissionRationale(target.getActivity(), PERMISSION_ONSTARTLOADERLIST)) {
          target.showNeverAskForList();
        } else {
          target.showDeniedForList();
        }
      }
      PENDING_ONSTARTLOADERLIST = null;
      break;
      default:
      break;
    }
  }

  private static final class OnStartLoaderListPermissionRequest implements GrantableRequest {
    private final WeakReference<MessageList> weakTarget;

    private final View view;

    private final Bundle savedInstanceState;

    private OnStartLoaderListPermissionRequest(MessageList target, View view, Bundle savedInstanceState) {
      this.weakTarget = new WeakReference<>(target);
      this.view = view;
      this.savedInstanceState = savedInstanceState;
    }

    @Override
    public void proceed() {
      MessageList target = weakTarget.get();
      if (target == null) return;
      target.requestPermissions(PERMISSION_ONSTARTLOADERLIST, REQUEST_ONSTARTLOADERLIST);
    }

    @Override
    public void cancel() {
      MessageList target = weakTarget.get();
      if (target == null) return;
      target.showDeniedForList();
    }

    @Override
    public void grant() {
      MessageList target = weakTarget.get();
      if (target == null) return;
      target.onStartLoaderList(view, savedInstanceState);
    }
  }
}

Could you give us a sample prj?

The sample is compiled with android studio.
MyApplication3.zip

You miss implmenting onRequestPermissionsResult
    @Override
    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        MessageListPermissionsDispatcher.onRequestPermissionsResult(this, requestCode, grantResults);
    }

https://github.com/hotchemi/PermissionsDispatcher#2-delegate-to-generated-class

BTW, you don't need to do following
        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            MessageListPermissionsDispatcher.onStartLoaderListWithCheck(this, view, savedInstanceState);
        } else {
            onStartLoaderList(view, savedInstanceState);
        }

just call withCheck method.
    @Nullable
    @Override
    public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_layout, container, false);

        MessageListPermissionsDispatcher.onStartLoaderListWithCheck(this, view, savedInstanceState);

        return view;
    }

https://github.com/hotchemi/PermissionsDispatcher/issues/157#issuecomment-224774837

authors: Bathilde hotchemi shiraji

repo: hotchemi/PermissionsDispatcher


text:
Pick and Save Not Enabled & Order Items Invisible

Current behavior

Currently, there are two critical issues affecting our system:

Pick and Save Buttons Not Enabled: The Pick and Save buttons are not enabled in  the app.

Order Items Invisible in Fulfilment App: Additionally, the order items are not visible in the fulfilment application. As a result, we are unable to fulfill orders promptly.

We tested this issue for order ID : SVC13094 in adoc-sv-oms
Expected behavior

The Pick and Save buttons should be enabled, allowing our team to efficiently manage orders.
Order items should be visible within the fulfilment application to facilitate accurate order processing.

This issues is due the dependency on OMS. The recent changes related to internationalInvoiceUrl (Custom document generation) were part of OMS 5.5.1 release. So in order to get it fix on adoc-sv-oms, need to be upgraded to 5.5.1.

authors: khushalidube-hwsys ravilodhi

repo: hotwax/fulfillment-pwa


text:
Make Autoloading more robust

Duplicate of #3
Modifies the stimulus/loaders/autoloader module to account for module
importing in 4 different scenarios:

Immediately when parsed
Whenever elements that declare [data-controller] are added,
deleted, or modified (via a MutationObserver)
Whenever the DOMContentLoaded event fires (for applications that
don't depend on turbo
Whenever the turbo:load event fires (for applications that do
depend on turbo

In addition to autoloading in more scenarios, this commit also changes
the autoloader to read controller tokens in a spacing-agnostic manner,
and to transform dasherized controller names (like
message-rendering) to underscored file names (like
message_rendering_controller.js).
The changes made to test/dummy were done so manually, and are being
checked into version control. In an ideal set up, the generator would be
run for every System Test, and then reverted.
Testing
Add System Test level coverage to ensure that the configurations,
helpers, and autoloading work together in concert to dynamically load
Stimulus Controllers.
To do so, add a Gemfile-level dependency on capybara, webdrivers,
and selenium-webdrivers.
Co-authored-by: Justin Malčić j.malcic@me.com

Thanks for the review @MarkoZabcic! I've added you as a co-author to the commit.

Thanks for the review @MarkoZabcic! I've added you as a co-author to the commit.

Plan is still to extract the bulk of this into stimulus, but at least we're not broken in the meanwhile!

Plan is still to extract the bulk of this into stimulus, but at least we're not broken in the meanwhile!

authors: dhh seanpdoyle

repo: hotwired/stimulus-rails


text:
Upgrade the croc version

croc is not compatible with older versions after upgrading to version 10.0
v9.6.16 was a breaking change so I have re-released it as v10.0.0 to signal that. clients must be >=v9.6.16 or >=v10 to be compatible.

I updated it. Usually takes a week to show up in fdroid.

Can a standalone apk file be provided?

I added an APK to the release.

authors: TJNOV howeyc

repo: howeyc/crocgui

license: ISC


text:
建议取消页面转码的注释，并添加ignore，忽略非法字符

gb2312 编码的网页会存在问题
#request.py

import chardet

#line 121
#res_data = await resp.text()
content = await resp.read()
charset = chardet.detect(content)
res_data = content.decode(charset['encoding'], 'ignore')

@sugarguo
你好，为什么取消是因为这是一个轻量的框架，不想过多依赖第三方库，对于编码问题，你可以:

利用read()方法获取字节进行解码
或者我另外开一个关于编码的ruia插件 ruia-cchardet
我这边提供一个编码参数，你那边使用的时候，比如gb2312，直接传encoding = gb2312，这边帮你解码

你觉得哪种方案比较好


text:
关于onebot生态应用案例的补充

这是我写的一个基于Nonebot的QQ群机器人，它叫FG，最具特色的功能是使用机器学习算法提取聊天关键词。目前有两个分支，一个是主分支，只有提取关键词功能，另外一个分支是为某科幻群定制的版本，这个版本功能更加丰富，可以欢迎新人，微软小冰（支持文字/图片）智能聊天引擎的接入等～目前正考虑将微软小冰的特性接入主分支。
目前在Github获得17个star，望能补充进应用案例模块～
项目主页：https://github.com/mgsky1/FG
主分支：https://github.com/mgsky1/FG/tree/mirai
某科幻群的定制分支：https://github.com/mgsky1/FG/tree/hhx_mirai
效果图：

直接按原格式提个 pull request 吧

直接按原格式提个 pull request 吧

已提交PR

repo: howmanybots/onebot


text:
add count of pending users

Issue #335
Description

Add a scope for pending users in model
Add the counter in view

Testing steps
Explain how to test your PR manually

Step 1
Step 2
Step 3

Features PR URL
PR #ID
Checklist
Make sure that all steps a checked before the merge

[ ] RSpec tests are passing on CI
[ ] Cucumber features are passing localy
[ ] bin/cop -a does not return any warnings
[ ] Tested manually

Screenshots
Provide screenshots of implemented functionality

Что здесь можно тестровать? Вьюху? Или скоуп?

@Mehonoshin Можно проверять. Да, своего скоупа не нужно, в модели уже был нужный метод.

билд упал, надо фичи поправить

repo: howtohireme/give-me-poc


text:
[BUG]: pretraining llama-2-70b get unknowen error

🐛 Describe the bug
我按照教程做llama-2-70的预训练，修改了gemini.sh，运行出现了下面的错误
  self.layers = nn.ModuleList([LlamaDecoderLayer(config) for _ in range(config.num_hidden_layers)])
  File "/usr/local/anaconda/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 380, in __init__
    self.self_attn = LlamaAttention(config=config)
  File "/usr/local/anaconda/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 255, in __init__
    self.q_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=False)
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 101, in __init__
    self.reset_parameters()
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 107, in reset_parameters
    init.kaiming_uniform_(self.weight, a=math.sqrt(5))
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/nn/init.py", line 396, in kaiming_uniform_
    return torch.overrides.handle_torch_function(
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/overrides.py", line 1551, in handle_torch_function
    result = torch_func_method(public_api, types, args, kwargs)
  File "/usr/local/anaconda/lib/python3.10/site-packages/colossalai/lazy/lazy_init.py", line 324, in __torch_function__
    o = func(*tree_map(unwrap, args), **tree_map(unwrap, kwargs))
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/nn/init.py", line 396, in kaiming_uniform_
    return torch.overrides.handle_torch_function(
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/overrides.py", line 1551, in handle_torch_function
    result = torch_func_method(public_api, types, args, kwargs)
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/_tensor.py", line 1295, in __torch_function__
    ret = func(*args, **kwargs)
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/nn/init.py", line 412, in kaiming_uniform_
    return tensor.uniform_(-bound, bound)
  File "/usr/local/anaconda/lib/python3.10/site-packages/colossalai/_analyzer/_subclasses/meta_tensor.py", line 113, in __torch_dispatch__
    ret = func(*args, **kwargs)
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/_ops.py", line 287, in __call__
    return self._op(*args, **kwargs or {})
  File "/usr/local/anaconda/lib/python3.10/site-packages/torch/_decomp/decompositions.py", line 1958, in uniform_
    return self.copy_((high - low) * torch.rand_like(self) + low)
  File "/usr/local/anaconda/lib/python3.10/site-packages/colossalai/lazy/lazy_init.py", line 476, in wrapper
    return self.tensor_cls(orig_target, *args[1:], device=orig_t.device, dtype=orig_t.dtype, **kwargs)
  File "/usr/local/anaconda/lib/python3.10/site-packages/colossalai/lazy/lazy_init.py", line 163, in __new__
    elem = func(*args, **{**kwargs, 'device': 'meta'})

Environment
python3.10
torch2.0
cuda11.2

运行脚本
colossalai run --nproc_per_node 8 pretrain.py -c 70b -g -x fp16 -b 2 -d /path/to/RedPajama-Data-1T-Sample

您好，请问有完整的报错信息吗，traceback的报错好像缺了最后的部分？

我搜了issue，是因为不支持torch2.0
所以我降级到了pytorch 1.13.1+cu117，但是仍然跑不起来，这次是因为OOM
我是单机8卡跑的，A100 40G
运行脚本
colossalai run --nproc_per_node 8 pretrain.py -a -c 70b -g -x fp16 -p gemini_auto -b 1 -d RedPajama-Data-1T-Sample

adjust the batch size or model configuration to fit within the memory constraints

TypeError  File "/usr/local/lib/python3.10/dist-packages/colossalai/lazy/lazy_init.py", line 163, in new
: rand() received an invalid combination of arguments - got (dtype=torch.dtype, device=str, ), but expected one of:

(tuple of ints size, *, torch.Generator generator, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

(tuple of ints size, *, torch.Generator generator, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

(tuple of ints size, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

(tuple of ints size, *, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
elem = func(*args, **{**kwargs, 'device': 'meta'})
TypeError: rand() received an invalid combination of arguments - got (dtype=torch.dtype, device=str, ), but expected one of:

(tuple of ints size, *, torch.Generator generator, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

(tuple of ints size, *, torch.Generator generator, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

(tuple of ints size, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

(tuple of ints size, *, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

sure, batch size now is set to 1, can't be small

repo: hpcaitech/ColossalAI


text:
[pipeline] add pipeline support for T5Stack/T5EncoderModel

📌 Checklist before creating the PR

[x] I have created an issue for this PR for traceability
[x] The title follows the standard format: [doc/gemini/tensor/...]: A concise description
[x] I have added relevant tags if possible for us to better distinguish different PRs

🚨 Issue number

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge
e.g. fixed #1234, closed #1234, resolved #1234

#4247
📝 What does this PR do?

Summarize your work here.
if you have any plots/diagrams/screenshots/tables, please attach them here.

Design special algorithm for distributing layers to pipeline stages, since the structure of T5(Encoder/Decoder) is more complex than other transformer models.
Modify the logic of forward for T5Stack/T5EncoderModel, so that pipeline parallel can be smoothly run.
Add relevant tests for layer distribution & pipeline forward.

💥 Checklist before requesting a review

[x] I have linked my PR to an issue (instruction)
[x] My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
[x] I have performed a self-review of my code
[x] I have added thorough tests.
[x] I have added docstrings for all the functions/methods I implemented

⭐ Do you enjoy contributing to Colossal-AI?

[x] 🌝 Yes, I do.
[ ] 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.


text:
Implemented generic os event driven mechanism to update HPENodeInfo object if there is any change in object attributes detected .

Issue:
CON-882 (Continuously monitor worker node network configuration)
Implementations:
Implemented a generic polling mechanism that accepts anonymous function and polling interval as arguments.
It has two functions
1.obj:=InitTask(...)
This is basically used to initialize the task object which registers the anonymous function that needs to be polled along with poll frequency. Also, it invokes a separate thread to monitor the OS signals e.g SIGTERM, SIGHUP for the graceful exit of the polling task.
2.obj.start()
This is basically to kick starts the polling in a loop unit os signal is received. It periodically polls the registered anonymous fn. This should be invoked as a separate goroutine.
Created an anonymous wrapper function around getNodeInfo() that is passed to InitTask() with default 30 Minutes polling frequency.
Testing:
I have tested the code by manually deleting the cluster worker node's one of the data network interfaces and have validated that the network changes are dynamically picked by Node Server and also HPENodeInfo is updated.

Hi,
I'm not sure how to get these email to stop. Can you please remove me from
your mailing list?
-Shiva
On Mon, Apr 27, 2020, 8:36 AM Shiva Krishna Merla notifications@github.com
wrote:

@shivamerla approved this pull request.
looks good..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hpe-storage/csi-driver/pull/145#pullrequestreview-401074021,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAB2ZBZRZRNVFF3UUBKPH3ROWRAFANCNFSM4MJSNJDQ
.

Hi, I'm not sure how to get these email to stop. Can you please remove me from your mailing list?
…
-Shiva

I guess you need to Unsubscribe notification. That should stop. Since I haven't made any user-specific configuration it was the default.

Hi, I'm not sure how to get these email to stop. Can you please remove me from your mailing list?
…
-Shiva

I guess you need to Unsubscribe notification. That should stop. Since I haven't made any user-specific configuration it was the default.

@shiva  Looks like folks have been tagging you instead of me by mistake. My GitHub ID is @shivamerla. I am not sure how i can control it. Can you unsubscribe from notifications on this repo?

Will try. Thanks for your responses.
-Shiva
On Mon, Apr 27, 2020, 9:49 PM Shiva Krishna Merla notifications@github.com
wrote:

Hi, I'm not sure how to get these email to stop. Can you please remove me
from your mailing list?
… <#m_2134139001607331619_>
-Shiva
I guess you need to Unsubscribe notification. That should stop. Since I
haven't made any user-specific configuration it was the default.
@shiva https://github.com/shiva Looks like folks have been tagging you
instead of me by mistake. My GitHub ID is @shivamerla
https://github.com/shivamerla. I am not sure how i can control it. Can
you unsubscribe from notifications on this repo?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hpe-storage/csi-driver/pull/145#issuecomment-620378754,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAB2ZEG5Z26UNSZAROD6T3ROZN6LANCNFSM4MJSNJDQ
.

authors: shiva shivamerla vidhutsingh

repo: hpe-storage/csi-driver


text:
US_4.3: Email to participants

As organizer I want to send a bulk mail to all participants of an event in order to avoid coping the email addresses.

Dependency: Event, Role Organizer, Role Pupil

Additional details: The sender of the Email can be a single person (e.g. tobias.duerschmid@student.hpi.de) or a mailing list (e.g. mintcamp2016@hpi.de). Please ensure, that this will not lead to access violation and discuss your solution with the HPI admins and my team.


text:
Missing information in seeds.rb

As @radscheit already pointed out, db/seeds.rb is missing information to seed the database. Please add at least the required fields for a profile (:first_name, :last_name, :gender, :birth_date, :email, :school, :street_name, :zip_code, :city, :state, :country)
/cc @hefowe @cmfcmf @Philipp-Bode

Maybe there could be a test that makes sure that db/seeds.rb can be loaded?

authors: bjrne chrisma


text:
composer.json是否有误？

"require": {
"php": ">=5.3.0",
"hprose/hprose": ">=2.0.9",
"ext-swoole": ">=1.8.8"
},
应为 "hprose/hprose-php":">=2.0.9"

并没有错，hprose/hprose-php 这个包不是官方的，是一个 hprose 用户在很久之前 fork 了一份发布到 packagist 上面的一个包，这个版本是很旧的。
hprose/hprose 这个包才是对应的官方的 hprose/hprose-php 项目的。

authors: andot geekchu

repo: hprose/hprose-swoole


text:
Update readme with typedarray source

Here's a small change to the README, with information on using a Uint8Array for the source, which I forgot to add in my previous PR.

Thanks!

repo: hrynko/vue-pdf-embed


text:
JobDetails unit test fails

Failed test output:
tests/components/Job/JobDetails.test.tsx > JobDetails > renders JobDetails
TypeError: Cannot read properties of undefined (reading 'join')

Added a conditional statement to check if the requiredSkills array existed before attempting to call join on it. Bug fixed!


text:
new(vx-demo): convert Brush to codesandbox

:memo: Documentation
:house: Internal
TODO

[ ] fix initialBrushPosition in sandbox

Part of #624, re-writes the Brush demo to link out to code-sandbox.
Link (update branch to master upon merge).

@kristw @hshoff

I'm just gonna merge this and continue to debug the initialBrushPosition separately

repo: hshoff/vx


text:
Fix #23 decrease horizontal width of badges

Fix #23 decrease horizontal width of badges

Closing to squash.


text:
🛑 Manhuagui is down

In c4be4d9, Manhuagui (https://www.manhuagui.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Manhuagui is back up in f04cd4c after 9 minutes.


text:
Update sbt-release to 1.0.14

Updates com.github.gseitz:sbt-release from 1.0.13 to 1.0.14.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.github.gseitz", artifactId = "sbt-release" } ]

labels: sbt-plugin-update, semver-patch

Superseded by #117.


text:
Http4s Testing Documentation

In our documentation we are lacking examples and demonstration of using http4s-testing to create unit tests for our services. We have some implementations in http4s.g8, but we should have more concrete examples that show a consensus that people can work from in the Website documentation.

@ChristopherDavenport Could you point me to http4s-testing when you have a chance? I can't seem to find it.

It's the testing subproject.  It gets published as:
"org.http4s" %% "http4s-testing" % Http4sVersion

We have Http4sMatchers, which help with Specs2.  If you search our tests for the methods therein, you'll find examples of their use.  (Aside: it's not great that our testing module has a dependency on specs2.  I think we should consider whether that's the right home.)
Other interesting things in there are the ArbitraryInstances, which go nicely with Scalacheck.  We have also started adding some laws that go well with discipline.  I suspect these are more useful inside http4s than outside, though I can imagine them being used in more advanced testing scenarios.

@rossabaker Awesome, I will play around with that! Thank you!

I've been looking around at this a little bit, one thing i'm unclear on is where these docs are supposed to live. In the docs/ folder?

Definitely seems good enough to close out this issue. If we want we can revisit arbitraries and law testing at some point in the future.


text:
Default bind address: 127.0.0.1 or 0.0.0.0?

The default has tripped a couple people up recently.  I looked at a few other servers for prior art, and found support for both.
Without looking, what do you expect?

I'd say 0.0.0.0
On May 2, 2016 8:21 PM, "Ross A. Baker" notifications@github.com wrote:

The default has tripped a couple people up recently. I looked at a few
other servers for prior art, and found support for both.
Without looking, what do you expect?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/http4s/http4s/issues/622

Vetoed.  See other ticket.

authors: LeifW rossabaker


text:
Add @SystemFw to the POM

Welcome to the team!

Thank you very much :)

👏

authors: SystemFw jcranky rossabaker


text:
Further upload improvements

This pull request adds two more upload improvements. First commit changes HTTP::Request::Body to use IO#readpartial if available, and second commit adds a buffer string for memory-efficient uploads; both are explained in detail in their commit descriptions.
I was hoping that, once this is merged (or rejected), we could release a new version of HTTP.rb and form_data.rb with the streaming upload feature.

Does this need an addition to the test suite to exercise both #read and #readpartial?

@mikegee The example that uses StringIO as a "Enumerable IO" already exercises #readpartial, and the "non-Enumerable" FakeIO example exercises #read.

Thanks for the detailed commit messages. I was about to ask why #readpartial was preferable.

@mikegee I made what I think is an improvement in the last commit. Instead of writing out the #read/#readpartial logic and using a buffer string, we can use IO.copy_stream which will do all that for us (see the Rubinius implementation), with the help of a BlockIO object which acts as a "destination IO" and just calls the block with the data that IO.copy_stream "writes".
Here we use a trick of creating a Proc objects from an implicit block by calling Proc.new without any arguments. So, this:
def foo
  block = Proc.new
end

is equivalent to
def foo(&block)
end

This way we can still use yield in other branches of the conditional.

Wow! TIL about def foo; Proc.new; end

@ixti Updated. I brought back returning Enumerator in HTTP::Request::Body#each because it makes tests simpler. Also, because of https://github.com/jruby/jruby/issues/4701 I changed the tests for IO objects to just verify that yielded chunks sum up to the entire content.

@britishtea @ixti Updated.

@ixti @britishtea Do you think this one is ready for merging?

Sorry I was on a vacation and completely off the grid. Will handle this ASAP.

@ixti Quick bump 😃

Sorry took me so long. Merged. Thank you!

@ixti No problem at all!
Sorry that I've been nagging about it, I just thought about writing a section in  Shrine documentation about how to upload files with various HTTP libraries, and I wanted to wait until HTTP.rb had streaming IO uploads, so that I don't have to change the documentation later.
Now that we merged these final memory optimizations, and made deflating work with IO/Enumerable uploads (https://github.com/httprb/http/pull/412), do you think we can release a new HTTP.rb version with the new streaming IO uploads feature?

@janko-m I want to work-on/merge all outstanding PRs that can be merged in relatively fast, and then we'll be good to release 3.0.0.pre1 I just want to merge max breaking changes as we ae doing that anyway ;))

@ixti Sounds great, thank you!

authors: ixti janko-m mikegee

repo: httprb/http


text:
能不能提供一下在4090上实验的具体安装清单

我自己只修改了torch 和cuda的版本 发现会出现很多错误

你好，请问你解决了吗

authors: jackwky johnren-code

repo: huang-yh/SelfOcc


text:
How to achieve renderings from other perspectives？

Thanksfor your efforts!
The effect is very good, but the images are all from a horizontal perspective. How about the effect images from other perspectives?
For example, Looking down on objects
We look forward to your reply！

hey,
a part of the answer lies in the way the camera is initialized :
https://github.com/huanngzh/MV-Adapter/blob/612211253f79d383656289ab85e8df22b9f46ea4/scripts/inference_t2mv_sdxl.py#L83-L92
specifically the values of
elevation_deg=[0, 0, 0, 0, 0, 0], # <= rotation about the X axis : the "up/down" angle
distance=[1.8] * num_views, #<= distance from center
azimuth_deg=[x - 90 for x in [0, 45, 90, 180, 270, 315]], # <= rotation about the Y axis : the "turn table" angle

these values are partly hardcoded (elevation & azimut_deg) and partly dynamic (distances is based on num_views) so first idea is to make everything dynamic like so:
# initialise rotations values
azimuts = []
distances = []
elevations = []
elevation = 0
step = int( 360 / num_views ) # 'turn table' angle
for i in range( 0, 360, step):
    azimuts.append( i - 90 )
    elevations.append( elevation )
    distances.append( 1.8 )
print( "azimut values", len(azimuts), azimuts, 'step', step )
# with: a num_views of 9: => azimut values 9 [-90, -50, -10, 30, 70, 110, 150, 190, 230] step 40
# Prepare cameras
cameras = get_orthogonal_camera(
    azimuth_deg=azimuts,
    elevation_deg=elevations,
    distance=distances,
    left=-0.55,
    right=0.55,
    bottom=-0.55,
    top=0.55,
    device=device,
)

NB: the get_orthogonal_camera method doesn't have a num_views argument so you must provide the azimuth_deg (or add num_views to get_orthogonal_camera's args).
this should create 9 views around the model BUT it doesn't work and I don't understand why.
it does create 9 images but they always use the same 6 (default) angles...
this is what the above call with 9 views produces

the images 2 & 3, 4 & 5, 6 & 7 are computed individually (notice some slight differences) but have the same camera angles that correspond to the 'default' angles.
any hint as to why & how to fix would be appreciated :)

Hi, your understanding of the hyperparameters is correct. However, sorry we haven't released our arbitrary view generation, as shown in README.

Hi, thanks for your great work, I'd like to know when will you release your inference code for generating arbitrary number of views?

authors: benzhangdragonplus huanngzh nicoptere yejr0229

repo: huanngzh/MV-Adapter


text:
Cross Origin Problem

I started your app on my server like that : wssh --address='127.0.0.1' --origin="*" --port=8888 --xsrf=False --debug
And i access it from my computer to the server with my custom address.
The problem is that it does not connect :(
E.G : It's working without problem from localhost to localhost.
But i need the access from * to my server

Do you see what's wrong ?

What error complained by your webssh server?

Hello, this is the error that appears on the server

It seems that the problem was on the nginx configuration ! Strange thing
I will close it, thanks for help

repo: huashengdun/webssh


text:
Some keys appear wrong on German keyboard

Hi, this one is weird. Generally the assignments are correct, but for example # appears as / in an WebSSH terminal.

OK


text:
【Enhancement】 router support set fallback route as downgrading routing strategy

What would you like to be enhanced?
Router add fallback rule to support downgrading routing strategy.
Why is this needed?
Support multi permanent path routing degradation strategy.

标签路由目前存在以下问题，当存在多标签的实例时，有可能存在以下的配置：

precedence: 0
route:

weight: 100
tags:
cas_lane_tag: base
weight: 100

precedence: 1
match:
headers:
x-cse-canary:
exact: red
route:

weight: 100
tags:
cas_lane_tag: red

precedence: 2
match:
headers:
x-cse-canary:
exact: gray
route:

weight: 100
tags:
cas_lane_tag: gray
那么会存在一种场景，在全链路灰度的情况下，如果一个请求匹配上了cas_lane_tag: gray的路由，但是却没有部署实例，那么将会根据负载均衡策略选取实例，也就说有可能会路由到red组的实例或者base组的实例，但大多数场景下，更多的是希望能路由到base组，所以需要增加fallback机制，配置可拓展为：

precedence: 0
route:

weight: 100
tags:
cas_lane_tag: base
weight: 100

precedence: 1
match:
headers:
x-cse-canary:
exact: red
route:

weight: 100
tags:
cas_lane_tag: red
fallback:
tags:
cas_lane_tag: base
weight: 100

precedence: 2
match:
headers:
x-cse-canary:
exact: gray
route:

weight: 100
tags:
cas_lane_tag: gray
fallback:
tags:
cas_lane_tag: base
weight: 100
那么，没有red组或者gray组的情况下，将fallback到base组，解决了之前的不足

authors: chengyouling provenceee

repo: huaweicloud/Sermant


text:
怎么携带 context

为什么sdk所有对 obs 操作的 api 没有鞋带 context 参数

这个参数是要实现什么功能呢？

repo: huaweicloud/huaweicloud-sdk-go-obs


text:
Fix a few typos in why.md

As a native US English speaker, these minor mistakes caught my eye while reading about this very cool project.
So, I took a minute to clean them up.

Thank you for this PR @NateEag !
Merged

authors: NateEag bpetit

repo: hubblo-org/scaphandre


text:
Based on this awesome API

Hi @huchenme! Maybe you want to know that I'm working on this project: https://github.com/zircleUI/github-trending-plus that heavily uses your API  😄 🎉
Thank you again for your work!!

Hi @tinchox5, this is nice to know! Your site is fun to play with, nice animations 😄

@tinchox5 Just updated README and added your project to this section https://github.com/huchenme/github-trending-api#projects-using-github-trending-api
🙌

Thank you!!
On Wed, Feb 13, 2019 at 10:40 AM Hu Chen notifications@github.com wrote:

@tinchox5 https://github.com/tinchox5 Just updated README and added
your project to this section
https://github.com/huchenme/github-trending-api#projects-using-github-trending-api
🙌
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/huchenme/github-trending-api/issues/11#issuecomment-463247357,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALBcDTH1n5XIbPUQPk896crJ3TAwLrMgks5vNDIGgaJpZM4YTZyu
.

repo: huchenme/github-trending-api


text:
🛑 VGMdb API is down

In 7f8afed, VGMdb API (https://vgmdb.info) was down:

HTTP code: 0
Response time: 0 ms

Resolved: VGMdb API is back up in 8e8cd42 after 5 hours, 18 minutes.

repo: hufman/upptime


text:
hugegraph0.8.0 怎么配置 ConfigAuthenticator模式

我的配置
    ConfigAuthenticator模式
    ConfigAuthenticator模式是通过预先在配置文件中设置用户信息来支持用户认证，该实现是基于配置好的静态tokens来验证用户是否合法。下面是具体的配置流程（重启服务生效）：

    在配置文件gremlin-server.yaml中配置authenticator及其rest-server文件路径：

    authentication: {
      authenticator: com.baidu.hugegraph.auth.ConfigAuthenticator,
      authenticationHandler: com.baidu.hugegraph.auth.WsAndHttpBasicAuthHandler,
      config: {tokens: /etc/hugegraph/rest-server.properties}
    }
    在配置文件rest-server.properties中配置authenticator及其tokens信息：

    auth.authenticator=com.baidu.hugegraph.auth.ConfigAuthenticator
    auth.admin_token=token-value-a
    auth.user_tokens=[hugegraph1:token-value-1, hugegraph2:token-value-2]
    在配置文件hugegraph{n}.properties中配置gremlin.graph信息：

    gremlin.graph=com.baidu.hugegraph.auth.HugeFactoryAuthProxy

我的报错：
main] [ERROR] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Gremlin Server Error
java.lang.IllegalStateException: Could not create/configure Authenticator null
2021-01-27 11:30:55 6209  [main] [ERROR] com.baidu.hugegraph.dist.HugeGremlinServer [] - Gremlin Server was unable to start and will shutdown now: Could not create/configure Authenticator null

已解决

已解决

repo: hugegraph/hugegraph


text:
很大的一个BUG，请修改

如果用户没有下载次数的话，自动更新会直接奔溃，报空指针；

我也发现了这个问题

authors: aesion qincunrong

repo: hugeterry/UpdateDemo


text:
ValueError: Query/Key/Value should either all have the same dtype,

--enable_xformers_memory_efficient_attention fails with the following error when run with accelerate
File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/xformers/ops/fmha/__init__.py", line 348, in _memory_efficient_attention_forward_requires_grad
    inp.validate_inputs()
  File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/xformers/ops/fmha/common.py", line 121, in validate_inputs
    raise ValueError(
ValueError: Query/Key/Value should either all have the same dtype, or (in the quantized case) Key/Value should have dtype torch.int32
  query.dtype: torch.float32
  key.dtype  : torch.float16
  value.dtype: torch.float16
Steps:   0%|                                           | 0/1000 [00:02<?, ?it/s]
[2023-11-25 14:03:17,898] torch.distributed.elastic.multiprocessing.api: [ERROR] failed (exitcode: 1) local_rank: 0 (pid: 5264) of binary: /anaconda/envs/diffusers-ikin/bin/python
Traceback (most recent call last):
  File "/anaconda/envs/diffusers-ikin/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
    args.func(args)
  File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/accelerate/commands/launch.py", line 985, in launch_command
    multi_gpu_launcher(args)
  File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/accelerate/commands/launch.py", line 654, in multi_gpu_launcher
    distrib_run.run(args)
  File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/torch/distributed/run.py", line 797, in run
    elastic_launch(
  File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 134, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
  File "/anaconda/envs/diffusers-ikin/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 264, in launch_agent
    raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
diffusers/examples/dreambooth/train_dreambooth_lora_sdxl.py FAILED

I am running accelerate as following
accelerate launch diffusers/examples/dreambooth/train_dreambooth_lora_sdxl.py \
      --pretrained_model_name_or_path="stabilityai/stable-diffusion-xl-base-1.0" \
      --instance_data_dir={input_dir} \
      --output_dir={output_dir} \
      --instance_prompt=instance_prompt \
      --mixed_precision="fp16" \
      --resolution=1024 \
      --train_batch_size=1 \
      --gradient_accumulation_steps=4 \
      --learning_rate=1e-4 \
      --lr_scheduler="constant" \
      --lr_warmup_steps=0 \
      --checkpointing_steps=500 \
      --max_train_steps=1000 \
      --seed="0" \
      --checkpoints_total_limit=5 \
      --enable_xformers_memory_efficient_attention

Accelerate config
{
  "compute_environment": "LOCAL_MACHINE",
  "debug": false,
  "distributed_type": "MULTI_GPU",
  "downcast_bf16": false,
  "machine_rank": 0,
  "main_training_function": "main",
  "mixed_precision": "no",
  "num_machines": 1,
  "num_processes": 2,
  "rdzv_backend": "static",
  "same_network": false,
  "tpu_use_cluster": false,
  "tpu_use_sudo": false,
  "use_cpu": false
}

Versions:
xformers==0.0.23.dev687
accelerate==0.24.1
torch==2.1.0
torchvision==0.16.1

Thanks for reporting @khayamgondal, is it working without accelerate ? It looks like the query don't have the same dtype as the key and the value. I would suggest trying to find out why it is the case.

If I run accelerate without --enable_xformers_memory_efficient_attention flag, training works fine. Llooks like somehow xformers upscales query vector to float32.

+1

@sr5434 can you try without accelerate ? it doesn't seems to be an issue with accelerate since we don't modify the dtype. Maybe it is probably something in train_dreambooth_lora_sdxl.py that modifies the dtype. LMK how it goes !

If I run accelerate without --enable_xformers_memory_efficient_attention flag, training works fine. Looks like somehow xformers upscales query vector to float32.

this made all the difference. thank you!

@klopez89 that seems more like a workaround though

@SunMarc This is the source code: https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora_sdxl.py
Also when I just use python the error stays the same

Thanks for clarifying @sr5434 ! This issue is not related to accelerate then. You should probably open an issue on diffusers repository. My guess is that xformers attention is not working as expected in the script.

i think the problem is caused by xformers and pytorch used different cuda version to compile, xformers is compiled used cuda 11.8 or higher,but the cuda version  your pytorch compiled is 11.7 or lower.solution is to download xfomers source code and compile it in your environment

@SunMarc I was able to fix the problem by disabling xformers

+1

I get the same error when running the train_text_to_image_lora_sdxl.py script. I've made sure to align the CUDA version as suggestion above but no difference.
accelerate==0.26.1
torch==2.1.2+cu118
torchvision==0.16.2+cu118
xformers==0.0.23.post1+cu118

Can the same Dreambooth fixes be applied here as well?

Hi @JakobLS , can you try to build xformers from source ?

I'm running this in a cloud VM and it's freezing when I do that. Tried it twice - in my original and in a new I created. If I don't align the CUDA versions before, as I showed above, I get the following error:
  The detected CUDA version (11.8) mismatches the version that was used to compile
  PyTorch (12.1). Please make sure to use the same CUDA versions.

Hi @JakobLS , you need to either reinstall pytorch with the cu121. Or the you can the version of CUDA of your driver to 11.8

Hi @SunMarc, I might not be explaining myself properly. That's what I wanted to show with my first comment.
The VM comes installed with CUDA 11.8.

If I install a Pytorch version with CUDA 11.8 and run it with no mixed precision it works fine. If I run it with mixed_precision="fp16" I get the following error:

ValueError: Query/Key/Value should either all have the same dtype, or (in the quantized case) Key/Value should have dtype torch.int32
  query.dtype: torch.float32
  key.dtype  : torch.float16
  value.dtype: torch.float16

Similarly if I install a Pytorch version with CUDA 12.1 and run it with no mixed precision it also works fine. But if I run it with mixed_precision="fp16" I get the exact same error.

It doesn't like when I run it with mixed precision so it looks like the issue might be there rather than in the CUDA version. I'd like to use mixed precision though due to the speed advantage.

Let me know if you want me to open a new issue for this btw.

@SunMarc, when I install from source, the installation automatically terminates and the terminal window shuts down. No xformers is being installed. Using the following script:
pip install ninja
pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers

This is the installed Pytorch:
accelerate==0.26.1
torch==2.1.2+cu118
torchvision==0.16.2+cu118

and CUDA (checking with nvcc --version):
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0

This is indeed strange that you are not able to install from source. Let's try this then: pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu118. You should get the 11.8 version this way.

That successfully installs xformers:
accelerate==0.26.1
torch==2.1.2+cu118
torchvision==0.16.2+cu118
xformers==0.0.23.post1+cu118

But when I now execute the script train_text_to_image_lora_sdxl.py  as shown above, I get the same error as OP:
ValueError: Query/Key/Value should either all have the same dtype, or (in the quantized case) Key/Value should have dtype torch.int32
  query.dtype: torch.float32
  key.dtype  : torch.float16
  value.dtype: torch.float16

If I run the script without --enable_xformers_memory_efficient_attention I instead get the following error:
ValueError: Attempting to unscale FP16 gradients.

ValueError: Attempting to unscale FP16 gradients. error means that the model is on fp16. See this thread for more information.
As for the other issue, it seems that compiling both pytorch and xformers with the same cuda version doesn't work. I will try to debug that.

Thanks for looking into it. I'll keep --enable_xformers_memory_efficient_attention enabled to reap its benefits though. 🙂
If it helps you, it's working if I remove mixed precision like this:
accelerate launch $SCRIPT_PATH \
  --enable_xformers_memory_efficient_attention \

  # Same as before

Still, I'd like to use mixed_precision="fp16" for the speed boost.

Still the same issue thanks for the workaround @JakobLS

Has anyone found a fix to this? I still facing the same issues.

It's now some time ago and I'm not working on it anymore. But I think I "solved" it by using mixed_precision="fp16" over xformers instead since the latter seem to lead to clearer degradation in image quality which fp16 doesn't.
You could also try to update to later cuda, torch and xformers versions if you really want to use xformers (I think I tried that and got it to work).

authors: GaParmar JakobLS SunMarc billvsme faceslog khayamgondal klopez89 sr5434 xiaohaipeng

repo: huggingface/accelerate


text:
Training gets stuck at loss.backward() using TPU

❓ Questions and Help
Hi, I am trying to fine-tune a pre-trained language model (~400M) using ParlAI and XLA via huggingface's accelerate. But the training gets stuck at loss.backward() step. One thing about the ParlAI is that they seperate the data loading and main model training into different scripts, therefore I have to use self.model, self.optimizer, batch = accelerator.prepare(self.model, self.optimizer, batch) multiple times otherwise the system screams that the tensors are not XLA tensors. I would really appreciate it If anyone can take a look and advise on how to fix this issue.
Below is the output of the metric report along with other print statements I used for debugging.
11:13:27 INFO | training...
the computed loss is tensor(1.9162, device='xla:1', grad_fn=<DivBackward0>)
performing accelerator.backward(loss):  None
this is torch_xla._XLAC._get_xla_tensors_text([loss] IR {
  %0 = s64[16]{0} xla::device_data(), device=TPU:0
  %1 = s64[] aten::sum(%0), dimensions=(0), keep_reduced_dimensions=0, dtype=4
  %2 = f32[] xla::cast(%1), type=f32, dtype=Float
  %3 = f32[16]{0} xla::device_data(), device=TPU:0
  %4 = f32[] aten::sum(%3), dimensions=(0), keep_reduced_dimensions=0, dtype=6
  %5 = f32[] aten::div(%4, %2), ROOT=0
}

this is a metric report Metric: CompileTime
  TotalSamples: 15
  Accumulator: 19s334ms940.755us
  ValueRate: 01s021ms185.841us / second
  Rate: 0.792274 / second
  Percentiles: 1%=007ms553.223us; 5%=007ms553.223us; 10%=007ms425.795us; 20%=009ms072.881us; 50%=021ms906.075us; 80%=998ms656.162us; 90%=09s994ms042.677us; 95%=09s047ms368.065us; 99%=09s047ms368.065us
Metric: DeviceLockWait
  TotalSamples: 15
  Accumulator: 053.267us
  ValueRate: 002.686us / second
  Rate: 0.756331 / second
  Percentiles: 1%=001.586us; 5%=001.586us; 10%=001.905us; 20%=002.947us; 50%=003.184us; 80%=005.166us; 90%=005.648us; 95%=005.716us; 99%=005.716us
Metric: ExecuteTime
  TotalSamples: 15
  Accumulator: 211ms826.316us
  ValueRate: 011ms134.990us / second
  Rate: 0.792239 / second
  Percentiles: 1%=002ms386.367us; 5%=002ms386.367us; 10%=002ms455.348us; 20%=002ms478.949us; 50%=003ms287.108us; 80%=014ms827.398us; 90%=071ms815.250us; 95%=073ms143.528us; 99%=073ms143.528us
Metric: InboundData
  TotalSamples: 18
  Accumulator: 2.41KB
  ValueRate: 130.39B / second
  Rate: 0.951754 / second
  Percentiles: 1%=1.00B; 5%=1.00B; 10%=1.00B; 20%=1.00B; 50%=8.00B; 80%=128.00B; 90%=128.00B; 95%=1.73KB; 99%=1.73KB
Metric: InputOutputAliasCount
  TotalSamples: 11
  Accumulator: 12.00
  ValueRate: 0.61 / second
  Rate: 0.55474 / second
  Percentiles: 1%=1.00; 5%=1.00; 10%=1.00; 20%=1.00; 50%=1.00; 80%=1.00; 90%=1.00; 95%=2.00; 99%=2.00
Metric: IrValueTensorToXlaData
  TotalSamples: 357
  Accumulator: 15s110ms619.120us
  ValueRate: 424ms335.772us / second
  Rate: 10.0259 / second
  Percentiles: 1%=001ms069.136us; 5%=001ms279.980us; 10%=001ms413.787us; 20%=002ms551.990us; 50%=002ms841.347us; 80%=066ms132.470us; 90%=067ms457.525us; 95%=261ms053.985us; 99%=270ms630.855us
Metric: OutboundData
  TotalSamples: 368
  Accumulator: 1.36GB
  ValueRate: 38.75MB / second
  Rate: 10.2479 / second
  Percentiles: 1%=4.00B; 5%=5.00KB; 10%=5.00KB; 20%=5.00KB; 50%=5.00KB; 80%=6.25MB; 90%=6.25MB; 95%=25.00MB; 99%=25.00MB
Metric: ReleaseDataHandlesTime
  TotalSamples: 14
  Accumulator: 153ms995.227us
  ValueRate: 008ms089.200us / second
  Rate: 0.740211 / second
  Percentiles: 1%=738.550us; 5%=738.550us; 10%=962.790us; 20%=001ms031.819us; 50%=002ms699.409us; 80%=016ms770.251us; 90%=019ms555.057us; 95%=080ms454.166us; 99%=080ms454.166us
Metric: TensorsGraphSize
  TotalSamples: 15
  Accumulator: 13737.00
  ValueRate: 725.57 / second
  Rate: 0.792275 / second
  Percentiles: 1%=3.00; 5%=3.00; 10%=3.00; 20%=5.00; 50%=7.00; 80%=15.00; 90%=6823.00; 95%=6823.00; 99%=6823.00
Metric: TransferFromServerTime
  TotalSamples: 18
  Accumulator: 066ms155.154us
  ValueRate: 003ms497.967us / second
  Rate: 0.951754 / second
  Percentiles: 1%=001ms306.763us; 5%=001ms306.763us; 10%=001ms398.792us; 20%=002ms544.387us; 50%=002ms869.355us; 80%=008ms518.333us; 90%=012ms099.418us; 95%=013ms433.408us; 99%=013ms433.408us
Metric: TransferToServerTime
  TotalSamples: 368
  Accumulator: 15s131ms507.769us
  ValueRate: 421ms440.948us / second
  Rate: 10.2502 / second
  Percentiles: 1%=001ms063.388us; 5%=001ms270.664us; 10%=001ms390.961us; 20%=002ms546.362us; 50%=002ms829.677us; 80%=066ms102.141us; 90%=067ms432.965us; 95%=261ms927.295us; 99%=270ms621.466us
Metric: TransferToServerTransformTime
  TotalSamples: 368
  Accumulator: 389ms949.399us
  ValueRate: 011ms831.283us / second
  Rate: 10.2479 / second
  Percentiles: 1%=043.033us; 5%=050.050us; 10%=059.885us; 20%=087.111us; 50%=130.146us; 80%=002ms578.564us; 90%=002ms702.544us; 95%=006ms921.781us; 99%=008ms652.382us
Counter: CreateCompileHandles
  Value: 15
Counter: CreateDataHandles
  Value: 384
Counter: CreateXlaTensor
  Value: 5308
Counter: DestroyDataHandles
  Value: 15
Counter: DestroyXlaTensor
  Value: 4603
Counter: DeviceDataCacheMiss
  Value: 10
Counter: ReleaseDataHandles
  Value: 15
Counter: UncachedCompile
  Value: 15
Counter: XRTAllocateFromTensor_Empty
  Value: 13
Counter: XrtCompile_Empty
  Value: 384
Counter: XrtExecuteChained_Empty
  Value: 384
Counter: XrtExecute_Empty
  Value: 384
Counter: XrtMemoryInfo_Empty
  Value: 384
Counter: XrtRead_Empty
  Value: 384
Counter: XrtReleaseAllocationHandle_Empty
  Value: 384
Counter: XrtReleaseCompileHandle_Empty
  Value: 384
Counter: XrtSessionCount
  Value: 4
Counter: XrtSubTuple_Empty
  Value: 384
Counter: aten::_local_scalar_dense
  Value: 9
Counter: aten::cumsum
  Value: 1
Counter: aten::masked_select
  Value: 1
Counter: xla::_copy_from
  Value: 422
Counter: xla::_log_softmax
  Value: 1
Counter: xla::_log_softmax_backward_data
  Value: 1
Counter: xla::_softmax
  Value: 26
Counter: xla::_softmax_backward_data
  Value: 26
Counter: xla::_unsafe_view
  Value: 133
Counter: xla::abs
  Value: 2
Counter: xla::add
  Value: 135
Counter: xla::add_
  Value: 132
Counter: xla::addcmul
  Value: 42
Counter: xla::any
  Value: 1
Counter: xla::arange_out
  Value: 1
Counter: xla::as_strided
  Value: 382
Counter: xla::bernoulli_
  Value: 42
Counter: xla::bitwise_and_out
  Value: 1
Counter: xla::bmm
  Value: 156
Counter: xla::cat
  Value: 1
Counter: xla::ceil
  Value: 1
Counter: xla::clamp_
  Value: 1
Counter: xla::clone
  Value: 53
Counter: xla::cumsum
  Value: 1
Counter: xla::div
  Value: 28
Counter: xla::div_
  Value: 69
Counter: xla::embedding
  Value: 4
Counter: xla::embedding_dense_backward
  Value: 2
Counter: xla::empty
  Value: 446
Counter: xla::empty_strided
  Value: 382
Counter: xla::eq
  Value: 30
Counter: xla::expand
  Value: 44
Counter: xla::fill_
  Value: 14
Counter: xla::gelu
  Value: 14
Counter: xla::gelu_backward
  Value: 14
Counter: xla::gt
  Value: 2
Counter: xla::index_select
  Value: 4
Counter: xla::lt
  Value: 1
Counter: xla::masked_fill_
  Value: 52
Counter: xla::masked_select
  Value: 1
Counter: xla::max
  Value: 4
Counter: xla::min
  Value: 1
Counter: xla::mm
  Value: 399
Counter: xla::mul
  Value: 262
Counter: xla::mul_
  Value: 4
Counter: xla::native_batch_norm
  Value: 42
Counter: xla::native_batch_norm_backward
  Value: 42
Counter: xla::ne
  Value: 5
Counter: xla::nll_loss_backward
  Value: 1
Counter: xla::nll_loss_forward
  Value: 1
Counter: xla::repeat
  Value: 26
Counter: xla::select
  Value: 4
Counter: xla::slice
  Value: 8
Counter: xla::sub
  Value: 1
Counter: xla::sum
  Value: 221
Counter: xla::t
  Value: 532
Counter: xla::transpose
  Value: 416
Counter: xla::tril
  Value: 12
Counter: xla::unbind
  Value: 2
Counter: xla::unsqueeze
  Value: 17
Counter: xla::view
  Value: 1639
Counter: xla::zero_
  Value: 1
Metric: XrtAllocateFromTensor
  TotalSamples: 368
  Accumulator: 674ms548.126us
  Mean: 002ms830.294us
  StdDev: 003ms035.214us
  Rate: 10.2503 / second
  Percentiles: 25%=429.054us; 50%=554.600us; 80%=002ms440.790us; 90%=003ms026.023us; 95%=008ms286.670us; 99%=019ms699.977us
Metric: XrtCompile
  TotalSamples: 15
  Accumulator: 19s091ms002.111us
  Mean: 01s273ms733.474us
  StdDev: 03s034ms709.782us
  Rate: 0.792277 / second
  Percentiles: 25%=007ms006.559us; 50%=019ms110.326us; 80%=932ms812.838us; 90%=09s961ms819.611us; 95%=09s010ms994.333us; 99%=09s010ms994.333us
Metric: XrtExecute
  TotalSamples: 15
  Accumulator: 160ms538.076us
  Mean: 011ms635.872us
  StdDev: 023ms381.113us
  Rate: 0.792158 / second
  Percentiles: 25%=001ms106.660us; 50%=002ms532.117us; 80%=002ms086.252us; 90%=069ms194.319us; 95%=071ms271.787us; 99%=071ms271.787us
Metric: XrtExecutorEvict
  TotalSamples: 0
  Accumulator: nanB
  Mean: nanB
  StdDev: nanB
  Percentiles:
Metric: XrtReadLiteral
  TotalSamples: 19
  Accumulator: 010ms266.051us
  Mean: 540.318us
  StdDev: 147.028us
  Rate: 1.00464 / second
  Percentiles: 25%=375.627us; 50%=565.235us; 80%=679.678us; 90%=714.152us; 95%=830.439us; 99%=830.439us
Metric: XrtReleaseAllocation
  TotalSamples: 14
  Accumulator: 283.906us
  Mean: 020.279us
  StdDev: 005.056us
  Rate: 0.740218 / second
  Percentiles: 25%=018.544us; 50%=021.219us; 80%=023.325us; 90%=024.486us; 95%=032.160us; 99%=032.160us

To Reproduce
The main training scripts are as below.
scripts.torch_generator_agent.txt
train_model.txt
torch_agent.txt
Environment
reproducible on XLA backend [CPU/TPU]: tested on a colab TPU
torch_xla version: cloud-tpu-client==0.10 and torch_xla-1.9-cp37-cp37m-linux_x86_64
torch==1.9.0+cu111
I used pip install accelerate
Thank you so much in advance!

Please use the forums to debug your code, as we keep the issues for bugs and feature requests only :-)
Not passing the whole dataloader will result in each process seeing the same data, which completely kills the purpose of distributed training. So you should find a way to import the dataloader from your other script.

Cool, thanks for letting for me know! And sorry about posting it here. I will try to see implement dataloader if possible.

authors: evelynkyl sgugger