You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example below, when using a Vset with is_async=True, the transform method expects to get a ray.objectRef and call ray.get on it, but instead gets an array:
fromvflowimportbuild_vset, init_argsimportnumpyasnpfromsklearn.decompositionimportPCAfromsklearn.datasetsimportmake_regressionfromsklearn.model_selectionimporttrain_test_splitfromsklearn.utilsimportresampleimportrayray.init(num_cpus=4)
X, y=make_regression(n_samples=1000, n_features=100, n_informative=1)
X_trainval, X_test, y_trainval, y_test=train_test_split(X, y)
X_train, X_val, y_train, y_val=train_test_split(X_trainval, y_trainval)
X_train, y_train=init_args([X_train, y_train], names=['X_train', 'y_train'])
X_val, y_val=init_args([X_val, y_val], names=['X_val', 'y_val'])
# create a Vset for bootstrapping from data 10 times# we use lazy=True so that the data will not be resampled until neededboot_set=build_vset('boot', resample, reps=10, lazy=True)
# bootstrap from training data by calling boot_funX_trains, y_trains=boot_set(X_train, y_train)
# hyperparameters to trypca_params= {
'n_components': [10, 20, 50],
'svd_solver': ['randomized', 'full', 'auto']
}
# we could instead pass a list of distinct models and corresponding param dictspca_set=build_vset('PCA', PCA, pca_params, is_async=True)
X_trains_pca=pca_set.fit_transform(X_trains)
TypeError: Attempting to call `get` on the value [[-0.73763296 -1.64044139 -0.74793088 ... -0.1085027 -0.25652127
0.11583096]
...
See #50 for a possible workaround until this is fixed.
The text was updated successfully, but these errors were encountered:
In the example below, when using a
Vset
withis_async=True
, thetransform
method expects to get aray.objectRef
and callray.get
on it, but instead gets an array:See #50 for a possible workaround until this is fixed.
The text was updated successfully, but these errors were encountered: