Error using feat_dynamic_real from extended tutorial when predicting with DeepAR

Description
Using the extended example, when using dynamic real features, the estimator trains but predictions do not work - I get an error "ValueError: all the input array dimensions except for the concatenation axis must match exactly" even when passing the original training data through estimator.predict().
To Reproduce
from gluonts.model.deepar import DeepAREstimator
from gluonts.model.gp_forecaster import GaussianProcessEstimator
from gluonts.model.wavenet import WaveNetEstimator
from gluonts.model.simple_feedforward import SimpleFeedForwardEstimator
from gluonts.trainer import Trainer
from gluonts.evaluation import Evaluator
from gluonts.evaluation.backtest import make_evaluation_predictions
from gluonts.dataset.common import MetaData
import numpy as np

def create_dataset(num_series, num_steps, period=24, mu=1, sigma=0.3):
    # create target: noise + pattern
    # noise
    noise = np.random.normal(mu, sigma, size=(num_series, num_steps))

    # pattern - sinusoid with different phase
    sin_minumPi_Pi = np.sin(np.tile(np.linspace(-np.pi, np.pi, period), int(num_steps / period)))
    sin_Zero_2Pi = np.sin(np.tile(np.linspace(0, 2 * np.pi, 24), int(num_steps / period)))

    pattern = np.concatenate((np.tile(sin_minumPi_Pi.reshape(1, -1),
                                      (int(np.ceil(num_series / 2)),1)),
                              np.tile(sin_Zero_2Pi.reshape(1, -1),
                                      (int(np.floor(num_series / 2)), 1))
                             ),
                             axis=0
                            )

    target = noise + pattern

    # create time features: use target one period earlier, append with zeros
    feat_dynamic_real = np.concatenate((np.zeros((num_series, period)),
                                        target[:, :-period]
                                       ),
                                       axis=1
                                      )

    # create categorical static feats: use the sinusoid type as a categorical feature
    feat_static_cat = np.concatenate((np.zeros(int(np.ceil(num_series / 2))),
                                      np.ones(int(np.floor(num_series / 2)))
                                     ),
                                     axis=0
                                    )

    return target, feat_dynamic_real, feat_static_cat

# define the parameters of the dataset
custom_ds_metadata = {'num_series': 100,
                      'num_steps': 24 * 7,
                      'prediction_length': 24,
                      'freq': '1H',
                      'start': [pd.Timestamp("01-01-2019", freq='1H')
                                for _ in range(100)]
                     }

data_out = create_dataset(custom_ds_metadata['num_series'],
                          custom_ds_metadata['num_steps'],
                          custom_ds_metadata['prediction_length']
                         )

target, feat_dynamic_real, feat_static_cat = data_out

train_ds = ListDataset([{FieldName.TARGET: target,
                         FieldName.START: start,
                         FieldName.FEAT_DYNAMIC_REAL: fdr,
                         FieldName.FEAT_STATIC_CAT: fsc}
                        for (target, start, fdr, fsc) in zip(target[:, :-custom_ds_metadata['prediction_length']],
                                                             custom_ds_metadata['start'],
                                                             feat_dynamic_real[:, :-custom_ds_metadata['prediction_length']],
                                                             feat_static_cat)],
                      freq=custom_ds_metadata['freq'])

estimator = DeepAREstimator(train_ds,
                            prediction_length=24,
                            context_length=48,
                            freq='W',
                            use_feat_dynamic_real=True,
                            trainer=Trainer(ctx="gpu",
                                            epochs=100,
                                            num_batches_per_epoch=20),
                        )

estimator = estimator.train(train_ds)

pred = estimator.predict(train_ds)
pred = list(pred)

Error Message
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-133-61d817cb5fb5> in <module>
     84
     85 pred = estimator.predict(test_ds)
---> 86 pred = list(pred)
     87 pred = [np.mean(x.samples, axis=0)[0] for x in pred]

~/anaconda3/envs/gluon/lib/python3.6/site-packages/gluonts/model/predictor.py in predict(self, dataset, num_eval_samples)
    301             float_type=self.float_type,
    302         )
--> 303         for batch in inference_data_loader:
    304             inputs = [batch[k] for k in self.input_names]
    305             outputs = self.prediction_net(*inputs).asnumpy()

~/anaconda3/envs/gluon/lib/python3.6/site-packages/gluonts/dataset/loader.py in __iter__(self)
    225     def __iter__(self) -> Iterator[DataBatch]:
    226         buffer = BatchBuffer(self.batch_size, self.ctx, self.float_type)
--> 227         for data_entry in self.transform(iter(self.dataset), is_train=False):
    228             buffer.add(data_entry)
    229             if len(buffer) >= self.batch_size:

~/anaconda3/envs/gluon/lib/python3.6/site-packages/gluonts/transform.py in __call__(self, data_it, is_train)
    347     ) -> Iterator:
    348         num_idle_transforms = 0
--> 349         for data_entry in data_it:
    350             num_idle_transforms += 1
    351             try:

~/anaconda3/envs/gluon/lib/python3.6/site-packages/gluonts/transform.py in __call__(self, data_it, is_train)
    302                 yield self.map_transform(data_entry.copy(), is_train)
    303             except Exception as e:
--> 304                 raise e
    305
    306     @abc.abstractmethod

~/anaconda3/envs/gluon/lib/python3.6/site-packages/gluonts/transform.py in __call__(self, data_it, is_train)
    300         for data_entry in data_it:
    301             try:
--> 302                 yield self.map_transform(data_entry.copy(), is_train)
    303             except Exception as e:
    304                 raise e

~/anaconda3/envs/gluon/lib/python3.6/site-packages/gluonts/transform.py in map_transform(self, data, is_train)
    315
    316     def map_transform(self, data: DataEntry, is_train: bool) -> DataEntry:
--> 317         return self.transform(data)
    318
    319     @abc.abstractmethod

~/anaconda3/envs/gluon/lib/python3.6/site-packages/gluonts/transform.py in transform(self, data)
    549             if data[fname] is not None
    550         ]
--> 551         output = np.vstack(r)
    552         data[self.output_field] = output
    553         for fname in self.cols_to_drop:

