Malformed Framework response from App Store Connect

Description
I got this email from App Store Connect after submitting a macOS app with Firebase 10.23.0 and Xcode 14.3. M1 MacBook with Sonoma 14.3.1
My project only has Firebase as dependency.
I tried:
Removing all dependencies, clearing build folder and derived data. Xcode submission went through but then you receive an email from Connect.

Reproducing the issue
No response
Firebase SDK Version
10.23.0
Xcode Version
14.3
Installation Method
Swift Package Manager
Firebase Product(s)
All
Targeted Platforms
macOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet

{
  "originHash" : "c63c63846d9c539229e96de38d6af51417e28c0ee9a0bc48bd0f0f19d923c329",
  "pins" : [
    {
      "identity" : "abseil-cpp-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/abseil-cpp-binary.git",
      "state" : {
        "revision" : "7ce7be095bc3ed3c98b009532fe2d7698c132614",
        "version" : "1.2024011601.0"
      }
    },
    {
      "identity" : "app-check",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/app-check.git",
      "state" : {
        "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2",
        "version" : "10.18.1"
      }
    },
    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk",
      "state" : {
        "revision" : "fcf5ced6dae2d43fced2581e673cc3b59bdb8ffa",
        "version" : "10.23.0"
      }
    },
    {
      "identity" : "googleappmeasurement",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleAppMeasurement.git",
      "state" : {
        "revision" : "6ec4ca62b00a665fa09b594fab897753a8c635fa",
        "version" : "10.23.0"
      }
    },
    {
      "identity" : "googledatatransport",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleDataTransport.git",
      "state" : {
        "revision" : "a637d318ae7ae246b02d7305121275bc75ed5565",
        "version" : "9.4.0"
      }
    },
    {
      "identity" : "googleutilities",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleUtilities.git",
      "state" : {
        "revision" : "26c898aed8bed13b8a63057ee26500abbbcb8d55",
        "version" : "7.13.1"
      }
    },
    {
      "identity" : "grpc-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/grpc-binary.git",
      "state" : {
        "revision" : "67043f6389d0e28b38fa02d1c6952afeb04d807f",
        "version" : "1.62.1"
      }
    },
    {
      "identity" : "gtm-session-fetcher",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/gtm-session-fetcher.git",
      "state" : {
        "revision" : "76135c9f4e1ac85459d5fec61b6f76ac47ab3a4c",
        "version" : "3.3.1"
      }
    },
    {
      "identity" : "interop-ios-for-google-sdks",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/interop-ios-for-google-sdks.git",
      "state" : {
        "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
        "version" : "100.0.0"
      }
    },
    {
      "identity" : "leveldb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/leveldb.git",
      "state" : {
        "revision" : "43aaef65e0c665daadf848761d560e446d350d3d",
        "version" : "1.22.4"
      }
    },
    {
      "identity" : "nanopb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/nanopb.git",
      "state" : {
        "revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
        "version" : "2.30910.0"
      }
    },
    {
      "identity" : "promises",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/promises.git",
      "state" : {
        "revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
        "version" : "2.4.0"
      }
    },
    {
      "identity" : "swift-protobuf",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/apple/swift-protobuf.git",
      "state" : {
        "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8",
        "version" : "1.25.2"
      }
    }
  ],
  "version" : 3
}

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

Done. Sorry.

Thanks! We've reproduced. It looks like Apple silently added new requirements today or within the last few days since we last tested.
We'll investigate.

If you're using Firestore, but not Analytics, the source SwiftPM build should be a workaround. See https://github.com/firebase/firebase-ios-sdk?tab=readme-ov-file#visionos

Same issue here:

Xcode 15.3 on macOS 14.4 RC (Xcode Cloud) → ASC errors ITMS-90291 and ITMS-90292
Xcode 15.2 on macOS 14.3.1 (Xcode Cloud) → all good

Just wanted to confirm that this issue occurs on 10.23.0 (I was waiting for this update to fix our issue). Seems like @paulb777 you've gotten the repro you need?

Thanks all. Appreciate the response. Should we expect a hotfix this week or should we expect this to be part of the normal release cycle? just need to manage expectations with the team.

Tested the latest Firebase 10.23.0 , feedback reported the following error, still not working. So the latest version still conflicts with Xcode 15.3? A similar error is mentioned in https://github.com/firebase/firebase-ios-sdk/issues/12505#issuecomment-1989630753

@emperinter The issue in #12505 was addressed. Apple introduced new checks today that we're now working on.

🤣 One problem solved, and found a new problem, it is not clear when it can be fixed? The last half month can not be used really quite affect the business monitoring, related work can not be carried out, the team is considering downgrading the relevant program version to solve this problem or migrate to other platforms.

One option could be to stay on Xcode 15.2 while the Xcode 15.3/App Store issues get sorted.

Same issue. Waiting for a new fixed version.

One option could be to stay on Xcode 15.2 while the Xcode 15.3/App Store issues get sorted.

Thanks for this tip, I can confirm it works in the meantime

Same here, please fix it. Any ETA @ncooke3 ?

You can download Xcode 15.2 from here and use Firebase 10.21. I was able to get my binaries approved for Catalyst this way.

