Predict for future date without target value

I need to predict for future dates with some dates missing in between the training date and the date I wan to predict. So I wont be having any target values.
When I use Nan for target series, My forecast is mostly on 0.

Hi @ManikandanThangavelu,
thank you for using GluonTS.
Using NaNs would be our recommended way of handling this. Another option would be to manually impute the missing values yourself (using time series means, for example).
Please note that "cold-start' forecasts (not having any target values in the context before prediction), will be generally of lower quality than forecasts that have context data.
Hope that helps!

Hi @mbohlkeschneider
Thanks for your answer.
The predictions are not good when I use Nan and my question would be why should we provide target values if the model is already been trained in the historical data. Won't sending the dates should be enough for the model to predict. Like we do in other algorithms like Prophet.

Hi @ManikandanThangavelu,
It depends on the algorithm, of course. DeepAR uses the context target values to update the hidden state and compute the distribution parameters with the learned weights (that are estimated during training). You can find more information in the DeepAR paper.

HI @mbohlkeschneider
That explains it. Can you please suggest an algorithm in GluonTs that won't need a target value while predicting and some examples if possible.

Hi @ManikandanThangavelu,
all of our models use the target values, if I recall correctly.

Hi @mbohlkeschneider,
Any model that will perform well even if the target value is Nan?.

That is hard to say in general terms. I would suggest to experiment if any of the models works for you.
Best,
Michael

Sure... Thank you.
Closing the issue

@ManikandanThangavelu it seems that the DeepAR estimator is not taking NaN values in the training set? what can you suggest?

I have the same doubt.
How to forecast the target values with gluonts DeepAR?
I have a time series from 1995-01-01 to 2021-10-01. Frequency=monthly.
How to forecast values for the future (next 3 months): 2021-11-01 to 2022-01-01?
Note that I dont have the target values for 2021-11-01, 2021-12-01 and 2022-01-01.
Many thanks.

Are you touching on ”make_evaluation_predictions"?
You can use "predict".

Actually, I would like to know the target values for "2021-11-01", "2021-12-01" and "2022-01-01". I have a time series from "1995-01-01" to "2021-10-01". Monthly frequency. How to forecast values for the next 3 months: "2021-11-01", "2021-12-01" and "2022-01-01"? Here is the code:
from gluonts.model.deepar import DeepAREstimator
from gluonts.mx import Trainer
import numpy as np
import mxnet as mx

np.random.seed(7)
mx.random.seed(7)

estimator = DeepAREstimator(
    prediction_length=12
    , context_length=120
    , freq='M'
    , trainer=Trainer(
        epochs=5
        , learning_rate=1e-03
        , num_batches_per_epoch=50))

predictor = estimator.train(training_data=df_train)

# Forecasting
predictions = predictor.predict(df_test)
predictions = list(predictions)[0]
predictions = predictions.quantile(0.5)

print(predictions)
[163842.34  152805.08  161326.3   176823.97  127003.79  126937.78
 139575.2   117121.67  115754.67  139211.28  122623.586 120102.65 ]

As I understood, the predictions values are not for "2021-11-01", "2021-12-01" and "2022-01-01". How do I know to wich months this values refer to? How to forecast values for the next 3 months: "2021-11-01", "2021-12-01" and "2022-01-01"?
Many thanks!

You set prediction_length to 12 in DeepAREstimator, so you got 12 values.
First 3 values is those you want to get, I think.
Hope this helps.

Take a look at this code. It comes from "Advanced Forecasting with Python".
https://github.com/Apress/advanced-forecasting-python/blob/main/Chapter 20 - Amazon's DeepAR.ipynb
It does not seem to forecast unknown future values, once it compares the last 28 values of test_ds   (Listing 20-5. R2 score and prediction graph)  with the predictions made over this same dataset test_ds (Listing 20-4. Prediction)
How do I forecast  unknown future values?
Many thanks!
# Data source
# https://www.kaggle.com/c/recruit-restaurant-visitor-forecasting

# Listing 20-1. Importing the data
import pandas as pd
y = pd.read_csv('air_visit_data.csv.zip')
y = y.pivot(index='visit_date', columns='air_store_id')['visitors']
y = y.fillna(0)
y = pd.DataFrame(y.sum(axis=1))

y = y.reset_index(drop=False)
y.columns = ['date', 'y']

