I love the product and it seems like the right fit for me team.
I am running into 502 issues
“”" raise ResponseCannotBeDecodedException(location, response)
–>raise UnexpectedStatusCodeException(location, response)
UnexpectedStatusCodeException: batch response! Unexpected status code: 502, with response body: None.“”"
This is what stops the app. I am also getting these errors as the upload continues
{‘error’: [{‘message’: ‘update vector: unmarshal response body: json: cannot unmarshal number into Go struct field openAIApiError.error.code of type string’}]}.
Here is my code to load my vector store (its quite a big schema):
food_class_schema = {
"class": "FoodNYC",
"description": "A collection of food from UberEats and Doordash",
"vectorizer": "text2vec-openai",
"vectorIndexConfig" : {
"distance" : "cosine",
},
"moduleConfig": {
"text2vec-openai": {
"vectorizeClassName": False,
"model": "ada",
"modelVersion": "002",
"type": "text"
},
},
}
food_class_schema["properties"] = [
{
"name": "infatuation_RestaurantName",
"dataType": ["text"],
"description": "The name of the restaurant from Infatuation",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "infatuation_ReviewCount",
"dataType": ["text"],
"description": "Number of reviews from Infatuation",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "RestaurantReviewCount",
"dataType": ["text"],
"description": "Number of reviews on Platform",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Sour_Level",
"dataType": ["text"],
"description": "Sour_Level",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Umami_Level",
"dataType": ["text"],
"description": "Umami_Level",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Spice_Level",
"dataType": ["text"],
"description": "Spice_Level",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Sweetness_Level",
"dataType": ["text"],
"description": "Sweetness_Level",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Bitterness_Level",
"dataType": ["text"],
"description": "Bitterness_Level",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "MonDoorDash",
"dataType": ["text"],
"description": "DoorDash availability on Monday",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "TueDoorDash",
"dataType": ["text"],
"description": "DoorDash availability on Tuesday",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "WedDoorDash",
"dataType": ["text"],
"description": "DoorDash availability on Wednesday",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "ThuDoorDash",
"dataType": ["text"],
"description": "DoorDash availability on Thursday",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "FriDoorDash",
"dataType": ["text"],
"description": "DoorDash availability on Friday",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "SatDoorDash",
"dataType": ["text"],
"description": "DoorDash availability on Saturday",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "SunDoorDash",
"dataType": ["text"],
"description": "DoorDash availability on Sunday",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "AvoidanceDiseaseFoodTags",
"dataType": ["text"],
"description": "Tags for diseases that should avoid the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "StockImageDoorDash",
"dataType": ["text"],
"description": "Link to the stock image of the dish on DoorDash",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "StockImageUber",
"dataType": ["text"],
"description": "Link to the stock image of the dish on Uber",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Restaurant_ID",
"dataType": ["text"],
"description": "Identifier for the restaurant",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Dish_ID",
"dataType": ["text"],
"description": "Identifier for the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "DishRes_ID",
"dataType": ["text"],
"description": "Combined identifier for dish and restaurant",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Calorie_Count_Estimate",
"dataType": ["text"],
"description": "Estimated calorie count for the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "HealthAlternatives",
"dataType": ["text"],
"description": "Healthier dish alternatives",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Mass_Fat",
"dataType": ["text"],
"description": "Amount of fat by mass in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Mass_Carbs",
"dataType": ["text"],
"description": "Amount of carbohydrates by mass in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Mass_Protein",
"dataType": ["text"],
"description": "Amount of protein by mass in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Cholesterol",
"dataType": ["text"],
"description": "Amount of cholesterol in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Calcium",
"dataType": ["text"],
"description": "Amount of calcium content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Iron",
"dataType": ["text"],
"description": "Amount of iron content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Potassium",
"dataType": ["text"],
"description": "Amount of potassium content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Zinc",
"dataType": ["text"],
"description": "Amount of zinc content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Magnesium",
"dataType": ["text"],
"description": "Amount of magnesium content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Vitamin_A",
"dataType": ["text"],
"description": "Amount of Vitamin A content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Vitamin_C",
"dataType": ["text"],
"description": "Amount of Vitamin C content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Vitamin_D",
"dataType": ["text"],
"description": "Amount of Vitamin D content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Vitamin_E",
"dataType": ["text"],
"description": "Amount of Vitamin E content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Vitamin_K",
"dataType": ["text"],
"description": "Amount of Vitamin K content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "B_Vitamins",
"dataType": ["text"],
"description": "Amount of B Vitamins content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Antioxidants",
"dataType": ["text"],
"description": "Amount of antioxidants content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Omega_3_Fatty_Acids",
"dataType": ["text"],
"description": "Amount of omega-3 fatty acids content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Phytonutrients",
"dataType": ["text"],
"description": "Amount of phytonutrients content in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "SpecificBaseAlternatives",
"dataType": ["text"],
"description": "Specific alternative bases for the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "AlternativesWithinSameCuisine",
"dataType": ["text"],
"description": "Other dish alternatives within the same cuisine",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}},
{
"name": "LinkUber",
"dataType": ["text"],
"description": "Link to the Uber platform for the restaurant or dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "LinkDoorDash",
"dataType": ["text"],
"description": "Link to the DoorDash platform for the restaurant or dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "FoodItemLinkUber",
"dataType": ["text"],
"description": "Link to the specific food item on the Uber platform",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "FoodItemLinkDoorDash",
"dataType": ["text"],
"description": "Link to the specific food item on the DoorDash platform",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "ImageUber",
"dataType": ["text"],
"description": "Image URL for the dish on the Uber platform",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "StoreImageUber",
"dataType": ["text"],
"description": "Flag indicating if the store image is available on Uber",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "ImageDoorDash",
"dataType": ["text"],
"description": "Image URL for the dish on the DoorDash platform",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "StoreImageDoorDash",
"dataType": ["text"],
"description": "Flag indicating if the store image is available on DoorDash",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "RestaurantPhone",
"dataType": ["text"],
"description": "Phone number of the restaurant",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "RestaurantAddress",
"dataType": ["text"],
"description": "Address of the restaurant",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "PriceUber",
"dataType": ["text"],
"description": "Price of the dish on the Uber platform",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "PriceDoorDash",
"dataType": ["text"],
"description": "Price of the dish on the DoorDash platform",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "OpenCloseHours",
"dataType": ["text"],
"description": "Open and close hours for the restaurant",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "CloseTime_UberEats_uber",
"dataType": ["text"],
"description": "Closing time for the restaurant on Uber Eats",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "DaysOpen_UberEats_uber",
"dataType": ["text"],
"description": "Days of the week the restaurant is open on Uber Eats",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "OpeningHours_UberEats_uber",
"dataType": ["text"],
"description": "Opening hours for the restaurant on Uber Eats",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "RestaurantWebsite",
"dataType": ["text"],
"description": "Website of the restaurant",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Lat",
"dataType": ["number"],
"description": "Latitude coordinate for the restaurant's location",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Long",
"dataType": ["number"],
"description": "Longitude coordinate for the restaurant's location",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Allergy_Tags",
"dataType": ["text"],
"description": "Tags for allergens present in the dish",
"moduleConfig": {
"text2vec-openai": {
"skip": True,
"vectorizePropertyName": False
}
}
},
{
"name": "Sodium",
"dataType": ["text"],
"description": "Amount of sodium content in the dish"
},
{
"name": "Fiber",
"dataType": ["text"],
"description": "Amount of dietary fiber content in the dish"
},
{
"name": "Sugars",
"dataType": ["text"],
"description": "Amount of sugars content in the dish",
},
{
"name": "DishName",
"dataType": ["text"],
"description": "The name of the dish",
},
{
"name": "Neighborhood",
"dataType": ["text"],
"description": "The neighborhood where the restaurant is located",
},
{
"name": "PlatformProvidedCuisine",
"dataType": ["text"],
"description": "Type of cuisine provided on the platform for the restaurant"
},
{
"name": "RestaurantRating",
"dataType": ["text"],
"description": "Overall rating for the restaurant"
},
{
"name": "Cuisine",
"dataType": ["text"],
"description": "Type of cuisine the dish belongs to"
},
{
"name": "Diet_Tags",
"dataType": ["text"],
"description": "Tags related to dietary preferences or restrictions"
},
{
"name": "Oil_Tags",
"dataType": ["text"],
"description": "Tags related to type of oil used in the dish"
},
{
"name": "Texture_Tags",
"dataType": ["text"],
"description": "Tags describing the texture of the dish"
},
{
"name": "Preparation_Tags",
"dataType": ["text"],
"description": "Tags related to the preparation method of the dish"
},
{
"name": "Feeling_Tags",
"dataType": ["text"],
"description": "Tags indicating the feeling or experience associated with the dish"
},
{
"name": "Spice_Category",
"dataType": ["text"],
"description": "Level of spiciness in the dish"},
{
"name": "Sweetness_Category",
"dataType": ["text"],
"description": "Level of sweetness in the dish"
},
{
"name": "Bitterness_Category",
"dataType": ["text"],
"description": "Level of bitterness in the dish"
},
{
"name": "Sour_Category",
"dataType": ["text"],
"description": "Level of sourness in the dish",
},
{
"name": "Savory_Delicious_Category",
"dataType": ["text"],
"description": "Level of umami taste in the dish" },
{
"name": "Emoji",
"dataType": ["string"],
"description": "Emoji related to the dish"
},
{
"name": "BaseDish",
"dataType": ["text"],
"description": "The base dish from which variations can be made"
},
{
"name": "CleanedDishName",
"dataType": ["text"],
"description": "The dish name after cleaning process"
},
{
"name": "Ingredients",
"dataType": ["text"],
"description": "List of ingredients in the dish"
},
{
"name": "DietTags",
"dataType": ["text"],
"description": "Tags related to the diet options the dish adheres to"
},
{
"name": "SuitableDiseaseFoodTags",
"dataType": ["text"],
"description": "Tags for diseases that the dish is suitable for"
},
{
"name": "DishType",
"dataType": ["text"],
"description": "Type of dish"
},
{
"name": "DishDescription",
"dataType": ["text"],
"description": "Description on Website of Dish"
},
{
"name": "infatuation_ReviewDictVec",
"dataType": ["text"],
"description": "Dictionary containing reviews from InfatuationNYC"
},
{
"name": "eater_ReviewDictVev",
"dataType": ["text"],
"description": "Dictionary containing reviews from EaterNYC"
},
{
"name": "RestaurantName",
"dataType": ["text"],
"description": "RestaurantName of Food Item"
},
{
"name": "FoodHistory",
"dataType": ["text"],
"description": "History and cultural significance of the dish"
},
{
"name": "RatingCategory",
"dataType": ["text"],
"description": "The Average Rating on Platform"
},
{
"name": "ReviewCountCategory",
"dataType": ["text"],
"description": "The Review Count Category on Platform"
},
{
"name": "PriceDescription",
"dataType": ["text"],
"description": "The Review Count Category on Platform"
}
]
client.schema.create_class(food_class_schema)
# Configure batch process - for faster imports
client.batch.configure(
batch_size=2000,
dynamic=True, # dynamically update the `batch_size` based on import speed
timeout_retries=3,
)
for i in tqdm(range(len(big))):
item = big.iloc[i]
food_object = {
'infatuation_RestaurantName': str(item['infatuation_RestaurantName']),
'infatuation_ReviewCount': str(item['infatuation_ReviewCount']),
'infatuation_ReviewDictVec':str(item['infatuation_ReviewCount']),
'eater_ReviewDictVec':str(item['eater_ReviewDictVec']),
'MonDoorDash': str(item['MonDoorDash']),
'TueDoorDash': str(item['TueDoorDash']),
'WedDoorDash': str(item['WedDoorDash']),
'ThuDoorDash': str(item['ThuDoorDash']),
'FriDoorDash': str(item['FriDoorDash']),
'SatDoorDash': str(item['SatDoorDash']),
'SunDoorDash': str(item['SunDoorDash']),
'AvoidanceDiseaseFoodTags': str(item['AvoidanceDiseaseFoodTags']),
'StockImageDoorDash': str(item['StockImageDoorDash']),
'StockImageUber': str(item['StockImageUber']),
'Restaurant_ID': str(item['Restaurant_ID']),
'Dish_ID': str(item['Dish_ID']),
'DishRes_ID': str(item['DishRes_ID']),
'Calorie_Count_Estimate': str(item['Calorie_Count_Estimate']),
'HealthAlternatives': str(item['HealthAlternatives']),
'Mass_Fat': str(item['Mass_Fat']),
'Mass_Carbs': str(item['Mass_Carbs']),
'Mass_Protein': str(item['Mass_Protein']),
'Sodium': str(item['Sodium']),
'Fiber': str(item['Fiber']),
'Sugars': str(item['Sugars']),
'Cholesterol': str(item['Cholesterol']),
'Calcium': str(item['Calcium']),
'Iron': str(item['Iron']),
'Potassium': str(item['Potassium']),
'Zinc': str(item['Zinc']),
'Magnesium': str(item['Magnesium']),
'Vitamin_A': str(item['Vitamin_A']),
'Vitamin_C': str(item['Vitamin_C']),
'Vitamin_D': str(item['Vitamin_D']),
'Vitamin_E': str(item['Vitamin_E']),
'Vitamin_K': str(item['Vitamin_K']),
'B_Vitamins': str(item['B_Vitamins']),
'Antioxidants': str(item['Antioxidants']),
'Omega_3_Fatty_Acids': str(item['Omega_3_Fatty_Acids']),
'Phytonutrients': str(item['Phytonutrients']),
'SpecificBaseAlternatives': str(item['SpecificBaseAlternatives']),
'AlternativesWithinSameCuisine': str(item['AlternativesWithinSameCuisine']),
'LinkUber': str(item['LinkUber']),
'LinkDoorDash': str(item['LinkDoorDash']),
'FoodItemLinkUber': str(item['FoodItemLinkUber']),
'FoodItemLinkDoorDash': str(item['FoodItemLinkDoorDash']),
'ImageUber': str(item['ImageUber']),
'StoreImageUber': str(item['StoreImageUber']),
'ImageDoorDash': str(item['ImageDoorDash']),
'StoreImageDoorDash': str(item['StoreImageDoorDash']),
'RestaurantPhone': str(item['RestaurantPhone']),
'RestaurantAddress': str(item['RestaurantAddress']),
'PriceUber': str(item['PriceUber']),
'PriceDoorDash': str(item['PriceDoorDash']),
'OpenCloseHours': str(item['OpenCloseHours']),
'CloseTime_UberEats_uber': str(item['CloseTime_UberEats_uber']),
'DaysOpen_UberEats_uber': str(item['DaysOpen_UberEats_uber']),
'OpeningHours_UberEats_uber': str(item['OpeningHours_UberEats_uber']),
'RestaurantWebsite': str(item['RestaurantWebsite']),
'Lat': float(item['Lat']),
'Long': float(item['Long']),
'RestaurantReviewCount': str(item['RestaurantReviewCount']),
'DishName': str(item['DishName']),
'Neighborhood': str(item['Neighborhood']),
'PlatformProvidedCuisine': str(item['PlatformProvidedCuisine']),
'RestaurantRating': str(item['RestaurantRating']),
'Cuisine': str(item['Cuisine']),
'Allergy_Tags': str(item['Allergy_Tags']),
'Oil_Tags': str(item['Oil_Tags']),
'Texture_Tags': str(item['Texture_Tags']),
'Preparation_Tags': str(item['Preparation_Tags']),
'Feeling_Tags': str(item['Feeling_Tags']),
'Spice_Level': str(item['Spice_Level']),
'Sweetness_Level': str(item['Sweetness_Level']),
'Bitterness_Level': str(item['Bitterness_Level']),
'Sour_Level': str(item['Sour_Level']),
'Umami_Level': str(item['Umami_Level']),
'Spice_Category': str(item['Spice_Category']),
'Sweetness_Category': str(item['Sweetness_Category']),
'Bitterness_Category': str(item['Bitterness_Category']),
'Sour_Category': str(item['Sour_Category']),
'Savory_Delicious_Category': str(item['Savory_Delicious_Category']),
'Emoji': str(item['Emoji']),
'BaseDish': str(item['BaseDish']),
'CleanedDishName': str(item['CleanedDishName']),
'Ingredients': str(item['Ingredients']),
'DietTags': str(item['DietTags']),
'Diet_Tags': str(item['Diet_Tags']),
'SuitableDiseaseFoodTags': str(item['SuitableDiseaseFoodTags']),
'DishType': str(item['DishType']),
'DishDescription': str(item['DishDescription']),
'infatuation_ReviewDict': str(item['infatuation_ReviewDict']),
'eater_ReviewDict': str(item['eater_ReviewDict']),
'AvoidanceDiseaseFoodVec': str(item['AvoidanceDiseaseFoodVec']),
'EatDiseaseFoodVec': str(item['EatDiseaseFoodVec']),
'AvoidanceDiseaseFoodVec': str(item['infatuation_ReviewDictVec']),
'EatDiseaseFoodVec': str(item['eater_ReviewDictVec']),
'RestaurantName': str(item['RestaurantName']),
'FoodHistory': str(item['FoodHistory']),
'RestaurantRating': str(item['RestaurantRating']),
'RestaurantReviewCount': str(item['RestaurantReviewCount']),
'ReviewCountCategory': str(item['ReviewCountCategory']),
'RatingCategory': str(item['RatingCategory']),
'PriceDescription': str(item['PriceDescription']),
'PriceCategories': str(item['PriceCategories']),}
try:
client.batch.add_data_object(food_object, "FoodNYC") # Use your specific class name
except BaseException as error:
print("Import Failed at: ", i)
print("An exception occurred: {}".format(error))
break
print(client.query.aggregate("FoodNYC").with_meta_count().do())
client.batch.flush()