I know but I have more dependencies that work with Xcode 15.3 and its features are only available on new versions so ...  nothing to do with it.

Hi everyone, we are still working on this. The macOS and macCatalyst framework structure is changing quite a bit, so this is taking some time to work through. The fix is scheduled to be released in 10.24.0 during the week of April 9. For now, the workaround is to use Xcode 15.2.
Additionally:

If you're using Firestore, but not Analytics, the source SwiftPM build should be a workaround. See https://github.com/firebase/firebase-ios-sdk?tab=readme-ov-file#visionos

You can workaround using something like this, but easier to downgrade of course:
# resolve packages as a separate step
xcodebuild -resolvePackageDependencies -workspace My.xcworkspace -scheme MyScheme -derivedDataPath build -destination generic/platform\=macOS,variant\=Mac\ Catalyst

cd build/SourcePackages/artifacts

# Fixes the "Current" symlink. This makes the archive succeed.
find -P . -regex ".*\.framework/\Versions/\Current" -execdir rm -rf {} \; -execdir ln -s A {} \;
# Find the top-level symlinks and fix those too. The archive succeeds without this, but is rejected by Apple.
# I haven't scripted this yet, but `ln -s ` all top-level entries to the matching Versions/Current/blah entry.

# Create the archive as normal, but avoid touching the packages.
xcodebuild -skipPackageUpdates -workspace My.xcworkspace -scheme MyScheme -derivedDataPath build -destination generic/platform\=macOS,variant\=Mac\ Catalyst archive

It's surprising this hasn't been an issue before now because this has been Apple's guidance for > 10 years

Yeah I think Apple just started enforcing it

@ncooke3 do we have any specific release date? I see in the milestone that everything is already done, isn't it?

This is still reproducing in 10.23.1

@YoavGro the fix is planned in 10.24.0

@wojciech-kulik, 10.24.0 is being released today. It is already released for SPM and the Firebase.zip (https://github.com/firebase/firebase-ios-sdk/releases/download/10.24.0/Firebase.zip).
CocoaPods and Carthage publishing are still in progress.

I'm going to close this issue as the 10.24.0 release should fix this.

I can confirm that it works as expected now :). Yesterday I released the app with the latest Firebase package from SPM. 🎊 Thanks for resolving this issue  @ncooke3 🍻


v0.5.5

Hi, there is a mistake. v0.5.4 is on maven instead of v0.5.5,  are you able to fix it? thank you

Sorry, I forgot , v0.5.5 is deployed, will be seen on maven 2-4 hours later.


[To rel/1.2] Enhance warning messages for ConfigNodeClient

cherry-pick https://github.com/apache/iotdb/pull/10721

coverage: 48.0% (-0.003%) from 48.003% when pulling 16916dc95918a32a2231a88d47f2bf69cfde7566 on enhance_confignode_client_msg_cp into 315e4916c9a951cbdf400efa6209307b1d7f38e4 on rel/1.2.


Splitting responses to console.log, console.error

Is there an easy way to split the logger between console.log and console.error depending on the HTTP code?
I'd like to use this with winston so I can easily split the 4xx, 5xx, etc. codes to the error logger and the 2xx to the info logger.

Yep! #134

Sorry for the simple questions but I didn't see any way of using something like winston instead of a stream.
In the example is there a way to replace the process.stderr and process.stdout with log.error() and log.info()? They work similarly to console.error() and console.log().
app.use(morgan('combined', {
    skip: function (req, res) {
        return res.statusCode < 400
    }, stream: process.stderr
}));
app.use(morgan('combined', {
    skip: function (req, res) {
        return res.statusCode >= 400
    }, stream: process.stdout
}));

You could use the split module to construct a simple stream into Winston, if I'm understanding Winston correctly:
var split = require('split')
var winston = require('winston')

var logger = new winston.Logger()
var stream = split().on('data', (log) => logger.log(log))

app.use(morgan('combined', { stream: stream }))

For anyone that stumbles onto this here's an example.
app.use(morgan('combined', {
    skip: (req, res) => {
        return res.statusCode < 400;
    }, stream: split().on('data', data => log.info(data))
}));
app.use(morgan('combined', {
    skip: (req, res) => {
        return res.statusCode >= 400;
    }, stream: split().on('data', data => log.error(data))
}));


[BUG] .venv not in sys.path (?)

Investigative information
Please provide the following:

Timestamp: 2022-12-31T04:56:29.748Z
Function App name: newazurefunc
Function name(s) (as appropriate): mytimer
Core Tools Version:       4.0.4915 Commit hash: N/A  (64-bit)
Function Runtime Version: <IP_ADDRESS>31
Python 3.9.13

Repro steps
Provide the steps required to reproduce the problem:

Open VSCode
Click Azure button
Click Create Function button
Create new folder C:\test\NewFunc2
Select folder created above
at "Select a language" prompt select: "python (Programming Model V2)"
Select a Python interpreter to create a virtual environment: "python3 3.9.13"
(also tried "python 3.9.4")
Select "Open in current window"
Edit "requirements.txt" add new line "requests"
Change body of "function_app.py" to be:

import azure.functions as func
import logging
import datetime
import requests
app = func.FunctionApp()
@app.function_name(name="mytimer")
@app.schedule(schedule="0 */5 * * * *", arg_name="mytimer", run_on_startup=True,
              use_monitor=False)
def test_function(mytimer: func.TimerRequest) -> None:
    utc_timestamp = datetime.datetime.utcnow().replace(
        tzinfo=datetime.timezone.utc).isoformat()
    if mytimer.past_due:
        logging.info('The timer is past due!')
    logging.info('Python timer trigger function ran at %s', utc_timestamp)

press F5
"Exception: ModuleNotFoundError: No module named 'requests'."

Expected behavior
Provide a description of the expected behavior.
Expected the function to run without import error
Actual behavior
Provide a description of the actual behavior observed.
Error in index_function_app. Sys Path: ['C:\\Users\\<>\\AppData\\Roaming\\npm\\node_modules\\azure-functions-core-tools\\bin\\workers\\python\\3.9\\WINDOWS\\X64',
'C:\\Users\\<>\\AppData\\Roaming\\npm\\node_modules\\azure-functions-core-tools\\bin\\workers\\python\\3.9\\WINDOWS\\X64',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\python39.zip',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\DLLs',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\lib',
'C:\\Users\\<>\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\lib\\site-packages',
'C:\\test\\NewAzureFunc'],

Known workarounds
Provide a description of any known workarounds.
I've tried a lot of things short of manually injecting into sys.path to no avail.
Contents of the requirements.txt file:
Provide the requirements.txt file to help us find out module related issues.
azure-functions
requests

Related information
Provide any related information
n/a

I can perform the following in terminal:
(.venv) PS C:\test\NewAzureFunc> python --version
Python 3.9.13
(.venv) PS C:\test\NewAzureFunc> python
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\python39.zip',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\DLLs',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\lib',
'C:\\Users\\lee\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0',
'C:\\test\\NewAzureFunc\\.venv',
'C:\\test\\NewAzureFunc\\.venv\\lib\\site-packages']
>>>

as you can see above the .venv site-packages is in the path.
Not sure why it's not there when func host start runs.

I thought this may have been a problem with the Programming Model V2, but it also happens when I select normal "Python", too. Now I'm confused and concerned that I cannot make any functions run locally with modules in the requirements.txt.
I'm not even sure where to start trying to diagnose/fix this.

Thanks for updating will update you soon on this issue

@Clam- have you installed requests in the venv? i tried v2 model and it works for me

I used requirements.txt which installs the required packages for you when you run/setup the package for the first time.
Oh, one thing I forgot to mention is that if I manually activate the venv, run python and import requests the package loads fine:
PS C:\test\newfunc3>
PS C:\test\newfunc3> .\.venv\Scripts\Activate.ps1
(.venv) PS C:\test\newfunc3> python
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>

If I manually try to install requests it says it is already installed as one would expect:
(.venv) PS C:\test\newfunc3> pip install requests
Requirement already satisfied: requests in c:\test\newfunc3\.venv\lib\site-packages (2.28.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\test\newfunc3\.venv\lib\site-packages (from requests) (1.26.13)
Requirement already satisfied: certifi>=2017.4.17 in c:\test\newfunc3\.venv\lib\site-packages (from requests) (2022.12.7)
Requirement already satisfied: idna<4,>=2.5 in c:\test\newfunc3\.venv\lib\site-packages (from requests) (3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\test\newfunc3\.venv\lib\site-packages (from requests) (2.1.1)
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the 'c:\test\newfunc3\.venv\Scripts\python.exe -m pip install --upgrade pip' command.
(.venv) PS C:\test\newfunc3>

I mean the underlying issue is that when running the actual function the runtime environment isn't correct for some reason. sys.path doesn't have the venv site-packages in it.
I'm not sure why or even how to diagnose it or even what to try to fix it. For example, would removing and re-adding the azure functions extension fix that? uninstalling/reinstalling Visual Studio Code?
Thanks for your time.

@Clam- i followed your steps using vscode extension to create the app but still cant repro it. the sys.path has .venv site-packages in it.

my azure functions extension is v1.9.0, core tool version is 4.0.4915.
Can you try reinstalling azure functions extension/vscode and core tool and create a new project to test again? thanks

Here is a gist of the full output of the terminal along with a screenshot:

@Clam- Hi thanks for the update. Sorry for confusion. We are looking into it. By the way, does deploying this function to azure remotely works?

FYI, @YunchuWang @Clam- Replicated the issue using Core Tools Version: 4.0.4915 and 4.0.4765 and works fine, No issues. Thanks

@YunchuWang I haven't tried deploying yet since I wanted to locally develop first. Deploying blind makes me a bit nervous however later this week I could attempt a simple deploy of the test timer thing, probably.

@clam Hope you got the solution by above comment please update .

@bhagyshricompany what solution? There didn't seem to be anything written that I could try.

@clam have you tried with the option given by @pdthummar ?

I don't understand what that text means. I am using Core Tools 4.0.4915. Is that text saying to use 4.0.4765 ?
The text you quoted sounds like "both 4.0.4915 and 4.0.4765 work fine".
I will try 4.0.4765 if that is what the text is suggesting.
Thank you.

try one of the version mentioned

I already have 4.0.4915 installed.
I do not see 4.0.4765 in npm view azure-functions-core-tools version.
It shows:
'4.0.3594',
  '4.0.3687',       '4.0.3743',       '4.0.3780',      '4.0.3928',
  '4.0.3971',       '4.0.4426',       '4.0.4483',      '4.0.4544',
  '4.0.4590',       '4.0.4629',       '4.0.4653',      '4.0.4670',
  '4.0.4704',       '4.0.4736',       '4.0.4785',      '4.0.4829',
  '4.0.4865',       '4.0.4895',       '4.0.4915'

I installed the closest match which was 4.0.4785.
Same problem. Tried creating a new function using the steps in the opening post to no avail.
Why isn't my debugging environment using the correct sys path? How do I debug this?
Thanks.

@Clam- sorry for delayed response, have you installed python from Microsoft windows store? if so, can you try uninstall it? there is likely a bug using vscode function extension with windows store python

@YunchuWang Yes, I was using Windows Store Python. Understood. I will try normal python installer in the coming days.

For future reference: uninstalling the Microsoft store Python (3.11), installing it from python.org and recreating the venv fixed the issue.


Redirection from https://mydomain.com to https://www.mydomain.com doesn't work

I have a react app deployed on AWS Amplify. I have configured a custom domain for this app managed by a third party domain provider. I have configured it to redirect from https://mydomain.com to https://www.mydomain.com under rewrite and redirect section. I have added A type record set as suggested but still if I go to https://www.mydomain.com it redirects to the app but if I navigate https://mydomain.com I get "this site cannot be reached" error.
The record set for my app in route 53 is attached herewith. Any help would be greatly appreciated.

did you manage to fix it?

did you manage to fix it?


[TF 2.0] Issues Serializing SavedModel Serving Default Signature

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): OSX + Linux
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): pipenv install --pre tensorflow==2.0.0-beta1 --python=3.6.8
TensorFlow version (use command below): 2.0.0-beta1
Python version: 3.6.8
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A