# Listing 20-2. Preparing the data format requered by the gluonts library
from gluonts.dataset.common import ListDataset
start = pd.Timestamp("01-01-2016", freq="H")
# train dataset: cut the last window of length "prediction_length", add "target" and "start" fields
train_ds = ListDataset([{'target': y.loc[:450,'y'], 'start': start}], freq='H')
# test dataset: use the whole dataset, add "target" and "start" fields
test_ds = ListDataset([{'target': y['y'], 'start': start}],freq='H')

# Listing 20-3. Fitting the default DeepAR model
from gluonts.model.deepar import DeepAREstimator
from gluonts.trainer import Trainer
import mxnet as mx
import numpy as np

np.random.seed(7)
mx.random.seed(7)

estimator = DeepAREstimator(
    prediction_length=28,
    context_length=100,
    freq=’H’,
    trainer=Trainer(ctx="gpu", # remove if running on windows
                    epochs=5,
                    learning_rate=1e-3,
                    num_batches_per_epoch=100
                   )
)

predictor = estimator.train(train_ds)

# Listing 20-4. Prediction
predictions = predictor.predict(test_ds)
predictions = list(predictions)[0]
predictions = predictions.quantile(0.5)

# Listing 20-5. R2 score and prediction graph
from sklearn.metrics import r2_score
print(r2_score( list(test_ds)[0]['target'][-28:], predictions))

import matplotlib.pyplot as plt
plt.plot(predictions)
plt.plot(list(test_ds)[0]['target'][-28:])
plt.legend(['predictions', 'actuals'])
plt.show()

Why don't you ask Apress?
I don't think this code is correct.

Good afternoon all.
I have the same doubt, how to forecast future values without having the targets?

ave the same doubt.
How to forecast the target values with gluonts DeepAR?
I have a time series from 1995-01-01 to 2021-10-01. Frequency=monthly.
How to forecast values for the future (next 3 months): 2021-11-01 to 2022-01-01?
Note that I dont have the target values for 2021-11-01, 2021-12-01 and 2022-01-01.
Many thanks.

I have to same issue to ask

ave the same doubt.
How to forecast the target values with gluonts DeepAR?
I have a time series from 1995-01-01 to 2021-10-01. Frequency=monthly.
How to forecast values for the future (next 3 months): 2021-11-01 to 2022-01-01?
Note that I dont have the target values for 2021-11-01, 2021-12-01 and 2022-01-01.
Many thanks.

I have to same issue to ask

hello @zhongxianmen2020 , you must use the predcit function:


Strike stay Ara Najarian membership

Connects adding his middle initial.
https://lametro-app-upgrade.datamade.us/committee/executive-management-committee-d52d7f095399/

will this also add Nagarian's title to his new membership? It's missing on his committee memberships.

Will investigate, thanks for flagging, @shrayshray!

@hancush we're also seeing duplicates of the other Board members updated recently - Holly J. Mitchell and Gloria Roberts. Could you prioritize fixing this so the duplicates are removed before we post items for the Committee meetings?

Done


Update backup restore docs

We should note that the backup operator should only be installed in the local cluster. I also think it is a good idea to call out that it’s s only backing up the Rancher management workload.

@cloudnautique The chart is hidden from downstream clusters, and there's a note in the main backups page that it it to be installed only in the local cluster. Also since the docs call it rancher backup, I think that will make it clear that it's only backing up the rancher app


Need an invoke function for getting at subscriptionId

In ARM templates, subscription() template function is pretty common: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource#subscription
Would be helpful to expose an invoke function to get this information, see something similar here: https://github.com/pulumi/pulumi-azure/blob/master/sdk/nodejs/core/getClientConfig.ts#L22

Also, tenant ID and object ID

0.4.0 ships the getClientConfig invoke, here is a quick example in TypeScript:
import * as authorization from "@pulumi/azure-nextgen/authorization/latest";
const config = pulumi.output(authorization.getClientConfig());
const subscriptionId = config.subscriptionId;
const currentObjectId = config.objectId;

0.4.0 ships the getClientConfig invoke, here is a quick example in TypeScript:
import * as authorization from "@pulumi/azure-nextgen/authorization/latest";
const config = pulumi.output(authorization.getClientConfig());
const subscriptionId = config.subscriptionId;
const currentObjectId = config.objectId;


