I would like to install the Python fastText wrapper of the Facebook C++ library on Azure ML Studio. This library is installed and works properly on my laptop.
I tried to follow the instructions in this Stack Overflow thread for the upload on Azure without success.
The code in my "Execute Python Script" is minimal: I am just unzipping and loading the fastText package that I installed locally on my machine and then calling a help function on the "train_supervised" attribute of the fastText module to verify that the package is imported correctly
# The script MUST contain a function named azureml_main
# which is the entry point for this module.
import fastText
# The entry point function can contain up to two input arguments:
# Param<dataframe1>: a pandas.DataFrame
# Param<dataframe2>: a pandas.DataFrame
def azureml_main(dataframe1 = None, dataframe2 = None):
print(help(fastText.train_supervised))
# Return value must be of a sequence of pandas.DataFrame
return dataframe1,
Upon running this minimal Azure experiment I get the following error:
Traceback (most recent call last): File "C:\server\invokepy.py", line 199, in batch odfs = mod.azureml_main(*idfs) File "C:\temp\e6acccec62994066a25e0d758090e749.py", line 44, in azureml_main print(help(fastText.train_supervised))AttributeError: module 'fastText' has no attribute 'train_supervised'Process returned with non-zero exit code 1---------- End of error message from Python interpreter ---------- Process exited with error code -2
I have also tried to create a virtual environment on my local machine (using conda) and to install fastText and its dependencies in it, but I did not manage. The goal would have been then to zip and upload those libraries to Azure. This is because, for compatibility with the Azure Python environment, I need the 3.5.1 Python version (Anaconda 4.0).
Any help/guidance appreciated!