Describe the current behavior
I want to use a SavedModel to run batch inference in Spark. A few libraries implement this functionality, such as Databrick's Spark Deep Learning, however, they are implemented using TF 1.13.1 or lower. I am using TF 2 to train and save my models, so I would like to use the same version for deploying my model.
To use an object in PySpark it must be serializable, but I am getting a pickle issue when trying to use a SavedModel's signatures['serving_default] concrete function.
Previously, this call was serializable
# TensorFlow 1.X
outputs = session.run(f(placeholder), feed_dict={placeholder: input})

Now, this is giving issues
# TensorFlow 2.0
outputs = f(input)

This behavior can be reproduced without using Spark. You only need to try pickle.dump the signatures['serving_default'] concrete function.
Describe the expected behavior
I expect both the TF 1.X and TF 2.0 ways of predicting from a SavedModel to be serializable
# TensorFlow 1.X
outputs = session.run(f(placeholder), feed_dict={placeholder: input})
# TensorFlow 2.0
outputs = f(input)

Let me know if I am approaching this problem the wrong way! Any help is appreciated.
Code to reproduce the issue

# Example
import os
import pickle

from pathlib import Path

import tensorflow as tf
from tensorflow.keras import layers

# Create a simple model
inputs = tf.keras.Input(shape=(784,), name='img')

x = layers.Dense(64, activation='relu')(inputs)
x = layers.Dense(64, activation='relu')(x)
outputs = layers.Dense(10, activation='softmax')(x)

model = tf.keras.Model(inputs=inputs, outputs=outputs, name='mnist_model')

