get instance from model to save to foreignkey field

i don't really understand what this instance was implying "Cannot assign "15": "Cart.Product_ID" must be a "Product" instance." "15" is the primary key of Model.Product and i want to insert it...

Installing module from setup.py in Anaconda?

I have seen a few posts (1, 2) regarding this question but none have hit the nail on the head for me. I am trying to install nvidia-ml-py version 7.352.0 into my Anaconda Python 2.7...

Ajax 500 Internal Server but gets deleted after refresh and in Django models

I am using Django and Datatables and I'm doing something like a batch deleting functionality for the ListView. When I click the Delete button, it displays a POST 500 (Internal Server Error). But...

Configuration postgresql in Djnago

I'm completely new to Django so sorry if I forgot to add something. I'm trying to change my SQLite db to Postgres. I changed settings.py to include postgres instead of sqlite, but python manage.py...

'OSError: [WinError 126] The specified module could not be found' when using OpenAI Gym-Atari on Windows 10

I am just trying to execute this simple trial code: import gym env = gym.make('SpaceInvaders-v0') env.reset() for _ in range(1000): env.step(env.action_space.sample()) ...

How is it that torch is not installed by torchvision?

Somehow when I do the install it installs torchvision but not torch. Command I am running as dictated from the main website: conda install pytorch torchvision cudatoolkit=10.0 -c pytorch then I...

Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/?

trying to install fastai using pip but the following error is shown i have installed visual studio build tools 2019 but still cant install fastai using pip. Installing collected packages:...

How to use Tensorboard with Pytorch in Sagemaker

I am using torch version 1.2.0 and installed with conda tensorboard 2.0.2. I am running on Sagemaker conda_pytorch_p36. I also followed this StackOverflow question from a while ago. My goal is to...

GCP - Cannot SSH into fresh GPU Deep Learning VM instance

If I create a fresh GCE VM instance with a GPU and a GPU-optimized Debian image, I cannot SSH into it, neither via the browser SSH window or using a third party SSH client (after uploading public...

ImportError: cannot import name 'downsample' while importing lasagne in python 3.6

I am getting the above error with the following import statements on Google Colab GPU: import argparse #import cPickle import _pickle as cPickle import time import os import numpy as np import...

OpenCV-CUDA Win10. Python Module Not Found on Import

So, I have been working on getting opencv with nvidia gpu support for a few days now and can't get python to import cv2 (importing precompiled opencv-python works as expected). Out of frustration...

Python/Anaconda can not locate installed modules in conda environments

I am using anaconda as an environment manager for my code. When i installed anaconda and created the environments everything worked fine. But when i came back the next day and activated the...

Pytorch won't run on deep-learning-vm "Found no NVIDIA driver on your system"

I did create a new conda environment to run my code from. But I get the following error: AssertionError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and...

Conda - how to update only cudatoolkit in an existing environment?

This is a specific instance of a general problem that I run into when updating packages using conda. I have an environment that is working great on machine A. I want to transfer it to machine...

Sudden Tensorflow / Keras Google Colab dependency problems `AttributeError: module 'tensorflow._api.v1.compat.v2' has no attribute '__internal__'`

I have running a machine learning model (Matterport's Mask R-CNN) in google colab for a couple of weeks. All of a sudden today I am unable to run any of my notebooks due to I think some kind of...

RuntimeError Pytoch Unable to find a valid cuDNN algorithm to run convolution

I want to test a github for my work: https://github.com/tufts-ml/GAN-Ensemble-for-Anomaly-Detection so I did a git clone...