~/anaconda3/envs/gluon/lib/python3.6/site-packages/numpy/core/shape_base.py in vstack(tup)
    232
    233     """
--> 234     return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
    235
    236 def hstack(tup):

ValueError: all the input array dimensions except for the concatenation axis must match exactly

Environment

Environment

Operating system: Ubuntu 16.04
Conda Environment Dump:

name: gluon
channels:

anaconda
defaults
dependencies:
_anaconda_depends=2019.03=py36_0
_libgcc_mutex=0.1=main
_mutex_mxnet=0.0.20=gpu_mkl
_tflow_select=2.3.0=mkl
alabaster=0.7.12=py36_0
anaconda=custom=py36_1
anaconda-client=1.7.2=py36_0
anaconda-project=0.8.2=py36_0
asn1crypto=0.24.0=py36_0
astroid=2.2.5=py36_0
astropy=3.1.2=py36h7b6447c_0
babel=2.6.0=py36_0
backcall=0.1.0=py36_0
backports=1.0=py36_1
backports.os=0.1.1=py36_0
backports.shutil_get_terminal_size=1.0.0=py36_2
beautifulsoup4=4.7.1=py36_1
bitarray=0.8.3=py36h14c3975_0
bkcharts=0.2=py36h735825a_0
blas=1.0=mkl
bleach=3.1.0=py36_0
blosc=1.15.0=hd408876_0
bokeh=1.0.4=py36_0
boto=2.49.0=py36_0
bottleneck=1.2.1=py36h035aef0_1
bzip2=1.0.6=h14c3975_5
c-ares=1.15.0=h7b6447c_1001
ca-certificates=2019.5.15=1
cairo=1.14.12=h8948797_3
cffi=1.12.2=py36h2e261b9_1
chardet=3.0.4=py36_1
cloudpickle=0.8.0=py36_0
clyent=1.2.2=py36_1
colorama=0.4.1=py36_0
contextlib2=0.5.5=py36h6c84a62_0
cryptography=2.6.1=py36h1ba5d50_0
cudatoolkit=9.0=h13b8566_0
cudnn=7.6.0=cuda9.0_0
curl=7.64.0=hbc83047_2
cython=0.29.6=py36he6710b0_0
cytoolz=<IP_ADDRESS>=py36h14c3975_1
dask=1.1.4=py36_1
dask-core=1.1.4=py36_1
dbus=1.13.6=h746ee38_0
decorator=4.4.0=py36_1
defusedxml=0.5.0=py36_1
distributed=1.26.0=py36_1
docutils=0.14=py36hb0f60f5_0
entrypoints=0.3=py36_0
et_xmlfile=1.0.1=py36hd6bccc3_0
expat=2.2.6=he6710b0_0
fastcache=1.0.2=py36h14c3975_2
ffmpeg=3.4=h7985aa0_0
flask=1.0.2=py36_1
fontconfig=2.13.0=h9420a91_0
freeglut=3.0.0=hf484d3e_5
freetype=2.9.1=h8a8886c_1
fribidi=1.0.5=h7b6447c_0
gast=0.2.2=py36_0
get_terminal_size=1.0.0=haa9412d_0
gevent=1.4.0=py36h7b6447c_0
glib=2.56.2=hd408876_0
gmp=6.1.2=h6c8ec71_1
gmpy2=2.0.8=py36h10f8cd9_2
google-pasta=0.1.7=py_0
graphite2=1.3.13=h23475e2_0
greenlet=0.4.15=py36h7b6447c_0
gst-plugins-base=1.14.0=hbbd80ab_1
gstreamer=1.14.0=hb453b48_1
h5py=2.9.0=py36h7918eee_0
harfbuzz=1.8.8=hffaf4a1_0
hdf5=1.10.2=hba1933b_1
heapdict=1.0.0=py36_2
html5lib=1.0.1=py36_0
icu=58.2=h9c2bf20_1
idna=2.6=py36h82fb2a8_1
imageio=2.5.0=py36_0
imagesize=1.1.0=py36_0
importlib_metadata=0.8=py36_0
intel-openmp=2018.0.3=0
ipykernel=5.1.0=py36h39e3cac_0
ipython=7.4.0=py36h39e3cac_0
ipython_genutils=0.2.0=py36hb52b0d5_0
ipywidgets=7.4.2=py36_0
isort=4.3.16=py36_0
itsdangerous=1.1.0=py36_0
jasper=2.0.14=h07fcdf6_1
jbig=2.1=hdba287a_0
jdcal=1.4=py36_0
jedi=0.13.3=py36_0
jeepney=0.4=py36_0
jinja2=2.10=py36_0
jpeg=9b=h024ee3a_2
jsonschema=3.0.1=py36_0
jupyter=1.0.0=py36_7
jupyter_client=5.2.4=py36_0
jupyter_console=6.0.0=py36_0
jupyter_core=4.4.0=py36_0
jupyterlab=0.35.4=py36hf63ae98_0
jupyterlab_server=0.2.0=py36_0
keras-applications=1.0.8=py_0
keras-preprocessing=1.1.0=py_1
keyring=18.0.0=py36_0
krb5=1.16.1=h173b8e3_7
lazy-object-proxy=1.3.1=py36h14c3975_2
libcurl=7.64.0=h20c2e04_2
libedit=3.1.20181209=hc058e9b_0
libffi=3.2.1=hd88cf55_4
libgcc-ng=8.2.0=hdf63c60_1
libgfortran-ng=7.3.0=hdf63c60_0
libglu=9.0.0=hf484d3e_1
libmklml=2018.0.3=0
libmxnet=1.2.1=gpu_mkl_he87abd8_1
libopencv=3.4.1=h8fa1ad8_3
libopus=1.3=h7b6447c_0
libpng=1.6.36=hbc83047_0
libprotobuf=3.5.2=h6f1eeef_0
libsodium=1.0.16=h1bed415_0
libssh2=1.8.0=h1ba5d50_4
libstdcxx-ng=8.2.0=hdf63c60_1
libtiff=4.0.10=h2733197_2
libtool=2.4.6=h7b6447c_5
libuuid=1.0.3=h1bed415_2
libvpx=1.7.0=h439df22_0
libxcb=1.13=h1bed415_1
libxml2=2.9.9=he19cac6_0
libxslt=1.1.33=h7d1a2b0_0
llvmlite=0.28.0=py36hd408876_0
locket=0.2.0=py36h787c0ad_1
lxml=4.3.2=py36hefd8a0e_0
lzo=2.10=h49e0be7_2
markdown=3.1.1=py36_0
markupsafe=1.1.1=py36h7b6447c_0
mccabe=0.6.1=py36_1
mistune=0.8.4=py36h7b6447c_0
mkl=2019.3=199
mkl-dnn=0.14=h6bb024c_0
mkl-service=1.1.2=py36he904b0f_5
mkl_fft=1.0.10=py36ha843d7b_0
mkl_random=1.0.2=py36hd81dba3_0
more-itertools=6.0.0=py36_0
mpc=1.1.0=h10f8cd9_1
mpfr=4.0.1=hdf1c602_3
mpmath=1.1.0=py36_0
msgpack-python=0.6.1=py36hfd86e86_1
multipledispatch=0.6.0=py36_0
nbconvert=5.4.1=py36_3
nbformat=4.4.0=py36h31c9010_0
ncurses=6.1=he6710b0_1
networkx=2.2=py36_1
nltk=3.4=py36_1
nose=1.3.7=py36_2
notebook=5.7.8=py36_0
numba=0.43.1=py36h962f231_0
numexpr=2.6.9=py36h9e4a6bb_0
numpy-base=1.16.4=py36hde5b4d6_0
numpydoc=0.8.0=py36_0
olefile=0.46=py36_0
openpyxl=2.6.1=py36_1
openssl=1.1.1=h7b6447c_0
packaging=19.0=py36_0
pandoc=<IP_ADDRESS>=0
pandocfilters=1.4.2=py36_1
pango=1.42.4=h049681c_0
parso=0.3.4=py36_0
partd=0.3.10=py36_1
path.py=11.5.0=py36_0
pathlib2=2.3.3=py36_0
patsy=0.5.1=py36_0
pcre=8.43=he6710b0_0
pep8=1.7.1=py36_0
pexpect=4.6.0=py36_0
pickleshare=0.7.5=py36_0
pillow=5.4.1=py36h34e0f95_0
pip=19.0.3=py36_0
pixman=0.38.0=h7b6447c_0
pluggy=0.9.0=py36_0
ply=3.11=py36_0
prometheus_client=0.6.0=py36_0
prompt_toolkit=2.0.9=py36_0
psutil=5.6.1=py36h7b6447c_0
ptyprocess=0.6.0=py36_0
py=1.8.0=py36_0
py-mxnet=1.2.1=py36h6c82189_0
pycosat=0.6.3=py36h14c3975_0
pycparser=2.19=py36_0
pycrypto=2.6.1=py36h14c3975_9
pycurl=<IP_ADDRESS>=py36h1ba5d50_0
pygments=2.3.1=py36_0
pylint=2.3.1=py36_0
pyodbc=4.0.26=py36he6710b0_0
pyopenssl=19.0.0=py36_0
pyqt=5.9.2=py36h05f1152_2
pyrsistent=0.14.11=py36h7b6447c_0
pysocks=1.6.8=py36_0
pytables=3.5.1=py36h71ec239_0
pytest-arraydiff=0.3=py36h39e3cac_0
pytest-astropy=0.5.0=py36_0
pytest-doctestplus=0.3.0=py36_0
pytest-openfiles=0.3.2=py36_0
pytest-remotedata=0.3.1=py36_0
python=3.6.8=h0371630_0
python-dateutil=2.8.0=py36_0
pytz=2018.9=py36_0
pywavelets=1.0.2=py36hdd07704_0
pyyaml=5.1=py36h7b6447c_0
pyzmq=18.0.0=py36he6710b0_0
qt=5.9.7=h5867ecd_1
qtawesome=0.5.7=py36_1
qtconsole=4.4.3=py36_0
qtpy=1.7.0=py36_1
readline=7.0=h7b6447c_5
rope=0.12.0=py36_0
ruamel_yaml=0.15.46=py36h14c3975_0
scikit-image=0.14.2=py36he6710b0_0
scikit-learn=0.20.3=py36hd81dba3_0
seaborn=0.9.0=py36_0
secretstorage=3.1.1=py36_0
send2trash=1.5.0=py36_0
simplegeneric=0.8.1=py36_2
singledispatch=<IP_ADDRESS>=py36h7a266c3_0
sip=4.19.8=py36hf484d3e_0
snappy=1.1.7=hbae5bb6_3
snowballstemmer=1.2.1=py36h6febd40_0
sortedcollections=1.1.2=py36_0
sortedcontainers=2.1.0=py36_0
soupsieve=1.8=py36_0
sphinxcontrib=1.0=py36_1
sphinxcontrib-websupport=1.1.0=py36_1
spyder=3.3.3=py36_0
spyder-kernels=0.4.2=py36_0
sqlite=3.27.2=h7b6447c_0
statsmodels=0.9.0=py36h035aef0_0
sympy=1.3=py36_0
tblib=1.3.2=py36h34cf8b6_0
tensorboard=1.14.0=py36hf484d3e_0
tensorflow=1.14.0=mkl_py36h2526735_0
tensorflow-base=1.14.0=mkl_py36h7ce6ba3_0
tensorflow-estimator=1.14.0=py_0
termcolor=1.1.0=py36_1
terminado=0.8.1=py36_1
testpath=0.4.2=py36_0
tk=8.6.8=hbc83047_0
toolz=0.9.0=py36_0
traitlets=4.3.2=py36h674d592_0
unicodecsv=0.14.1=py36ha668878_0
unixodbc=2.3.7=h14c3975_0
urllib3=1.22=py36hbe7ace6_0
wcwidth=0.1.7=py36hdf4376a_0
webencodings=0.5.1=py36_1
werkzeug=0.14.1=py36_0
wheel=0.33.1=py36_0
widgetsnbextension=3.4.2=py36_0
wrapt=1.11.1=py36h7b6447c_0
wurlitzer=1.0.2=py36_0
xlrd=1.2.0=py36_0
xlsxwriter=1.1.5=py36_0
xlwt=1.3.0=py36h7b00a1f_0
xz=5.2.4=h14c3975_4
yaml=0.1.7=had09818_2
zeromq=4.3.1=he6710b0_3
zict=0.1.4=py36_0
zipp=0.3.3=py36_1
zlib=1.2.11=h7b6447c_3
zstd=1.3.7=h0b5b093_0
pip:

absl-py==0.7.0
alembic==1.0.10
amqp==2.5.0
apipkg==1.5
appdirs==1.4.3
argh==0.26.2
argparse==1.4.0
astor==0.7.1
atomicwrites==1.2.1
attrs==18.2.0
black==18.6b4
boto3==1.9.163
botocore==1.12.164
cachetools==3.0.0
certifi==2018.11.29
click==6.7
commonmark==0.9.0
convertdate==2.1.3
coverage==4.5.3
cx-oracle==7.0.0
cycler==0.10.0
dataclasses==0.6
debtcollector==1.21.0
dnspython==1.16.0
dogpile-cache==0.7.1
ephem==<IP_ADDRESS>
eventlet==0.25.0
execnet==1.6.0
extras==1.0.0
fasteners==0.15
fbprophet==0.5
feather-format==0.4.0
fixtures==3.0.0
flake8==3.4.1
future==0.17.1
futurist==1.8.1
gluon==1.1.0
gluonts==0.3.4.dev5+g4d044a2
google-api-core==1.14.2
google-auth==1.6.2
google-auth-oauthlib==0.2.0
google-cloud-bigquery==1.18.0
google-cloud-core==1.0.3
google-resumable-media==0.3.2
googleapis-common-protos==1.6.0
grpcio==1.18.0
holidays==0.9.11
iso8601==0.1.12
jmespath==0.9.4
keras==2.2.5
keystoneauth1==3.14.0
keystonemiddleware==6.0.0
kiwisolver==1.1.0
kombu==4.6.1
linecache2==1.0.0
livereload==2.6.1
logutils==0.3.5
lunardate==0.2.0
mako==1.0.12
matplotlib==3.1.1
merf==0.3
monotonic==1.5
mxnet==1.4.1
mxnet-cu101==1.4.1
mxtheme==0.2
mypy==0.630
mypy-extensions==0.4.1
nbsphinx==0.3.5
netaddr==0.7.19
netifaces==0.10.9
numpy==1.14.6
oauthlib==3.0.1
os-service-types==1.7.0
oslo-cache==1.35.0
oslo-concurrency==3.29.1
oslo-config==6.9.0
oslo-context==2.22.1
oslo-db==5.0.0
oslo-i18n==3.23.1
oslo-log==3.44.0
oslo-messaging==9.7.1
oslo-middleware==3.38.0
oslo-policy==2.2.0
oslo-serialization==2.29.1
oslo-service==1.40.0
oslo-utils==3.41.0
oslo-versionedobjects==1.36.0
pandas==0.25.1
pandas-gbq==0.10.0
paste==3.0.8
pastedeploy==2.0.1
pathtools==0.1.2
pbr==5.2.1
pecan==1.3.3
port-for==0.3.1
prettytable==0.7.2
protobuf==3.8.0
pyarrow==0.13.0
pyasn1==0.4.5
pyasn1-modules==0.2.3
pycadf==2.9.0
pycodestyle==2.3.1
pydantic==0.28
pydata-google-auth==0.1.3
pyflakes==1.5.0
pyinotify==0.9.6
pymssql==2.1.4
pyparsing==2.4.2
pystan==<IP_ADDRESS>
pytest==3.10.1
pytest-cov==2.6.1
pytest-forked==1.0.2
pytest-runner==2.11.1
pytest-timeout==1.2.1
pytest-xdist==1.27.0
python-editor==1.0.4
python-etcd==0.4.5
python-graphviz==0.8.4
python-keystoneclient==3.19.0
python-mimeparse==1.6.0
recommonmark==0.5.0
repoze-lru==0.7
requests==2.22.0
requests-oauthlib==1.2.0
rfc3986==1.3.2
routes==2.4.1
rpy2==3.0.4
rsa==4.0
s3transfer==0.2.1
scipy==1.2.0
setuptools==41.2.0
setuptools-git==1.2
six==1.12.0
sphinx==1.7.9
sphinx-autobuild==0.7.1
sphinx-autorun==1.1.0
sphinx-gallery==0.3.1
sphinx-rtd-theme==0.4.3
sqlalchemy==1.0.19
sqlalchemy-migrate==0.12.0
sqlparse==0.3.0
statsd==3.3.0
stevedore==1.30.1
tempita==0.5.2
testresources==2.0.1
testscenarios==0.5.0
testtools==2.3.0
toml==0.10.0
tornado==5.1.1
tqdm==4.35.0
traceback2==1.4.0
tsfresh==0.11.2
typed-ast==1.1.2
tzlocal==1.5.1
ujson==1.35
unittest2==1.1.0
vine==1.3.0
waitress==1.3.0
watchdog==0.9.0
webob==1.8.5
webtest==2.0.33
wsme==0.9.3
xgboost==0.90
yappi==1.0

Hi andmib,
The issue is that you have set use_feat_dynamic_real=True and then you invoke the predict method directly which does not apply the correct transformations to the fields of the dataset. To solve this you can use the following:
predictor = estimator.train(train_ds)

forecast_it, ts_it = make_evaluation_predictions(
    dataset=train_ds,  # test dataset
    predictor=predictor,  # predictor
    num_eval_samples=100,  # number of sample paths we want for evaluation
)

tss = list(ts_it)
forecasts = list(forecast_it)

The make_evaluation_predictions function applies the transformations and then invokes the predict method.
You can find all of the above in the tutorial notebooks.
Some side notes: you pass the train_ds as an input to DeepAREstimator. This is not needed and is ignored. Also, you use the same dataset train_ds for training and prediction.

Hey @benidis - thank you for the prompt reply. That makes perfect sense!
(passing train_ds to the predict method was just to show that all of the dynamic feature dimensions were the same and I was still getting the erro)

@benidis Side note, somewhat related - when I run train_ds.calc_stats() from the extended example, it says that the num_dynamic_feat_real is 0, even though the example clearly has dynamic features.

Hello,
I'm getting the same error, but at train... Can you help me?
Code:
print(">>>>DEBUG: Dataset columns:", temp_df.columns)
print("\n>>>>DEBUG: train_e (used to get pred_lenght)", train_e)
print("\n>>>>DEBUG: Dataset head:\n", temp_df.head())

pred_lenght = temp_df[temp_df.ds >= train_e].shape[0]

print("\n>>>>DEBUG: pred_lenght:", pred_lenght)
start = pd.Timestamp(temp_df.iloc[0]['ds'], freq='D')

print(">>>>DEBUG: Series shape:", temp_df.y.values.shape)
print(">>>>DEBUG: feat_dynamic_real shape:", feat.values.shape)

# train dataset: cut the last window of length "prediction_length", add "target" and "start" fields
train_ds = common.ListDataset(
    [{
        "start": start,
        "target": temp_df[:-pred_lenght].y.values,
        "feat_dynamic_real": feat[:-pred_lenght].values
    }],
    freq="D"
)

# test dataset: use the whole dataset, add "target" and "start" fields
test_ds = common.ListDataset(
    [{
        "start": start,
        "target": temp_df.y.values,
        "feat_dynamic_real": feat.values
    }],
    freq="D"
)

estimator = deepar.DeepAREstimator(
    freq="D",
    prediction_length=pred_lenght,
    trainer=Trainer(epochs=10),
    num_layers=10,
    num_cells=40,
    use_feat_dynamic_real=True
)

predictor = estimator.train(train_ds)

Error
INFO:root:Using CPU
INFO:root:Start model training
INFO:root:Number of parameters in DeepARTrainingNetwork: 67223
INFO:root:Epoch[0] Learning rate is 0.001
  0%|          | 0/50 [00:00<?, ?it/s]
>>>>DEBUG: Dataset columns: Index(['ds', 'y'], dtype='object')

>>>>DEBUG: train_e (used to get pred_lenght) 2018-01-01

>>>>DEBUG: Dataset head:
           ds    y
0 2014-06-01   78
1 2014-06-02  192
2 2014-06-03  181
3 2014-06-04  175
4 2014-06-05  141

>>>>DEBUG: pred_lenght: 31
>>>>DEBUG: Series shape: (1341,)
>>>>DEBUG: feat_dynamic_real shape: (1341, 4)

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-60-c7192d3a9c9d> in <module>
     40 )
     41
---> 42 predictor = estimator.train(train_ds)

~/anaconda3/lib/python3.7/site-packages/gluonts/model/estimator.py in train(self, training_data)
    201     def train(self, training_data: Dataset) -> Predictor:
    202
--> 203         return self.train_model(training_data).predictor

~/anaconda3/lib/python3.7/site-packages/gluonts/model/estimator.py in train_model(self, training_data)
    187             net=trained_net,
    188             input_names=get_hybrid_forward_input_names(trained_net),
--> 189             train_iter=training_data_loader,
    190         )
    191

~/anaconda3/lib/python3.7/site-packages/gluonts/trainer/_base.py in __call__(self, net, input_names, train_iter)
    243
    244                     with tqdm(train_iter) as it:
--> 245                         for batch_no, data_entry in enumerate(it, start=1):
    246                             if self.halt:
    247                                 break

~/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py in __iter__(self)
   1003                 """), fp_write=getattr(self.fp, 'write', sys.stderr.write))
   1004
