I am trying to work on different models on a small piece of ML project which needs to work on azure platform and get the score.py with all the values. It is getting not a single library issue, but getting multiple Module errors and Attribute errors. I am using latest SDK version only, but I am not sure, where I am going side path.
Any previous observations on this error?
The compatibility break is there for the newer version of the packages based on the current version of SDK. If the current SDK version is 1.13.0 and above, previous versions of packages are not in working stage. The compatibility issue is raising because of support of packages from SDK for different versions. It differs from version-to-version package support from SDK.
Because of this we are getting Module not found, ImportError and AttributeError.
This solution depends on the AutoML SDK training version.
If you are using 1.13.0 above version of SDK, update the versions of pandas to 0.25.1 and scikit-learn to 0.22.1
Using the following command in BASH to upgrade the versions.
pip install –upgrade pandas==0.25.1
pip install –upgrade sickit-learn==0.22.1
The generic syntax for upgrading is:
pip install –upgrade package_name==version
If the error occurs in AutoML Configuration file, then need to upgrade that also.
But it is suggestable to uninstall and reinstall AutoMLConfig.
pip uninstall azureml-train automl
Then reinstall using the below code,
pip install azureml-train automl
If you are using windows operating system, then install Miniconda.
If you are a linux user, then using sudo or conda syntaxes for the same operation.
Some of the advanced libraries of computer vision supportive like TensorFlow will be installed by default. Then we need to install them from dependencies.
azureml.core.runconfig import RunConfiguration from
azureml.core.conda_dependencies import CondaDependencies run_config =
RunConfiguration() run_config.environment.python.conda_dependencies =
CondaDependencies.create(conda_packages=['tensorflow==1.12.0'])
Documentation credit to #Larry Franks.
Related
I have been googling and doing everything I have read about this issue and it seems it will not work and I cant figure it out.
Here is the issue:Tensorflow error
I have made sure that hub is installed and it is:
Tensorflow hub installed
This should be working and it keeps erroring out.
You can try updating tensor flow.
$ pip install --upgrade tensorflow # for Python 2.7
$ pip3 install --upgrade tensorflow # for Python 3.n
This may depend on what code editor you are using and what interoperator or package installer you are using. I think sometimes you might have to uninstall python. I am familiar with anaconda and I have had this problem but upgrading the module most of the time worked.
Its usually because there are multiple instalations or versions of python on the environment.
I have a problem with importing TensorFlow. I have tried multiple versions of Numpy, Python, and TensorFlow and I still get the following error:
struct_pb2.TypeSpecProto.NDARRAY_SPEC
AttributeError: NDARRAY_SPEC
I have tried using conda and pip for installation and neither one works. I have no idea what might be the cause of this problem and it started happening about a week ago before that TensorFlow was working fine!
I believe you are using windows, and you have an incompatible version of tensorflow installed or you are missing a dependency. First make sure you have the following installed correct version of Visual C++ installed for your version of windows.
https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
https://aka.ms/vs/16/release/vc_redist.x64.exe here is the direct link.
If it still doesn't work, enable longpaths,
https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
If you are having a clash with other packages, create a new conda environment first if you haven't already, and install tensorflow like this.
conda create -n tfenv
conda activate tfenv
conda install tensorflow
Then try to import tensorflow as tf again.
In my program, I need to use some joblib functions. However, when I run the program, I get the error message: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23.
Apparently the library has been updated in this Github repo but I did not have success installing the library with the pip install command
I did a test just to install the setup file
pip install https://github.com/dsxuser/scikit-learn/setup.py/0.20.x.zip
but i got 404 error.
What I need is to update all the joblib library in that branch.
Does anyone know how to properly install it?
That's not an error, that's a warning. It tells you that you shouldn't use sklearn.externals.joblib anymore, if you want your code to be compatible with later versions of scikit-learn. Should means that you still can, as long as you do NOT upgrade scikit-learn to 0.23 or later.
The way to make your code ready for later versions of scikit-learn is to not use the deprecated sklearn.externals.joblib, but to use joblib directly instead. It's not pre-installed, so you can do one of these:
conda install joblib
pip install joblib
You didn't mention what part of Watson Studio you are using. If it's notebooks without Spark, the preferred way to install packages is with conda. You can define a custom environment with this customization:
dependencies:
- joblib=0.13.2
or else you can call conda from a notebook cell:
!conda install joblib=0.13.2
If you're using some other part of Watson Studio, give conda a try, and if it doesn't work, switch to pip. Note that pip expects == instead of = before the version number. Specifying the version number protects you from surprises when new versions of joblib are released.
To do this I ran just ran the command
pip3 install azure
and from what I could tell this retrieved the latest versions of the various Azure modules for Python3. For example, the Postgres version was listed as 2017-12-01 and networking was 2018-08-01. However, I ran the same command from two other Ubuntu systems and on these systems the Postgres version was much older, 2017-04-30-preview.
How do I insure that the latest stable versions of the Azure SDK modules are installed when I run the pip install command on a system?
After a lot more trouble than it should have been, I managed to get pip3 updated on these systems and then running
pip3 install azure
installed the latest versions of the Azure modules. I didn't realize the version of pip impacts which versions of external modules it installs but apparently it plays a role.
I have been successfully using PyCharm for my python work.All the packages can be easily installed by going to settings and then project interpreter but tensorflow installation is showing error.In suggestions it asked me to upgrade pip module.But even after that it shows error with following message:
" Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow"
I am able to install all other packages but error is with tensorflow only.I am using windows.
Please run pip install tensorflow in command line and post the output here. Tensorflow can be installed on Windows but the process is often annoying.
You could also tried anaconda. It is has very nice UI and you could switch between different version.