Audio fails to start in Safari 14.0.2

I've been battling with Safari and audio problems for a while, but that seems to be a new issue.
I understand that modern browsers only allow audio to play after there has been some interaction with the user (e.g. a click on a button). In a new experiment, the participants go through the instructions by hitting the spacebar or clicking on a piece of text. Then come some trials using the audio-keyboard-response plugin. In Firefox and Chrome, the sound plays just fine (whether the user clicks or presses the spacebar), but in Safari, nothing happens, and it just hangs silently.
To unlock it, I had to add an async call-function trial that displays a button with a callback that calls jsPsych.pluginAPI.audioContext():
    const is_Safari = /Version\/.*Safari\//.test(navigator.userAgent) && !window.MSStream;
    if(is_Safari){
        timeline.push({
            type: 'call-function',
            async: true,
            func: function(done){

                var display_element = document.getElementById('jspsych-content');

                display_element.innerHTML = "
Click on the screen to start...
";
                //var init_button = display_element.querySelector('#safari_audio_init');

                function init_audio_files(){
                    jsPsych.pluginAPI.audioContext();
                    done();
                }

                document.addEventListener('touchstart', init_audio_files, false);
                document.addEventListener('click', init_audio_files, false);
            }
        });
    }

It is a pain... but it works... I tried to have just a button without the jsPsych.pluginAPI.audioContext() callback, and it did not work. This is the only combination that worked, and with or without webAudio made no difference.
Honestly, I don't think there is anything wrong with jsPsych. I don't know why Safari makes it extra hard and quirky to get audio started... I'm going to make a plugin to deal with this automatically, but if there's some more insight out there, that'd be great!

To clarify, I am guessing that the difference between Safari and Chrome is that Chrome accepts any user interaction since context initialisation to unlock the audio context, while Safari only accepts user interactions that are directly linked to the audio context? As a result, I haven't found a way to make a feature-based case discrimination... and am thus relying on ugly User Agent parsing...
Meanwhile, here's the plugin:
/**
 * jspsych-audio-safari-init
 * Etienne Gaudrain
 *
 * Safari is the new Internet Explorer and does everything differently from others
 * for better, and mostly for worse. Here is a plugin to display a screen for the user to click on
 * before starting the experiment to unlock the audio context, if we are dealing with Safari.
 *
 **/

jsPsych.plugins["audio-safari-init"] = (function() {

    var plugin = {};

    //jsPsych.pluginAPI.registerPreload('audio-safari-init', 'stimulus', 'audio');

    plugin.info = {
        name: 'audio-safari-init',
        description: '',
        parameters: {
            prompt: {
                type: jsPsych.plugins.parameterType.STRING,
                pretty_name: 'Prompt',
                default: "Click on the screen to start the experiment",
                description: 'Any content here will be displayed below the stimulus.'
            }
        }
    }

    plugin.trial = function(display_element, trial) {

        // Ideally, we would want to be able to detect this on feature basis rather than using userAgents,
        // but Safari just doesn't count clicks not directly aimed at starting sounds, while other browsers do.
        const is_Safari = /Version\/.*Safari\//.test(navigator.userAgent) && !window.MSStream;
        if(is_Safari){
            display_element.innerHTML = trial.prompt;
            document.addEventListener('touchstart', init_audio);
            document.addEventListener('click', init_audio);
        } else {
            jsPsych.finishTrial();
        }

        function init_audio(){
            jsPsych.pluginAPI.audioContext();
            end_trial();
        }

        // function to end trial when it is time
        function end_trial() {

            document.removeEventListener('touchstart', init_audio);
            document.removeEventListener('click', init_audio);

            // kill any remaining setTimeout handlers
            jsPsych.pluginAPI.clearAllTimeouts();

            // kill keyboard listeners
            jsPsych.pluginAPI.cancelAllKeyboardResponses();

            // clear the display
            display_element.innerHTML = '';

            // move on to the next trial
            jsPsych.finishTrial();
        }

    };

    return plugin;
})();

For use_webaudio=false, one has to use the play/pause trick on one sound... To do that, I exposed the list of ids of preloaded sounds in jsPsych.js by adding, before return module:
module.preloaded_audio_IDs = function(){ return Object.keys(audio_buffers) };