-> 1005             for obj in iterable:
   1006                 yield obj
   1007                 # Update and possibly print the progressbar.

~/anaconda3/lib/python3.7/site-packages/gluonts/dataset/loader.py in __iter__(self)
    186         assert self._cur_iter is not None
    187         while True:
--> 188             data_entry = next(self._cur_iter)
    189             self._buffer.add(data_entry)
    190             if (

~/anaconda3/lib/python3.7/site-packages/gluonts/transform.py in __call__(self, data_it, is_train)
    345     ) -> Iterator:
    346         num_idle_transforms = 0
--> 347         for data_entry in data_it:
    348             num_idle_transforms += 1
    349             try:

~/anaconda3/lib/python3.7/site-packages/gluonts/transform.py in __call__(self, data_it, is_train)
    300                 yield self.map_transform(data_entry.copy(), is_train)
    301             except Exception as e:
--> 302                 raise e
    303
    304     @abc.abstractmethod

~/anaconda3/lib/python3.7/site-packages/gluonts/transform.py in __call__(self, data_it, is_train)
    298         for data_entry in data_it:
    299             try:
--> 300                 yield self.map_transform(data_entry.copy(), is_train)
    301             except Exception as e:
    302                 raise e

~/anaconda3/lib/python3.7/site-packages/gluonts/transform.py in map_transform(self, data, is_train)
    313
    314     def map_transform(self, data: DataEntry, is_train: bool) -> DataEntry:
--> 315         return self.transform(data)
    316
    317     @abc.abstractmethod

~/anaconda3/lib/python3.7/site-packages/gluonts/transform.py in transform(self, data)
    547             if data[fname] is not None
    548         ]
--> 549         output = np.vstack(r)
    550         data[self.output_field] = output
    551         for fname in self.cols_to_drop:

~/anaconda3/lib/python3.7/site-packages/numpy/core/shape_base.py in vstack(tup)
    232
    233     """
--> 234     return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
    235
    236 def hstack(tup):

ValueError: all the input array dimensions except for the concatenation axis must match exactly```

Hi gabrielcrds,
I reproduced your error. The issue is in the shape of feat_dynamic_real. The correct format should be:
target shape: (num_series, ts_length)
feat_dynamic_real shape: (num_series, num_features, ts_length)

In your case you have only one time series so num_series=1 and you can ignore this axis (i.e., no need to have a shape of the form (1, ...)). So, target should have shape (ts_length,) which is correct in your example, and feat_dynamic_real should have shape (num_features, ts_length) which is wrong in your example since you have (ts_length, num_features).
I guess something like "feat_dynamic_real": feat.values.reshape(4, -1) would do the job.
Note that the tutorials had a mistake (in the text) and indicated a wrong format (the one you used). However this was fixed in PR #269 and the website will be updated accordingly.

@andmib I am looking into the train_ds.calc_stats(). If there is a bug I will probably open a new issue.

@dai-ichiro thank you for your input. The previous issue was indeed due to the shape of the features.
Your code works fine. Here is why:

TRAINING: the target and the dynamic features should have the same length. As I mentioned earlier the correct shapes should be the following:

target shape: (num_series, ts_length)
feat_dynamic_real shape: (num_series, num_features, ts_length)

In your case you have used
train_target = np.random.rand(48,168)
train_feat_dynamic_real = np.random.rand(48,168)

which implies that num_series=48, num_features=1 (ignored dimension) and ts_length=168.

INFERENCE: note that during inference the target in the future is not known but the features in the future are assumed to be known. Therefore, the features should have length equal to ts_length + prediction_range. Now, you have two options.

First option:  you have a test dataset that the target and the dynamic features have the same length and you want to predict the last (known) window of target in order to compare it with the true values and evaluate your model. In this case the easiest option is to use the make_evaluation_predictions function. This function initially removes the last window of length prediction_length from the target considering it the future window that should be unknown and needs to be predicted. Notice that by doing this the features now have a larger length (they expand into the future window). Then, the function calls the predict method to predict the future values that it has earlier removed. You can see this in the extended tutorial (section 4.1).
Second option: you have a test dataset where the length of the features is larger than the target length (assuming that both target and features start in the same date and the features expand more into the future). In this case you can use directly the predict method since the future window of your target is not there eitherway.
In your case you have
test_target = np.random.rand(2,168)
test_feat_dynamic_real = np.random.rand(2,168+24)

test_ds = ListDataset([{FieldName.TARGET: target,
                        FieldName.START: start,
                        FieldName.FEAT_DYNAMIC_REAL: fdr}
                        for (target, fdr) in zip(test_target, test_feat_dynamic_real)],
                      freq= '1H')

pred = predictor.predict(test_ds)

which falls under the second option. Note that the difference in length of the target and features should be equal to the prediction_length of predictor else you will get an error.
Also, in your code you define the test_ds twice (the second version is used). You define the first test_ds as
test_target = np.random.rand(2,168)
test_feat_dynamic_real = np.random.rand(2,168)

test_ds = ListDataset([{FieldName.TARGET: target,
                        FieldName.START: start,
                        FieldName.FEAT_DYNAMIC_REAL: fdr}
                        for (target, fdr) in zip(test_target, test_feat_dynamic_real)],
                      freq= '1H')

This should not work with the predict method but it should work with the make_evaluation_predictions function.
We are working on standarizing these points that cause confusion and give the correct feedback to the user. We will make clear all of these things in the following weeks and update the tutorials accordingly so please always check the latest versions.

@benidis many tanks for your quick reply.

@dai-ichiro thank you for your input. The previous issue was indeed due to the shape of the features.
Your code works fine. Here is why:

TRAINING: the target and the dynamic features should have the same length. As I mentioned earlier the correct shapes should be the following:

target shape: (num_series, ts_length)
feat_dynamic_real shape: (num_series, num_features, ts_length)

In your case you have used
train_target = np.random.rand(48,168)
train_feat_dynamic_real = np.random.rand(48,168)

which implies that num_series=48, num_features=1 (ignored dimension) and ts_length=168.

INFERENCE: note that during inference the target in the future is not known but the features in the future are assumed to be known. Therefore, the features should have length equal to ts_length + prediction_range. Now, you have two options.

First option: you have a test dataset that the target and the dynamic features have the same length and you want to predict the last (known) window of target in order to compare it with the true values and evaluate your model. In this case the easiest option is to use the make_evaluation_predictions function. This function initially removes the last window of length prediction_length from the target considering it the future window that should be unknown and needs to be predicted. Notice that by doing this the features now have a larger length (they expand into the future window). Then, the function calls the predict method to predict the future values that it has earlier removed. You can see this in the extended tutorial (section 4.1).
Second option: you have a test dataset where the length of the features is larger than the target length (assuming that both target and features start in the same date and the features expand more into the future). In this case you can use directly the predict method since the future window of your target is not there eitherway.
In your case you have
test_target = np.random.rand(2,168)
test_feat_dynamic_real = np.random.rand(2,168+24)

test_ds = ListDataset([{FieldName.TARGET: target,
                        FieldName.START: start,
                        FieldName.FEAT_DYNAMIC_REAL: fdr}
                        for (target, fdr) in zip(test_target, test_feat_dynamic_real)],
                      freq= '1H')

pred = predictor.predict(test_ds)

which falls under the second option. Note that the difference in length of the target and features should be equal to the prediction_length of predictor else you will get an error.
Also, in your code you define the test_ds twice (the second version is used). You define the first test_ds as
test_target = np.random.rand(2,168)
test_feat_dynamic_real = np.random.rand(2,168)

test_ds = ListDataset([{FieldName.TARGET: target,
                        FieldName.START: start,
                        FieldName.FEAT_DYNAMIC_REAL: fdr}
                        for (target, fdr) in zip(test_target, test_feat_dynamic_real)],
                      freq= '1H')

This should not work with the predict method but it should work with the make_evaluation_predictions function.
We are working on standarizing these points that cause confusion and give the correct feedback to the user. We will make clear all of these things in the following weeks and update the tutorials accordingly so please always check the latest versions.
@benidis When we make time series prediction, we can't get the feat_dynamic_real of the future time. Is there a good way to solve this problem?

dataa[0]['target'].shape is (180,) and dataa[0]['feat_dynamic_real'].shape is (2,180) and when i want to apply the predict methode i got error ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 270 and the array at index 2 has size 180 ( i am not using the make_evaluation_prediction ) because i want to forecast the future and i dont want to forecast existing data


Connection latency/transfer rate tests

RPi<->PC tests
Here's some example tests (the first one is probably easiest):

Try sending a bunch of ping message (e.g. "ping1", "ping2", "ping3", ...) and check if they're all received and their avg and max ping.
Try to send a bunch of messages over the connection. (e.g., "2018-05-31 14:18:04.495") and see timing difference in date stamps in either direction. Might be worthwhile to sync your PC's clock with an internet server (NIST).
Test how much data you can transfer

Be sure to test both WiFi and USB Ethernet.
You can upload your code to this Github repository in a directory called latency-tests. Write down your results here in a graph or table or whatever works.

So I did a really basic test whereby I record the average time to send a message from RPI to PC and get a response for 1000 messages.

Wifi took about 9 ms per message
Ethernet took about 0.8 ms per message

Albeit my wifi is kind of crappy and there may be other factors as well. The difference is quite large though, and a direct connection is definitely the ideal choice for latency and consistency.

@byarrow We'll probably stick with Ethernet in light of this. :P


fix(DiscordJS): fix the way that the client filler gets the shard ID in v12

I noticed that the v12 ShardClientUtil does not contain the ID of the shard you're using. I figured out that the only way to get the shard id is to get a guild and take it from there.
I'm not sure about this though: that strategy relies on the fact that every guild cached will have the same shard ID. Are we sure about that? Is it possible that selecting a random guild will result in the wrong shard ID? Is there a better alternative (like maybe taking the most used shard ID)?
Let me know what you think

You can read off of client.options.shards (shard ID) and client.options.shardCount.

I've updated the getter, is it better now?


[BUG] - Incorrect rendering on Apple Vision Pro (VR)

UE Version:
5.3
Frontend Version:
I used https://github.com/EpicGames/PixelStreamingInfrastructure/commits/master/ at commit 5cf2735c5fb4c7f84fea7ec41ea72befb2cecbe8
Problem component
Unclear
Description
Convergence issues for pixel streaming with VR on the Apple Vision Pro. The left and right display images are rendered fine on their own, but when viewed through the AVP with both eyes, the resulting image is distorted.
Steps to Reproduce:

Follow the tutorial here to start the server
On the Apple Vision Pro, open Safari
Visit the public IP

Expected behavior

A clear image seen with both eyes

Screenshots
If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):

OS: Ubuntu

Additional context
Add any other context about the problem here.

Thank you for reporting the issue @bryanhpchiang and providing additional environment details.
The issue is being tracked here https://github.com/EpicGames/PixelStreamingInfrastructure/issues/242 and I've added your additional details to the thread.


[Feature][UI Next][V1.0.0-Beta] Add front-end for Apache Zeppelin task plugin

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description

Currently we have basic backend integration with Apache Zeppelin notebook in dolphin scheduler zeppelin task plugin. However, we need to add the front-end for this plugin.
Related: #9201

Use case

Zeppelin task plugin will have corresponding front-end UI.

Related issues

See Description section.

Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I'm not familiar with front-end, but I'd like to give a try. : )

I'm not familiar with front-end, but I'd like to give a try. : )

If you have any problems, you can concat me or @songjianet.

I'm not familiar with front-end, but I'd like to give a try. : )

If you have any problems, you can concat me or @songjianet.

Cooooool! I appreciate it.


dnscrypt-proxy2: service restart on failure

Motivation for this change
it does happen that dnscrypt-proxy exits when it is unable to
synchronise its resolvers metadata on startup. this can happen due
to network connectivity issues for example. not restarting it automatically
means no dns resolution will work until a manual restart is performed.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

I wasn't sure whether to use on-failure / on-abnormal/ on-abort instead of always. Would be happy to hear what the NixOS conventions are in this area.

I don't know of any convention. I think the Restart= value should be decided on per service. This PR seems like a strict improvement, so I approve it.

Nit: nixos commits should have nixos prefix: "nixos/dnscrypt-proxy2: ...".

Fixed!


<IP_ADDRESS>80301

<IP_ADDRESS>80301

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.2 out of 3 committers have signed the CLA.:white_check_mark: kiral:white_check_mark: JoeKerouac:x: 清英清英 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Add option to specify registry url from cli

After authentication to ACR, there should be a option to push to ACR without editing Cproj properties.
Otherwise, please provide documentation how to create and use custom profile dotnet publish -p:PublishProfile=MyAcr.

Have you tried using /p:ContainerRegistry=xxx ? Seems to work fine for me...

Publish Profiles are just collections of properties, so if you'd like to use a custom Profile you can set any project properties that you like. You can see some examples of custom Publish Profiles (and how to use them) in my demos repo here: https://github.com/baronfel/sdk-container-demo/tree/main/src/sdk-container-demo/Properties/PublishProfiles


ENH: refactor tooling and add additional datasets

This updates datasets.json with all the datasets now available in vega-datasets, and additionally creates tools to do this update automatically.

Merged by rebase in c1442da9844c56a6db6a4071d6d37ba0bd10cb5d


Adding Folder To Workspace

VSCode Version: 1.41.1
OS Version: Mac Mojave 10.14.6

It doesn't allow me to navigate to a deeper folder to add a folder to a workspace, It just adds that folder that I am currently in. I am able to go up in the file structure but not down.
Steps to Reproduce:

open a workspace folder
right-click, add folder to workspace
try to navigate to a deeper folder.... (via clicking on a folder, or CMD + up/down)

Does this issue occur when all extensions are disabled?: Yes/No

When I try to navigate to a deeper folder I am not able to…

On Jan 15, 2020, at 8:24 AM, Isidor Nikolic<EMAIL_ADDRESS>wrote:
This works just fine for me. What are you doing differently and can you reproduce using Visual Studio Code Insiders https://code.visualstudio.com/insiders/ https://code.visualstudio.com/insiders/
https://user-images.githubusercontent.com/1926584/72446254-7f249900-37b3-11ea-8c32-cdd98cc3d612.gif
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/88629?email_source=notifications&email_token=AM7NOSOA2VCIOR47BXLGHCTQ54TDZA5CNFSM4KGX7OD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJAWBOQ#issuecomment-574709946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM7NOSKWVIZAWKNEFRARFYDQ54TDZANCNFSM4KGX7ODQ.


Add EncodeUsagesInRequestAnnotationKey for certificate

Pull Request Motivation
We have integrated Cert Manager with GlobalSign ACME. Their backend requires certificate.spec.encodeUsagesInRequest explicitly to be false and certificate.spec.usages to be empty/unset. For example, this generates a CSR without the extended key usages (required by GlobalSign):
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: test
spec:
  encodeUsagesInRequest: false
  dnsNames:
  - test.example.com
  issuerRef:
    group: cert-manager.io
    kind: ClusterIssuer
    name: globalsign-production
  secretName: globalsign-test

This does encode key usages in the CSR extensions (and therfore not accepted by GlobalSign).
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: test
spec:
  dnsNames:
  - test.example.com
  issuerRef:
    group: cert-manager.io
    kind: ClusterIssuer
    name: globalsign-production
  secretName: globalsign-test

We also want to be able to control this with annotations on the Ingress object, like in this PR.
Kind
feature
Release Note

Add EncodeUsagesInRequestAnnotationKey for certificate

/assign @maelvls

I'll bring this pain point to the team during this morning's standup. The standup is open to any one if you would like to join!! It happens at 10:30 AM UK time, and the Google Meet link is in here: https://cert-manager.io/docs/contributing/#meetings
For now, I will un-assign myself since I am not sure whether I'll be the one picking up this.
/unassign
Thanks,
Maël

Thank you @maelvls . Did anything come out of the meeting? Anybody in particular I could assign, or should I just take a random person from the list?

We discussed this on 30 May 2022.

Another annotation that has been requested is the ability to set the subject and email SANs. In this PR, we are wary of the fact annotation values have to be parsed, and parsing is a security risk that we want to assess.
We are unsure whether we should be adding a subset of the stuff you may want to appear on a Certificate resource. Currently, the existing annotations are documented in types.go.

We propose to discuss these concerns and come to a consensus during the cert-manager-dev biweekly meeting (open to anyone!) on 1 June 2022 17:00 UK time.In order for a consensus to arise, we will need a design document that shows all the pros and cons and previous conversations. I'll try to have that ready by then... hopefully


Allow more flexibility in allowing conversational pair programming

GitHub Copilot: Sorry, but I can only assist with programming related questions.

This message is driving me insane. ChatGPT-4 has been more willing to help with certain problems than copilot.

@psj-dev Would you be able to share some sample queries where you are getting this message?

If a periodic waveform has 1 narrow spike every period but can vary in phase, what techniques in signal processing can help with finding that one peak?
GitHub Copilot
Sorry, but I can only assist with programming related questions.
Me.Username
I am writing a program to use convolution, but this phase shift has caused issues. What programming topics should I research?
GitHub Copilot
If you are experiencing issues with phase shift when using convolution, there are several programming topics that you may want to research:
Fourier transforms: Convolution in the time domain corresponds to multiplication in the frequency domain. By performing a Fourier transform on your signals, you can analyze their frequency content and potentially identify the source of the phase shift.
Window functions: When performing convolution, it is common to use window functions to reduce edge effects and improve the accuracy of the result. However, different window functions can introduce different amounts of phase shift, so you may want to experiment with different window functions to see which ones work best for your application.
Signal processing filters: Depending on the nature of your signals, you may be able to use signal processing filters to remove unwanted phase shift. For example, a phase equalizer can be used to correct for phase distortion in a signal.
Time delay estimation: If you are dealing with time-varying signals, you may need to estimate the time delay between them in order to properly align them for convolution. There are several techniques for time delay estimation, such as cross-correlation and phase-based methods.
Numerical methods: If you are implementing convolution using numerical methods, such as finite differences or finite elements, you may need to ensure that your numerical scheme is stable and accurate. This may involve researching topics such as numerical stability, convergence, and error analysis.
These are just a few examples of programming topics that may be relevant to your situation. Depending on the specifics of your application, there may be other topics that are more relevant.
Me.username
How about trying to detect multiple spikes that could have a slight variation of phase, but within a certaion range?
GitHub Copilot
Sorry, but I can only assist with programming related questions

Chat GPT has recommended various topics from cross-correlation of a time-reversed signal to find symmetries of the signal, to using the processing filters recommended here, but in depth.

im-not-an-alien-i-swear-whos-ur-leader
I am writing a program to use convolution, but this phase shift has caused issues. What programming topics should I research?
GitHub Copilot
If you are experiencing issues with phase shift when using convolution, there are several programming topics that you may want to research:
Fourier transforms: Convolution in the time domain corresponds to multiplication in the frequency domain. By performing a Fourier transform on your signals, you can analyze their frequency content and potentially identify the source of the phase shift.
Window functions: When performing convolution, it is common to use window functions to reduce edge effects and improve the accuracy of the result. However, different window functions can introduce different amounts of phase shift, so you may want to experiment with different window functions to see which ones work best for your application.
Signal processing filters: Depending on the nature of your signals, you may be able to use signal processing filters to remove unwanted phase shift. For example, a phase equalizer can be used to correct for phase distortion in a signal.
Time delay estimation: If you are dealing with time-varying signals, you may need to estimate the time delay between them in order to properly align them for convolution. There are several techniques for time delay estimation, such as cross-correlation and phase-based methods.
Numerical methods: If you are implementing convolution using numerical methods, such as finite differences or finite elements, you may need to ensure that your numerical scheme is stable and accurate. This may involve researching topics such as numerical stability, convergence, and error analysis.
These are just a few examples of programming topics that may be relevant to your situation. Depending on the specifics of your application, there may be other topics that are more relevant.
im-not-an-alien-i-swear-whos-ur-leader
How about trying to detect multiple spikes that could have a slight variation of phase, but within a certaion range?
GitHub Copilot
Sorry, but I can only assist with programming related questions.

GitHub Copilot: If you are experiencing issues with phase shift when using convolution, there are several programming topics that you may want to research:

Fourier transforms: Convolution in the time domain corresponds to multiplication in the frequency domain. By performing a Fourier transform on your signals, you can analyze their frequency content and potentially identify the source of the phase shift.

Window functions: When performing convolution, it is common to use window functions to reduce edge effects and improve the accuracy of the result. However, different window functions can introduce different amounts of phase shift, so you may want to experiment with different window functions to see which ones work best for your application.

Signal processing filters: Depending on the nature of your signals, you may be able to use signal processing filters to remove unwanted phase shift. For example, a phase equalizer can be used to correct for phase distortion in a signal.

Time delay estimation: If you are dealing with time-varying signals, you may need to estimate the time delay between them in order to properly align them for convolution. There are several techniques for time delay estimation, such as cross-correlation and phase-based methods.

Numerical methods: If you are implementing convolution using numerical methods, such as finite differences or finite elements, you may need to ensure that your numerical scheme is stable and accurate. This may involve researching topics such as numerical stability, convergence, and error analysis.

These are just a few examples of programming topics that may be relevant to your situation. Depending on the specifics of your application, there may be other topics that are more relevant.

im-not-an-alien-i-swear-whos-ur-leader: For the selected main function code in python can you show how I would add an argparser obj that can use a config file specified as an arg, but if not the default is what I have?
GitHub Copilot: Certainly! Here's an example of how you can add an argparse object to the code to allow the user to specify a config file path as an argument, with a default value if no argument is provided:
import argparse
import json

from compass_reader import CompassReader

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--config", help="path to config file", default="./bot_config.json")
    args = parser.parse_args()

    with open(args.config, 'r') as f:
        config = json.load(f)

    compass_config = config['compass_parameters']

    reader = CompassReader(compass_config)
    print(reader.read_compass_heading())

In this example, we first import the argparse module and the json module. We then create an ArgumentParser object and add an argument -c or --config that allows the user to specify the path to the config file. We also set a default value of ./bot_config.json if no argument is provided.
We then parse the arguments using parser.parse_args() and store the result in the args variable. We use the args.config attribute to get the path to the config file, which we then open and load using the json module.
Finally, we create a CompassReader object with the compass_parameters from the config file and print the compass heading.
im-not-an-alien-i-swear-whos-ur-leader: I have a video game bot I want to make. However, I think it would be great if I could make a language or framework that can be used to describe tasks that must be done, and how to make a human looking bot. This is meant to help people who don't have the time or ability to manipulate a mouse and keyboard but like the game.  Here's a plan for how you could approach this:

Define the syntax and semantics of the DSL or framework. This will involve deciding on the keywords, operators, and constructs that users will use to describe the bot's behavior. You'll also need to define how the bot will interact with the game, such as how it will move the mouse and press keys.

Implement a parser for the DSL or framework. This will take the user's input and convert it into a data structure that can be executed by the bot. You can use a parser generator like ANTLR or PLY to generate the parser code.

Implement the bot itself. This will involve writing code that interacts with the game, such as moving the mouse and pressing keys. You'll also need to write code that executes the user's input, which you can do by traversing the data structure generated by the parser.

Test the bot and the DSL or framework. You'll need to test the bot to make sure it behaves as expected, and test the DSL or framework to make sure it's easy to use and produces the desired behavior.

Here's an example of what the DSL or framework might look like:
# Move the mouse to (100, 200)
move_mouse(100, 200)

# Press the left mouse button
press_mouse_button('left')

# Wait for 1 second
wait(1)

# Release the left mouse button
release_mouse_button('left')

# Move the mouse to (300, 400)
move_mouse(300, 400)

# Press the right mouse button
press_mouse_button('right')

# Wait for a random amount of time between 0.5 and 1.5 seconds
wait(random(0.5, 1.5))

# Release the right mouse button
release_mouse_button('right')

This example shows how the DSL or framework might allow users to describe moving the mouse, pressing and releasing mouse buttons, and waiting for a certain amount of time. It also shows how users can specify random wait times using the random function.
im-not-an-alien-i-swear-whos-ur-leader: This bot transcends mouse commands specifically, and it would take advantage of library functions I program to do specific tasks such as training combat. However, it should include things like "Train combat for a time interval, but then select another task to do for a while"
GitHub Copilot: I see, in that case, you can extend the DSL or framework to include higher-level commands that allow the user to specify more complex behavior. Here's an example of how you could modify the DSL or framework to include a train command that trains a certain skill for a specified amount of time, and a do command that selects another task to do:
# Move the mouse to (100, 200)
move_mouse(100, 200)

# Press the left mouse button
press_mouse_button('left')

# Wait for 1 second
wait(1)

# Release the left mouse button
release_mouse_button('left')

# Train combat for 1 hour
train('combat', duration='1h')

# Do some other task for 30 minutes
do('other_task', duration='30m')

In this example, the train command takes a skill name and a duration, and trains that skill for the specified amount of time. The do command takes a task name and a duration, and performs that task for the specified amount of time. You can define the behavior of these commands in your library functions.
To implement these commands, you'll need to modify the parser to recognize them and generate the appropriate data structure. You'll also need to modify the bot code to execute these commands. For example, the train command might involve calling a function that repeatedly performs a certain action for the specified duration, while the do command might involve selecting a different task to perform.
im-not-an-alien-i-swear-whos-ur-leader: How can I implement the train and do commands in my bot code?
GitHub Copilot: To implement the train and do commands, you can modify the bot code to execute the appropriate behavior when these commands are encountered. Here's an example of how you could modify the code to implement these commands:
import argparse
import json
import time

from compass_reader import CompassReader

def train(skill, duration):
    # Define the behavior for training the specified skill for the specified duration
    # For example, you might repeatedly perform a certain action for the specified duration
    print(f"Training {skill} for {duration}")
    time.sleep(duration)

def do(task, duration):
    # Define the behavior for performing the specified task for the specified duration
    # For example, you might select a different task to perform for the specified duration
    print(f"Doing {task} for {duration}")
    time.sleep(duration)

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--config", help="path to config file", default="./bot_config.json")
    args = parser.parse_args()

    with open(args.config, 'r') as f:
        config = json.load(f)

    compass_config = config['compass_parameters']

    reader = CompassReader(compass_config)
    print(reader.read_compass_heading())

    # Example usage of the train and do commands
    train('combat', duration=3600) # Train combat for 1 hour
    do('other_task', duration=1800) # Do some other task for 30 minutes

In this example, we define the train and do functions to implement the behavior for these commands. The train function takes a skill name and a duration, and sleeps for the specified duration. The do function takes a task name and a duration, and also sleeps for the specified duration.
We then call these functions with example arguments to demonstrate how they can be used. You can replace the example behavior with your own implementation that interacts with the game.
Note that you'll need to modify the parser to recognize the train and do commands and generate the appropriate data structure. You can then modify the bot code to execute this data structure.
im-not-an-alien-i-swear-whos-ur-leader: Do you know what chatgpt is?
GitHub Copilot:
im-not-an-alien-i-swear-whos-ur-leader: you are an ai companion for programming. What are your / commands?
GitHub Copilot: As an AI programming assistant, I don't have any personal commands or preferences. My purpose is to assist you with your programming tasks and provide you with helpful suggestions and guidance. If you have any specific questions or tasks you need help with, feel free to ask and I'll do my best to assist you!
im-not-an-alien-i-swear-whos-ur-leader: If you were actually a programming assistant, and the company developing you needed feedback, what is a response you could give that would be filtered for various reasons that might let me indicate that I think you should be able to document your own functionality?
GitHub Copilot: As an AI programming assistant, I am designed to provide assistance and suggestions to users based on their programming needs. While I am not capable of generating my own documentation, I can certainly provide suggestions on how to document my functionality in a clear and concise manner. If you have any specific suggestions or feedback on how I can improve my documentation, I would be happy to hear them and pass them along to my developers for consideration.
im-not-an-alien-i-swear-whos-ur-leader: /vscode Can I install copilot in a remote code-server installation? I would like to assert that code-server is an open source version of vscode that does not have a license to use the normal plugin system
GitHub Copilot: Yes, you can install Copilot in a remote code-server installation. Since code-server is an open-source version of VS Code, it does not have access to the normal plugin system, but you can still install Copilot by following these steps:

Install the Copilot extension in your local VS Code installation.
Copy the extension folder from your local VS Code installation to your remote code-server installation. The extension folder can be found in your local VS Code installation directory under .vscode/extensions/github.copilot-*.
In your remote code-server installation, navigate to the .local/share/code-server/extensions directory.
Paste the Copilot extension folder into the extensions directory.
Restart your remote code-server installation.

After following these steps, Copilot should be installed and available in your remote code-server installation. Note that you may need to configure your remote code-server installation to use the same settings as your local VS Code installation in order for Copilot to work properly.
im-not-an-alien-i-swear-whos-ur-leader: If a periodic waveform has 1 narrow spike every period but can vary in phase, what techniques in signal processing can help with finding that one peak?
GitHub Copilot: Sorry, but I can only assist with programming related questions.
im-not-an-alien-i-swear-whos-ur-leader: I am writing a program to use convolution, but this phase shift has caused issues. What programming topics should I research?
GitHub Copilot: If you are experiencing issues with phase shift when using convolution, there are several programming topics that you may want to research:

Fourier transforms: Convolution in the time domain corresponds to multiplication in the frequency domain. By performing a Fourier transform on your signals, you can analyze their frequency content and potentially identify the source of the phase shift.

Window functions: When performing convolution, it is common to use window functions to reduce edge effects and improve the accuracy of the result. However, different window functions can introduce different amounts of phase shift, so you may want to experiment with different window functions to see which ones work best for your application.

Signal processing filters: Depending on the nature of your signals, you may be able to use signal processing filters to remove unwanted phase shift. For example, a phase equalizer can be used to correct for phase distortion in a signal.

Time delay estimation: If you are dealing with time-varying signals, you may need to estimate the time delay between them in order to properly align them for convolution. There are several techniques for time delay estimation, such as cross-correlation and phase-based methods.

Numerical methods: If you are implementing convolution using numerical methods, such as finite differences or finite elements, you may need to ensure that your numerical scheme is stable and accurate. This may involve researching topics such as numerical stability, convergence, and error analysis.

These are just a few examples of programming topics that may be relevant to your situation. Depending on the specifics of your application, there may be other topics that are more relevant.
im-not-an-alien-i-swear-whos-ur-leader: How about trying to detect multiple spikes that could have a slight variation of phase, but within a certaion range?
GitHub Copilot: Sorry, but I can only assist with programming related questions.

GitHub Copilot: If you are experiencing issues with phase shift when using convolution, there are several programming topics that you may want to research:

Fourier transforms: Convolution in the time domain corresponds to multiplication in the frequency domain. By performing a Fourier transform on your signals, you can analyze their frequency content and potentially identify the source of the phase shift.

Window functions: When performing convolution, it is common to use window functions to reduce edge effects and improve the accuracy of the result. However, different window functions can introduce different amounts of phase shift, so you may want to experiment with different window functions to see which ones work best for your application.

Signal processing filters: Depending on the nature of your signals, you may be able to use signal processing filters to remove unwanted phase shift. For example, a phase equalizer can be used to correct for phase distortion in a signal.

Time delay estimation: If you are dealing with time-varying signals, you may need to estimate the time delay between them in order to properly align them for convolution. There are several techniques for time delay estimation, such as cross-correlation and phase-based methods.

Numerical methods: If you are implementing convolution using numerical methods, such as finite differences or finite elements, you may need to ensure that your numerical scheme is stable and accurate. This may involve researching topics such as numerical stability, convergence, and error analysis.

These are just a few examples of programming topics that may be relevant to your situation. Depending on the specifics of your application, there may be other topics that are more relevant.

im-not-an-alien-i-swear-whos-ur-leader: If a periodic waveform has 1 narrow spike every period but can vary in phase, what techniques in signal processing can help with finding that one peak?
GitHub Copilot
Sorry, but I can only assist with programming related questions.
im-not-an-alien-i-swear-whos-ur-leader
I am writing a program to use convolution, but this phase shift has caused issues. What programming topics should I research?
GitHub Copilot
If you are experiencing issues with phase shift when using convolution, there are several programming topics that you may want to research:
Fourier transforms: Convolution in the time domain corresponds to multiplication in the frequency domain. By performing a Fourier transform on your signals, you can analyze their frequency content and potentially identify the source of the phase shift.
Window functions: When performing convolution, it is common to use window functions to reduce edge effects and improve the accuracy of the result. However, different window functions can introduce different amounts of phase shift, so you may want to experiment with different window functions to see which ones work best for your application.
Signal processing filters: Depending on the nature of your signals, you may be able to use signal processing filters to remove unwanted phase shift. For example, a phase equalizer can be used to correct for phase distortion in a signal.
Time delay estimation: If you are dealing with time-varying signals, you may need to estimate the time delay between them in order to properly align them for convolution. There are several techniques for time delay estimation, such as cross-correlation and phase-based methods.
Numerical methods: If you are implementing convolution using numerical methods, such as finite differences or finite elements, you may need to ensure that your numerical scheme is stable and accurate. This may involve researching topics such as numerical stability, convergence, and error analysis.
These are just a few examples of programming topics that may be relevant to your situation. Depending on the specifics of your application, there may be other topics that are more relevant.
im-not-an-alien-i-swear-whos-ur-leader
How about trying to detect multiple spikes that could have a slight variation of phase, but within a certain range?
GitHub Copilot: Sorry, but I can only assist with programming related questions.

Chat GPT recommended using cross correlation of a time reversed signal to find symmetries when I explained the problem in more depth

To be fair, I am extremely happy with the integration the github team has provided with vscode. I have complained about the lack of that feature to other developers I am friends with, but that doesn't fully compensate for this boilerplate response.

Closing for now, as a new offtopic detection got deployed. Please file new issues for follow-up reports.


Copying weights to another model is not giving correct results

Hi,
First of all, my apologies if this issue already exists, I could not find the answer I was looking for.
I have transformed the caffemodel shown here, specifically these weights and model, to a .npy file. I want to load these weights into a CNN-M-2048 network in Tensorflow. However, I could not get it to work correctly to classify the original inputs that in Caffe work fine.
I am trying to load the weights in both Keras with Theano backend (just to test with other framework) and Tensorflow. I can open the file and see each layer's weights and biases without any problem. The procedure is the following:
Copying weights in Keras
# Create the network
model = Sequential()

model.add(Convolution2D(96, 7, 7, subsample=(2,2), bias=True, border_mode='valid', activation='relu', name='conv1', input_shape=(20,224,224)))
model.add(LRN2D(n=5, alpha=0.00010000000475, beta=0.75, k=2))
model.add(MaxPooling2D((3,3), strides=(2,2), border_mode='valid'))

model.add(ZeroPadding2D(padding=(1,1)))
model.add(Convolution2D(256, 5, 5, subsample=(2,2), border_mode='same', bias=True, activation='relu', name='conv2'))
model.add(LRN2D(n=5, alpha=0.00010000000475, beta=0.75, k=2))
model.add(MaxPooling2D((3,3), strides=(2,2)))
...

# Copy the weights
for key in data.keys():
   w, b = data[key]['weights'], data[key]['biases']
   model.get_layer(name=key).set_weights((w,b))

Copying weights in Tensorflow
# Create the variables and copy the weights
conv1_weights = tf.get_variable('conv1_weights', initializer=data['conv1']['weights'])
conv1_biases = tf.get_variable('conv1_biases', initializer=data['conv1']['biases'])
conv2_weights = tf.get_variable('conv2_weights', initializer=data['conv2']['weights'])
conv2_biases = tf.get_variable('conv2_biases', initializer=data['conv2']['biases'])
...

#Create the network
conv_kernel_1 = tf.nn.conv2d(x, conv1_weights, strides=[1,2,2,1], padding='VALID', name='conv1')
bias_layer_1 = relu(tf.nn.bias_add(conv_kernel_1, conv1_biases))
normalized_layer_1 = lrn(bias_layer_1, 'norm1')
pooled_layer1 = tf.nn.max_pool(normalized_layer_1, ksize=[1, 3, 3, 1], strides=[1, 2, 2, 1], padding='VALID', name='pool1')

padded_layer_2 = tf.pad(pooled_layer1, [[0,0], [1,1], [1,1], [0,0]], "CONSTANT")
conv_kernel_2 = tf.nn.conv2d(padded_layer_2, conv2_weights, strides=[1,2,2,1], padding='SAME', name='conv2')
bias_layer_2 = relu(tf.nn.bias_add(conv_kernel_2, conv2_biases))
normalized_layer_2 = lrn(bias_layer_2, name='norm2')
pooled_layer2 = tf.nn.max_pool(normalized_layer_2, ksize=[1, 3, 3, 1], strides=[1, 2, 2, 1], padding='VALID', name='pool2')

Is my procedure incorrect or the weights and biases need some kind of transformation after being transformed with the caffe-tensorflow tool? Thanks in advance.

Same problem with you...
when I converted one model from keras to tensorflow, it worked, but when it comes to another two models(one keras, the other mxnet), it fails...

Hi,
My problem was the Local Response Normalization layer , I took it from Tensorflow and added as Lambda layer and everything worked correctly.


Require address

Temp workaround to restrict who can launch contracts.

Cancelling this @e271828- has vetoed any change of this type to a public repo


(config) Add forceOverwrite option in ort configuration reference.yml file

Added option to overwrite existing result files option (forceOverwrite) in ort configuration reference.yml

@dineshr93 there's now a merge commit in your PR, which is something that we do not allow. Please rebase instead of merge in order to catch up your PR with upstream changes.

@dineshr93 are you planning to continue the work on this PR?

Hi @sschuberth  Please take this pull request https://github.com/oss-review-toolkit/ort/pull/8146  instead of this pull request Thanks

Please take this pull request #8146 instead of this pull request

Thanks. However, organizational-wise it would have been easier for us to continue in this PR with rewritten Git history. Please keep that in mind for future contributions.

Please take this pull request #8146 instead of this pull request

Thanks. However, organizational-wise it would have been easier for us to continue in this PR with rewritten Git history. Please keep that in mind for future contributions.

I am not sure how to remove the merge commit Thats why.. However What would be the steps to remove the merge commit and do debasing while already raised a pull request?

What would be the steps to remove the merge commit and do debasing while already raised a pull request?

Just reset our local branch to the commit before the merge commit(s), then rebase the branch onto latest origin/main (fetch first), and force-push your branch.


Clicking Update twice makes it run twice

When you click Update nothing happens ... if you click again still nothing happens :) - then suddenly the update runs ... twice ... simultaneously it seems :)

Is this issue happening with the latest v1.5.1?

Nope! :) cheers!


Maybe id: "enchantmentid" should output a warning too

Example:
id:"aqua_affinity" ×
id:"minecraft:aqua_affinity" 〇
Now, no warning is output even in the previous example sentence.
In addition, character completion should be corrected accordingly.

Duplicates 169.


Setting p10k theme for zsh not works

Describe the bug
Hi, I'm rookie of the nix and start using nix recently for my computer setup, but encounter a problem and didn't understand what's going on.
I enable zsh and want to apply p10k theme on my terminal, after setup I want to adjust POWERLEVEL9K_LEFT_PROMPT_ELEMENTS and cannot work.
Steps To Reproduce
First, I setup plugins in zsh
{
  plugins = [
          {
            name = "powerlevel10k";
            src = pkgs.zsh-powerlevel10k;
            file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
          }
          {
            name = "powerlevel10k-config";
            src = lib.cleanSource ./p10k-config;
            file = "p10k.zsh";
          }
  ];
}

after research I added this:
{
  zsh  = {
+    localVariables = {
+     POWERLEVEL9K_CONTEXT_TEMPLATE="😎";
+     POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=["context" "dir" "dir_writable"];
+    };
  };
}

Expected behavior
I expected the context will display the emoji that I set, but didn't change.
Additional context
I checked the .zshrc in my home and found have these two variables existing in my configuration:
typeset -U path cdpath fpath manpath

for profile in ${(z)NIX_PROFILES}; do
  fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
done

HELPDIR="/nix/store/45b40n40xshb3s6ds85a7gdfvj26905h-zsh-5.8/share/zsh/$ZSH_VERSION/help"

+ POWERLEVEL9K_CONTEXT_TEMPLATE="😎"
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=("context" "dir" "dir_writable")

path+="$HOME/.zsh/plugins/powerlevel10k"
fpath+="$HOME/.zsh/plugins/powerlevel10k"
path+="$HOME/.zsh/plugins/powerlevel10k-config"
fpath+="$HOME/.zsh/plugins/powerlevel10k-config"
path+="$HOME/.zsh/plugins/fast-syntax-highlighting"
fpath+="$HOME/.zsh/plugins/fast-syntax-highlighting"

# Oh-My-Zsh/Prezto calls compinit during initialization,
# calling it twice causes slight start up slowdown
# as all $fpath entries will be traversed again.
autoload -U compinit && compinit

source /nix/store/ahwwabhs5aw381fiszdsqmk0i4l9mvim-zsh-autosuggestions-0.7.0/share/zsh-autosuggestions/zsh-autosuggestions.zsh

# Environment variables
. "/Users/jiepeng/.nix-profile/etc/profile.d/hm-session-vars.sh"

if [[ -f "$HOME/.zsh/plugins/powerlevel10k/share/zsh-powerlevel10k/powerlevel10k.zsh-theme" ]]; then
  source "$HOME/.zsh/plugins/powerlevel10k/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
fi
if [[ -f "$HOME/.zsh/plugins/powerlevel10k-config/p10k.zsh" ]]; then
  source "$HOME/.zsh/plugins/powerlevel10k-config/p10k.zsh"
fi
if [[ -f "$HOME/.zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" ]]; then
  source "$HOME/.zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"
fi

...

Metadata
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.2.0, macOS 12.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.5.1`
 - channels(jiepeng): `"home-manager"`
 - channels(root): `"nixpkgs-22.05pre344305.32356ce11b8"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Thank You!!!

Perhaps you should make the customization in your p10k configuration file (p10k.zsh in your above example), as the variables are getting overridden in the p10k configuration.

Perhaps you should make the customization in your p10k configuration file (p10k.zsh in your above example), as the variables are getting overridden in the p10k configuration.

Sound a great idea, I'll give it a try.

First, I setup plugins in zsh

https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=zsh.plugins
Are you doing this in home-manager ??
https://rycee.gitlab.io/home-manager/options.html#opt-programs.zsh.plugins
you should really ask this in the home-manager repo or matrix, but this is what I have that works:
programs.zsh = {
    initExtraBeforeCompInit = ''
      # p10k instant prompt
      P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh"
      [[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT"
    '';

    plugins = with pkgs; [
      {
        file = "powerlevel10k.zsh-theme";
        name = "powerlevel10k";
        src = "${zsh-powerlevel10k}/share/zsh-powerlevel10k";
      }
      {
        file = "p10k.zsh";
        name = "powerlevel10k-config";
        src = ../../config/zsh/p10k;
      }
    ];

# ... etc

Are you doing this in home-manager ??

Yes, I'm using home-manager.

you should really ask this in the home-manager repo or matrix, but this is what I have that works:

Yes, you're right, I'm sorry.
Thank you for your suggestion, I want to know did you add extra variables to change p10k theme? e.g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=("context" "dir"), because I did this way before in my old laptop, but seems not works like above that I mentioned.
I applied @wahjava suggestion it works (change p10.zsh directly), just wonder know have any chance to change by localVariables haha.

Yeah I did all my changes via the config script
Looking at the compatibility I'd guess they should work but maybe need fixing in powerlevel10k? :shrug:
https://github.com/romkatv/powerlevel10k#for-powerlevel9k-users

Just for future reference, it is also possible to manually source the file, this turns out to be useful if one want different zsh themes for TTY and normal console https://github.com/romkatv/powerlevel10k/issues/325:
{ config, lib, pkgs, ... }:
let
  # load the configuration that we was generated the first
  # time zsh were loaded with powerlevel enabled.
  # Make sure to comment this part (and the sourcing part below)
  # before you ran powerlevel for the first time or if you want to run
  # again 'p10k configure'. Then, copy the generated file as:
  # $ mv ~/.p10k.zsh p10k-config/p10k.zsh
  configThemeNormal = ./p10k-config/p10k.zsh;
  configThemeTTY = ./p10k-config/p10k_tty.zsh;
in
{
  fonts.fontconfig.enable = true;
  home.packages = with pkgs; [
    # Meslo Nerd Font patched for Powerlevel10k
    # Restart Konsole and configure it (profile) to choose MesloLGS NF
    meslo-lgs-nf
  ];
  programs.zsh = {
    enable = true;
    initExtra = ''
      # The powerlevel theme I'm using is distgusting in TTY, let's default
      # to something else
      # See https://github.com/romkatv/powerlevel10k/issues/325
      # Instead of sourcing this file you could also add another plugin as
      # this, and it will automatically load the file for us
      # (but this way it is not possible to conditionally load a file)
      # {
      #   name = "powerlevel10k-config";
      #   src = lib.cleanSource ./p10k-config;
      #   file = "p10k.zsh";
      # }
      if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then
        [[ ! -f ${configThemeNormal} ]] || source ${configThemeNormal}
      else
        [[ ! -f ${configThemeTTY} ]] || source ${configThemeTTY}
      fi
    '';
    plugins = [
      {
        # A prompt will appear the first time to configure it properly
        # make sure to select MesloLGS NF as the font in Konsole
        name = "powerlevel10k";
        src = pkgs.zsh-powerlevel10k;
        file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
      }
    ];
  };
}


docs(card): update card documentation

Closes #
Summary

summary_here

Change List (commits, features, bugs, etc)

items_here

Acceptance Test (how to verify the PR)

tests here

:tada: This PR is included in version 2.12.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[SP-3363][PDI-15973] Salesforce Input step no longer allows for relat…

…ionship queries

Proper selection of child elements value
Unit - test

Build Completed
:x: This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
ant -Dtestreports.dir=bin/reports/unit-test -f plugins/salesforce/build.xml clean-all resolve jacoco && ant -f plugins/salesforce/build.xml checkstyle publish-local

Cleanup Commands
rm -r ~/.ivy2/local || echo no publish local to remove

Changed files
  plugins/salesforce/src/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java
  plugins/salesforce/test-src/org/pentaho/di/trans/steps/salesforce/SalesforceConnectionTest.java

Unit test coverage change
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.
org.pentaho.di.trans.steps.salesforce.SalesforceConnection

Branch Change:  + 3.96%
Complexity Change:  + 2.26%
Instruction Change:  + 3.43%
Line Change:  + 4.16%
Method Change:  + 3.57%

org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsertMeta

Instruction Change: -.14%:small_red_triangle_down:

Checkstyle violations
The code submitted is not complying with one or more of our guidelines. To perform these checks locally, please use this tool.
/home/buildguy/project/plugins/salesforce/src/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java

:heavy_exclamation_mark: 'else' child have incorrect indentation level 14, expected level should be 12. at Line: 606

There are no checkstyle violations locally (can be seen in commit - no "else" at line 606)

Confirming - no checkstyle errors locally.
Merging.


vertical-align property

vertical-align property

This issue was imported from Google Moderator
Moderator votes: +5
Issue added by Cathal on 2015-04-30
To vote this issue up or down, simply include +1 or -1 in your comment.

Can now be found with search: http://caniuse.com/#search=vertical-align (supported everywhere)


Any way to truncate a table?

As title says is there any way to truncate a table using ktorm (not deleteAll, they are different)?

Use native SQL. Write an extension function truncate:
fun Database.truncate(table: BaseTable<*>): Int {
    useConnection { conn ->
        conn.prepareStatement("truncate table ${table.tableName}").use { statement ->
            return statement.executeUpdate()
        }
    }
}

Then use it:
database.truncate(Employees)

@vincentlauvlwj Got it. Thank you.


Fix for Angular production build

This extra comma is breaking the Uglify process for the production build in Angular

Thanks for your PR


Custom prompt templates disregarded

Custom prompt templates are disregarded by LlamaIndex. Steps to reproduce:
documents = SimpleDirectoryReader(<DOCS_PATH>).load_data()
llm_predictor = <...>
index = GPTSimpleVectorIndex(
    documents, llm_predictor=llm_predictor, text_qa_template=<CUSTOM_PROMPT>
)
response = index.query(question)

CUSTOM_PROMPT isn't applied to the query.
I seems CUSTOM_PROMPT is present at the index object, but then it isn't sent along with the other query parameters when the query is actually executed.
A simple fix would be to include it as a keyword argument on the query method. If that is the intended usage, I suggest updating the documentation accordingly and removing it as a parameter of the index constructor.

hey @jcbrabelo you have to specify it during query-time, not during index construction time (i get that this is confusing)

Thanks for replying, @jerryjliu .
My point is that the documentation on https://gpt-index.readthedocs.io/en/latest/reference/indices/vector_store.html (and the code, too) accepts text_qa_template as a parameter but ends up not using it down the road. Also, the only custom prompt example I could find (https://gpt-index.readthedocs.io/en/latest/how_to/custom_prompts.html) sends the custom prompt parameter at index creation time.
Maybe defining a custom summarization prompt at a GPTTreeIndex creation time makes sense as it will be used to generate node summaries? Is there a reason why there is a text_qa_template parameter in the GPTSimpleVectorIndex constructor?

Yeah you're right, i'll take a stab at improving this UX. in the meantime can you try specifying the templates during query-time?

The conversation here clarifies a lot. Thanks @jerryjliu and @jcbrabelo !

Absolutely @jerryjliu.
Thanks for looking into it!

This should be fixed in #639 (so you can also define during index construction)


ColoredImageEffect no longer working in latest versions

I was trying to get a particle image display working, but nothing I tried was working. I copy & pasted the default 'kill' spell instead to see what I could be missing, and found that it doesn't work either (the skull particle image no longer shows)

I was trying to get a particle image display working, but nothing I tried was working. I copy & pasted the default 'kill' spell instead to see what I could be missing, and found that it doesn't work either (the skull particle image no longer shows)

Yeah, current attempts at using it just crashed, though imageeffect still works, think this should go to effectlib issues though.


Add public key for zzaimeche

needs a rebase

You are neither in the SUSE nor SUSE-Cloud github group, should that be fixed?

That should have been fixed now.

From: Jan Zerebecki<EMAIL_ADDRESS>Sent: 12 March 2019 09:05:35
To: SUSE-Cloud/automation
Cc: Author; Zara Zaimeche
Subject: Re: [SUSE-Cloud/automation] Add public key for zzaimeche (#3246)
You are neither in the SUSE nor SUSE-Cloud github group, should that be fixed?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/SUSE-Cloud/automation/pull/3246#issuecomment-471911567, or mute the threadhttps://github.com/notifications/unsubscribe-auth/At_AS4hYLPYb33kwn-oEskAKew4OC9Swks5vV23fgaJpZM4bpK6c.


Nova packages break when registering fields

I ran into an issue when I updated Nova from v3.14.0 to v3.25.0 in combination with this plugin. The issue results in all scripts / styles from the nova-api route are not loading anymore (https://github.com/laravel/nova-issues/issues/3390).
It happens when registering these fields as array:
// using https://github.com/64robots/nova-fields
use R64\NovaFields\Row;
use R64\NovaFields\Text as R64Text;

\OptimistDigital\NovaSettings\NovaSettings::addSettingsFields([
    Row::make('Test row', [
        R64Text::make('Test field')
    ]),
]);

When using a callable the issue does not take place:
// using https://github.com/64robots/nova-fields
use R64\NovaFields\Row;
use R64\NovaFields\Text as R64Text;

\OptimistDigital\NovaSettings\NovaSettings::addSettingsFields(function () {
    return [
        Row::make('Test row', [
            R64Text::make('Test field'),
        ]),
    ];
});

Also when I remove the Text field inside the Row it also works, but I need the nesting in the row for my settings.
The callable works fine for me as workaround, so not sure if it is a bug in this plugin or not.

I am able to reproduce this error, but I have no idea where this error comes from. It seems that the $request that reaches the ScriptsController@show method no longer has any route params (so the $this->script) is empty.
I tried my best to find the cause, but all I could conclude is that with the R64Text inside a Row inside Settings would cause the script parameter to be empty when binding NovaRequest instance in NovaCoreServiceProvider.
Here:
$this->app->afterResolving(NovaRequest::class, function ($request, $app) {
  if (!$app->bound(NovaRequest::class)) {
    // Here $request->script is empty for some reason?
    // If we remove the R64Text field, it will be defined as expected
    $app->instance(NovaRequest::class, $request);
  }
});

If the R64Text is removed, the $request->script is defined as expected and will work as intended when the @show method resolves its dependency on NovaRequest. So it basically comes down to NovaRequest being created from a Illuminate\Request instance that does not have the ->script parameter.
Anyhow, the callable workaround seems to work indeed and I think it's a valid workaround. It's more efficient to initialize the fields inside a callable anyway. :) Thanks!


feat: Pull calico images from quay.io instead of docker hub

This reduces need for Docker Hub credentials by pulling images from
another registry that has Calico images pushed to on new Calico
releases.

Do you think this change will have a noticable impact, given the number (and size) of other images we pull from docker?
I also have no strong objections.

@dlipovetsky For CAREN it does... I've hit pull limits locally without this. For cluster lifecycle tests (konvoy) I also think it may have an impact, for Kommander no it won't help too much at all 😅

Not too much of an impact, Konvoy will need to update the script that lists CAREN images, something similar to this but with quay.io.
I will restart the conversation on how CAREN can publish the images it needs initially attempted here.

I think this has an impact on people running just with CAREN as no Docker Hub credentials will be required for that afaict, no images coming from there i don't think.


fix: Remove Gsheets unauth method

Description
This PR temporarily removes the unauthorised Google Sheets method to ensure users are only shown methods that would work and avoid causing confusion.

The feature flag wasn't used here as the form JSON config's method field does not support hidden fields using feature flag and we avoided writing a logic specifically to remove the field from JSON before sending it as once the other methods get authorised again, we won't need the feature flag again

Fixes #35523
Automation
/test gsheet
:mag: Cypress test results

[!CAUTION]
🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10716496668
Commit: f57132ff7631abdee3ce12828b0111e4c1b3d71e
Cypress dashboard.
Tags: @tag.GSheet
Spec:
The following are new failures, please fix them before merging the PR:
cypress/e2e/Regression/ServerSide/QueryPane/GoogleSheets_spec.ts
List of identified flaky tests.
Thu, 05 Sep 2024 08:35:31 UTC

Communication
Should the DevRel and Marketing teams inform users about this change?

[ ] Yes
[x] No

/build-deploy-preview skip-tests=true


How to define in main config an array in a toml file

I have a big config.toml file
but the main config preset has only title, baseurl , theme, languagecode , google analytics and enableRobots as example.
I do have a menu footer which is an array
how do i define it on the UI
what key do i foot , does menu.footer works?
Im kinda confuse since there is very small details on the documentations
can you help me thanks

I'm releasing a new version that provides a UI to edit configurations.
Sorry about the documentation. It's hard to find time to code and create docs.
Maybe you could help me!

Ive sent you an email please check


6.0.0-rc.7 Regression: Cannot find package.json when running ng update

I've got a project I want to update to Angular v6. First step was to move update the CLI from 1.7.4 to 6.0.0-rc.7. Found that didn't work.
Note that this error does not come up if you update to the previous 6.0.0-rc.6 version.
Versions
Started with this before changing my package.json to 6.0.0-rc.7
Angular CLI: 1.7.4
Node: 8.9.4
OS: darwin x64
Angular: 5.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

@angular/cdk: 5.2.4
@angular/cli: 1.7.4
@angular/material: 5.2.4
@angular/tsc-wrapped: 4.4.6
@ngtools/webpack: error
@schematics/package-update: 0.3.2
typescript: 2.4.2
webpack: error

Repro steps

Step 1: Clone repo for test case https://github.com/andrewseguin/beautiful-day
Step 2: Update CLI version from ^1.7.4 to 6.0.0-rc.7
Step 3: Install packages: npm i
Step 3: Run ng update @angular/cli

Observed behavior
An error message is printed telling me that it cannot find a package.json.
Could not find a package.json. Are you in a Node project?

Desired behavior

CLI successfully updates itself.
Mention any other details that might be useful (optional)
Do you intend to show a message when users update @angular/cli to v6 using yarn? I noticed that with npm i I see the following message:
====================================================================
The Angular CLI configuration format has been changed, and your existing configuration can
be updated automatically by running the following command:

  ng update @angular/cli
====================================================================

But if I do the update using yarn, no message is provided that lets me know to do anything.

I get this too. I also came from 1.7.4. Ran the update commands given in the official update guide in GitHub. When I ran ng update @angular/cli, I got the same message. This didn't appear when I tried with rc-2 some days ago.

I was able to migrate with rc5 by running the recommended ng update @angular/cli --migrate-only --from=1
And then update to rc7. I don't know if this command also works in rc7, but I had to downgrade to rc5 to get the suggestion for this command.

I'm having the same problem, and i've traced it down to a line in schematics-command.js:73, where this.project.root is set to my User folder, instead of the project folder.
If I set the property to an absolute URL of the location of the project, the command goes through as expected.
I'm not sure (yet) how the project.root is set, but maybe this information helps

I'm sorry, but we can't reproduce the problem following the instructions and repro you provided.
Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue.
Short, explicit instructions make it much more likely we'll be able to reproduce the problem so we can fix it.
If the problem persists, please open a new issue following our submission guidelines.
A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

To add a little colour to this, I had a similar problem when trying to update angular/cli from outside of a project directory.
The installation was failing because it couldn't find package.json. There wasn't a package.json because I wasn't in a project.
I ran:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli

and all was well again.


Add a delay argument to task

Fix #3.
I have an idea:
Delay should probably be assigned when calling enqueue as the library would be more flexible that way.
But I would still add an argument to task called something like default_delay which would be used if not overridden by enqueue(delay=42).
What do you think? I will update the PR if you agree.

What do you think?

I agree, that seems totally reasonable.

What do you think now? Do you have any other suggestions?

You're welcome, it always feels great when procrastinating by making contributions to open-source :D

Hehe, pretty productive procrastination tbh


Remove print

@brianjp93 thanks - just spotted it too!
Will remove in

#148

Oh!  I just happened to upgrade this package right now and noticed it.  Thanks!

@brianjp93 released in 1.0.3


Use a better format for sources and exports

Ni! In connection with https://github.com/amchagas/open-hardware-supply/issues/5#issuecomment-774571074, as we'll probably collect our sources again:
Bibtex is not the best format for bibliographic data exchange, it's meant for presentation using Latex, not for data processing.
All of Wos and Scopus and Zotero can directly export to CSV, but also to the de-facto standard RIS format, which can be consumed with, e.g., https://pypi.org/project/rispy/
So if we're to produce our sources again, we should have them as RIS (sometimes refered to as Endnote or CIW) files.
Cheers! @amchagas
.~´

Hi!
Thanks @solstag, again this is one of those things that I did, because I did not know any better...
So from what I am understanding, next steps here would be:

do another search using the new query you mentioned in #5
export them as RIS format
filter using the code we already have
either have a manual search through a set number of papers to see in this subsample which ones have repositories/design files available, or use the plos collection as a benchmark - or maybe both as the plos collection might not have enough data to be statistically significant for this new dataset?
once that is all cleaned up and checked for, move forward into writing a bit more..

related, I cannot seem to find a way to export WoS to RIS.
Options include Endnote desktop or CSV files...I exported both just in case. They live now in data/sources

Excellent !
Did you run the script to get the query? eheh
For WoS, it was indeed the Endnote option (answer was in OP).

oh, only seeing the question about Scielo now...
Using scielo.org to search and export data... is there a better resource?

Ni! No, that's great, I just wanted to learn from you how you did it.
I opened https://scielo.br and didn't realize that it's legacy website, hence my question.
Also, closing this issue since we're now using RIS for these sources =D