(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
x_train = x_train.reshape(60000, 784).astype('float32') / 255

# Compile
model.compile(loss='sparse_categorical_crossentropy',
              optimizer=tf.keras.optimizers.RMSprop(),
              metrics=['accuracy'])

# Train
history = model.fit(x_train, y_train,
                    batch_size=64,
                    epochs=5,
                    validation_split=0.2)

# Save to SavedModel
output_dir = "/tmp/workdir/v1/"
output_directory = Path(output_dir)
output_directory.mkdir(parents=True, exist_ok=True)

model_save_path = os.path.join(output_dir,'model')

model.save(tf_model_save_path, save_format="tf")

# Load the SavedModel

saved_model = tf.saved_model.load(model_save_path, tags=['serve'])

# Get the 'predict' concrete function
infer = saved_model.signatures['serving_default']

pickle_file = os.path.join(output_dir, 'serialized')

# Try serialize the function
with open(pickle_file, 'wb') as f:
    pickle.dump(infer, f)

# Expect error
# _pickle.PickleError: can't pickle repeated message fields, convert to list first

Other info / logs
_pickle.PickleError: can't pickle repeated message fields, convert to list first

I have tried in Jupyter notebook with TF version 2.0 beta1 and was able to reproduce the issue.Please, find the gist in attachment.Thanks!
savedmodel.ipynb.tar.gz

I'm not sure I see the relation between pickling an object and Spark. Spark directly uses the SavedModel by calling tf.saved_model.loader, without re-serializing it to another format (from an admittedly brief look at the library - let met know if I missed something). Can you clarify?

@k-w-w Thanks for taking a look at this.
When you create a user defined function in Spark, it serializes (pickles) the function in order to distribute it across workers. In this case, I want to create a user defined function that predicts on each row with a SavedModel, but the method for predicting in TF 2.0
# Get the 'predict' concrete function
infer = saved_model.signatures['serving_default']

is no longer serializable. Whereas,
outputs = session.run(f(placeholder), feed_dict={placeholder: input})

was serializable, so it worked with user defined functions
Let me know if that makes sense!

That makes sense, thank you for the explanation!
infer is a ConcreteFunction which is an object defined in Tensorflow, which isn't compatible with pickle. You can file a separate issue requesting this feature, or submit a PR to add this functionality.
A possible workaround is to create a regular python function that loads the SavedModel and calls the default signature function, and register that as a user-defined function.
I'll close this issue because it is not a bug, but please do file the feature request or try the workaround suggested!

@k-w-w
Would you be able to provide an example of calling the (non-ConcreteFunction) default signature function for a SavedModel in TF 2.0?
I'll make a feature request if this workaround doesn't work 👍

@k-w-w Workaround worked 😄
For all those that run into this issue, read the guide below!
Guide to Deploying a TF 2.0 SavedModel on Spark using PySparK
Load Dependencies

import tensorflow as tf

from pyspark import SparkFiles
from pyspark.sql.functions import udf
import pyspark.sql.types as T
from pyspark.sql import Row

print(tf.__version__)

Fetch SavedModel from S3/GCS and Distribute to Nodes
S3_PREFIX = "s3://"

MODEL_BUCKET = "my-models-bucket"
MODEL_PATH = "path/to/my/model/dir"
MODEL_NAME = "model"

S3_MODEL = f"{S3_PREFIX}{MODEL_BUCKET}/{MODEL_PATH}/{MODEL_NAME}"

print("Fetching model", S3_MODEL)

# Add model to all workers
spark.sparkContext.addFile(S3_MODEL, recursive=True)

Create the Input Dataframe
# In this example, the SavedModel has the following format:

# inputs = tf.keras.Input(shape=(784,), name='img')
# x = layers.Dense(64, activation='relu')(inputs)
# x = layers.Dense(64, activation='relu')(x)
# outputs = layers.Dense(10, activation='softmax')(x)
# model = tf.keras.Model(inputs=inputs, # outputs=outputs, name='mnist_model')

(_, _), (x_test, _) = tf.keras.datasets.mnist.load_data()
x_test = x_test.reshape(10000, 784).astype('float32') / 255

rows = list(map(lambda n: Row(img=[n.tolist()]), x_test))

schema = T.StructType([T.StructField('img',T.ArrayType(T.ArrayType(T.FloatType())))])

input_df = spark.createDataFrame(rows, schema=schema)

Memoize Retrieval of the Saved Model
# Simple memoization helper with a single cache key
def compute_once(f):
    K = '0'
    cache = {}

    def wrapper(x):
        # Set on first call
        if K not in cache:
            cache[K] = f(x)

        return cache[K]

    return wrapper

def load_model(model_name):
    # Models are saved under the SparkFiles root directory
    root_dir = SparkFiles.getRootDirectory()
    export_dir = f"{root_dir}/{model_name}"

    return tf.saved_model.load(export_dir, tags=['serve'])

# Only load the model once per worker!
# The reduced disk IO makes prediction much faster
memo_model_load = compute_once(load_model)

def get_model_prediction(model_name, input):
    """
    Note:
        TF session is scoped to where the model is loaded.
        All calls to the model's ConcreteFunciton must be in the same scope as
        the loaded model (i.e in the same function!)

        If not, TF will throw errors for undefined/ variables
    """
    # Load the predict function (from disk or cache)
    m = memo_model_load(model_name)

    # Save the predict signature
    pred_func = m.signatures[tf.saved_model.DEFAULT_SERVING_SIGNATURE_DEF_KEY]

    return pred_func(input)

Create the Predict UDF
# Decorator with return type of UDF
@udf("array<array<float>>")
def infer(data):
    # Cast the input to a Tensor
    input_data = tf.constant(data)

    # Returns a dict of the form { TENSOR_NAME: Tensor }
    outputs = get_model_prediction(MODEL_NAME, input_data)

    # Assuming we have a single output
    output_tensor = list(outputs.values())[0]

    # Convert back to regular python
    output_value = output_tensor.numpy().tolist()

    return output_value

Infer on the Dataset 🎉
predictions_df = input_df.withColumn("predictions", infer("img"))

# All done :)
predictions_df.show(vertical=True)


unset/remove NSUserDefaults value for NSDate

There is no option to unset/remove value for a NSDate.

I also tried to call removeFromKey but crashed on the attempt

Did you use quotes around dateKey when calling removeObjectForKey:?
i.e.

Otherwise the input isn't valid JSON and will call removeObjectForKey: with nil, which throws an exception.
I agree it would be nice to have an unset button as part of the "Edit Default" screen. Contributions are always welcome :wink:.

Closing this as there has been no response since 2015


[@xstate/vue] Update Docs: Add new useActor & useInterpret Hooks + Fixes

Hi again!
I've updated the Vue docs, so they have the latest hooks from #1991.
I've also added:

A table of contents with doctoc at the top as @xstate/react has.
Added the missing Configuring Machines from #1973 PR that was done only to the docs folder and is deleted when building the project.
Fixed the Vue links so they point to the latest Vue v3 docs.

My only question is: should I commit the changes that the npm run build or npm run dev does locally? So it copies the packages files to the docs folder, or will this done automatically on merge?
Thanks!!

This is wonderful, thank you!

My only question is: should I commit the changes that the yarn docs:dev or yarn docs:build does locally? So it copies the package README to the docs folder, or will this done automatically on merge?
Thanks!!

Still need to write a script for this. Don't worry about it, I'll do it manually.


Gorse suitable for a job-ads recommender app ?

Hello,
I am  building a job board app and are evaluating recommenders.
Would gorse work well in this field ?

items would be our offers
labels being the criteria of the ad
users would be people looking for a job and  adding their feedback from the list of available jobs

The only issue I am seeing right now is how to handle cold-start. Is there some ways to make use of user properties (user has a profile with properties that could match criterias)?
Could you advise on  whether gorse might be a good fit and pointers to handle cold-start?
Thanks for your time (and for gorse!)

Unfortunately, Gorse is unable to handle pure cold-start  recommendation. Similar items could be recommended to users with few feedback. However, Gorse cannot generate personalized recommendation for users without any feedback. It only recommend latest or popular items to new users without any feedback.

Thanks for taking the time! I guess we would need to tackle our problem differently then.


[BCKSTAGE] Change system for backstage

Update backstage info

Suggested change in catalog-info.yaml (line 33):
   jira/project-key: LIVE
   jira/component: Exchange-SDK


How to emit a new value

This might be common knowledge with people using Reactive programming paradigm, but since I'm relativly new it's not obvious from the docs or the lib code if I can emit a new value after the observer creation WITHOUT saving a ref to this value (as ReactiveProperty does). In other words, I'm looking for something like this:
var obs: Observable = GDRx.just(42)
obs.on_next(43) //emits a new value to subscribers
A subscriber should then receive the new 43 value.
Thank you!

G'Day, this is what the Subject class is intended for. A subject is an observer and an observable at the same time, meaning you can invoke on_next() on it and use it as an observable sequence simultaneously.
Your described behavior would look like this:
var sub : Subject = Subject.new()
var obs : Observable = GDRx.merge([GDRx.just(42), sub.obs])
obs.subscribe(func(i): print("i> ", i)).dispose_with(self)
sub.on_next(43)

First, you create a new instance of Subject. Observers can subscribe to a Subject and receive the emitted items from the observable contract (on_next, on_completed, on_error).
You would then merge it with the observable sequence, which just emits '42'
The third line is an example observer subscribing to 'obs'
Finally, you can manually emit items on the resulting sequence 'obs' by calling 'on_next' on 'sub'

Please not: The README is not a full documentation, as GodotRx unfortunately does not have one yet. I do recommend reading the RxPY doc, as GodotRx is a subset of its functionality for all classes, which are outside the folder 'engine'.

I will close this issue now. If you have further questions, feel free to send me an e-mail.


Long constructor error handling

Hi,
I just noticed that the Long constructor yields value 0 for NaN:
var Long = require("long");
var l = Long.fromNumber(NaN);
console.log(l.toString()); //  "0"

As Long does not have an isNaN() method, I would expect the long constructor to throw when it receives one.
Btw I would actually prefer if it just supported NaN / Infinity etc properly, it seems more in line with JavaScript numbers.

There is no NaN or Infinity in a fixed-size integer context. It's just like with 32bit integers:
console.log(NaN | 0); // = 0
console.log(Infinity | 0); // = 0

NaN and Infinity exist with doubles, which JavaScript numbers are internally, only.

Ok so we should not make NaN a concept in Long. But then, the fromString() method should validate against it (like any function should validate its input). I.e. if I put garbage into fromString() it should error and not return 0L, right?
> var Long = require("long");
undefined
> l = Long.fromString("kaboom")
{ low: 0,
  high: 0,
  unsigned: undefined }
>```

I think it harms reliability to have code that swallows your bugs like this.

On a related note, I corrupted a lot of data by doing new cassandra.types.Long("numbers over 2^32") - cassandra.types.Long is just a Long.js Long.  The constructor took a string and wasn't throwing errors, so I assumed it was working.

I am not sure if checking all possible inputs is desirable for something like Long. It's meant to be rather low level and every additional check makes more complex computations on top of it slightly slower.

Well, it's Javascript not C.  Anyone really interested in speed doesn't use an interpreted language. And on the other hand, computers and phones are mighty fast for these things these days. That's what Facebook's React is about: even in Javascript, computations are very fast.
Still, I guess you could reduce it by having two modes or two builds of the package. But first I'd run some speed tests with and without checks and get the facts right.

Sometimes you have no other choice than using JavaScript. In fact, why would you use a Long class for JS if you had the choice to write that thing in another language?  And of what actual relevance is that react comparison here?


Fix various misspellings of "shepherd" in the release docs

Signed-off-by: Julius Volz<EMAIL_ADDRESS>

Travis tests fail for unrelated reason:
go: verifying<EMAIL_ADDRESS>checksum mismatch
	downloaded: h1:VBj0QYQ0u2MCJzBfeYXGexnAl17GsH1yidnoxCqqD9E=
	go.sum:     h1:9HVkPxOpo+yO93Ah4yrO67d/qh0fbLLWbKqhYjyHq9A=

:+1:, and yes, the test is failing everywhere in the same way.

Re the test failure, I'll send a patch. This is due to a change in the latest Go 1.11 version (see https://github.com/golang/go/issues/29278#issuecomment-447537558).

Travis passes now. :+1:


tx components should display all the decimals

use num.full()
blocked by #1432

I don't think this is completely blocked if you use yarn link

All the components? What about the balance header?

transaction components

this was about transaction components.

my bad

no scientific notation plz

lol yes, for sure. why is that happening?

🤷♂

This looks like a JS issue "adding a number and a string".
There shouldn't be values in Cosmos that are that small.

It’s actually BN, we have to parse it to string before displaying it

fixed on develop


[$10] Display payment processing date and time

Follow up from https://github.com/topcoder-platform/taas-apis/issues/443
Inside the payment list add a new column "Created At" which would display date and time when payment was created:

show using timezone of the browser
format "Jan 28, 2021 12:23 am"

@MadOPcode feel free to pick this up if you like.

Verified in Dev Env. The payment created time is displayed correctly.

Challenge https://www.topcoder.com/challenges/5c5a5cb4-11ee-4ac1-9139-cc56b8202f03 has been created for this ticket.This is an automated message for maxceem via Topcoder X

Challenge https://www.topcoder.com/challenges/5c5a5cb4-11ee-4ac1-9139-cc56b8202f03 has been assigned to madopcode.This is an automated message for maxceem via Topcoder X

Payment task has been updated: https://www.topcoder.com/challenges/5c5a5cb4-11ee-4ac1-9139-cc56b8202f03
Payments Complete
Winner: madopcode
Copilot: maxceem
Challenge 5c5a5cb4-11ee-4ac1-9139-cc56b8202f03 has been paid and closed.This is an automated message for maxceem via Topcoder X

Verified on Prod Env. Working as expected.
cc: @nkumar-topcoder


class that extends itself doesn't compile correctly

A class which extends itself isn't compiled correctly:
class A {
    ...
}

class A extends A {
    ...
}

I think the error comes from:
inherits(A, A);

A workaround is to do:
var A_ = A;
class A extends A_ {

}

How are you expecting this to work?

FYI
class A {}
class A extends A {}

Wont even compile at all.
TypeError: stdin: Line 5: Duplicate declaration "A"
  3  | }
  4  |
> 5  | class A extends A {
     |       ^
  6  |
  7  | }
  8  |

They're from different files. I'm expecting it to work like the original A was named something else.

@simonzack I still don't understand what you mean.

I'm expecting the first one to behave like the second:
class A {}
class A extends A {}

class A {}
var A_ = A;
class A extends A_ {}

Can you provide the actual file or a more elaborate example? That shouldn't even be allowed. You shouldn't be able to do that in the first place.

I don't think  class A extends A is legal in any context, as the A will be in a temporal dead zone

@monsanto That's already supported by the es6.blockScopingTDZ optional transformer that will probably be made default in the next major. I don't know how he's even getting that code to compile in the first place without it throwing an error since you can't redeclare a new class binding.

@sebmck The first definition is in another file, and the second file imports it and redeclares. It's hard to give a concrete example since my setup
The first file defines A in es5:
function A(){
}
exports.A = A;

But I don't think that matters, I changed it to class and it still works.
The second file imports it like so:
import {A} from 'A';

class A extends A {
...
}

This gets compiled, but the behavior isn't quite right. My actual setup involves gulp files and browserify, which is rather complicated to show here.

Yeah, that's illegal. (At least it is in master, duplication error is mixed up but that's a completely unrelated issue that I'll fix now)
TypeError: test.js: Line 1: Duplicate declaration "A"
> 1  | import {A} from 'file';
     |         ^
  2  |
  3  | class A extends A {}
  4  |

I'm on the latest version v3.5.3, btw, was that a recent commit?

Last version was released 4 days ago. A lot of work has been done since then on the internals.


Fix retry logic for permisison faults in file transfer

#160767265
Description
Fixes retrying of file upload/download. The acquiring of service ticket for the purpose of authentication to transfer file via host might fail due to inadequate permissions. In such a case, retry should trigger transfer of file via datacenter.
Related PR and Issues
Fixes https://www.pivotaltracker.com/story/show/160767265
Impacted Areas in Application
Absence of Host.Configuration.SystemManagement on host or parent cluster will trigger retry of file transfer via DC. DC in that case must have Datastore.LowLevelFileOps privilege to enable file transfer
Type of change

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Unit Tests Added.
Tight Permission Driven Integration test will test it. Infra configuration yet to be updated for testbeds.
Checklist:

[x] My code follows the standard ruby style guide
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] integration test Pending

@EleanorRigby  in file_provider when you upload via datacenter the log message is incorrect. Please correct it


Error "TypeError: this._state.then is not a function" when "glean.switchToTarget" is true

Fixed by https://github.com/wix-incubator/vscode-glean/commit/4ccb825374017ab3fd138aa245439016bd67550b


learn

Expected behavior
Actual behavior
Information about the Issue
Steps to reproduce the behavior

...
...

No information provided - Closing


Make API and server compatible with OpenAI API

Modified encode_message and encode_dialog_prompt methods in generate.py to resolve streamlit errors.

Seems like I forgot to add my changes to generate.py to #1043 🤦♂
Could you also add an import time to the beginning of browser.py? It seems to be missing from my earlier changes. This gives us a response token rate in the message status.

Sure, I will add it and submit the PR.
Thanks
Nobel Chowdary Mandepudi
(352)-740-5992
www.nobelchowdary.com https://nobelchowdary.com/
LinkedIn https://www.linkedin.com/in/nobel-chowdary/ & GitHub
https://github.com/nobelchowdary
On Tue, Aug 20, 2024 at 5:55 PM vmpuri @.***> wrote:

Seems like I forgot to add my changes to generate.py to #1043
https://github.com/pytorch/torchchat/pull/1043 🤦♂
Could you also add an import time to the beginning of browser.py? It
seems to be missing from my earlier changes. This gives us a response token
rate in the message status.
—
Reply to this email directly, view it on GitHub
https://github.com/pytorch/torchchat/pull/1043#issuecomment-2299896239,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOKGPT6YTLZRE222EEJ6O4DZSPCOHAVCNFSM6AAAAABM2ZPCWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJZHA4TMMRTHE
.
You are receiving this because you were mentioned.Message ID:
@.***>


The generated log files cannot be written to

Excuse me，I'm sorry to bother you, but I encountered some issues while running your program.
When running train.py, I found that the log files generated in the Tensorboard_logger directory were not being updated with training data. Have you encountered this issue during your runs as well?

Excuse me，I'm sorry to bother you, but I encountered some issues while running your program. When running train.py, I found that the log files generated in the Tensorboard_logger directory were not being updated with training data. Have you encountered this issue during your runs as well?

This problem is probably due to the program constantly repeating the reset function and not really entering the training stage. This can be found by adjusting the logging level to INFO. I have also encountered the same problem. Do you know the solution?


Older versions of Git fail to #rev_list silently

I had Git <IP_ADDRESS> and couldn't get git pull-request to give me a default PR message.  I tracked it down to #rev_list using --right-only, which doesn't exist in that version of Git.
Since Git is returning a non-zero status, it would be nice to have some sort of error or warning that would point me to trouble with Git.

I'm not sure what's our minimum required git version anymore, but time has passed since this was reported, and people now generally have newer git versions that support --right-only. Nobody has complained about this since, so I'm going to go ahead and close this out.


Fix event init in eventFromException

In #185 the event := NewEvent() was changed to event := &Event{Level: level}. and caused this problem:panic: assignment to entry in nil map when you try to set value to event.Extra.
Extra useage example: https://github.com/getsentry/sentry-go/blob/master/example/with_extra/main.go#L56

@gukz thanks for the PR!
I am sorry and I take all the blame for having changed the behavior so subtly. I've opened #221 and #222 with ideas for improvements from lessons learned here.
The change was intentional 😓
It was to avoid allocating maps in all events, even when they are never used. I wanted to eventually remove NewEvent from the API in favor of using the Event type directly.
Unfortunately, I reckon it does require defensive nil checks, and makes it less convenient when mutating events in an EventProcessor or BeforeSend.
Some not-too-old threads about map initialization in golang-nuts can be illustrative:

https://groups.google.com/d/msg/golang-nuts/5_8E9OblIho/nvX-T8xKCAAJ
https://groups.google.com/d/msg/golang-nuts/Q4BS8Xrbg7M/sde7Z7ZwBAAJ

In a nutshell, there is no magical way to initialize maps on-demand.
Moving forward
I'm considering what we could do best.
To strike a balance between forcing downstream users to nil-check/ initialize maps (nil check is a good defensive code practice anyway) and always wastefully allocate maps when they may never get used, I'm considering hiding the maps behind "getters" that would take care of lazily initializing the maps.
For example,
event.Extra[key] = val

would become
event.Extra()[key] = val

This would be implemented similar to https://play.golang.org/p/zb-JJemNMr7.
It is not without its drawbacks; for instance, if you happen to have an existing map[string]interface{} you can't simply assign it to event.Extra, but you have to iterate over the keys and set values one-by-one.
I imagine that having a pre-existing map[string]interface{} is not the common case, though. Even if it was common, it is not as common as not using Extra. The example code linked to in the PR description starts off from a map[string]string and in that case the for loop is necessary anyway.
It would be a breaking change, though easy to adjust downstream code. The compiler would complain, and one can mass string-replace Extra => Extra() (and this could be easily automated with tools like golang.org/x/tools/cmd/eg).
@gukz what do you think?

@rhcarvalho
If it is necessary to remove NewEvenet, i think add a AddExtra function would be better.
event.AddExtra(key, value)

I think event.Extra()[key] = val is not very intuitive.
And is it really necessary to delete NewEvent? NewEvent is already been used in code/tests/docs, and it is an incompatible change for users. Is there more evidence to prove it has performance issues?
Or you will update example. Now my project locked in<EMAIL_ADDRESS>