Then in the plugin, the init_audio function looks like this:
function init_audio(){
    var context = jsPsych.pluginAPI.audioContext();
    if(context==null){
        jsPsych.pluginAPI.preloaded_audio_IDs().slice(0,1).forEach(function(a){
            var b = jsPsych.pluginAPI.getAudioBuffer(a);
            b.play();
            b.pause();
            b.currentTime = 0;
        });
    }
    end_trial();
}

This seems to cover all cases.
Note that I think that it could be in general useful to expose some access to preload buffers.

I made a minimalistic case trial here: https://dbsplab.fun/test/jspsych/test_jspsych-audio-safari-init.html.
Doing so I think it is a bit clearer which cases this concerns, but I am still not 100% certain.
It looks like the issue arises only when there has been no click on elements of the DOM that were not generated by javascript. If I create HTML buttons on the page that trigger jsPsych.init, the issue does not occur. But if the first click occurs on elements that were javascript generated, they need to be connected to the audio in some form to unlock the playback...

Thanks so much for all of this info @egaudrain.
I'm certainly open to different ways of solving this. It sounds like a generic solution is going to be tough to generate right now, but perhaps we can add some of these approaches to the preload plugin that we're currently working on. Or maybe we should have an init-audio plugin like the one you've created and recommend that people use it when running audio experiments. Obviously if there is a way to modify how we are handling audio files that fixes this behind the scenes I'm all for that.
I don't have easy access to a mac right now so I can't do much testing of possible fixes.

Thanks very much @egaudrain! Do you happen to know whether this problem will replicate on an iPad (iOS / Safari 14). If so then I can help test.
If I understand correctly, it sounds like this isn't something that we can address with changes to the preload plugin or any of the audio-* plugins, because this is all about initiating the audio context via a user interaction, and the form of that interaction isn't something that we know about or have access to inside the preload or audio plugins.
I guess we could add a parameter to audio-* plugins for whether or not to do this interaction/initialization at the start of the trial. But that would mean using a different parameter value for the first vs subsequent audio trials. And it would require adding more parameters to audio plugins related to the interaction (text on the screen, button vs keyboard response, etc.), all of which replicate behavior that is already covered by other plugins.
Maybe another option is to have a universal plugin parameter that flags a particular trial as an 'audio interaction' trial. This way the init_audio function could be stored in jspsych.js and added as a click or keyboard event handler in the plugin. But this might be a little tricky and time-consuming to set up.
So my view is that your standalone init-audio plugin makes the most sense, and as Josh says, we could just recommend using it in audio experiments (at least when the researcher wants to allow Safari).

Thanks for your feedback, @jodeleeuw and @becky-gilbert! I had a look at the preload plugin. Is there a discussion item somewhere that outlines the rationale?
But I also agree with your analysis, @becky-gilbert. Integrating the Safari odd case would mean looking though the timeline, checking if there are clickable elements (if that's possible) before the first sound is played, locate the first one, and add a 'click' callback that starts an audio context. And if there isn't any clickable element, add a button at the beginning that activates the audio context.
Another workaround would be to always recommend triggering jsPsych.init() through the click of an HTML button (hard-coded, not JS generated). Then, I think it would always work... That feels a bit cumbersome, but on the other hand, it is perhaps not a bad practice in keeping with the rationale behind all these autoplay restrictions. I'll add this to the test case.
I haven't found much documentation on all these yet. I don't know if it is a Safari oddity, or if it is in AppleWebKit. If so, likely Chrome will be hit by the same issue when it catches up in version numbers. To be safe, I had been looking for ways to detect it using feature-based detection (i.e. trying to create a context and see if it is created suspended or not), but the different between browsers seems to be in what user interaction they consider when allowing the audio context to resume... and I have no clue how to test that.
Regarding iPad, unfortunately I do not have direct access to one to try, so if you do, perhaps you can try the test case above. If the sound plays without the init-audio plugin (i.e. first button), then we're good.

I had a look at the preload plugin. Is there a discussion item somewhere that outlines the rationale?

Yep the preload plugin issue is #1351. The first comment in that issue thread references pull request #1234, which is also relevant. Please feel free to share your thoughts.

Regarding iPad, unfortunately I do not have direct access to one to try, so if you do, perhaps you can try the test case above.

Sorry, I missed your test link before. Thanks for putting this together! I tried on my iPad but couldn't get to the audio trial because it requires a space bar press, and I'm on touchscreen only. Just let me know if you have a chance to change from a keypress to button to start the audio trial, and I'd be happy to try testing again.

Ahah, of course! I modified it such that you can just wait 2s before the sound is played (I had put the spacebar trial just to check that pressing a key wasn't enough to count as user gesture).
Also I tried it with Safari 14.0.3, the behaviour is identical. And I tried it in an XCode simulated iPad with iOS 13 (which should be Safari 13) and it is the same as well (although I am not entirely sure to what extent the simulation is faithful).
Another side note, perhaps worth mentioning: the safari-init plugin is invisible because the event listener on document that is created in the trial function of the plugin catches the click on the button in the previous trial, I assume, as the event is bubbling up...? This is the same in Chrome, but it took me a while to understand, and I am still scratching my head as to how an event listener created after the event was triggered can still capture the event...

Hi. Today I've experienced the same problem while testing an experiment (which uses the image-audio plugin from @becky-gilbert - thanks BTW) in different browsers. It works in firefox and chrome, but in Chromium (the free software version of chrome) it fails as @egaudrain experienced in safari. Actually it fails jsPsych initialization, I'll post the logs from Chromium below.
The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ jspsych.js:46
(anonymous) @ jspsych.js:1067

Note that I'm still using version 6.2 of jsPsych and line 46 corresponds to:
core.webaudio_context = (typeof window !== 'undefined' && typeof window.AudioContext !== 'undefined') ? new AudioContext() : null;

The link from the error points to autoplay policy changes from the browser and it contains some workarounds for the problem.

Aha, thanks @charles2910, really helpful to know that Chromium causes the same problem. Are you able to use @egaudrain's safari-init plugin as a temporary workaround? Or trigger jsPsych.init from a button click?
BTW I think this same console message:

The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.

shows up a lot when audio is used in jsPsych experiments, but doesn't always cause the experiment to break.
And @egaudrain, I forgot to say thanks for updating your test link to work with touchscreens. I did try this on my iPad and am getting exactly the same behavior you described.

Hi, I have some news. I tried the safari init plugin and it doesn't work. Now to the interesting part. I use Debian (GNU/Linux distribution) and the audio only works on firefox, today I tried on Chrome too and it doesn't work, the webaudio_context is initialized but suspended before any interaction with the window. After the interaction with the safari plugin or the welcome screen that I have, it changes to running, but the image-audio-response shows "Audio recording not possible.". The interesting is that on windows, this problem doesn't happen on Chrome, so I think it may be related with the OS and how the browser was compiled.

As far as I understand it, as @becky-gilbert noted, the AudioContext is always created suspended. On macOS, hat happens with Firefox, Chrome and Safari. However, it is only suspended until there is a user interaction. That's where Safari differed from other browsers: it looks like, in Safari, a click on a JS generated button does not resume the AudioContext, but other browsers do allow that. One workaround I've found that should work in all browser is to have a button hard-coded in your HTML, and call jsPsych.init() in the callback of that button... That seems to work on all browsers. Do you want to try this? Actually you can perhaps try the test-case I had prepared and see what works and what doesn't: https://dbsplab.fun/test/jspsych/test_jspsych-audio-safari-init.php.

And @egaudrain, I forgot to say thanks for updating your test link to work with touchscreens. I did try this on my iPad and am getting exactly the same behavior you described.

@becky-gilbert, thanks for trying on an iPad! At least there is consistent behaviour :)
I tracked down some people responsible for Safari on Twitter, but they didn't know anything specific about it. I need to prepare a pure JS test-case that's not jsPsych-dependent to submit to them. The online documentation is extremely vague on the matter... to the point that I wondered if there wasn't voluntary obfuscation since this is a feature that's supposed to prevent exploitation from unscrupulous advertisers... but maybe I'm being paranoid.

Thanks for providing the tests @egaudrain. Feedback:

All the options worked with Chrome and Chromium, I could hear the audio;
Only when using "with HTML button" option the error is absent.

Note that the trial I'm using is to record audio after a image is displayed. This plugin is from @becky-gilbert.

Hi @charles2910, I think the "Audio recording not possible" error that you're getting with the image-audio-response plugin is separate to this issue, which is about getting audio to play and the browser's user interaction requirement. The audio-response plugins use the MediaRecorder API, which is not supported in Safari - I've noted this in the plugin docs here. I'm not sure if the MediaRecorder API is supported in Chromium.
Also, the "Audio recording not possible" message that you're seeing is related to the getUserMedia function, which tries to access the computer's mic. So in addition to the browser compatibility issues, there are a few other reasons why you might see this error, e.g. another program on the computer is already accessing the mic. This blog post has a list of reasons why getUserMedia can fail.
Apologies if I misunderstood the problem you're having. But if you think you're running into a separate problem with the image-audio-response plugin, then feel free to follow-up on this thread about audio recording: #494.

Oh boy. @becky-gilbert you're right, they are two different issues. Turns out that firefox is a little dumber and let me record audio even without having a microphone, but Chrome(ium) does not.

The issue I faced was that jsPsych (use_webaudio: true) is calling the audio after a setTimeout (in TimeoutAPI) and not from the click.  The solution I used is to play an empty sound file directly from a click early in the task e.g.:
            const soundEffect = new Audio();
            soundEffect.autoplay = true;
            soundEffect.src = "data:audio/mpeg;base64,SUQzBAAAAAABEVRYWFgAAAAtAAADY29tbWVudABCaWdTb3VuZEJhbmsuY29tIC8gTGFTb25vdGhlcXVlLm9yZwBURU5DAAAAHQAAA1N3aXRjaCBQbHVzIMKpIE5DSCBTb2Z0d2FyZQBUSVQyAAAABgAAAzIyMzUAVFNTRQAAAA8AAANMYXZmNTcuODMuMTAwAAAAAAAAAAAAAAD/80DEAAAAA0gAAAAATEFNRTMuMTAwVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/zQsRbAAADSAAAAABVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/zQMSkAAADSAAAAABVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV";

This is nothing to do with the framework, it is iOS (and other browsers) policy to block auto-playing media.
to respond to @egaudrain:

I don't know why Safari makes it extra hard and quirky to get audio started

History of the policy was because media autoplay was abused by advertisers, and does burn bandwidth on behalf of users before they can stop it. Documentation on the blockage is not great, but it is clear enough to understand the rules.

Thanks @qbunt, after some research, we had indeed figured out that much. The issue boiled down to the fact that there is no clear documented definition of what Safari considers a "user gesture" and some cases were defying our intuition.
But this issue is a bit old, I haven't had much time to look at it more in details (and jsPsych switching to TypeScript has spooked me a bit), and everything could be different by now. At the time, it seemed that, sometimes, clicks on JS generated buttons were not good enough for Safari to unlock playback  (see above). It worked to use an HTML button as a workaround for cases where we wanted the test to be ran on iOS or iPad, despite the fact that the HTML button is there before the AudioContext is created... so definitely some unexpected behaviour. If you get to the bottom of this, it would be great to have some workarounds documented somewhere.

@egaudrain all good, 2 years is a long time. Definitely no easy answers. We haven't seen JS or static html make any difference, but if buttons are added/removed from the tree, that will trip Safari up.
The thing that PsychJS could do is require an element first for interaction for media with audio (only on iOS, super problematic) OR use all three required attributes to play as expected without interaction if it can play without full screening the video (not full screening the UI)

autoplay
muted
playsinline

Obviously can't work for anything with audio, so that would have to force the interaction first. Simplest way to handle would be an overlay on the video element but it's real intrusive in a clinical setting.


WIP: Add US Equities loader for FFC.

Not ready to merge, requires at unit tests beforehand.
To use this branch locally:

download bcolz file from internal server
ln -s $path_to_file .
python -m zipline.data.ffc.shims.us_equity_pricing_index
python -m zipline.data.ffc.shims.us_equity_pricing_test

Implement FFC loader for US Equity daily pricing using a bcolz file.
The bcolz file packs all of history in blocks of equities, which include
0 values representing nan-values.
The loader uses the offset information for each equity to get a start
and end position for each sid then slices the data for each sid, and
puts the result into the output container.
All data is read into memory since in testing reading it all in and then
using indexing into the np vector is faster than repeatedly making the
bcolz logic determine what blocks to load, when using many sids.
Includes a shim us_equity_pricing_test which tries an approximate
average use case of a years worth of data and 8000 sids.
In local testing this query takes ~300ms to execute.
Some questions inline with code comments and in README's.

cc: @ssanderson

@ehebert closing this since the core functionality has been merged to my dev branch


Session problem with Brave browser

Thanks for this awesome library - I'm using it a lot.
However, I'm facing session problems with brave browser and since there are a few people using this browser, I just wanted to mention it. It instantly looses session after login.
When login with the "remember me" option for 1 year, it keeps the session for a few minutes with brave.

Thank you!
What version of Brave (and on what OS) are you using?
Could you open the developer tools and check the status of the two cookies, i.e. if they are created, with what parameters, and when they are lost? It’s probably best to start with a clean state of zero cookies for the domain.

And does your site happen to use frames?

I'm using Version 1.37.116 Chromium: 100.0.4896.127 on windows 10 64 Bit.
The 2 cookies are created:

and should last during the whole session.
All the PHP session variables are created as well - but only if i read them right after $auth->login($_POST['email'], $_POST['password']) ... 1 click on the page and the PHP session variables are gone, but the 2 cookies remain.

Thank you!
That could be the cause of the problem already. There should only be one session cookie (“PHPSESSID”). So these two are always re-created, even if you delete them entirely (and any other cookies for the domain)? If there are two, that could lead to a conflict, where the server does not receive the cookie it expects but the other one.
With “remember me” enabled, that should then be three cookies in your setup?


chore(main): release 1.5.0

:robot: I have created a release beep boop
1.5.0 (2024-12-02)
Features

handle exit error globally (#49) (8018475)
use exact bun version to build (#51) (72ed67b)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v1.5.0
:sunflower:


Requests templates

First

[x] I have read and understand the Contributing documentation.

Description

Update CONTRIBUTING.md, ISSUE_TEMPLATE.md, and PULL_REQUEST_TEMPLATE.md.  Updated formatting to make it easier to complete and read. Also the same formatting is used across all of the documents. New template is being used in this PR.
Types of Changes

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

Issues

Pull Requests

[ ] Frontend in home-assistant-polymer:
[ ] Documentation in home-assistant.io:
[ ] Javascript in home-assistant-js:

Configuration.yaml Example
[your-code]

Screenshots (if applicable)

Checklist

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.
[ ] Changes add/change user functionality or configuration variables. Requires items below

[ ] Documentation has been updated and pull request has been submitted.
[ ] Pull request link is listed in Pull Requests section above.

[ ] New code communicates with devices or webservices. Requires items below

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

@kellerza Thanks for the feedback. I'll look into making those changes. I based this on templates from other major projects, github, and what was already there. On the checkboxes, it was already setup for not all of the checkboxes to be marked.

Perfect, apologies if some of the feedback was a bit harsh :-)
Checkboxes don't have to be marked, but it is nice to see the "progress" of the tasks (each task represented by a checkbox) -- I always end up deleting the non-relevant ones...

That's a good idea. I can put in an instruction to remove non-applicable tasks.

I would suggest another box in

Types of Changes

Cleanup / Refactoring

This template is very long, taking up a lot of vertical space. Let's try using smaller headers and answers that can be filled in on the same line.
Type of changes: bug fix / feature
Description

Thanks for all of the input. I'm going to close this for now and I'll come back to it later.


whitespace required errors

seeing this with a new vim version
Error detected while processing /Users/gedge/.vimrc[45]..function pathogen#infect[17]..pathogen#interpose:
line   10:
E1004: White space required before and after ':'

fixed in #214

also may have been fixed in https://github.com/vim/vim/commit/a04d447d3aaddb5b978dd9a0e0186007fde8e09e

also may have been fixed in https://github.com/vim/vim/commit/a04d447d3aaddb5b978dd9a0e0186007fde8e09e

also may have been fixed in https://github.com/vim/vim/commit/a04d447d3aaddb5b978dd9a0e0186007fde8e09e

also may have been fixed in https://github.com/vim/vim/commit/a04d447d3aaddb5b978dd9a0e0186007fde8e09e

this is a vim bug, that has been fixed.

this is a vim bug, that has been fixed.

Merged anyways, no harm in supporting this one weird patch level of Vim.

Merged anyways, no harm in supporting this one weird patch level of Vim.


[PROJECT] Design work on expenses and transactions

Overview
We are bundling up some issues regarding expenses+transactions, so we have complete visibility on the changes regarding the budget features and merge/push to implementation all of them.
List of issues/goals

[x] #1073
[x] #4751 (Continuation)
[x] #4785 (Production files)
[ ] #4113
[ ] https://github.com/opencollective/opencollective/issues/4874
[ ] #4984

Plan for this week

[ ] #1073
[ ] #4751 (Continuation)
[ ] #4984

Plan for this week / W3S2Q4 - Week 49

[ ] #1073
[ ] #4751 (Continuation)
[ ] #4984

[ ] Transactions list filters redesign #4984

[ ] seek feedback

Closing this to track transactions updates and expenses updates on separated issues:
https://github.com/opencollective/opencollective/issues/4874
https://github.com/opencollective/opencollective/issues/4785


Dataverse choices(option set) columns descriptive values?

We have a Dataverse(CDS) which pushes data into azure data lake storage (in model.json format). We use datafactory mapping dataflow to read the CDM folders.
For fields of type Choices (Option set) how do we get the descriptive names. Example Account table has statuscode 1 or 2 (1 = Active and 2=Inactive) how do we get the words "Active" and "Inactive"?
Does CDM connector have any ability to convert the codes? I can see in data lake storage gen2 the values are stored in this file Microsoft.Athena.TrickleFeedService/account-EntityMetadata.json

acount-EntityMetadata.json file screenshot

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

ID: ba002086-e5b7-023a-4f1c-d8912c67cecd
Version Independent ID: 6bab0cb3-7eae-644d-36ab-8f8676e78932
Content: Common Data Model format - Azure Data Factory
Content Source: articles/data-factory/format-common-data-model.md
Service: data-factory
GitHub Login: @kromerm
Microsoft Alias: makromer

@subashsivaji Thanks for your feedback! We will investigate and update as appropriate.

@kromerm - Can you please take a look and share your thoughts

You will do code mapping like this through a Lookup transformation inside of an ADF data flow. The lookup will use a data source that is the acount-EntityMetadata.json file. Just read it in like a normal JSON source from storage, not as a CDM source.

#please-close


JSDoc: error TS1005 when using conditional type in @typedef

TypeScript Version:  3.9.0-dev.20200229

Search Terms: JSDoc typedef
Expected behavior: compile javascript JSDoc without any errors
Actual behavior: Actually, tsc compiles correct d.ts type, but annoying error '?' expected appears. You can see that error on the Playground's Errors tab.

Related Issues:
Code
/**
 * @template T
 * @typedef {{[K in keyof T]: T[K] extends Function ? K : never}[keyof T]} FunctionProperties
 */

Compiler Options
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "alwaysStrict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "esModuleInterop": true,
    "checkJs": true,
    "allowJs": true,
    "declaration": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "moduleResolution": 2,
    "target": "ES2017",
    "jsx": "React",
    "module": "ESNext"
  }
}

Playground Link: Provided

The JSDoc parser supports postfix-? types instead of conditional types, based on existing support in Closure. This syntax is not common, since it's not even standard Closure. However, removing it would require checking to see how much code out there we are breaking.

A grep through the user tests gives the following breakdown. The break wouldn't be that bad, but I'm not sure conditional types in JSDoc is worth the churn -- you can see that a number of widely-used projects use postfix-? types a few times each. Let's leave this open on the backlog to see if there's much demand for it.
postfix-?
eslint-scope (5)
eslint-plugin-jest (5)
nodemailer (1)
fbjs (1)
eslint (1)
wd (1?) (seems like it's an example, not a jsdoc type reference)
prettier (3)
webpack (2)
react-native (1)
svgo (1)
protobufjs (13)
grpc (1)
standalone ?
angular (100?)
puppeter (1)
zone.js (1)
react-dom (5)
react-native (2)
soap (4)
chrome-devtools-frontend (25?)
firebase (4)
Note that standalone ? should continue to work as a type, although I'd need to look at the parser code again to figure out if that's possible.
(Sorry for the annoying formatting)

#38747 shows another conflict -- postfix-? in tuple types. This one looks ambiguous to humans, too.

So, uh, tuple type parsing now relies on postfix-? ... So it kind of has to stay in. That means the simplest change is to keep postfix-?, but to choose the conditional type interpretation whenever it's ambiguous, even inside JSDoc.
I'll send out a PR soon.