text:
includes additional, customizable health checks

Signed-off-by: barinek barinek@initialcapacity.io

Codecov Report

Merging #201 (0a6623c) into main (340d54b) will decrease coverage by 0.03%.
The diff coverage is 91.11%.

@@            Coverage Diff             @@
##             main     #201      +/-   ##
==========================================
- Coverage   91.41%   91.37%   -0.04%
==========================================
  Files          38       38
  Lines        1666     1705      +39
==========================================
+ Hits         1523     1558      +35
- Misses         96       98       +2
- Partials       47       49       +2

Impacted Files
Coverage Δ

pkg/admin/status.go
81.81% <50.00%> (-18.19%)
:arrow_down:

cmd/orchestrator/orchestrator.go
81.35% <88.23%> (+2.28%)
:arrow_up:

pkg/admin/orchestrator_client.go
87.91% <100.00%> (ø)

pkg/healthsupport/health_support.go
100.00% <100.00%> (ø)

pkg/websupport/web_support.go
95.45% <100.00%> (+0.71%)
:arrow_up:

Continue to review full report at Codecov.

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

authors: barinek codecov-commenter

repo: hexa-org/policy-orchestrator


text:
detect phone from sumsung galaxy j7 or Android OS return null

detect phone from sumsung galaxy j7 or Android OS return null
user-agent from sumsung galaxy j7 prime is
Mozilla/5.0 (Linux; Android 7.0; SM-G610F Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36
but phone detect is null
const md = new MobileDetect(req.headers['user-agent'])
console.log(md.mobile())
console.log(md.phone())
console.log(md.tablet())

result
UnknownMobile
null
null

I change to other Android Device
result the same

Do you remember the text showing up when creating an issue?
I repeat:
Important Note
Before creating an issue, please note:
mobile-detect is just a kind of "satellite"-project. It uses the RegEx patterns of
Mobile-Detect and generates JavaScript source code
based on the code of its "mother"-project.
Missing patterns for particular devices cannot be added in mobile-detect.js,
instead you have to create an issue in Mobile-Detect.
Please provide the User-Agent string, the manufacturer and the type of device (phone, tablet, tv, bot, ...).
I won't replicate your issue to Mobile-Detect!
It doesn't make any sense to change generated code. I hope you understand.
Issue
[ ] I've read above note and I'm quite sure I have a real issue with mobile-detect.js
... you can delete above note and just describe your issue ...

You seem to be missing the point. Ipad will have the same user agent as
desktop, making it impossible to detect via user agents
On Fri, Sep 13, 2019, 6:34 AM Heinrich Goebl notifications@github.com
wrote:

Do you remember the text showing up when creating an issue?
I repeat:
Important Note
Before creating an issue, please note:
mobile-detect is just a kind of "satellite"-project. It uses the RegEx
patterns of
Mobile-Detect https://github.com/serbanghita/Mobile-Detect and
generates JavaScript source code
based on the code of its "mother"-project.
Missing patterns for particular devices cannot be added in
mobile-detect.js,
instead you have to create an issue in Mobile-Detect
https://github.com/serbanghita/Mobile-Detect.
Please provide the User-Agent string, the manufacturer and the type of
device (phone, tablet, tv, bot, ...).
I won't replicate your issue to Mobile-Detect!
It doesn't make any sense to change generated code. I hope you understand.
Issue
[ ] I've read above note and I'm quite sure I have a real issue with
mobile-detect.js
... you can delete above note and just describe your issue ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hgoebl/mobile-detect.js/issues/87?email_source=notifications&email_token=AA2GSY6ZNIXFLU5A5L6LSEDQJOJHBA5CNFSM4FUDBUZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6VBARY#issuecomment-531238983,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA2GSY4MHRLEUCQRE36QL73QJOJHBANCNFSM4FUDBUZQ
.

SM-G610F should be added as a pattern in the Mobile-Detect project, not here.

source: gharchive/issue

authors: hgoebl masato48 stevenalanstark

license: mit

license_type: permissive

license_source: bigquery


text:
Fibonacci Number (Dynamic Programming) - Leetcode (Easy)

I would like to add my efficient solution to this problem Fibonacci Number in C++.
Leetcode: https://leetcode.com/problems/fibonacci-number/
Kindly please assign me this issue.
Hacktoberfest2021

@hhhrrrttt222111 Can you please Assigned this issue to me.

license_source: github-api


text:
feat: 添加 Context 的 drawable 和 color 获取的方式并补充 demo

作者你好，刚看到你提交的这个库，感觉很有意义，先补两个 Context 比较常用的方法。

@ZakAnun  你好， 在项目目录 ktKit/doc/help/  下面有个 05-context.md, 这是一个在线文档，方便在下面补充上你的使用方法吗？

source: gharchive/pull-request

authors: ZakAnun hi-dhl

repo: hi-dhl/KtKit


text:
HHH-16766: Load lazy hierarchical IdClass entities

https://hibernate.atlassian.net/browse/HHH-16766

Hi @JBodkin ,
thanks a lot for your PR.

repo: hibernate/hibernate-orm


text:
HHH-18296 When JDBC drivers generate SQLWarnings with a "success" SQLState, log that at a lower level than WARN

https://hibernate.atlassian.net/browse/HHH-18296
This gets rid of noise when dropping non-existing tables with the PostgreSQL JDBC driver in particular.
See also https://github.com/quarkusio/quarkus/issues/16204 and in particular https://github.com/quarkusio/quarkus/issues/16204#issuecomment-2182317973
I think the change is safe, because:

the SQL state is null by default in SQLWarning, so a JDBC driver not setting it would get the current behavior.
I wouldn't expect a JDBC driver to set the SQL state to a String starting with 00 by default, since the SQL state has clearly defined meaning.

I really don't like the idea of just silently swallowing warnings. We really have no clue of the side effects of such a change. What else are we going to silently swallow?

FWIW my view on the matter was in the PR description:

I think the change is safe, because:
* the SQL state is `null` by default in `SQLWarning`, so a JDBC driver not setting it would get the current behavior.

* I wouldn't expect a JDBC driver to set the SQL state to a String starting with `00` by default, since the SQL state has clearly defined meaning.

I get that we disagree.

Closing in favor of #8604


text:
HHH-18900 MariaDB Vector support

Since 11.7 MariaDB support Vector fields.
This was in preview since some time, and now released since 11.7.1. see https://mariadb.org/projects/mariadb-vector/

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.

https://hibernate.atlassian.net/browse/HHH-18900

Please hold on this PR for now. I'll take some time to make the test suite run with 11.7, but in a few weeks.
This will need specific investigation for each of them, like the optimistic test that fails because some new functionnality  snapshot-isolation that might need to be handle in hibernate to throw the appropriate error.

yes, there is indeed an issue, i've created buildSQLExceptionConversionDelegate() method in mariadb without getting the inherit mysql method. About the older mariadb version, they are still compatible with the test

this must now be ok.

rebase done

@beikov  rebased after localtime fix, hoping that's the last time :)

Thanks a lot for the contribution!

authors: beikov rusher


text:
HV 6 Memory and performance improvements

https://hibernate.atlassian.net/browse/HV-1437
https://hibernate.atlassian.net/browse/HV-1438
https://hibernate.atlassian.net/browse/HV-1439
https://hibernate.atlassian.net/browse/HV-1441
https://hibernate.atlassian.net/browse/HV-1443

Note 1: CI fails because of https://github.com/beanvalidation/beanvalidation-tck/pull/149 .
Note 2: the order of the commits displayed below is not exactly the one I have in my branch - the order of the HV-1439 commits is more consistent in my branch.
It's a big one. I started working on the different subjects separately but as I touched the same code and had the same issues, I had to cherry-pick some of the commits in other branches and finally ended up joining the efforts in one branch. The commits are well isolated and should be easily understandable by reading the commit comment and the code.
HV-1438
There are several things here:

I removed completely the ObjectValueExtractor. It's not a good idea to rely on the extractor infrastructure to validate the annotated object itself. Funnily enough, removing it revealed a few issues (these are the commits before the "Remove the ObjectValueExtractor" commit);
Narrowing down the value extractors considered is a necessity as cascading is real slow now, mostly due to the calls to TypeVariableBindings. What I did work, but I think I found an issue in the TCK: https://github.com/beanvalidation/beanvalidation-tck/pull/149 .

HV-1437
These are memory footprint improvements. The idea was mostly to reduce the size of the metadata. The example reported by Stuart is kinda extreme: see https://github.com/keycloak/keycloak/blob/master/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RealmEntity.java .
6.0 was already better than 5.x as I introduce the CollectionHelper.toImmutable* utilities: they trim down the empty and one element collections to the minimum but there was still some room for improvements.
All in all, we reduced the BeanMetaDataImpl of RealmEntity from ~177 kB in the original snapshot of Stuart (using 5.x) to ~60 kB (using this branch).
I'll post something on the list about some other things I'd like to discuss.
HV-1439
Benchmark improvements
The benchmarks were a bit painful to use when you wanted to compare closely 2 versions and switch from one to the other.
I pushed some clean ups to them.
I also removed the iterative benchmarks which were useless.
Some runtime performance improvements
Nothing big but a few things I noticed while benchmarking and it definitely improved the performances.
Quite a lot of parsing/metadata building improvements
The situation was quite bad here so I made quite a lot of improvements to reduce the startup cost of HV.
HV-1443
A small fix required by the other changes.

@gunnarmorling force pushed an update fixing your remarks.
I answered to the others, let me know if there's something else you want me to fix.

@gunnarmorling added 2 more commits to remove the metadata of the unconstrained methods (one is purely cosmetic).

repo: hibernate/hibernate-validator


text:
🛑 Mad at the Internet is down

In 9c3642d, Mad at the Internet (https://madattheinternet.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mad at the Internet is back up in c761d05 after 2 hours, 40 minutes.

repo: hickoryhouse/kf

license: MIT


text:
🛑 kiwifarms.hk is down

In 12acc4a, kiwifarms.hk (https://kiwifarms.hk) was down:

HTTP code: 0
Response time: 0 ms

Resolved: kiwifarms.hk is back up in 74de7f5 after 10 minutes.


text:
🛑 Mad at the Internet is down

In 3a0a780, Mad at the Internet (https://madattheinternet.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mad at the Internet is back up in c634266 after 4 minutes.


text:
Unhandled Redix error

It seems like this error is caused by trying to access a key that doesn't exist, at least acording to my quick digging. If its any help to you, we are using https://github.com/upstash/ratelimit.
10:42:46.423 [error] #PID<0.14839.0> running Srh.Http.BaseRouter (connection #PID<0.14837.0>, stream id 1) terminated
Server: example.example.svc.cluster.local:80 (http)
Request: POST /
** (exit) an exception was raised:
    ** (KeyError) key :message not found in: %Redix.ConnectionError{reason: :closed}
        (srh 0.1.0) lib/srh/http/command_handler.ex:160: Srh.Http.CommandHandler.dispatch_command/2
        (srh 0.1.0) lib/srh/http/base_router.ex:16: anonymous fn/2 in Srh.Http.BaseRouter.do_match/4
        (srh 0.1.0) lib/plug/router.ex:246: anonymous fn/4 in Srh.Http.BaseRouter.dispatch/2
        (telemetry 1.1.0) /app/deps/telemetry/src/telemetry.erl:320: :telemetry.span/3
        (srh 0.1.0) lib/plug/router.ex:242: Srh.Http.BaseRouter.dispatch/2
        (srh 0.1.0) lib/srh/http/base_router.ex:1: Srh.Http.BaseRouter.plug_builder_call/2
        (plug_cowboy 2.5.2) lib/plug/cowboy/handler.ex:12: Plug.Cowboy.Handler.init/2
        (cowboy 2.9.0) /app/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2

Hi! At a first glance from this error, the actual Redis connection is dying and is closed. I will take a look to see if I can replicate this - I am getting a null response on non-existant keys. Could you provide some reproduction steps?

If you want a fairly exact replication of our deployment, we are using this helm chart https://github.com/waldo-vision/waldo-helm/tree/main/charts/http-redis.

Thank you. I will work on replicating and push up a patch when I find the issue!

I've done some local work, and I have upstash/ratelimit working properly. The error seems to originate from the actual Redis connection being closed - there is an unhandled client error response case that I'm going to fix, but the actual Redis closing potentially could be more on the Redis going down / losing connection? I'm not quite sure - there obviously could be a lot of complexity in the setup of how it's talking to Redis.
Hopefully this new case I'm going to add will provide more insight to the underlying Redix error and why it might've closed
The code inside SRH automaticaly re-builds the pool when it goes down. So on the next request it will re-build the pool and attempt new connections. I will take a look at the Helm chart and see if I can reproduce within a K8s cluster and spot anything there.

Alright, thanks for really digging into this, I honestly can't express how grateful I am for this level of support. If you need anything else, just let me know.

No worries, I use this in production at my work so it's in my best interest to fix anything that comes up :)
I will leave this issue open until I improve the error handling for this error.
Thanks for using it!

Can I access this database through a public ip address? Why does my access keep failing

Hi @hiett , similar issue here, while the Redis instance is working fine. I can provide non minimal repro on the Devographics monorepo, but I am not doing anything fancy:

Run Redis, run SRH
Query a key that do not exist yet (haven't tried with existing key)

Redis and SRH are running fine, but the underlying Redis instance is not hit. Perhaps I've messed up the Redis connection string?
    docker run \
    --rm \
    -p 8080:80 \
    --label srh \
    -e SRH_MODE=env \
    -e SRH_TOKEN=fake-dev-token \
    -e SRH_CONNECTION_STRING="redis://localhost:6379" \
    hiett/serverless-redis-http:latest
    ```

@eric-burel Thanks for reaching out - this seems to be a misconfiguration issue.
In Docker, localhost refers to inside the container, not the host network - so your container is looking "internally" for 6379, rather than via the network.
There are a few simple solutions to this:

Run redis & srh in a docker compose, whereby they're in the same Docker network, so you can address via the hostname, e.g. redis
Use host.docker.internal if on an OS that supports it

You can read more about this networking situation with Docker at https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
For Kubernetes, if you are in the same namespace, you can just address via the service name. This is similar to the docker shared network approach.
The example for Docker Compose (https://github.com/hiett/serverless-redis-http#via-docker-compose) illustrates this approach
Hope this helps!

Long time since I used Docker sorry ':D works better now

authors: Huskydog9988 ecustspace eric-burel hiett

repo: hiett/serverless-redis-http


text:
(vb.net) a smaller than sign in a comment crashes all following highlighting

Describe the issue
A simple comment including a smaller than sign < will make all following code lines formatted as comments.
Which language seems to have the issue?
The issue is with VB.NET (probably but not tested the same issue with vbscript).
Are you using highlight or highlightAuto?
Using highlight (via tag associations on SO)
Sample Code to Reproduce
'rule 1: column A allows only text length < 9
Set AffectedCells = Intersect(Target, Target.Parent.Range("A:A"))

as shown in this filddle: https://jsfiddle.net/pcrcoding/4bcxaot0/
Expected behavior
I expect lines that start with a ' or REM  to handle the entire line until line break as coment and end comment formatting at the line break. The expected behaviour would be the one seen in this post at "Sample Code to Reproduce"
Additional context
Also check https://github.com/highlightjs/highlight.js/issues/2851 for the REM .

Confirm. It’s seen as the opening of a doctag which is never closed.  Probably still should terminate at line end either way.

Right now at a glance I'd say we're doing comments all wrong in VB.net.  Since doctags really only exist inside ''' comments, correct?

@joshgoebel If you are talking about the XML documentation comments, yes they all start with ''' and end with the line break.
I linked the documentation below:
https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/program-structure/documenting-your-code-with-xml

authors: joshgoebel pcr-coding


text:
Link preview position

Sometimes link previews' position looks glitchy.

Reducing the max-height of .anchor-tag__popover should fix this.

repo: hikerpig/gatsby-project-kb


text:
Logger missing attribution required by CC-BY-SA license

While I don't particularly care whether my code is taken and transformed beyond recognition, it would have been nice to include a little comment somewhere, acknowledging the original work this code is clearly based on, which was published on Code Review Stack Exchange 2014-09-28 under a CC-BY-SA license (i.e. attribution required) and can be found here.
Cheers!

The VbaLogger was developed and completed long before your post. It's just that because of the infrequent commits it was committed later. The author has never looked at that code at all. This is all original work.

authors: hilkoc retailcoder

repo: hilkoc/vbaDeveloper


text:
[question] Episodic Rewards in A2C vs. PPO2

Hi,
Is there any reason that two different functions are used to report epsidoc rewards in A2C and PPO? can 'episode_reward' be used in PPO too or "ep_rewmean" in A2C?
And to report  results, can either one be used?
Thanks

Hello,
One is used only to when tensorboard logging is activated ('episode reward'), the other one requires a Monitor wrapper (cf examples). The main difference is that "ep_rewmean" will always report the original reward even when normalization is applied but 'episode reward' does not require any extra wrapping.

can 'episode_reward' be used in PPO too or "ep_rewmean" in A2C?

"ep_rewmean" will be added in #206 for A2C and "episode_reward" is already present in PPO2.

And to report results, can either one be used?

This is only training/logging data and should not be used to report results (related to  #199 ).

Thanks a lot.
Not really, showing how a method progresses during training is valid thing to do in RL especially for metric like sample efficiency.
https://arxiv.org/pdf/1709.06009.pdf

This is only training/logging data and should not be used to report results (related to #199 ).

authors: araffin rasoolfa

repo: hill-a/stable-baselines


text:
[feature request] RL algorithms supporting custom recurrent policies

Many RL algorithms handle recurrent and non-recurrent policies differently. Currently, this switch in behavior is achieved by testing whether the policy class is a subclass of LstmPolicy.
Examples:
./stable_baselines/a2c/a2c.py:101:                if issubclass(self.policy, LstmPolicy):
./stable_baselines/ppo1/pposgd_simple.py:249:                                      shuffle=not issubclass(self.policy, LstmPolicy))
./stable_baselines/acktr/acktr_disc.py:118:                if issubclass(self.policy, LstmPolicy):
./stable_baselines/her/her.py:88:            assert not issubclass(self.policy, LstmPolicy), "Error: cannot use a recurrent policy for the HER model."
./stable_baselines/acer/acer_simple.py:183:                if issubclass(self.policy, LstmPolicy):
./stable_baselines/ppo2/ppo2.py:113:                if issubclass(self.policy, LstmPolicy):
./stable_baselines/common/base_class.py:98:            assert not issubclass(self.policy, LstmPolicy) or self.n_envs == env.num_envs, \

All the recurrent policies implemented in Stable Baselines inherit from LstmPolicy, so this works OK for typical use cases. However, some users may want to define their own recurrent policies. Right now, we are forcing them to subclass from LstmPolicy, which is fairly restrictive.
I can see two main alternatives:

Add a new abstract class, RecurrentPolicy, which subclasses BasePolicy but does not define any methods. Switch all subclass checks to RecurrentPolicy. LstmPolicy inherits from RecurrentPolicy.
Add a class attribute, recurrent, and check for whether this is true or false rather than using issubclass.

Any preferences between those two, or any other ideas? I'm happy to work on a PR for this once  a design is agreed.

Pinging @erniejunior for that conversation, as he has been working on recurrent policies (see #158 and #161 recurrent policies with keras).

Sorry for answering so slowly! Thanks @AdamGleave for opening the issue. I agree with you that the way we handle recurrent policies does need some rework:
Distinguishing between recurrent and non-recurrent policies is important. What sets them apart from other policies is not their recurrence but rather that they have some kind of state. Therefore I would vote for distinguishing between stateless and stateful (is that a word?) policies.
I have no strong opinion on the flag vs. subclass decision but I would lean slightly more towards option 2 (which you seem to already have implemented). What do you think about the following idea?: make the BasePolicy stateful by default. A stateless policy would then just return and accept None states. A rough sketch would be:
class BasePolicy:
    ...
    @property
    def initial_state():
        return #None if stateless, numpy array if stateful with fixed initial state, tf.Variable if learned initial state

    def is_stateless():
        return self.initial_state is None

    def step(observation, state=None):
        # Stateless policies just ignore the state argument

Actually that the way we have it implemented is already quite close to this: BasePolicy has the state as an argument to the step method. For some reason the initial state is a member of ActorCriticPolicy. We need to move this up to the BasePolicy and make it a property (to make clear that it is not writable).
While we are at it we should clean up (or at least properly document) the rest of the policy interface as well. Looking through the code of PPO2 I found that it accesses member variables of the policy such as states_ph, masks_ph, proba_step, value and initial_state. I think we have not documented what those members are supposed to mean/contain and I also think that we should turn them into documented properties of BasePolicy or ActorCriticPolicy (e.g. it took me a while to figure out what the masks_ph actually does because it is badly named and not documented).
When I played around with the LSTM policies the results were mediocre at best and I dropped them in favor of linear policies with an observation history. Maybe we should introduce some tests to check if recurrent policies really do perform better than linear policies. Is there some simple benchmark environment that requires learning n-step dependencies? This would not just check if recurrence is better but also if our implementation is even correct at all.
Before you start (re)implementing LSTMs be aware that right now they are a mess in tensorflow (see my issue here tensorflow/tensorflow#24850) and maybe it is worth to wait for the 2.0 API. I found that execution speed varies widely which we also should keep in mind!

Maybe related: https://github.com/openai/baselines/pull/859

@erniejunior thanks for this comment. I agree with distinguishing based on statefulness rather than recurrence; I'll rename the recurrent attribute to stateful. Also agree with suggested changes to BasePolicy. At a conference now so may not have time to work on this until later in the week, but will try and mock up some changes.
I'm not sure if I'll have bandwidth to make other changes to the policy interface, but I'll try and clear things up a bit.
Thanks for the helpful notes on LSTM polices. In my case I'm finetuning some existing policies (which are LSTM policies), which is why I wanted a custom policy class, but I'll bear this in mind when I have a choice over architecture.
Not aware off the top of my head of any standard benchmarks that require arbitrary n-step dependencies. Maybe maze navigation tasks? If you slowed down the agent / made the corridors longer, then it would require a larger observation history, but wouldn't need more memory / hidden state.

Maybe we should introduce some tests to check if recurrent policies really do perform better than linear policies. Is there some simple benchmark environment that requires learning n-step dependencies?
Not aware off the top of my head of any standard benchmarks that require arbitrary n-step dependencies.

For those kind of benchmark, I've got some for you ;)
First for debugging, I would suggest removing velocity from observation in environment like CartPole or MountainCar (and check that a feedforward net is not working without frame-stacking).
Then, for assessing the performance, I would go for Atari games when applicable (start with the simple Pong) without frame-stacking.

Therefore I would vote for distinguishing between stateless and stateful (is that a word?) policies.

I find the name stateful a bit confusing, as you can have stateless LSTM... (see here or here.
What was wrong with the word recurrent?
Pinging @hill-a for that kind of API big choices.

I was confused by stateful too at first. But apparently it is a common term in computer science. I would be OK to switch it to stateless and invert the logic if you think we should stick to more common English words.
When I understand the stateless keras LSTMs correctly they would be exactly the reason why we should distinguish between stateful/stateless instead of recurrent/non-recurrent. There can be recurrent networks that have no state and I also could think of policies with state that are not recurrent (e.g. when you want to do frame stacking in your policy instead of the environment).

I really do not like stateful or stateless as names, why not just call them what they are: state policy and base policy?
As for the solution, the OOP dev in me is not happy, but I still strongly agree with the proposed solution. of defining a default initial_state() -> None function that needs to be overrided for correct usage.

I really do not like stateful or stateless as names, why not just call them what they are: state policy and base policy?

Any particular reason you do not like stateful and stateless? I am not particularly fond of them either but by naming them this way we make very clear that the state in this context refers to the internal state of the policy and not the system state of our MDP. Not knowing about policies with internal state I might interpret StatePolicy as a policy that acts directly on environment states instead of just observations. What do you think about uses_internal_state or has_internal_state or simply has_state?

As for the solution, the OOP dev in me is not happy, but I still strongly agree with the proposed solution. of defining a default initial_state() -> None function that needs to be overrided for correct usage.

I feel with you here ;-)
I had the following use case in mind: what if I write some code that has to deal with a number of policies. Some are with state. Some are stateless. The only way to not have to deal with stateful policies as an edge case is to just treat all policies as stateful -- some just always stay in the same None state. The only place left where we have to distinguish between stateful and stateless policies is during training because here we need to arrange the batches differently.

I don't have a strong opinion on whether to call it stateful or recurrent, happy to go with whatever you all prefer.
I agree from an OO perspective the class structure doesn't make much sense. A stateless class being a degenerate case of a stateful class seems OK though.

@AdamGleave @hill-a @erniejunior
It seems we need to vote otherwise, it won't advance...
If there is a tie, either we hope people from the community to help us decide, otherwise we can let @hill-a have the final word as owner of this repo.
Then (correct me if I'm wrong), the candidates are:

recurrent
stateful
other?

I vote for recurrent.

My vote is for recurrent, since when I hear state in the context of RL I tend to think of the MDP state. However, I'd change my mind if there was an example of a policy that needed state that was not recurrent.

My vote is for stateful or has_memory or has_state. With the reasoning that

There somehow seem to be stateless LSTM.
A policy does not have to be a neural network. It could be any program that computes an action from an observation. If that program uses persistent memory instead of just acting like a (mathematical) function we would say that is has a memory or it is based on a state. Only in the (arguably currently dominating) field of neural networks this circumstance is referred to as recurrence. By using the term recurrent we implicitly assume that all policies are neural networks. At least we should be aware of this.
A practical example of a non-recurrent NN policy with state would be a policy that bases its action prediction on the last n obersvations. It could keep those last n observations in its state. Right now I use dirty hacks where I modify or wrap an environment to do the observation stacking for me.
recurrent refers to the internal structure of the policy which is not what matters in our context. The fact that we need to pass a state is the important thing here.

So far recurrent has two votes and stateful one vote. @hill-a do you want to weigh in / cast the deciding vote? I'd like to get this PR merged soon :)

Sorry, I was trying to understand stateless LSTMs before voting. It seems that stateless LSTMs have an internal state
(https://datascience.stackexchange.com/questions/36440/whats-the-difference-of-stateless-lstm-and-a-normal-feed-forward-nn)
It's just not preserved between batches.
(https://github.com/keras-team/keras/blob/master/keras/layers/recurrent.py#L2121 and https://github.com/keras-team/keras/blob/master/keras/engine/base_layer.py#L46)
In our case stateless LSTMs dont make that much sense I think. So I would prefere sticking to recurrent, as the only way to achieve recurrency would be with an internal state with Reinforcement learning.

There somehow seem to be stateless LSTM.

as @hill-a stated, those have still an internal state that is dropped between batches.

A policy does not have to be a neural network.

On that point, I totally agree, you can parametrize your policy in many different ways. However, in the current state of the lib, we have only neural network policies and provide only recurrent policies (LSTM here) that derive from the base class.

At least we should be aware of this.
NN policy with state would be a policy that bases its action prediction on the last n obersvations. It could keep those last n observations in its state.
The fact that we need to pass a state is the important thing here.

Good point @erniejunior , then we should state explicitly in the docstring of the class what it can do, even so the current lib only provide recurrent policies.

recurrent refers to the internal structure of the policy which is not what matters in our context.

I disagree with that last point, as "recurrent" can also refer to recurrence relation which just says that it needs previous terms in order to compute the current one.

closed by #244 being merged

authors: AdamGleave araffin erniejunior hill-a


text:
🛑 Main Page is down

In 828b915, Main Page (https://hinzwifi.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Main Page is back up in 203a3a8 after 8 minutes.

repo: hinzwifi/uptime-hinz


text:
🛑 μlogger is down

In 945188e, μlogger (https://gps.hinzwifi.xyz/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: μlogger is back up in cd0450b.


text:
test/net/integration/http fails because the response is not parsed correctly

Hello,
test/net/integration/http (master branch) fails sometimes (approx. once every ten runs) in my box (specs at the end). This seems to happen when the HTTP response is split into too many packets (see the TCP dump below). There seem to be two issues happening:
(1) the HTTP response is (sometimes) ended before parsing the last packet. Specifically, end_response in client_connection.cpp is called too early.
(2) the response is not parsed correctly and the body includes some lines that should belong to the header. Specifically, https://github.com/hioa-cs/IncludeOS/blob/master/src/net/http/client_connection.cpp#L98 is treating the last packet, that has a portion of the header and the body, as just the body.
Here is the output of test.py when failing because of issue (1) (service.cpp was slightly changed to print the response and body before the failing assert):
<vm>      [ Kernel ] Starting HTTP Test Service
<vm> ================================================================================
<vm> ================================================================================
<vm>  IncludeOS v0.10.0-dirty
<vm>  +--> Running [ HTTP Test Service ]
<vm> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<vm> [ Super stack ] Constructing stacks
<vm> [ Super stack ] Creating stack for Nic eth0
<vm>       [ Inet4 ] Bringing up a IPv4 stack
<vm>       [ Inet4 ] Network configured
<vm>                 IP: 		10.0.0.44
<vm>                 Netmask: 	255.255.255.0
<vm>                 Gateway: 	10.0.0.1
<vm>                 DNS Server: 	8.8.8.8
<vm>      [ Client ] Testing against local server
<vm>      [ Client ] Testing against Acorn
<vm> Response: ===============================> printing the full response before doing the checks.
<vm> HTTP/1.0 200 OK
<vm> Server: BaseHTTP/0.3 Python/2.7.12
<vm> Date: Wed, 05 Apr 2017 19:04:02 GMT
<vm> Content-type: text/plain:
<vm>
<vm> Body:
<vm> ===============================> body is empty
<vm>                 [x] No error
<vm> assertion "res->body() == "/testing"" failed: file "/root/IncludeOS/test/net/integration/http/service.cpp", line 56, function: auto Service::ready()::(anonymous class)::operator()(type-parameter-0-0, type-parameter-0-1) const
<vm> !!! Kill PID: 1, SIG: 6 - IOT trap / ABORT

Here is is the tcpdump for bridge43 for a case of issue (1). The last packet is not included in the HTTP response and that seems to be the reason for the failure.
19:18:47.659514 c0:01:0a:00:00:2a (oui Unknown) > c0:01:0a:00:00:01 (oui Unknown), ethertype IPv4 (0x0800), length 54: 10.0.0.44.57134 > 10.0.0.1.9011: Flags [.], ack 1, win 65535, length 0
        0x0000:  4500 0028 0000 0000 4006 66a4 0a00 002c  E..(....@.f....,
        0x0010:  0a00 0001 df2e 2333 1814 4399 df93 89d8  ......#3..C.....
        0x0020:  5010 ffff d42c 0000                      P....,..
19:18:47.659576 c0:01:0a:00:00:2a (oui Unknown) > c0:01:0a:00:00:01 (oui Unknown), ethertype IPv4 (0x0800), length 146: 10.0.0.44.57134 > 10.0.0.1.9011: Flags [P.], seq 1:93, ack 1, win 65535, length 92
        0x0000:  4500 0084 0000 0000 4006 6648 0a00 002c  E.......@.fH...,
        0x0010:  0a00 0001 df2e 2333 1814 4399 df93 89d8  ......#3..C.....
        0x0020:  5018 ffff b3d5 0000 4745 5420 2f74 6573  P.......GET./tes
        0x0030:  7469 6e67 2048 5454 502f 312e 310d 0a55  ting.HTTP/1.1..U
        0x0040:  7365 722d 4167 656e 743a 2049 6e63 6c75  ser-Agent:.Inclu
        0x0050:  6465 4f53 2f30 2e39 0d0a 436f 6e6e 6563  deOS/0.9..Connec
        0x0060:  7469 6f6e 3a20 636c 6f73 650d 0a48 6f73  tion:.close..Hos
        0x0070:  743a 2031 302e 302e 302e 313a 3930 3131  t:.10.0.0.1:9011
        0x0080:  0d0a 0d0a                                ....
19:18:47.659591 c0:01:0a:00:00:01 (oui Unknown) > c0:01:0a:00:00:2a (oui Unknown), ethertype IPv4 (0x0800), length 54: 10.0.0.1.9011 > 10.0.0.44.57134: Flags [.], ack 93, win 29200, length 0
        0x0000:  4500 0028 29ce 4000 4006 fcd5 0a00 0001  E..().@.@.......
        0x0010:  0a00 002c 2333 df2e df93 89d8 1814 43f5  ...,#3........C.
        0x0020:  5010 7210 1447 0000                      P.r..G..
19:18:47.659893 c0:01:0a:00:00:01 (oui Unknown) > c0:01:0a:00:00:2a (oui Unknown), ethertype IPv4 (0x0800), length 71: 10.0.0.1.9011 > 10.0.0.44.57134: Flags [P.], seq 1:18, ack 93, win 29200, length 17
        0x0000:  4500 0039 29cf 4000 4006 fcc3 0a00 0001  E..9).@.@.......
        0x0010:  0a00 002c 2333 df2e df93 89d8 1814 43f5  ...,#3........C.
        0x0020:  5018 7210 1458 0000 4854 5450 2f31 2e30  P.r..X..HTTP/1.0
        0x0030:  2032 3030 204f 4b0d 0a                   .200.OK..
19:18:47.659958 c0:01:0a:00:00:2a (oui Unknown) > c0:01:0a:00:00:01 (oui Unknown), ethertype IPv4 (0x0800), length 54: 10.0.0.44.57134 > 10.0.0.1.9011: Flags [.], ack 18, win 65535, length 0
        0x0000:  4500 0028 0000 0000 4006 66a4 0a00 002c  E..(....@.f....,
        0x0010:  0a00 0001 df2e 2333 1814 43f5 df93 89e9  ......#3..C.....
        0x0020:  5010 ffff d3bf 0000                      P.......
19:18:47.659975 c0:01:0a:00:00:01 (oui Unknown) > c0:01:0a:00:00:2a (oui Unknown), ethertype IPv4 (0x0800), length 90: 10.0.0.1.9011 > 10.0.0.44.57134: Flags [P.], seq 18:54, ack 93, win 29200, length 36
        0x0000:  4500 004c 29d0 4000 4006 fcaf 0a00 0001  E..L).@.@.......
        0x0010:  0a00 002c 2333 df2e df93 89e9 1814 43f5  ...,#3........C.
        0x0020:  5018 7210 146b 0000 5365 7276 6572 3a20  P.r..k..Server:.
        0x0030:  4261 7365 4854 5450 2f30 2e33 2050 7974  BaseHTTP/0.3.Pyt
        0x0040:  686f 6e2f 322e 372e 3132 0d0a            hon/2.7.12..

====> This next packet is ignored by the HTTP client.

19:18:47.660047 c0:01:0a:00:00:01 (oui Unknown) > c0:01:0a:00:00:2a (oui Unknown), ethertype IPv4 (0x0800), length 127: 10.0.0.1.9011 > 10.0.0.44.57134: Flags [FP.], seq 54:127, ack 93, win 29200, length 73
        0x0000:  4500 0071 29d1 4000 4006 fc89 0a00 0001  E..q).@.@.......
        0x0010:  0a00 002c 2333 df2e df93 8a0d 1814 43f5  ...,#3........C.
        0x0020:  5019 7210 1490 0000 4461 7465 3a20 5765  P.r.....Date:.We
        0x0030:  642c 2030 3520 4170 7220 3230 3137 2031  d,.05.Apr.2017.1
        0x0040:  393a 3138 3a34 3720 474d 540d 0a43 6f6e  9:18:47.GMT..Con
        0x0050:  7465 6e74 2d74 7970 653a 2074 6578 742f  tent-type:.text/
        0x0060:  706c 6169 6e0d 0a0d 0a2f 7465 7374 696e  plain..../testin
        0x0070:  67                                       g

This is the output of a run failing because of issue (2):
<vm>       [ Inet4 ] Bringing up a IPv4 stack
<vm>       [ Inet4 ] Network configured
<vm>                IP:             10.0.0.44
<vm>                 Netmask:        255.255.255.0
<vm>                 Gateway:        10.0.0.1
<vm>                 DNS Server:     8.8.8.8
<vm>      [ Client ] Testing against local server
<vm>      [ Client ] Testing against Acorn
<vm> Response:
<vm> HTTP/1.1 1866664461 Internal Server Error
<vm> Server: BaseHTTP/0.3 Python/2.7.12
<vm>
<vm> Date: Wed, 05 Apr 2017 20:25:07 GMT
<vm> Content-type: text/plain
<vm>
<vm> /testing
<vm> Body: ===============================> body includes some header stuff like Content-Type
<vm> Date: Wed, 05 Apr 2017 20:25:07 GMT
<vm> Content-type: text/plain
<vm>
<vm> /testing
<vm>                 [x] No error
<vm> assertion "res->body() == "/testing"" failed: file "/root/IncludeOS/test/net/integration/http/service.cpp", line 56, function: auto Service::ready()::(anonymous class)::operator()(type-parameter-0-0, type-parameter-0-1) const
<vm> !!! Kill PID: 1, SIG: 6 - IOT trap / ABORT

As another datapoint, this hacky change "fixes" the test (no failures in 50 runs). I'm not suggesting this change as the actual fix (it's just a datapoint).
--- a/src/net/http/client_connection.cpp
+++ b/src/net/http/client_connection.cpp
@@ -86,17 +86,11 @@ namespace http {
     else
     {
       // this is the case when Status line is received, but not yet headers.
-      if(res_->header().is_empty() && req_->method() != HEAD)
+      if(req_->method() != HEAD)
       {
         *res_ << data;
         res_->parse();
       }
-      // here we assume all headers has already been received (could not be true?)
-      else
-      {
-        // add chunks of body data
-        res_->add_chunk(data);
-      }
     }

     const auto& header = res_->header();
@@ -121,8 +115,6 @@ namespace http {
         catch(...)
         { end_response({Error::INVALID}); }
       }
-      else
-        end_response();
     }
     else if(req_->method() == HEAD)
     {
@@ -158,7 +150,7 @@ namespace http {
       auto callback = std::move(on_response_);
       on_response_.reset();
       timer_.stop();
-      callback(Error::CLOSING, std::move(res_));
+      callback(Error::NONE, std::move(res_));
     }

     client_.close(*this);

Just in case, this can be reproduced in a Lenovo x1 carbon (Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz), RHEL 7.3, 3.10.0-514.10.2.el7.x86_64. Let me know if you can't reproduce it and need some more info (or tests).
Thanks,
Ricardo

Thanks for a really detailed report! I will look into it.

The hacky change you posted was how it looked before, it's just so expensive. It means we need to concat the response string with the new chunk, and the re parse the whole response again, for every response. It's OK in the test case, but when the responses starts to get a lot of payload it gets really ugly. The problem is the way we parse and concat the response is not good enough. Any ideas on how to improve it are welcome!

If I understands the http_parser correctly it seems the on_headers_complete callback can be used to determine. I tried adding a bool for this (see 	3ac1abf). I ran the test plenty of times without any issue. Would you mind trying?
There are still some changes that can be done on how to build a HTTP response/request, but I'm not sure how yet.

Thanks Andreas. Tested your dev branch and it works (no failures in 50 runs).

Happy to help :) Thanks for thoroughly testing!

authors: AndreasAakesson ricarkol

repo: hioa-cs/IncludeOS


text:
test/tcp sometimes stop on step 3: HUGE string

Test SOMETIMES stops at Step #3: HUGE string.
VM (Virtualbox):
...
       [ TEST ] SMALL string (600)
                [x] conn.read() == small
                + Enabling IRQ 0, mask: 0xfbfa
[ IRQ manager ] Updated subscriptions: 0x401 irq: 0
       [ TEST ] BIG string (6000)
                [x] conn.read() == big
       [ TEST ] HUGE string (60000)
// stops here

Python:
$ python test.py 127.0.0.1 127.0.0.1
connecting to 127.0.0.1 port 8081
closing socket
connecting to 127.0.0.1 port 8082
closing socket
connecting to 127.0.0.1 port 8083
// stops here

If exiting the test, and start again, it works fine.
Possible errors:

python script
TCP implementation
Buffer solution inside test service. class Buffer
The event loop that fills/reads the buffer.
My computer

Reproduce/Solution:
Start test and :pray: to RNG jesus

This is probably due congestion. Currently improving TCP with slow start and fast recovery, hopefully the problem will be solved.

This was due to checksum failure. Solved with 7eaeed6


text:
Install dependencies before codeql analysis

WHAT

Install dependencies before the CodeQL analysis in GitHub Action.

WHY

To use custom build process.

it looks like..., the CodeQL does not support deno (typescript) yet. 😢
So, I just close this PR because it seems that this change does not affect anything on the CodeQL analysis. 😥

repo: hirakiuc/event-poll-bot


text:
[DX] Fix React Developer Tools showing all components as "Anonymous"

Is your feature request related to a problem? Please describe.
It is hard for new contributors (like me) to start giving a hand since almost all the components are shown as Anonymous in React Developer Tools (Components tab). It could be hard to find how a component is named and edit its file.

Describe the solution you'd like
This issue is present for all memo'ed components.
There are two solutions to solve this.
Solution 1: Moving React.memo to the export default. This may not be a solution for all components, that's why I would go with solution number 2.

Describe alternatives you've considered
Solution 2: Adding ComponentName.displayName = "ComponentName" for exportoed components, restarting tthe Next.js app, and checkign again the Components tab from React Developer Tools.

displayName is used in development builds as it is removed through dead-code elimination on production builds and should not be relied on within your application.
Additional context
I think this one of the features that will greatly improve the Developer Experience.

Hi, thanks for reporting this.
We've done a refactor of the UI layer. Would you mind reviewing if this issue is gone please?

authors: andresgalante drackosh

repo: hirosystems/explorer


text:
🌱 update to go 1.21

this commit updates to go 1.21

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:

[ ] squash commits
[ ] include documentation
[ ] add unit tests

@batistein do you have anything to add?

@kranurag7 what about linting? I saw that no linter was triggered.. Usually a golang update also requires adjusting go code..

The linting is embedded in make verify target.
Ref: https://github.com/hivelocity/hivelocity-cloud-controller-manager/actions/runs/6676009895/job/18144641479?pr=26#step:4:16

please check the golangci lint: https://github.com/hivelocity/hivelocity-cloud-controller-manager/blob/main/.golangci.yaml#L99-L101
This needs to be updated as well

authors: batistein janiskemper kranurag7


text:
Use HTTPS for scripts

hivemq-mqtt-web-client could not be hostet under a https Site because many scripts were referenced at http-locations. This PR fixes that.

@schaebo Do you know who can I ping when a PR is dangling w/o a reaction? :-D

@dajudge you pinged the right person.
@cla-bot check

authors: dajudge schaebo

repo: hivemq/hivemq-mqtt-web-client


text:
Baichuan-13B-Chat LoRA SFT loss cannot decrease when training within refgpt_zh_p1 and refgpt_zh_p2 datasets

@hiyouga Hi, could you please give some advice for this issue?
python src/train_bash.py \
    --stage sft \
    --model_name_or_path baichuan-inc/Baichuan-13B-Chat \
    --lora_target W_pack \
    --prompt_template baichuan \
    --do_train \
    --dataset refgpt_zh_p1,refgpt_zh_p2 \
    --finetuning_type lora \
    --output_dir llm_checkpoint/LLaMA-Efficient-Tuning/baichuan-13b-sft-refgpt \
    --overwrite_cache \
    --per_device_train_batch_size 4 \
    --gradient_accumulation_steps 4 \
    --lr_scheduler_type cosine \
    --logging_steps 10 \
    --save_steps 2000 \
    --learning_rate 5e-5 \
    --num_train_epochs 10.0 \
    --plot_loss \
    --fp16

{'loss': 1.2533, 'learning_rate': 4.999999987366907e-05, 'epoch': 0.01}
{'loss': 1.2285, 'learning_rate': 4.999998976719485e-05, 'epoch': 0.01}
{'loss': 1.2225, 'learning_rate': 4.999995439454585e-05, 'epoch': 0.01}
{'loss': 1.2278, 'learning_rate': 4.999990095661131e-05, 'epoch': 0.02}
{'loss': 1.2074, 'learning_rate': 4.999981757834978e-05, 'epoch': 0.02}
{'loss': 1.2808, 'learning_rate': 4.999970893408749e-05, 'epoch': 0.02}
{'loss': 1.232, 'learning_rate': 4.999957502393421e-05, 'epoch': 0.03}
{'loss': 1.2317, 'learning_rate': 4.99994158480253e-05, 'epoch': 0.03}
{'loss': 1.195, 'learning_rate': 4.999925098761864e-05, 'epoch': 0.03}

...

{'loss': 1.2549, 'learning_rate': 3.85987575146203e-05, 'epoch': 3.18}
{'loss': 1.2446, 'learning_rate': 3.857766132503218e-05, 'epoch': 3.18}
{'loss': 1.2179, 'learning_rate': 3.8556551413215864e-05, 'epoch': 3.18}
{'loss': 1.2061, 'learning_rate': 3.8535427800506035e-05, 'epoch': 3.19}
{'loss': 1.2184, 'learning_rate': 3.8514290508251214e-05, 'epoch': 3.19}
{'loss': 1.2735, 'learning_rate': 3.8493139557813763e-05, 'epoch': 3.19}
{'loss': 1.242, 'learning_rate': 3.847197497056982e-05, 'epoch': 3.2}
{'loss': 1.2458, 'learning_rate': 3.8450796767909326e-05, 'epoch': 3.2}

Have you updated your Baichuan model files?

@hiyouga This commit of Baichuan modeling was employed. Should I update it to the latest version?
https://huggingface.co/baichuan-inc/Baichuan-13B-Chat/blob/f5f47be2adbbdceb784f334d6fa1ca2c73e65097/modeling_baichuan.py
By the way, I'm wondering how to set the hyper parameters (such as learning_rate and gradient_accumulation_steps) of Baichuan-13B-Base and Baichuan-13B-Chat properly during SFT with custom datasets. Could you please give some advice?

Sure, you should update the model file to the latest version.
I recommend using learning_rate=3e-5 with a total batch size of 16 in SFT.

@hiyouga Thanks. I'll try it out. Do you have plan to support Tensor Parallel and Pipeline Parallel during model training?

Please use deepspeed for distributed training.

@hiyouga This commit of Baichuan modeling was employed. Should I update it to the latest version? https://huggingface.co/baichuan-inc/Baichuan-13B-Chat/blob/f5f47be2adbbdceb784f334d6fa1ca2c73e65097/modeling_baichuan.py
By the way, I'm wondering how to set the hyper parameters (such as learning_rate and gradient_accumulation_steps) of Baichuan-13B-Base and Baichuan-13B-Chat properly during SFT with custom datasets. Could you please give some advice?

@hiyouga Hi, The training loss looks like to decrease using the latest version.
Thanks for your advice. Automatic Tensor Parallelism (https://www.deepspeed.ai/tutorials/automatic-tensor-parallelism/) has been supported by DeepSpeed (after v0.9.3). However,  DeepSpeed suffers from some issues for Llama support (https://github.com/microsoft/DeepSpeed/issues/3681). And it seems that pipeline parallelism is not compatible with ZeRO-2 and ZeRO-3 in deepspeed (https://deepspeed.readthedocs.io/en/latest/pipeline.html).
Megatron-DeepSpeed also supports 3D parallelism. I'm confusing which is a better choice between DeepSpeed and Megatron-DeepSpeed for distributed training considering performance and efficiency.
Moreover, I'm wondering whether bf16 will be more effective than fp16 during LORA training for Baichuan.
Could you please give some advice? Thanks.
{'loss': 1.108, 'learning_rate': 4.9999949467642495e-05, 'epoch': 0.01}
{'loss': 1.0652, 'learning_rate': 4.9999886302243484e-05, 'epoch': 0.01}
{'loss': 1.0389, 'learning_rate': 4.9999797870774244e-05, 'epoch': 0.01}
{'loss': 1.0278, 'learning_rate': 4.999968417332415e-05, 'epoch': 0.02}
{'loss': 1.0159, 'learning_rate': 4.99995452100081e-05, 'epoch': 0.02}
{'loss': 1.073, 'learning_rate': 4.999938098096655e-05, 'epoch': 0.02}
{'loss': 1.0235, 'learning_rate': 4.999919148636547e-05, 'epoch': 0.03}
{'loss': 1.0049, 'learning_rate': 4.999897672639636e-05, 'epoch': 0.03}
{'loss': 0.9644, 'learning_rate': 4.9998736701276295e-05, 'epoch': 0.03}

...

{'loss': 0.9272, 'learning_rate': 4.9573512141426694e-05, 'epoch': 0.59}
{'loss': 0.9734, 'learning_rate': 4.956887721279726e-05, 'epoch': 0.59}
{'loss': 0.9621, 'learning_rate': 4.9564217453695806e-05, 'epoch': 0.6}
{'loss': 0.9854, 'learning_rate': 4.955953286883171e-05, 'epoch': 0.6}
{'loss': 1.0031, 'learning_rate': 4.9554823462939445e-05, 'epoch': 0.6}
{'loss': 0.9441, 'learning_rate': 4.9550089240778556e-05, 'epoch': 0.6}
{'loss': 0.9763, 'learning_rate': 4.9545330207133664e-05, 'epoch': 0.61}
{'loss': 0.943, 'learning_rate': 4.9540546366814486e-05, 'epoch': 0.61}
{'loss': 0.9574, 'learning_rate': 4.9535737724655784e-05, 'epoch': 0.61}
{'loss': 0.961, 'learning_rate': 4.953090428551741e-05, 'epoch': 0.62}
{'loss': 0.969, 'learning_rate': 4.952604605428427e-05, 'epoch': 0.62}
{'loss': 0.9491, 'learning_rate': 4.952116303586631e-05, 'epoch': 0.62}

authors: hiyouga songkq

repo: hiyouga/LLaMA-Efficient-Tuning


text:
希望能恢复lora权重文件能生成.bin格式，新版本是.safetensors，希望能加入参数控制，llama.cpp的qlora要bin格式

Reminder

[X] I have read the README and searched the existing issues.

Reproduction
python src/train_bash.py
--stage pt
--model_name_or_path /hy-tmp/model/AquilaCode-multi
--do_train
--dataset my_code
--template aquila
--lora_target all
--finetuning_type lora
--output_dir sft_checkpoint_aquila
--overwrite_cache
--per_device_train_batch_size 4
--gradient_accumulation_steps 1
--lr_scheduler_type cosine
--logging_steps 1
--save_steps 100
--save_total_limit 10
--learning_rate 5e-5
--num_train_epochs 1000
--plot_loss
--fp16
--quantization_bit 4
Expected behavior
No response
System Info
No response
Others
No response

--save_safetensors False

--save_safetensors False

sft指令中加了这句话--save_safetensors False，最后生成模型的过程中报错。提示错误： --save_safetensors: 未找到命令

repo: hiyouga/LLaMA-Factory


text:
Dropped invalid example Issue

Reminder

[X] I have read the README and searched the existing issues.

System Info
llamafactory version: lastest
python 3.12
bitandbytes 0.43.1
hugginface-hub 0.23.3
gradio 4.36.1
jsonschema 4.22.0
xformers 0.026.post1
transfomers 4.41.2
Reproduction
I have tried to fine tune llama3 using LoRA with a private data set that is in json format, which I verified to ensure that it was in the correct format and still got this errors multiple times. when i tried to run alpaca demo dataset, it works fine. I could not figure out why.
error message:
WARNING - llamafactory.data.processors.supervised - Dropped invalid example
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
RuntimeError("Cannot find valid samples, check data/README.md for the data format.")
RuntimeError: Cannot find valid samples, check data/README.md for the data format.
example of my dataset format:
[
{
"instruction": "xxxx.",
"input": "xxx",
"output": {
"xxx": "xxx",
"xxx": {
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": 57,
"xxx": 25,
"xxx": null,
"xxx": 8,
"xxx": null,
"xxx": null,
"xxx": 32,
"xxx": 12
},
"xxx": {
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null
},
"xxx_xxx_xxx": {
"xxx_xxx": null,
"xxx_xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": null,
"xxx": 47,
"xxx": 22,
"xxx": null,
"xxx": 7,
"xxx": 2.6,
"xxx": 6.3,
"xxx": null,
"xxx": null
}
}
}
]
anyone can help or have any ideas why?
Expected behavior
No response
Others
No response

The value of output must be string.

Follow https://github.com/hiyouga/LLaMA-Factory/blob/main/data/README.md and make sure the value of output is a string

authors: hiyouga hzhaoy ndao600


text:
Ability to merge servers with own list

Hello!
It would be great to have ability to merge own servers.json (or an object) list with existing. For example I know some whois servers, that better match my requirements and existing server options don't allow to do it for me :disappointed:

Hi,
I see what you mean. I am thinking of exporting the SERVER variable. It's a simple change, and that should allow you to change the object as necessary before using the lookup function.

Thank you :+1:


text:
Handle hostname

to be rebased once https://github.com/hjr3/weldr/pull/77 is merged.
This PR adds the possibility to use hostnames as backends.
For example:
cargo run --bin weldr 127.0.0.1:9001 https://wiki-growth.herokuapp.com/ 127.0.0.1:9002

serves https://wiki-growth.herokuapp.com/ on http://127.0.0.1:9001
cargo run --bin weldr 127.0.0.1:9001 https://github.com/ 127.0.0.1:9002

serves github on http://127.0.0.1:9001
To completely support github, we still have to translate cookies.
The response header:
Set-Cookie:logged_in=no; domain=.github.com; path=/; expires=Wed, 25 Feb 2037 13:48:23 -0000; secure; HttpOnly

must be translated for the proxy host name / secure or not.
And all cookie request headers must also be translated.
I propose to add an issue for that and address this in another PR.

awesome! I was going to make this same change to store Url in the server.

I made the host mapping configurable, in a very simple way.
Now using heroku works like this:
cargo run --bin weldr 127.0.0.1:9001 https://wiki-growth.herokuapp.com/ 127.0.0.1:9002 true

I guess this is the minimal before starting a proper configuration.

Awesome! Thank you for all the work.


text:
🛑 Griffo is down

In 601f770, Griffo (https://www.griffo.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Griffo is back up in 77762b2 after 8 minutes.

repo: hjstrauss/MonitorMySites


text:
🛑 Reime ohne Sinn und Verstand is down

In 1e97af6, Reime ohne Sinn und Verstand (https://www.reimeohnesinnundverstand.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Reime ohne Sinn und Verstand is back up in e8d73f0 after 8 minutes.


text:
🛑 LM Bogen WSV is down

In 4de21fa, LM Bogen WSV (https://www.lmbogenwsv.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: LM Bogen WSV is back up in 4ea3b2f after 9 minutes.


text:
🛑 HJStrauss is down

In d4b6dc5, HJStrauss (https://www.hjstrauss.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: HJStrauss is back up in 0ce74ea after 31 minutes.


text:
🛑 Opa Hansi is down

In 5056bc8, Opa Hansi (https://www.opahansi.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Opa Hansi is back up in 60ee908 after 16 minutes.


text:
🛑 Reime ohne Sinn und Verstand is down

In 1654693, Reime ohne Sinn und Verstand (https://www.reimeohnesinnundverstand.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Reime ohne Sinn und Verstand is back up in c17ccd6 after 8 minutes.


text:
Dplochcoder patch 2

Launch DarknessRandomizer alongside HKSpoilerViewer updates.

Integrations need to come after Repository. (Also you don't need to duplicate dependencies in the integrations section, it's intended that anything that uses integrations will also use dependencies, although you can keep them if you like)

Done (and fixed the verify error too)

authors: dplochcoder flibber-hk

repo: hk-modding/modlinks


text:
loss is nan

我训练自己的数据，刚训练两分钟损失值就变成nan，请问这是什么原因导致的？

Sorry for the late reply, I am kind of busy recently.
There are a lot of possibilities for this case and I cannot find the reason just by loss is nan. Here are some common reasons:

Noisy data

Images containing no objects?
Noisy annotations?

Unreasonable settings

Data settings. Categories? Mappings?
Hyperparameters. Anchor settings? Mini-batch size? Dynamic R-CNN hyperparameters?

etc.

Maybe you can provide more detailed information (everything might be helpful). For example:

If you use the original Faster R-CNN with your data, is your loss normal?
Can you make sure that the settings are correct?
What kind of data you are using? Does it have some special properties which require some considerate hyperparameters?


text:
Optimize update package time

shell-command-to-string will run eg fish -c git instead of git. In my case, it takes a few seconds and lots of CPU to start the shell.

Given that you are likely to encounter this problem with many other plugins, I recommend that you just set shell-file-name. I've done the following for example:
(setq shell-file-name "/usr/local/bin/dash")

dash is quite fast

I just tried to set shell-file-name, but it seems to have no effect in the CLI tool.

My recommendation wasn't related to the CLI tool. I just meant that many Emacs plugins use shell-command-to-string indiscriminately so it's useful to have it set.

I approve of these changes, however, I'm a day or two away from publishing a rewrite Doom's CLI, which includes the replacement of doom-sh and a redesign of doom upgrade and doom update. I'll have to turn down this PR, but thank you for bringing it to my attention! It has inspired a few optimizations in the rewrite.

authors: hlissner rgrinberg xosdy

repo: hlissner/doom-emacs


text:
Fix page.attributes in "page load started" event

based on the test URL:
https://main--bitdefender--hlxsites.hlx.live/solutions/?cid=test&icid=test&adobe_mc_ref=test
Event page load started
page.attributes.domain should be helix.live
page.attributes.domainPeriod should be 2
page.info.referringURL is not taking into account the adobe_mc_ref parameter
(URL of the last page that lead to the loading of the current page from document.referrer
If the destinationURL has one of the following query parameters: ref or adobe_mc_ref then the value of the parameter will be used.
So, the referringURL value will be populated in this order:
adobe_mc_ref parameter -> ref parameter  -> document.referrer -> empty)
page.attributes.time is missing the day and time zone, example value: "12:03|12:00-12:59|monday|gmt +2"

page.attributes.domain should be hlx.live

authors: basecode lansami

repo: hlxsites/bitdefender


text:
Sticky navigation not set on middle of the screen

Sticky navigation is not in the middle of the screen
On bitdefender website

On main branch

Issue occurs only for huge screens


text:
[Lab Notes] "Table of content" Style links don't work

Table of content style links do not work, because the headers have different IDs autogenerated by Franklin, so old links are not good anymore.

Example:
https://franklin.moleculardevices.com/lab-notes/clone-screening/accelerated-production-of-monoclonal-antibodies-for-treatment-of-sars-cov-2-covid-19

This is fixed by https://github.com/hlxsites/moleculardevices/pull/640

authors: andreituicu mhaack

repo: hlxsites/moleculardevices


text:
feat: Generate Coveo Sitemap XML

This PR Generates the Coveo Sitemap XML as in the original website.
There will be a follow up PR to regenerate + commit + push the Sitemap XML when there is a publish event.
For the moment the intention is to merge it and test the indexing result of this XML.

How often do we expect to update the xml? 5 MB is not a lot, but it can quickly increase repo size if we update it often.

authors: alexcarol andreituicu


text:
Suggestion: setAnimationLoop for autorender?

Great work Hendrik! 🎉 I'm a big fan already.
Threejs require the use of setAnimationLoop for WebXR content, so maybe that could be the default when autorender is enabled?
Would also be nice to add the WebXR button as a component. 😛

🙏  Thank you! I'm releasing 0.2 tomorrow, with -- finally -- an official ("official") announcement post. I'm excited!
With regard to setAnimationLoop, I will look into it! It shouldn't be a big change, and I'll need to do it either way, since the project I'm working on aims to have a dash of VR support down the road.

🙏  Thank you! I'm releasing 0.2 tomorrow, with -- finally -- an official ("official") announcement post. I'm excited!
With regard to setAnimationLoop, I will look into it! It shouldn't be a big change, and I'll need to do it either way, since the project I'm working on aims to have a dash of VR support down the road.

Threejs require the use of setAnimationLoop for WebXR content, so maybe that could be the default when autorender is enabled?

I don't have a lot of practical experience with using sAL instead of rAF. From the outside, it sounds like I could feasibly use sAL all the time, instead of queueing my own rAFs, even if the application does not intend to actually do any XR. Does using sAL have any drawbacks? I did see that in the Three.js source it directly interacts with WebXRManager.

Threejs require the use of setAnimationLoop for WebXR content, so maybe that could be the default when autorender is enabled?

I don't have a lot of practical experience with using sAL instead of rAF. From the outside, it sounds like I could feasibly use sAL all the time, instead of queueing my own rAFs, even if the application does not intend to actually do any XR. Does using sAL have any drawbacks? I did see that in the Three.js source it directly interacts with WebXRManager.

Yes, I think sAL is future proof. Simply seems to be an internal wrapper for selecting appropriate render mechanism on different platforms.
Exciting! Looking forward to read it. I'm actually making a little board game with three, and have just swapped in three-elements - works flawlessly with my Vue workflow! Now I'm only concerned that it's too easy to manipulate. 😂

Yes, I think sAL is future proof. Simply seems to be an internal wrapper for selecting appropriate render mechanism on different platforms.
Exciting! Looking forward to read it. I'm actually making a little board game with three, and have just swapped in three-elements - works flawlessly with my Vue workflow! Now I'm only concerned that it's too easy to manipulate. 😂

If you have anything that you're willing to share, I'd be very happy to see it! The most important thing three-elements needs at this point is people building cool stuff with it and opening issues for the things that didn't work (or didn't work as well as they should have). I will also add a section to the website at some point with links to cool things built with the library, but at the moment it would be depressingly empty, and I don't have the time to work on demos right now (since I'm also working on that other project that three-elements was extracted from. I think it's going to be a good demo, but it's not ready yet.)

If you have anything that you're willing to share, I'd be very happy to see it! The most important thing three-elements needs at this point is people building cool stuff with it and opening issues for the things that didn't work (or didn't work as well as they should have). I will also add a section to the website at some point with links to cool things built with the library, but at the moment it would be depressingly empty, and I don't have the time to work on demos right now (since I'm also working on that other project that three-elements was extracted from. I think it's going to be a good demo, but it's not ready yet.)

authors: hmans okydk

repo: hmans/three-elements


text:
Vulnerability - formidable removed from known issues

@hmcts/nodejs-healthcheck --> superagent --> formidable was flagged as known issue
Advisory was withdrawn so no longer vulnerable
Removed from known issue via
yarn npm audit --recursive --environment production --json > yarn-audit-known-issues

Covered in https://github.com/hmcts/darts-portal/pull/977

repo: hmcts/darts-portal