text:
Why are observation_embed and action at the same “t” in the rollout_representation function?

Hi, I'm confused... In rnns.py，there is a function as follows:
def rollout_representation(self, steps: int, obs_embed: torch.Tensor, action: torch.Tensor,
                           prev_state: RSSMState):
    priors = []
    posteriors = []
    for t in range(steps):
        prior_state, posterior_state = self.representation_model(obs_embed[t], action[t], prev_state)
        priors.append(prior_state)
        posteriors.append(posterior_state)
        prev_state = posterior_state
    prior = stack_states(priors, dim=0)
    post = stack_states(posteriors, dim=0)
    return prior, post

According to the original formula in paper, the input of the representation model should be the action at the previous moment and the obs_embed at the current moment?
So why is it the same moment here <prior_state, posterior_state = self.representation_model(obs_embed[t], action[t], prev_state)>?
Maybe I missed some details, please help me to resolve my confusion. Thank you.

It is already considered that in here.
https://github.com/juliusfrost/dreamer-pytorch/blob/47bd509ab5cffa95ec613fd788d7ae1fe664ecd5/dreamer/algos/dreamer_algo.py#L194-L196

Hi, shouldn't it be
observation = samples.all_observation[:-1]  # [t, t+batch_length+1] -> [t, t+batch_length]
action = samples.all_action[:-1]            # [t-1, t+batch_length] -> [t-1, t+batch_length-1]
reward = samples.all_reward[1:]             # [t-1, t+batch_length] -> [t, t+batch_length]

so that
self.representation_model(obs_embed[t], action[t], prev_state)

will be $p(s_t | s_{t-1}, a_{t-1})$ for the prior and $p(s_t | s_{t-1}, a_{t-1}, o_t)$ for the posterior.
Current code is computing $p(s_t | s_{t-1}, a_t)$ for the prior and $p(s_t | s_{t-1}, a_t, o_t)$ for the posterior. Did I miss something?

all_observation is observation. not state. check the comment in lines :)

Hi sorry maybe I was not clear. My question was about indexing the action. The code is
        observation = samples.all_observation[:-1]  # [t, t+batch_length+1] -> [t, t+batch_length]
        action = samples.all_action[1:]  # [t-1, t+batch_length] -> [t, t+batch_length]
        reward = samples.all_reward[1:]  # [t-1, t+batch_length] -> [t, t+batch_length]
        reward = reward.unsqueeze(2)
        done = samples.done
        done = done.unsqueeze(2)

        # Extract tensors from the Samples object
        # They all have the batch_t dimension first, but we'll put the batch_b dimension first.
        # Also, we convert all tensors to floats so they can be fed into our models.

        lead_dim, batch_t, batch_b, img_shape = infer_leading_dims(observation, 3)
        # squeeze batch sizes to single batch dimension for imagination roll-out
        batch_size = batch_t * batch_b

        # normalize image
        observation = observation.type(self.type) / 255.0 - 0.5
        # embed the image
        embed = model.observation_encoder(observation)

        prev_state = model.representation.initial_state(batch_b, device=action.device, dtype=action.dtype)
        # Rollout model by taking the same series of actions as the real model
        prior, post = model.rollout.rollout_representation(batch_t, embed, action, prev_state)

which means embed is $o_{t:t+K}$ and action is $a_{t:t+K}$ (judging by the comment in the code). Don't we need $a_{t-1:t+K-1}$ instead?

no. action is $a_{t-1 : t+K-1}$. observation sequence timestep is like  [t, t+batch_length+1] by [:-1]and action sequence timestep is like [t-1, t+batch_length] by [1:]

Because the comment for observation is
# [t, t+batch_length+1] -> [t, t+batch_length]

and for action is
# [t-1, t+batch_length] -> [t, t+batch_length]

So that's why I thought it was wrong because both are $o_{t:t+K}$ and $a_{t:t+K}$. I said I was not really sure as well because I was not sure about the replay buffer sampling. Thanks for the confirmation!

Okay. Every code is fine. Depending on where you cut the array, you can create data starting from t-1 or data starting from t. Thanks.

authors: gunnxx seolhokim thj926

repo: juliusfrost/dreamer-pytorch


text:
feat: add dynamic swap page

Ticket: https://lifi.atlassian.net/browse/LF-11128

@tcheee
Todos:

[ ] populate correct FAQ infos
[ ] check content and possibly update texts
[ ] do we need to update some widget background-images? Like the "defaults" including Across as a returned quote?
[ ] do we need an image for the 2nd step: "Step 2: Make sure to have Funds on Polygon in your wallet". If yes, which one would that be?

pls review the color on the dark theme to use one of our theme pls

source: gharchive/pull-request

authors: dennyscode tcheee

repo: jumperexchange/jumper-exchange

license_type: permissive

license_source: github-api


text:
Bash syntax error rety loop on tab completion

Category

[ ] fzf binary
[ ] fzf-tmux script
[ ] Key bindings
[x] Completion
[ ] Vim
[ ] Neovim
[ ] Etc.

OS

[x] Linux
[ ] Mac OS X
[ ] Windows
[ ] Windows Subsystem for Linux
[ ] Etc.

Shell

[x] bash
[ ] zsh
[ ] fish

After installing fzf, anytime I try to use tab completion I get a loop of this:
-bash: conditional binary operator expected
-bash: syntax error near `"*'
-bash: conditional binary operator expected
-bash: syntax error near `"*'
-bash: warning: programmable_completion: vi: possible retry loop

I used a Docker container to narrow the problem down to the fzf installation, but I don't know where to go from here.

Same here. I will have to disable fzf until this is resolved.

Same here, looks like this old issue has resurfaced in some way.

You should post your Dockerfile so I can reproduce the problem locally.

@junegunn You can run the container with ‘docker run -it —rm ericsage/orca’. Built from https://github.com/ericsage/orca.

fzf works as expected on the alpine image built with the following Dockerfile so this may not be an issue of fzf but your configuration.
FROM alpine:latest
RUN apk update && apk upgrade --latest
RUN apk add bash git curl findutils
RUN git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install --all
CMD /bin/bash

@junegunn try this:
FROM alpine:latest
RUN apk update && apk upgrade --latest
RUN apk add bash bash-completion git curl findutils
RUN git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install --all
RUN echo "if [ -f $HOME/.bashrc ]; then source /root/.bashrc; fi" > /root/.bash_profile
CMD /bin/bash -l

Adding bash-completion and sourcing bashrc from a login shell causes this issue.

@ericsage Thanks for the repro. I think I have spotted the problem.

Let me know if you still have the problem.

@junegunn I rebuilt my env and the issue is now fixed. Thanks!!

Still have similar issue with OpenSUSE Leap 15.2.
Following is snippet of debug prints when performing tab completion with source <TAB> .
++ complete -o bashdefault -o default -F _fzf_path_completion source
+ return 124
+ __fzf_generic_path_completion _fzf_compgen_path -m '' source '' source
+ local cur base dir leftover matches trigger cmd
+ cmd=source
+ COMPREPLY=()
+ trigger='**'
+ cur=
+ [[ '' == *\*\* ]]
+ shift
+ shift
+ shift
+ _fzf_handle_dynamic_completion source source '' source
+ local cmd orig_var orig ret orig_cmd orig_complete
+ cmd=source
+ shift
+ orig_cmd=source
+ orig_var=_fzf_orig_completion_source
+ orig=
+ '[' -n '' ']'
+ '[' -n 1 ']'
++ complete -p source
+ orig_complete='complete -o bashdefault -o default -F _fzf_path_completion source'
+ _completion_loader source '' source
+ local dir=/usr/share/bash-completion/completions
+ local cmd=source
++ grep --color=auto -c _init_completion /usr/share/bash-completion/completions/source
+ local -i init=
+ (( init > 0 ))
+ . /usr/share/bash-completion/completions/source
+ complete -o default -o bashdefault source
+ return 124
+ ret=124
++ complete -p source
+ '[' 'complete -o bashdefault -o default source' '!=' 'complete -o bashdefault -o default -F _fzf_path_completion source' ']'
++ complete
++ command grep ' -F.* source$'
++ grep ' -F.* source$'
++ __fzf_orig_completion_filter
++ sed 's/^\(.*-F\) *\([^ ]*\).* \([^ ]*\)$/export _fzf_orig_completion_\3="\1 %s \3 #\2"; [[ "\1" = *" -o nospace "* ]] \&\& [[ ! "$__fzf_nospace_commands" = *" \3 "* ]] \&\& __fzf_nospace_commands="$__fzf_nospace_commands \3 ";/'
++ awk -F= '{OFS = FS} {gsub(/[^A-Za-z0-9_= ;]/, "_", $1);}1'
+ eval ''
+ [[  less  pushd  bzip2  chmod  ln  ls  more  gzip  vi  unzip  cd  grep  chown  rmdir  cat  bunzip2  gunzip  export  = *\ \s\o\u\r\c\e\ * ]]
+ eval 'complete -o bashdefault -o default -F _fzf_path_completion source'
++ complete -o bashdefault -o default -F _fzf_path_completion source
+ return 124
bash: warning: programmable_completion: source: possible retry loop

Having the same issue on SUSE Linux Enterprise Server 12 SP3 on tab completion of the tail command
-bash: warning: programmable_completion: tail: possible retry loop

Found that this issue does not occur by installing bash-completion package.

source: gharchive/issue

authors: Koushikphy ericsage gasuketsu junegunn micalexander timnolte

repo: junegunn/fzf

license: MIT


text:
Breaking Change in Keybinding Behavior due to Commit 6b4358f

Checklist

[X] I have read through the manual page (man fzf)
[X] I have searched through the existing issues
[X] For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version
0.52.1 (7aa88aa1)
OS

[ ] Linux
[X] macOS
[ ] Windows
[ ] Etc.

Shell

[ ] bash
[X] zsh
[ ] fish

Problem / Steps to reproduce
Issue
When executing the command below and pressing ⌃ Control + Y, I observe a different result since commit 6b4358f (Ref: #3810).
# Current situation with 'devel' branch
seq 10 | fzf --bind 'ctrl-y:toggle+down' --expect 'ctrl-y' --bind 'load:pos:4'
# ctrl-y
# 3

# Old behavior prior to 6b4358f
seq 10 | fzf --bind 'ctrl-y:toggle+down' --expect 'ctrl-y' --bind 'load:pos:4'
# ctrl-y
# 4

This seems like a breaking change. If a user has set some custom configuration in their FZF_DEFAULT_OPTS and runs a script where a user uses this keybind with --expect, it will cause unintended issues.

Background Info
In my situation, I had a list of PRs and set ctrl-y in my FZF_DEFAULT_OPTS to perform a toggle-down operation. In the script, the ctrl-y key was configured with --expect to checkout the selected PR. This has led to the wrong PR being checked out every time.
Unsetting FZF_DEFAULT_OPTS in the script serves as a solution, however, it results in the loss of numerous custom configurations set by the user. What is the best course of action here ?

I see, that's unfortunate.
--expect hasn't been compatible with --bind for a very long time, so while if it's conceptually right to make them compatible, some users may have come to rely on the current behavior.
So since we have the new print(...) action, how about if we

Officially declare that --expect is not compatible with --bind, and that it supersedes --bind for the same key when both are used. (Or maybe we can take "last one wins" strategy, e.g. --expect ctrl-y --bind ctrl-y:up)
And suggest using print(...) when they need to combine the two.fzf --bind 'enter:print()+accept,ctrl-y:print(ctrl-y)+accept'

/cc @ibhagwan

@junegunn
While I find it logically sound to have expect compatible with bind, I sympathize with the will to avoid breaking changes, especially for behaviors  that have been relied upon for a long time, whatever you decide will be lovingly accepted.

authors: LangLangBart ibhagwan junegunn


text:
Change framer-motion to optional peer dependency

If use peerDependenciesMeta we can skip a warning message whenit's not installed.

yarn docs
npm docs

@hahnlee Thanks to you, I just released @frogress/line@1.2.2 🎉
Too bad I missed the typo in your commit message 🙏  Hope you use this well!

authors: hahnlee junhoyeo

repo: junhoyeo/frogress


text:
Standalone mode set by extension authors

My alternative solution to #70 and #75.
This makes standalone mode an option only set by extension authors, not a configurable trait that users can set...

I thought that adding load_extensions=True as a keyword arg to ServerApp.initialize was pretty elegant (as this is the only place it is currently used). It also avoids the smell of setting _ variables on another object.
-    def initialize(self, argv=None):
+    def initialize(self, argv=None, load_extensions=True):
        super(ServerApp, self).initialize(argv)
        self.init_logging()
...
        self.init_signal()
-       self.init_server_extensions()
+       if load_extensions is True:
+           self.init_server_extensions()

That is pretty elegant 😃
Is there any danger to changing initialize's signature? That's what made me hesitate using this solution in the original PR.

I guess I still prefer an empty subclass StandaloneApp ...
class StandaloneApp(ExtensionApp):
    pass

then use...
if not isinstance(self, StandaloneApp):
     self.init_server_extensions()

Then no _ variables and self is always available wherever these checks are necessary and it provides a location for future divergence.

In the case of two serverapp extensions (voila and lab)

when launching jupyter voila --standalone (or without standalone if voila is a standalone app), I expect jupyterlab to not be served.
when launching jupyter lab, I expect to be able to use voila (especially for the voila-preview jupyterlab extension).

Thanks @SylvainCorlay - that's interesting and great example.
It seems like in the latter case, voila is merely a server extension and not an application and it would be nice that that be expressed in a class hierarchy somehow.  Some StandaloneApps are also extensions and some are not.  All ExtensionApps are also extensions by default.  Is there a way to express that?
I apologize for dragging this on.  Perhaps this is a matter of clarifying the jupyter server command itself.  Perhaps we should require jupyter server be the use-case for a headless server so that it not load any extension apps or it not be a valid command at all - producing output that an extensionApp is required.
We could then remove --standalone by having a StandaloneApp(ExtensionApp) class, but allow StandaloneApps to be loaded as extensions - assuming there's a way to distinguish between a "primary" extensionApp (i.e., the one specified on the CLI) vs. a "secondary" extensionApp (loaded by the primary).  I suppose this raises the question - how does an author state that they don't want their StandaloneApp loaded as an extension?
Can an "app" distinguish between it being primary vs. secondary - both at load and runtime? I think that would be useful.

It seems like in the latter case, voila is merely a server extension and not an application and it would be nice that that be expressed in a class hierarchy somehow. Some StandaloneApps are also extensions and some are not. All ExtensionApps are also extensions by default. Is there a way to express that?

It does not seem to me that there is really a distinction. I was merely assuming the voila command would be an alias for jupyter voila --standalone.

Given that we could possibly want all 4 combinations of "autoload me/not" × "autoload others/not", I believe the server app having a flag "load other extensions/not" should be sufficient (#76). Apps that do not want to be used as extensions should then not expose the server extension "magics" in the module.

@vidartf Did you mean to link #70 (instead of #76)?

No, I was confused about there I was posting, not where I was linking 😀

@vidartf  Updated this PR to use #75's way of allowing extensions to prevent other extensions from being loaded.

I'm in favor of flags over inheritance. This allows for extensions that can act standalone as well as cooperative.

@rolweber - good point.  The dual-mode behavior of Voila that @sylvain stated put a damper on a class-based approach since StandaloneApps could then also be cooperative - which makes sense.
I think we've boiled this down to two primary ways to start the server, each with a couple semantic differences: jupyter <extension_app> and jupyter server and no --standalone. :tada:
Here are some concrete examples that should illustrate the differences ... (I've also used "footnotes" for questions.)

jupyter voila - Voila extends ExtensionApp and because it sets load_other_extensions = False, no other server extensions [1] will be loaded.
jupyter lab - Lab extends ExtensionApp and leaves load_other_extensions = True.  As a result, any configured server extensions will be loaded - including Voila.[2,3]
jupyter server - Looks in the configuration files for ServerApp.jpserver_extensions and loads any enabled extensions. [4]
jupyter server --jpserver_extensions={...} - This is really just a form of the previous where the CLI is going to override anything found in the config files.  Just stating it here for completeness.  It would be cool - if possible - if use of the launch in this manner implies that all listed extensions are enabled.  I guess that goes back to making the enabled boolean default to True.

[1]: By "server extension" are we (now) always talking about applications that extend ExtensionApp in this context?  That is, Voila could define its own cofigurable containing a list of server extensions (that do not derive from ExtensionApp and only apply to Voila) that are loaded by Voila directly - correct?
[2]: Is there a way for an ExtensionApp to say that it doesn't want to be 'cooperative'?  I.e., extension authors require a "my way or the highway" approach.  Is that necessary?
[3]: Can a given ExtensionApp determine in what context it was loaded?  Is that necessary?  This probably only matters in the cases where load_other_extensions = False since those apps may want to change some behavior depending on how they're being used.  This would also be a way for an author to enforce the "my way or highway" requirement and say "I don't want to participate" - converting its load function into a no-op in that case.
[4]: What should the behavior be if no extension apps are configured and enabled?  Currently, it runs but I'm not sure how useful that is. However, I suppose this could be a way to validate a minimum configuration in times of troubleshooting, adding server extensions at each step - so I guess I'd be inclined to leave this alone.

Is there a way for an ExtensionApp to say that it doesn't want to be 'cooperative'? I.e., extension authors require "complete exclusivity". Is allowing such a thing necessary?

One clear step would be to not define the server extension interfaces in the package (server extension path function, server extension load function), so that it cannot be used as an extension.
Another clear step would be to name all the app classes with a leading underscore to hint that "this class is not meant for reuse".
I don't think we should do anything from this package's side.

[1]: By "server extension" are we (now) always talking about applications that extend ExtensionApp? That is, Voila could define its own configurable containing a list of server extensions (that do not derive from ExtensionApp and only apply to Voila) that are loaded by Voila directly - correct?

It was my understanding that by server extension we don't only talk about ExtensionApps. Basically we start creating server extensions as soon as we need new tornado entry points.
ExtensionApps are the subset of server extensions that has a default URL that we may want to start with a python entry point.

[2]: Is there a way for an ExtensionApp to say that it doesn't want to be 'cooperative'? I.e., extension authors require "complete exclusivity". Is allowing such a thing necessary?

Good question. I don't see a usecase for that at the moment though.
The reason why I brought up the standalone option for voilà is that it is sometimes important that we don't serve the filesystem or that we don't allow arbitrary code execution by giving a notebook interface. I expect the voila command-line to become an alias on jupyter voila --standalone, also specifying the allowed jupyter messages to disallow execution requests.

[3]: Can a given ExtensionApp determine in what context it was loaded? Is that necessary? This probably only matters in the cases where load_other_extensions = False since those apps may want to change some behavior depending on how they're being used. This would also be a way for an author to enforce the "complete exclusivity" requirement and say "I don't want to participate" - converting its load function into a no-op in that case.

It may be useful to e.g. disallow execution requests in the case of voilà, although since we should have the previously described alias, it is probably fine as-is.

[4]: What should the behavior be if no extension apps are configured and enabled?

I presume that the default start URL should be some jupyter equivalent to Apache's "it works" and some documentation about how to install extension apps.
When extension apps are enabled, they could be listed on that page.

Thank you @SylvainCorlay - that's helpful.

Any reason not to merge this?

authors: SylvainCorlay Zsailer kevin-bates rolweber vidartf


text:
Add "caching" functionality similar to BinderHub's

In #450 we discussed the possibility of creating a container from an existing image that repo2docker built previously. Currently when you run repo2docker again it has to re-execute the steps after copying the source repo over. This can take a long time if you have a lot of dependencies or R packages.
For git repositories we could add a functionality similar to BinderHub's that checks the local registry for previously built images and reuses them. This would make it a lot faster to launch and re-launch repositories that haven't changed.

this is an interesting idea - and sort of opens a door to having "fancier base images" that users can choose and then build off of...

fancy base images

My understanding of this idea is that it should provide the answer to: "I am a computational train spotter, how do I quickly get all the software that the comp train spotter community is using setup and running for my analysis?". I think the answer would be to have a repository "comp-train-spot" (maintained by someone, not exclusively r2d) that functions like a cookie cutter that has all the repo2docker config setup. I copy that repo, call it "swiss-trains-winter-18" and then do my work.
Hopefully over time the number of such "base repos" grows to areas beyond computational train spotting. Is this what you had in mind too or did you think of base images in the docker image sense to use in a FROM statement? Should we make a new issue to get to a common understanding and then  hash it out?
When I posted this I was thinking of the following problem:

run repo2docker https://github.com/binder-examples/requirements
change nothing in the remote repo
then run repo2docker https://github.com/binder-examples/requirements again and it will rebuild the container instead of launching the existing image.

Changing this so that the first run builds the image and the second reuses it is what I had in mind.
For local repositories this works already unless you edit some code that isn't related to the environment. For this #410 is relevant.

yeah I think from a technical perspective that's what I had in mind too. From a "future feature" perspective I was thinking stuff like "I want the Neurodebian neuroscience Docker image with this one extra package and some data downloaded" and the build process would be way faster because the Neurodebian image is cached

Closing as #511 got merged as the more successful cousin of #461

authors: betatim choldgraf


text:
Persist repository build logs for later access

Proposed change
When a repository is being built we stream the output of repo2docker to the website the user sees. It would be great if this log would also be available after the build has failed. For example builds can take a very long time (hours or more) in which users close the tab or otherwise leave. They have no way to recover the build log once the build has failed. The only option is to restart the build and this time wait. It is also hard to copy&paste text from the build log to share for debugging purposes. In both cases it would help to have a stable URL that for some time shows the build log.

This is an attempt to make a actionable issue out of #155.
Alternative options
For successful builds we could store the build log in the container image as a special file. This way users could access it from "within" their binder. This would not help users for which the build fails, as they'd never get a launching binder.
Who would use this feature?
People who have long running builds that need debugging or otherwise want to share/look at the output of a build.
(Optional): Suggest a solution
A new endpoint in BinderHub that outputs the build log of the last build for a given "repo spec". The log would be overwritten the next time the same spec is built. It would be a reasonably stable URL that is easy to discover. An alternative would be to assign a "build number" to each build, this would be super stable but creates the challenge of how a user would discover what the build number of their build was.
Build logs can be large. This means it is probably not feasible to store them in the process memory of BinderHub. In memory or on disk in the pod storage also means that on a cluster that runs several instances of the binderhub pod you'd need a mechanism for sending requests for the log to the right pod. This points towards the need for an additional service in which to store the logs.
The BinderHub process already sees a copy of the build log as it streams it to users. It could stream it to a log sink at the same time. Or the log could be archived independent of the BinderHub process directly from the repo2docker pod.

Using an s3 compatible object store might be an option? It's easier to setup on public cloud than managing a K8S persistent volume, and it also means we don't need an endpoint to download the logs, if the bucket is public you can give people a direct link.
You can optionally specify a TTL for auto-deletion, and it should work out cheaper than a disk volume.

@manics That sounds like a great solution. We would need to:

collect / process logs in binderhub prior to deletion of the pod (logs are actually JSON, what folks want is terminal-processed ANSI output of log messages)
upload those to public blob store with TTL, etc.
distribute stable URL for blob to user pods / other places folks might be interested. An API with deterministic blob resolution would work, too

I wonder how much can be accomplished by already existing software related to k8s logging, and what makes sense to develop ourselves. Here are some relevant links to consider this further.

Kubernetes documentation about logging
CNCF's landscape map is describing tools in various domains, and here is the logging domain

I like the idea of storing the "end product" in a S3 bucket. Especially if what we store is "finished HTML" so that serving a "log page" can be done by nginx or even directly from the bucket.
I read k8s logging docs and not sure which of the scenarios they list would fit us best. An idea from the guide I like is to add a sidecar to the repo2docker Pod that takes care of processing and streaming the logs to the bucket.
I have used filebeat to ship JSONL from a file in a container to a ElasticSearch instance. It worked well once setup but I found the documentation for filebeat confusing/hard to read so it involved a lot off trial&error. A quick google suggests filebeat can't ship to S3. On the one hand having a off the shelf tool do this for us would be nice (one less thing to maintain), on the other hand it might be as much or more work to find and configure one as it is to write a small utility ourselves that does exactly what we want (produce ANSI coloured HTML output).
For (3) from Min's suggestion:
Thinking about the API endpoint: we could have http://binder/v2/logs/<buildspec> which redirects you to the appropriate bucket (appropriate == the latest one for that spec?) with a permanent redirect. That way you'd get a stable URL to share as long as you visit http://binder/v2/logs/<buildspec> at approximately the right time. (One day we could maybe build an extension like http://binder/v2/logs/<buildspec>/<datetime> which tries to find the most likely bucket for that timestamp.)
What is a nice way to make the URL of the log available inside the launched Binder or do we skip that for now? I'm not sure how to do that nicely. Could BinderHub use that API endpoint to work out the bucket URL (or use the code behind that endpoint directly) and set it as a environment variable? Would we frequently be sending people to the previous build's logs because log processing hadn't completed/the new bucket not ready yet when the Pod is launched after being built?

I think it'd be best to store the raw logs (plain text) instead of wrapping it with HTML It's what Travis and GitHub actions do, and it means if you've got a large log you can easily download and search it. Initially I think giving users a direct link to the plain text is fine since this is a new feature and you'll probably need some developer experience to understand it. A second version could add a simple HTML viewer to BinderHub.
I don't think you can't easily stream logs to S3, so it'd be a case of write them to a temporary file and upload at the end of the build.
We already calculate a deterministic image name for each build, so if we name the log something like /bucket/buildlogs/<image-name>.log or /bucket/buildlogs/<image-name>/repo2docker.log we could inject it as an environment variable at run time?

It seemed like a fun mini-project to investigate on a rainy day: https://github.com/jupyterhub/repo2docker/pull/967

Thinking ahead to run-time logs, using a centralised logging system could work but we'd still need some infrastructure on top of it to filter the relevant logs for users. I don't think it's safe to make all logs public to everyone since there may be private information in there, either related to launching Jupyter or because users have run something private in their container that has emitted some logs.
If this was limited to only the launch phase then if BinderHub knows the pod name it could do something like upload the output of clientapi.read_namespaced_pod_log(namespace=NAMESPACE, name=PODNAME) to S3 for both successful and failed launches. If the bucket policy is set to prevent listing objects then a user would only have access to the log file if they were given the URL.

I think we can handle run-time logs with a much simpler approach by using an entrypoint that tees the 'real' entrypoint output to a file folks can read within the container, rather than deployment-specific external storage.
Something like
#!/bin/sh
exec real-entrypoint "$@" 2>&1 | tee server-log.txt

It doesn't persist beyond the life of the container, but I think that's a good thing.

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/accessing-the-jupyter-notebook-logs/6263/2

authors: betatim consideRatio manics meeseeksmachine minrk

repo: jupyterhub/binderhub


text:
Setup an easy way for local development that uses a multi node kubernets cluster

Right now, development happens mostly with minikube. This has a couple of differences from production:

Build host & run host are always the same, so it's much quicker than production
We don't use an image registry, so any bugs around that will be uncaught.

Locally developing binderhub only requires the following:

Access to a .kube/config file that knows how to connect to a kubernetes cluster
An appropriately configured JupyterHub

The easiest way to accomplish these is to have a 'dev' kubernetes cluster that's small, often destroyed, and has the following structure:

We give access to it liberally
Each person gets their own namespace to play with
We also have a central docker image repository with namespaces for each person

This also makes testing quicker, since the network over at GKE is probably faster than local computer networks (at least for those of us still in the land of the free). It shouldn't be too expensive either, and we can probably do this soon.

Another option is to investigate https://www.telepresence.io/

(I work with the Telepresence team, and am not familiar with Jupyter and how it works). Hopefully the below info is helpful:

Telepresence code a service locally, while proxying that service to a remote K8S cluster. So if for dev you need to run multiple different services in a K8S cluster but want to use, say, the Flask auto reload functionality, Telepresence works well.
Telepresence doesn't alleviate the need to have a deployment system that builds your Docker image, pushes it to a repo, does a kubectl apply, etc. Given that you're in minikube, I'm guessing that you already have such a system. If not, you might want to look at https://forge.sh.

If there are specific enhancements or support you need if you want to try this, please feel free to hop on our Gitter (https://gitter.im/datawire/telepresence).

Is this a suitable alternative https://github.com/jupyterhub/binderhub/issues/1318 ?

authors: manics richarddli yuvipanda


text:
[MRG] Make the build pod clean up task run in the background

We need to create a task, not just convert it into a future for the
build pod clean up function to run in the background all the time.
Noticed this because some tests printed a warning that this coroutine wasn't being awaited. I don't remember why there was an ensure_future() here. IMHO that would be useful for converting things that aren't a coroutine but won't get them executed.
Instead we now create a task which runs in the background. I think this is the right thing to do and equivalent to IOLoop.current().add_callback() from Tornado (which we could also use if we wanted to?).
Two questions for reviewing:

do create_task and add_callback achieve the same thing?
if yes, should we prefer one over the other? For example for cleanup during shutdown or something like that?

Because Travis is paused right now "all checks passed" as a PR status doesn't mean all our tests passed. They are "green" because the unit tests are not being executed at all :D

This change will introduce a dependency on Py37 rather than just Py36 as we currently have according to the python documentation.
async def coro():
    ...

# In Python 3.7+
task = asyncio.create_task(coro())
...

# This works in all Python versions but is less readable
task = asyncio.ensure_future(coro())
...

The ensure_future part will schedule the coroutine to be executed, but exactly where is not something I'm sure of, or if it will keep executing if not awaited etc.

Ok, then this isn't needed. Super weird naming though :)

authors: betatim consideRatio


text:
Rely on docker-image-cleaner in external repo

@yuvipanda and I worked to migrate the image-cleaner code and docker image from this repo to its own project in jupyterhub/docker-image-cleaner. It helps reduce the complexity of this repo that includes a lot of parts that could be split into smaller more comprehensible pieces.
With this PR, I remove the code the image cleaner code that now lives in the jupyterhub/docker-image-cleaner git repo.

Nice :D

I haven't tested it, but assuming it works I can't think of any reason not to do this :smile:

Fine for me. As always my main thoughts are around "what could break if we do this?"

This PR is successfully deployed all the way to mybinder.org-deploy. It had to be complemented with https://github.com/jupyterhub/binderhub/pull/1417.

authors: betatim consideRatio manics yuvipanda


text:
Add files from the jupyterhub python repository template

Reference: jupyterhub python repo template
Files to add include:

README file
CONTRIBUTING guide
MANIFEST.in
pyproject.toml
Directory for the project with init.py and _version.py files

Thank you so much for opening these issues @Sheila-nk!
For future issues it would super useful if you'd use the issue templates to provide more context about them. Trying to fill in the templates sections is a good exercise for understanding all aspects of a proposal and it also provides more context for others in the community.
For example, this issue would be a feature request, and to use the template, you'd click on the button in the screenshot below and fill in the sections there.
But you should also feel free to skip some sections there if they feel like are not relevant or really hard to fill in.

Hey @GeorgianaElena
I will definitely do that when opening more issues. Thanks for informing me.

repo: jupyterhub/jupyterhub-pytest-plugin


text:
Plotly: height attribute ignored / overwritten

In jupyterlab the plotly figure gets resized to the width of the container so e.g. when you open/collapse the side-panel the plot resizes to fit the width of the notebook without any scroll bars.
This adaptive-width behaviour is fine, however the height of the figure is completely ignored and appears to just be fixed.
JupyterLab:

Jupyter Notebook:

Repro notebook: https://anaconda.org/dhirschfeld/jupyterplotlybug/notebook

JupyterLabJupyter Notebook

@dhirschfeld Thanks for catching this! I removed the CSS rule that was enforcing a fixed height of 360px in https://github.com/jupyterlab/jupyter-renderers/pull/42.
Here is the notebook that I tested against this branch (adapted to Python 3): https://gist.github.com/gnestor/661f4b4a631ad810b377a911398d8753

authors: dhirschfeld gnestor

repo: jupyterlab/jupyter-renderers


text:
feat(db): implement EventInterface for MockDb

Type of Change

[ ] Bugfix
[ ] New feature
[x] Enhancement
[ ] Refactoring
[ ] Dependency updates
[ ] Documentation
[ ] CI/CD

Description

Additional Changes

[ ] This PR modifies the API contract
[ ] This PR modifies the database schema
[ ] This PR modifies application configuration/environment variables

Motivation and Context

Closes #1116.
How did you test it?

Checklist

[x] I formatted the code cargo +nightly fmt --all
[x] I addressed lints thrown by cargo clippy
[x] I reviewed submitted code
[x] I added unit tests for my changes where possible
[ ] I added a CHANGELOG entry if applicable

Could you please address the CI checks? The implementation looks good to me!

Thanks for the contribution @KushnerykPavel!

repo: juspay/hyperswitch


text:
2022.11.12 线上招新

主讲人：kkocdko & WangJun。
时间：13:15 - 13:20。

由于校社团联合会要求使用 PPT 并固化，本次计算机协会的线上招新可能比较单调。敬请谅解。
除了 PPT 以外的附加内容：

Q & A：非计算机学院 or 无基础？对基础水平和专业没有任何要求，但这不能成为我们不愿学习的借口！
Q & A：社团有什么活动？计划会有每 1~2 周一次的培训，目前看来大多都会是线上，条件允许可以线下（到梦溪）。（展示计划）。
Q & A：关于竞赛？学院有组织参加蓝桥杯，成绩好的也可以尝试其他 ACM / ICPC / CCPC 比赛。

结束

repo: just-ca-unofficial/rfcs


text:
Error: resolveContext2d / Total canvas memory use

Hi,
After opening my frame in Safari and let it run for more than 10 seconds. It overflows the memory and displays this error.
Can anyone help me?
Below are the log images.

Please post the relevant code, otherwise I am not sure what you are doing. Might be some issue with your code or an issue with tfjs in safari.

authors: MatheusDomingos justadudewhohacks


text:
🛑 Jellyfin is down

In 647f4d3, Jellyfin (https://video.mkacg.com) was down:

HTTP code: 530
Response time: 117 ms

Resolved: Jellyfin is back up in fa08f83 after 9 minutes.


text:
All fields required - instead of validates_presence_of fields only

I'm using:  formtastic (1.2.4). I have fields required in the model, but in my form all of the fields are showing as required without me specifying anything..
My model basically looks like this:
class Speakerform < ActiveRecord::Base

  validates_presence_of :interested, :dates, :first_name, :email

  def interested_label; "Who are you interested in?"; end;
  #... a bunch of other label fields here.. BTW I sort of makeshift made an easy way to create labels here.. is there an easier way that's integrated into formtastic from the model standpoint or something? (I'm using it on the model so I can use the same labels in an email)
end

Then in my form I don't have anything particularly special either:
<% semantic_form_for @speaker_form, :url => "/speakers/hire", :method => "post" do |f| %>
  <% f.inputs :name => "Event details" do %>
    <%= f.input :interested, :label => f.object.interested_label, :as => :select, :collection => Page.speakers.all.map(&:title)+["I'm not sure!"], :selected => params[:speaker] %>
    ..more similar fields
  <% end %>
  <% f.inputs :name => "Your info", :class => "your-info" do %>
    <%= f.input :first_name, :label => f.object.first_name_label %>
    ..more fields here..
  <% end %>
  <%= submit_tag "Submit" %>
<% end %>

I had to manually set :required => false/true...  no biggie.. but sounds like that shouldn't happen..
Also.. btw I created a mailer that sends out all my questions(or labels..)/answers on the form and I did something like this.. Could be cool to incorporate something similar for labels? Like if field_label is defined in the model, use that?..
<% cols = Speakerform.columns.map(&:name)-["id", "updated_at", "created_at"]
cols.each do |c| %>

<b><%= ((@form.send("#{c}_label").humanize if @form.respond_to?("#{c}_label"))) %></b>
<%= @form[c.to_sym] %>

Have you checked the "all_fields_required_by_default" setting in your formtastic initializer?
# Should all fields be considered "required" by default?
# Rails 2 only, ignored by Rails 3 because it will never fall back to this default.
# Defaults to true.
# Formtastic::SemanticFormBuilder.all_fields_required_by_default = true

@wejrowski I have some apps still using 1.2.x and haven't had any problems. Here's what I'd like to know:

Is Formtastic adding a required CSS class to the input as well as adding the required string to each input's label, or is this isolated to just labels?
What's in your configuration file for Formtastic::FormBuilder.required_string and Formtastic::FormBuilder.optional_string?
Are you doing any i18n translations at all (either related or unrelated to Formtastic)
Has this always been a bug (in a long standing project), or did it just start happening in an upgrade, or is this a new project?

authors: justinfrench wejrowski yabawock

repo: justinfrench/formtastic

license: mit

license_source: bigquery


text:
updated vendors

Updated all vendors
Updated phpunit to version ~4

Fixes #124

@justinrainbow should we remove the lock file from the repo to make sure we can install things on PHP 5.3.3 as well ? the current lock file requires 5.3.23+

+1, we don't need to store the composer.lock file and can instead specify the versions of packages in composer.json itself. Pull it out and lets see how the build goes.

ref #139

@lsv please rebase per #139

Closed with https://github.com/justinrainbow/json-schema/pull/174

authors: bighappyface keradus lsv stof

repo: justinrainbow/json-schema


text:
Output txt file doesn't load correctly into Audacity 2.1.3

The simplified annotation (txt) generated by scaper loads fine into Audacity 2.0.5, but doesn't display any labels when loaded into 2.1.3 (macOS).
Example contents:
0.18131 5.127892 siren
1.8938210000000002 5.881943000000001 siren
5.342074 8.890392 siren

Need to find out if this is an Audacity bug, or change of expected format.

Newer versions of audacity don't accept space-separated txt files for labels, must be tab separated.
Proposed solution: change separator from space to tab.
Optional: add separator as optional parameter in generate()

repo: justinsalamon/scaper


text:
Upgrade to new spago

Hello,
This PR is an upgrade of this package to new spago.yaml. Also, I made some fixes to compile with PS 0.15.15.

thanks

https://github.com/justinwoo/purescript-simple-json-generics/releases/tag/v0.2.0

authors: CGenie justinwoo


text:
TKM3rG5iMWtqZK9srXiJkCyYj31qyk7YD4

Before submission deletes this line:
THIS IS NOT A TOKEN LISTING REQUEST FORM. IF YOU DO NOT FOLLOW THE FORMAT OR MAKE A GENERIC TOKEN REQUEST YOUR ISSUE WILL BE DELETED WITHOUT COMMENT
YOUR JUSTLIST MUST FOLLOW THE JSON SPECIFICATION
https://github.com/justswaporg/justlists/blob/main/example.justlists.ts
Checklist

[ ] I understand that this is not the place to request a token listing.
[ ] I have tested that my JustList is compatible by pasting the URL into the add a list UI at justswap.org.
[ ] I understand that filing an issue or adding liquidity does not guarantee addition to the justlists website.

Please provide the following information for your token.
JustList URL must be HTTPS.
JustList URL:
JustList Name:
Link to the official homepage of the JustList manager:

Please submit the correct information, invalid information will cause the issue to close

What was incorrectly indicated? Does everything seem to be right or what needs to be fixed ?

repo: justswaporg/justlists


text:
🛑 Main Website is down

In 01be6c9, Main Website (https://tecnoscientifica.com) was down:

HTTP code: 403
Response time: 3031 ms

Resolved: Main Website is back up in c45fc9a after 13 minutes.

repo: justudin/tsp-status


text:
Collect es.uri from ENV Variable.

Can we have an option of getting the es.uri from env.
The preference should be in the order

command line flag
env variable
default/locahost

We'd like to keep this exporter consistent with others/official exporters. I've just checked a few of those and none seems to support getting options from ENV so I'd like to keep it as is for this exporter as well.

AWS recommends using credentials in Environment variable.
These are the few official exporters using Env Vars.
https://github.com/prometheus/mysqld_exporter#setting-the-mysql-servers-data-source-name
https://github.com/prometheus/cloudwatch_exporter#credentials-and-permissions
https://github.com/prometheus/consul_exporter#environment-variables

Those are a little different. Apart from the mysqld_exporter - that is using it's config flags/env vars inconsistently - the exporters are not evaluating the env vars themselfes, but rather the upstream libs they use.
Feel free to start the exporter through an wrapper script that translates your env vars to command line args.

authors: ashoksahoo dominikschulz


text:
expose -format for write file

fixes #125
remove the ability to append to a file when writing and simply rely on the
serializers to write out data in the various supported serializer formats.
we can revisit adding a -append option to the file adapter when it
becomes a requirement.

@davidvgalbraith @demmer as we discussed lets just drop the append behavior and then add the -format option so we can write out data in any of the formats supported by our serializers.

I'll fix the coverage issue in the morning.

I think it's useful to continue to support append for formats like jsonl and maybe csv.

@demmer opened an issue to follow up once this goes in #286

+1

authors: davidvgalbraith demmer rlgomes

repo: juttle/juttle


text:
crashing on iOS 13

Terminating app due to uncaught exception 'NSGenericException', reason: 'Access to UITextField's _placeholderLabel ivar is prohibited. This is an application bug'

Facing the same issue

Seems Xcode 11.2 Bug. Upgrade to Xcode 11.2.1 fixed my crash

authors: JeffWTING rheyansh

repo: jverdi/JVFloatLabeledTextField


text:
🛑 TRAPANNI PIZZA is down

In d3ac8ff, TRAPANNI PIZZA (https://trapanipizzaestofada.com) was down:

HTTP code: 500
Response time: 775 ms

Resolved: TRAPANNI PIZZA is back up in b3df70b after 8 days, 13 hours, 6 minutes.

repo: jveyes/upptime


text:
🛑 NATYASH is down

In 803c33f, NATYASH (https://natyash.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NATYASH is back up in cd2f4e1.


text:
RFE: source process and response time

Thanks for this project! It sure makes life a lot easier, so I don't need to remember the BPF syntax.
I would like to ask for two enhancements, if possible:
a) The source name or PID of the process which generated the query.
b) The time that it took to receive the response.
Thank you!

I would also appreciate a timestamp before every line.
Actually I use this "hack" from https://www.commandlinefu.com/commands/view/2682/vmstatiostat-with-timestamp
sudo dnspeep | awk '{now=strftime("%Y-%m-%d %T "); print now $0}'
Sould I open a new RFE or is it also ok to be included here?

A -t flag to timestamp every line and the time it took to receive each response both make sense to me!
Getting the PID of the process with generate the query is a little trickier -- I think I know how to do it on Linux (using BPF) but I don't know how to do it on Mac.

There's also BPF on MacOS 🤔

Oh, I mean eBPF (https://ebpf.io/)

Have you seen User Space eBPF and Rust (user-space) virtual machine for eBPF in detail?

Added a -t flag to print out the timestamp so I'm going to close this. I'll open another issue to track the other idea.

It works great! Thank you!

authors: badnetmask jvns thomasmerz

repo: jvns/dnspeep


text:
Model rotations and real-time updates

[ ] Rotation around x axis
[ ] Rotation around y axis
[ ] Rotation around z axis

Handled by matplotlib through mouse gestures

repo: jwannamaker/Pyxelator


text:
Verbose logging

Right now if I run docker-gen all I get is the response below which really doesn't explain what's happening. With a verbose flag logging could be added to explain what containers it can see, etc.
root@ace:~# docker-gen ./template ./output
2017/06/28 03:49:13 Contents of ./output did not change. Skipping notification ''

I would love to see what is happening. I have a synology box. It shows that there are container changes. But i can't see why it won't detect the vhosts.

can someone elaborate ? or close the issue if not relevant anymore ?

authors: OmgImAlexis Pimmetje revolunet

repo: jwilder/docker-gen


text:
The geometry of the terminal does not match the dimensions configuration

In Alacritty v0.2.0, with a clean alacritty.yml, when I open a terminal window, instead of being 80x24 as configured, it opens with a geometry of 47x14 instead.
~$ rg 'columns:|lines:' .config/alacritty/alacritty.yml
22:    columns: 80
23:    lines: 24
~$ tput lines
14
~$ tput cols
47

Which operating system does the issue occur on?
Debian unstable
If on linux, are you using X11 or Wayland?
X11.  Here is my Xft configuration (in .Xdefaults):
Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault

Does the #1403 PR solve this issue? There have been a few changes with DPI recently so current master doesn't do everything 100% correctly.
The glutin update PR should solve all these issues though.

It appears to, yes.

I thought we already had another issue about this, but it doesn't look like there's anything explicitly just talking about window dimensions.
So using this to track the problem, it should be automatically resolved once the PR hits master!

Same issue? https://github.com/jwilm/alacritty/issues/952

authors: chrisduerr gnuvince ohazi

repo: jwilm/alacritty


text:
Order of input messed up when auto typing

Which operating system does the issue occur on?
linux
If on linux, are you using X11 or Wayland?
X11
When auto typing with xdotools default delay (14ms) ordering of key strokes is not preserved most of the time and with even lower delays key presses are sometimes even dropped.
Depending on the alacritty version a delay around 30ms seems to be safe.
The glutin 0.18 PR improves the situation but does not fix it.
I tried this with several other terminals (xterm, termite, kitty) they all receive the simulated key presses without problems even when disabling the delay entirely.

@Arvedui that sounds bad. Would you mind trying to reproduce this with the winit window example?
Alternatively, can you provide detailed instructions to reproduce?

Steps to reproduce:

sleep 1; xdotool type --delay 12  "abcdefghijklmnopqrstuvwxyz" (sleep is only there to give one enough time to switch the window)
switch immediately to an alacritty window.
characters should appear in a messed up order. If not decrease delay and try again.

I could not reproduce this with the winit window example based on the terminal output.
I also ran alacritty with --print-events, the messed up order is clearly visible in the output as you can see.
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 30, state: Pressed, virtual_keycode: Some(A), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 30, state: Released, virtual_keycode: Some(A), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 48, state: Pressed, virtual_keycode: Some(B), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 48, state: Released, virtual_keycode: Some(B), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 46, state: Pressed, virtual_keycode: Some(C), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 46, state: Released, virtual_keycode: Some(C), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 32, state: Pressed, virtual_keycode: Some(D), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 32, state: Released, virtual_keycode: Some(D), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 18, state: Pressed, virtual_keycode: Some(E), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 18, state: Released, virtual_keycode: Some(E), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 33, state: Released, virtual_keycode: Some(F), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 33, state: Pressed, virtual_keycode: Some(F), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 34, state: Pressed, virtual_keycode: Some(G), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 34, state: Released, virtual_keycode: Some(G), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 38, state: Pressed, virtual_keycode: Some(L), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 16, state: Released, virtual_keycode: Some(Q), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 16, state: Pressed, virtual_keycode: Some(Q), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 25, state: Released, virtual_keycode: Some(P), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 25, state: Pressed, virtual_keycode: Some(P), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 24, state: Released, virtual_keycode: Some(O), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 24, state: Pressed, virtual_keycode: Some(O), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 49, state: Released, virtual_keycode: Some(N), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 49, state: Pressed, virtual_keycode: Some(N), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 50, state: Released, virtual_keycode: Some(M), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 50, state: Pressed, virtual_keycode: Some(M), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 38, state: Released, virtual_keycode: Some(L), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 35, state: Pressed, virtual_keycode: Some(H), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 35, state: Released, virtual_keycode: Some(H), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 23, state: Pressed, virtual_keycode: Some(I), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 23, state: Released, virtual_keycode: Some(I), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 36, state: Pressed, virtual_keycode: Some(J), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 36, state: Released, virtual_keycode: Some(J), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 37, state: Pressed, virtual_keycode: Some(K), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 37, state: Released, virtual_keycode: Some(K), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 19, state: Pressed, virtual_keycode: Some(R), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 19, state: Released, virtual_keycode: Some(R), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 31, state: Pressed, virtual_keycode: Some(S), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 31, state: Released, virtual_keycode: Some(S), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 20, state: Pressed, virtual_keycode: Some(T), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 20, state: Released, virtual_keycode: Some(T), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 22, state: Pressed, virtual_keycode: Some(U), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 17, state: Pressed, virtual_keycode: Some(W), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 17, state: Released, virtual_keycode: Some(W), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 45, state: Pressed, virtual_keycode: Some(X), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 45, state: Released, virtual_keycode: Some(X), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 44, state: Pressed, virtual_keycode: Some(Y), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 21, state: Released, virtual_keycode: Some(Z), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 21, state: Pressed, virtual_keycode: Some(Z), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(62914565))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 44, state: Released, virtual_keycode: Some(Y), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }

This means it is a problem in glutin, right?

I played around with the winit example a little and tried to mimic alacrittys event loop.
It looks like this now:
extern crate winit;

use std::{thread, time};

fn main() {
    let mut events_loop = winit::EventsLoop::new();
    let window = winit::Window::new(&events_loop).unwrap();

    loop {
        events_loop.run_forever(|event| {
            println!("forever: {:?}", event);

            winit::ControlFlow::Break
        });

        let sleep_time = time::Duration::from_millis(50);
        thread::sleep(sleep_time);

        events_loop.poll_events(|event| {
            println!("poll: {:?}", event);
            thread::sleep(time::Duration::from_millis(5));
        });
    }
}

With this and a xdotool type delay of 30 milliseconds I get … interesting results.
The event order is somewhat reliably completely flipped!
I than looked closer at the messed up character sequences I get in alacritty and it seems that most if not all can be put in their original order just by flipping consecutive characters.
For instance:
a b c d e f h g i j k m p o n l q r s v y x w t u z
            g h       l n o p m       v u t w x y
                        m p o n       t u v
                          n o p

I take this as a strong hint that what I can produce with winit directly and the problem I experience in alacrity have the same root cause.
Therefore I'd say this is a race condition somewhere in winit or below.

cc @francesca64

I believe I found the origin of this bug.
I stumbled upon this bug report for libx11, which winit uses for communication with x11.
It only occurs when using a xim, which I do.
I can reproduce this bug in other applications as well and it completely vanishes in all of them (including alacritty) when disabling the xim.
I only noticed this in alacritty because most applications I use use either gtk or qt. Both have their own input module apis that are preferred over xim and are obviously not affected, however when forcing them to use xim they are affected as well.
Sorry for the noise. :)

Thanks for keeping us updated.

authors: Arvedui chrisduerr jwilm


text:
[ASK] Is there a Roadmap for this react native library?

What isn't clear?
I'm wondering what the roadmap for fixes and features looks like for JW Player React Native.

Hi @paulrinaldi, sorry for the late response. We don't have a roadmap for this library. This project is maintained reactively, so we keep it relatively up-to-date, but most of our work is from raised issues/feature requests / or general maintenance.
We strive for parity between this library and our native SDKs, but we know things aren't perfectly 1:1 right now. If you see anything you want implemented from the documentation, please reach out or create a PR, and we can work to get it added/merged 👍

repo: jwplayer/jwplayer-react-native


text:
Example unsigned token that bypasses verification

you need to specify the algorithm in the options hash whenever you call JWT.decode to ensure that an attacker cannot bypass the algorithm verification step

Does anyone have an example of such a token?
I thought our system was exposed but I've been unable to write a failing unit test. For example:
malicious_token = JWT.encode({hi: 1}, nil, 'none')
# => "eyJhbGciOiJub25lIn0.eyJoaSI6MX0."

JWT.decode malicious_token, 'secret'
# => JWT::DecodeError: Not enough or too many segments

I cannot get JWT.decode(t, secret) to accept an unsigned token.

@brianlow eyJhbGciOiJub25lIn0.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ. is an example unsigned token (taken from https://tools.ietf.org/html/rfc7519#section-6.1)
For your decode call, you probably want to call something like JWT.decode(t, secret, true, { algorithms: %w(list of algorithms you are ok with)})
I believe that you've hit a bug with the encoder... In the case that the algorithm is none the encoder is returning a token that is not syntactically valid (it is missing the header declaring the algorithm). This bug was introduced by a refactor in the encoder in https://github.com/jwt/ruby-jwt/commit/43a08a40593c1e63b6e9684ef57e8b5ed02a0b25

Actually, I take it all back... there isn't a bug with the encoder... (I blame not enough coffee yet).
The "issue" here is that the decode call is trying to verify a signature on the token and a token with algorithm none has no signature to verify. The error message just isn't clear...
By default, JWT.decode sets the optional parameter verify to true, which is what you want in most cases. This will cause any token without a signature (e.g. with algorithm none) to fail decoding.
A "nicer" behaviour would be to raise an JWT::IncorrectAlgorithm error in this case (where verify is true - still check the claims - and the algorithm none is not specifically allowed)

That sound reasonable.
So it feels like using JWT.decode(token, password) is not vulnerable to attack by setting the token algorithm to none because it will raise an exception (though perhaps not an ideal one).
Is that fair?

Correct that it is not vulnerable to an attack whereby the attack uses the 'none' algorithm.
It may be vulnerable to other attacks. To reduce the attack surface, you should specify which algorithms you will allow the library to use when decoding. Not doing so may leave your application vulnerable to attacks such as:

providing a token signed using an algorithm that has weaknesses making it appear valid
using an asymmetric public key as a symmetric key to sign using a symmetric algorithm

If you are issuing the tokens, you should know what algorithm(s) you're using to sign the token. If you're not issuing the token, the issuer should be able to tell you what algorithms they use.
Hence advice to use: JWT.decode(token, password, true, { algorithms: %w(list of algorithms you are ok with)}) instead of just token and password.

@danleyden Thanks for the explanation!

سحب

Cash

سحب

ر

RDJ-D

سحب

repo: jwt/ruby-jwt


text:
chore: upgrade go, jwx and aws sdk v2

I am looking to use this and wanted to pitch in and update the dependencies.
Thanks for developing this.

Sorry, I really need to turn on notifications

authors: lestrrat wolfeidau

repo: jwx-go/crypto-signer


text:
QUESTION about number of training images

Hello everyone,
I have successfully trained with my own dataset. My dataset has been modified as the PASCAL_VOC format. And there are totally 889 images in my "trainval.txt", but when I begin the training process. It shows:
"before filtering, there are 444 images,
after filtering, there are 444 images,
444 roidbs entries"
Can anyone tell me how are there 444 images? THANKS A LOT!
I have figured out the reason, thank @jwyang your repository, you can close this issue.

@lyx190  Can you please tell me the solution about this issue? My dataset has 1544 images, but it shows that there are 3088 images, I'm confused.


text:
Is it possible to have step number in URL?

mdx-deck 2 URL does not include step, so the step index is reset every time the deck is edited during npm start.
It would be great if hot reload could keep step index.

Thanks for mdx-deck, it looks like the project is not suitable for presentations on stage: https://github.com/jxnblk/mdx-deck/pull/293

repo: jxnblk/mdx-deck


text:
Validation Error on nested models with Partial Streaming

[X] This is actually a bug report.
[ ] I am not getting good LLM Results
[ ] I have tried asking for help in the community on discord or discussions and have not received a response.
[X] I have tried searching the documentation and have not found an answer.

What Model are you using?

[ ] gpt-3.5-turbo
[X] gpt-4-turbo
[ ] gpt-4
[ ] Other (please specify)

Describe the bug
The use of Partial does not seem to prevent validation errors on nested models.
If you have the following:
class Child(BaseModel):
   dummy: str

class Parent(BaseModel):
   child: Child

And then attempt partial streaming (with Parent as your response model), a validation error will be thrown on the child property.
To Reproduce
If you take the demo code offered in the Streaming Partial Responses documentation, and change the user property to be a single User instead of a list of Users, for example:
class MeetingInfo(BaseModel):
    # users: List[User]
    users: User
    date: str
    location: str
    budget: int
    deadline: str

A validation error will be thrown on the users property:
pydantic_core._pydantic_core.ValidationError: 1 validation error for PartialMeetingInfo
users
  Input should be a valid dictionary or instance of PartialUser [type=model_type, input_value=[], input_type=list]
    For further information visit https://errors.pydantic.dev/2.7/v/model_type

Expected behavior
No validation error on use of nested models (apologies if that's an incorrect assumption).
Screenshots
N/A

Sorry @dosubot , I should've mentioned in my original post that that wrapping the field in Partial actually does not fix the problem -- only marking the property as optional fixes it.
I see here from this comment that it's actually an explicit decision to not mark those fields as optional though so that the AI will treat them as required (or at least so I assume, neat!):  https://github.com/jxnl/instructor/blob/main/instructor/dsl/partial.py#L235

can you try doing it with
client = instructor.from_openai(OpenAI())
client.chat.completions.create_with_partial

Thanks for the quick reply, @jxnl (and thanks for this awesome library).
Hm, that seems to result in the same error. One point of confusion, did you mean create_partial (so no _with_)?
If so, both of these still throw a validation error:
....

class MeetingInfo(BaseModel):
    users: User
    date: str
    location: str
    budget: int
    deadline: str

stream1 = client.chat.completions.create_partial(
    model="gpt-4",
    response_model=MeetingInfo,
    messages=[
        {
            "role": "user",
            "content": f"Get the information about the meeting and the users {text_block}",
        },
    ],
    stream=True,
)  # type: ignore

stream2 = client.chat.completions.create_partial(
    model="gpt-4",
    response_model=instructor.Partial[MeetingInfo],
    messages=[
        {
            "role": "user",
            "content": f"Get the information about the meeting and the users {text_block}",
        },
    ],
    stream=True,
)  # type: ignore

Yes sorry

I'll try to look at this but quite busy right now. I'd try to make everything optional for now.

from pydantic import BaseModel

from openai import OpenAI
import instructor

client = OpenAI()

client = instructor.from_openai(client)

class User(BaseModel):
    name: str
    email: str

class MeetingInfo(BaseModel):
    user: User
    date: str
    location: str
    budget: int
    deadline: str

data = """
Jason Liu jason@gmail.com
Meeting Date: 2024-01-01
Meeting Location: 1234 Main St
Meeting Budget: $1000
Meeting Deadline: 2024-01-31
"""
stream1 = client.chat.completions.create_partial(
    model="gpt-4",
    response_model=MeetingInfo,
    messages=[
        {
            "role": "user",
            "content": f"Get the information about the meeting and the users {data}",
        },
    ],
    stream=True,
)  # type: ignore

for message in stream1:
    print(message)
"""
ser={} date=None location=None budget=None deadline=None
user={} date=None location=None budget=None deadline=None
user={} date=None location=None budget=None deadline=None
user={} date=None location=None budget=None deadline=None
user=PartialUser(name=None, email=None) date=None location=None budget=None deadline=None
user=PartialUser(name=None, email=None) date=None location=None budget=None deadline=None
user=PartialUser(name=None, email=None) date=None location=None budget=None deadline=None
user=PartialUser(name=None, email=None) date=None location=None budget=None deadline=None
user=PartialUser(name=None, email=None) date=None location=None budget=None deadline=None
user=PartialUser(name=None, email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email=None) date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date=None location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location=None budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=None deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=100 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline=None
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline='2024-01-31'
user=PartialUser(name='Jason Liu', email='jason@gmail.com') date='2024-01-01' location='1234 Main St' budget=1000 deadline='2024-01-31'
"""

this works.

@jxnl thanks, I think I know what's actually going on here (and it's mostly 'user error') -- seems like keeping the property name as users combined with the prompt that has multiple users causes the LLM to only want to specify a list for the entry. Interestingly, your updated prompt with only a single user specified works even when the property is named users (I guess the LLM can intuit that property is just named poorly).
This is consistent with the original error, which, re-reading, makes it clear enough that the model was trying to stuff a [] where it didn't belong:  Input should be a valid dictionary or instance of PartialUser [type=model_type, input_value=[], input_type=list].
I independently ran into this issue on my own code, so I assume I must've done something similar (named something as a singular when expecting a list, or vice versa).
Some good LLM learning! Thanks for working with me to debug.

I hate llms, probably true lol

its almost too smart, but agree it feels like a funny face of user error??
i deleted the s without thinking

authors: jxnl pmalacho-mit

repo: jxnl/instructor


text:
🛑 le Zata is down

In 55fa04e, le Zata (http://zata.free.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: le Zata is back up in 01ed6ba.

repo: jyhem/upptime-jyhem


text:
Max value dont work with zero decimal places

Hi,
if you put inline max value like this: 1000.00 it doesn't work, however 1000.01 works fine.
Demo: http://jsfiddle.net/F2a36/

I'm sorry for the lack of activity on this issue. Instead of leaving it open any longer, I decided to close old issues without trying to address them, to longer give the false impression that it will get addressed eventually, especially after several years with no activity. It doesn't mean I'm abandoning the project, just that I'm unable to work through 200+ open issues with the little time I can afford to spend on this project.
To the reporter (or anyone else interested in this issue): If you're still affected by the same issue, please consider opening a new issue, with a testpage that demonstrates the issue with a current version of the plugin. Even better, make an attempt to fix the issue yourself, and improve the project by sending a pull request. This may seem daunting at first, but you'll likely learn some useful skills that you can apply elsewhere as well. And you can help keep this project alive. We've documented how to do these things, too. A patch is worth a thousand issues!

Hey,
That's fair enough. :)
But I think closing the issue might be misleading for some people, you should rather tag it help wanted

#1391 should solve this.

@danielhusar its now fixed :-)

authors: danielhusar jzaefferer

repo: jzaefferer/jquery-validation


text:
Encountered an issue while loading the model using transformers

I try to load the model with transformers,
 small_model = AutoModelForCausalLM.from_pretrained(approx_model_name,                                                         torch_dtype=torch.float16,                                                        device_map="auto",                                                        trust_remote_code=True)
but error occurs,
OSError: Unable to load weights from pytorch checkpoint file for '/mnt/data3/lyk/models/tinyllama-1.1b/pytorch_model.bin' at '/mnt/data3/lyk/models/tinyllama-1.1b/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
and when I set from_tf=True, another error occurs
AttributeError: module transformers has no attribute TFLlamaForCausalLM
My package is torch2.1.0, transformers 4.39.3

I encountered the same issue. It seems to be a bug in scripts/convert_lit_checkpoint.py. The model cannot be loaded due to UnicodeDecodeError (transformers 4.40.1).
Traceback (most recent call last):
  File "/home/user/.conda/envs/py39pt23/lib/python3.9/site-packages/transformers/modeling_utils.py", line 542, in load_state_dict
    if f.read(7) == "version":
  File "/home/user/.conda/envs/py39pt23/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 64: invalid start byte

It works in transformers 4.35.0, so I load the model in this version and save it again using standard API, then the model can be loaded from future transformers versions. Note that I have safetensors installed, so the local model is saved as model.safetensors
# transformers 4.35.0
model = AutoModelForCausalLM.from_pretrained(model_path)
model.save_pretrained("local/path")

# transformers 4.40.1
model = AutoModelForCausalLM.from_pretrained("local/path")  # ok
# model = AutoModelForCausalLM.from_pretrained(model_path)  # UnicodeDecodeError, OSError


text:
Create sentences on page open (for reading)

I'd like to include at least one sentence for Anki exports ( #3 ), but currently sentences aren't created until the page is marked read.
Instead, the sentences could be created when the page is rendered for reading.  The sentences still shouldn't be used until the page is marked "read" when showing the term references (using the Sentences link), but they should at least be available for export.  That way, if someone reads a page and creates a term, when they export to Anki at least one term would be available.

Done in develop.

Launched in 3.1.1


text:
Combine "parent term mapping" and "term import"

Currently, "parent term mapping" is handled at "Import Parent Term mapping", and "term import" at "Import Terms".  From a user's perspective, there's no real need for a difference, they're both just file imports.  The parent term mapping takes a "parent [tab] child" mapping file, and the term import takes a CSV with several columns.
The Term Import could take a CSV with variable number of fields.  Minimum required fields: language, term.  Optional fields would be the rest.  So, a parent mapping file could contain something like
language,term,parent
Spanish,gatos,gato

and the full import could have the whole thing.

The actually is a difference -- when mapping children to parents, the import file only creates and maps children if their parents are present.
So, if the import file for parent - child mapping was as follows:
dog    dogs

If "dogs" exists, but "dog" does not, only then is "dog" is created.
This is different behaviour from the "Import Term" feature, which just creates things, e.g.
dog    dogs

would create the dog term and the dogs term, if both were missing.

This ticket is incorrect and can't be done as-is.  While the parent term mapping stuff may be confusing, perhaps that's a good thing, at least until I sort out how it might work better -- and that will only happen as I start to use it, or as other conscientious users get back to me with notes.

repo: jzohrab/lute

license: Unlicense


text:
🛑 Hacker News is down

In cb12d02, Hacker News (https://news.ycombinator.com) was down:

HTTP code: 502
Response time: 295 ms

Resolved: Hacker News is back up in e590160 after 8 minutes.

repo: k-hal/upptime


text:
New recipe: tiny_transducer_ctc

This recipe is intended for streaming ASR on very low cost devices, with model parameters in the range of 1-2M and less than 0.1GOPS . It uses a small convolutional net as the encoder. It is trained with combined transducer and CTC losses, and supports both phone and BPE lexicons. The encoder consists of 2 subsampling layers followed by a stack of Conv1d-batchnorm-activation-causal_squeeze_excite blocks, with optional skip add. It's a bit similar to CitriNet and ContextNet, but even smaller.
For WER and more details see README.md. Note that transducer decoding does NOT require external LM, therefore the WER looks higher than CTC.

I get noticeable WER improvements just by enabling tf32 (see https://pytorch.org/docs/stable/notes/cuda.html#tensorfloat-32-tf32-on-ampere-devices). Will update the WER once all models' results are ready.

Thanks. Could you also support streaming decoding with cached left context for the causal convolutional modules, like streaming_decode.py in recipe conv_emformer_transducer_stateless2?

Thanks. Could you also support streaming decoding with cached left context for the causal convolutional modules, like streaming_decode.py in recipe conv_emformer_transducer_stateless2?

Looks like there's some work involved, will get to it when I have the time!

Hi wangtiance, it looks like some of the files need to be black formatted to match the requirements, would you please look into that?
Thank you!

Hi wangtiance, it looks like some of the files need to be black formatted to match the requirements, would you please look into that?
Thank you!

Reformatted. Now all checks have passed.

authors: JinZr wangtiance yaozengwei


text:
Update go.mod

update default golang version

Thanks!

authors: csukuangfj wxbool