Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: can't set attribute #60

Open
Voltarikk opened this issue Jan 26, 2024 · 0 comments
Open

AttributeError: can't set attribute #60

Voltarikk opened this issue Jan 26, 2024 · 0 comments

Comments

@Voltarikk
Copy link

Voltarikk commented Jan 26, 2024

hi,thanks for developing this useful method!
I was trying to run the desc_2.1.1_paul tutorial,but i got the AttributeError: can't set attribute, i don't know where the wrong exist.

  1. my desc_2.1.1 env
    anndata 0.9.2
    scanpy 1.9.6
    python 3.8.18
    PIL 10.2.0
    absl NA
    asttokens NA
    astunparse 1.6.3
    backcall 0.2.0
    certifi 2023.11.17
    charset_normalizer 3.3.2
    comm 0.2.1
    cycler 0.12.1
    cython_runtime NA
    dab0eaeee8bfae79490a0d4f23f5ad820bb199d8 NA
    dateutil 2.8.2
    debugpy 1.8.0
    decorator 5.1.1
    desc 2.1.1
    executing 2.0.1
    flatbuffers 23.5.26
    gast NA
    get_annotations NA
    google NA
    h5py 3.10.0
    idna 3.6
    igraph 0.10.8
    importlib_resources NA
    ipykernel 6.29.0
    jedi 0.19.1
    joblib 1.3.2
    keras 2.13.1
    kiwisolver 1.4.5
    llvmlite 0.41.1
    louvain 0.8.1
    matplotlib 3.7.4
    matplotlib_inline 0.1.6
    mpl_toolkits NA
    natsort 8.4.0
    numba 0.58.1
    numexpr 2.8.6
    numpy 1.24.3
    opt_einsum v3.3.0
    packaging 23.2
    pandas 2.0.3
    parso 0.8.3
    pexpect 4.9.0
    pickleshare 0.7.5
    pkg_resources NA
    platformdirs 4.1.0
    prompt_toolkit 3.0.43
    psutil 5.9.8
    ptyprocess 0.7.0
    pure_eval 0.2.2
    pydev_ipython NA
    pydevconsole NA
    pydevd 2.9.5
    pydevd_file_utils NA
    pydevd_plugins NA
    pydevd_tracing NA
    pygments 2.17.2
    pynndescent 0.5.11
    pyparsing 3.1.1
    pytz 2023.3.post1
    requests 2.31.0
    scipy 1.10.1
    session_info 1.0.0
    setuptools 68.2.2
    six 1.16.0
    sklearn 1.3.2
    stack_data 0.6.3
    tensorboard 2.13.0
    tensorflow 2.13.1
    termcolor NA
    texttable 1.7.0
    threadpoolctl 3.2.0
    tornado 6.4
    tqdm 4.66.1
    traitlets 5.14.1
    typing_extensions NA
    umap 0.5.5
    urllib3 2.1.0
    wcwidth 0.2.13
    wrapt 1.16.0
    zipp NA
    zmq 25.1.2
    IPython 8.12.3
    jupyter_client 8.6.0
    jupyter_core 5.7.1

Python 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0]
Linux-6.2.0-34-generic-x86_64-with-glibc2.17

Session information updated at 2024-01-26 10:23

  1. the question appeared when i ran the code
    adata=desc.train(adata, dims=[adata.shape[1],64,32], tol=0.005, n_neighbors=10, batch_size=256, louvain_resolution=[0.8,1.0], save_dir=str(save_dir), do_tsne=True, learning_rate=200, # the parameter of tsne use_GPU=False, num_Cores=1, #for reproducible, only use 1 cpu num_Cores_tsne=4, save_encoder_weights=False, save_encoder_step=3,# save_encoder_weights is False, this parameter is not used use_ae_weights=False, do_umap=False)

  2. some warnings appreared
    Start to process resolution= 0.8
    The number of cpu in your computer is 96
    You must install pydot (pip install pydot) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) for plot_model to work.(i'm confused)
    use_ae_weights=False, the program will rerun autoencoder
    Pretraining the 1th layer...
    learning rate = 0.1
    2024-01-26 11:29:54.242148: E tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:268] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
    2024-01-26 11:29:54.242179: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:168] retrieving CUDA diagnostic information for host: bgi-algo
    2024-01-26 11:29:54.242184: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:175] hostname: bgi-algo
    2024-01-26 11:29:54.242362: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:199] libcuda reported version is: 535.86.10
    2024-01-26 11:29:54.242380: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:203] kernel reported version is: 535.86.10
    2024-01-26 11:29:54.242383: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:309] kernel version seems to match DSO: 535.86.10
    Epoch 1/50
    11/11 [==============================] - 1s 34ms/step - loss: 0.9599
    ........
    ........
    11/11 [==============================] - 0s 9ms/step - loss: 0.2231
    Epoch 5/5
    11/11 [==============================] - 0s 9ms/step - loss: 0.2146
    delta_label 0.004395604395604396 < tol 0.005
    Reached tolerance threshold. Stop training.
    WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. model.compile_metrics will be empty until you train or evaluate the model.

  3. raised the error likeAttributeError: can't set attribute
    File /DATA/User/luowei/software/anaconda3/envs/DESC/lib/python3.8/site-packages/pandas/core/base.py:178, in NoNewAttributesMixin.setattr(self, key, value)
    172 if getattr(self, "__frozen", False) and not (
    173 key == "_cache"
    174 or key in type(self).dict
    175 or getattr(self, key, None) is not None
    176 ):
    177 raise AttributeError(f"You cannot add any new attribute '{key}'")
    --> 178 object.setattr(self, key, value)

File /DATA/User/luowei/software/anaconda3/envs/DESC/lib/python3.8/site-packages/pandas/core/accessor.py:99, in PandasDelegate._add_delegate_accessors.._create_delegator_property.._setter(self, new_values)
98 def _setter(self, new_values):
---> 99 return self._delegate_property_set(name, new_values)

File /DATA/User/luowei/software/anaconda3/envs/DESC/lib/python3.8/site-packages/pandas/core/arrays/categorical.py:2460, in CategoricalAccessor._delegate_property_set(self, name, new_values)
2459 def _delegate_property_set(self, name, new_values):
-> 2460 return setattr(self._parent, name, new_values)

is there anyone can help me?
thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant