Azure ML Studio -- importing a module

Ghada Adam 1 Reputation point
2022-09-02T15:02:55.397+00:00

I am trying to test the imblearn package from sklearn. I am receiving the following error when I try to import the imblearn package using the execute python script module:

in <module> import imblearn File ".\Script Bundle\imblearn__init__.py", line 52, in <module> from . import combine File ".\Script Bundle\imblearn\combine__init__.py", line 5, in <module> from ._smote_enn import SMOTEENN File ".\Script Bundle\imblearn\combine_smote_enn.py", line 117 ): ^SyntaxError: invalid syntaxProcess returned with non-zero exit code 1

I created a zip folder with the following structure and connected the zip code to the execute python script module:

imblearn
| init file
|_ _ combine
| init file
| _somte_enn file

  1. Line 52 in the first init file: from . import combine
  2. Line 5 in the nested init file: from ._smote_enn import SMOTEENN
  3. Line 117 in the _smote_enn file:

108 @_deprecate_positional_args
109 def init(
110 self,
111 *,
112 sampling_strategy="auto",
113 random_state=None,
114 smote=None,
115 enn=None,
116 n_jobs=None,
117 ):
118 super().init()
119 self.sampling_strategy = sampling_strategy
120 self.random_state = random_state
121 self.smote = smote
122 self.enn = enn
123 self.n_jobs = n_jobs

I appreciate your comment, suggestions, and help.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,985 questions
{count} votes