-
Notifications
You must be signed in to change notification settings - Fork 17
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
PermissionError during model fitting in Optuna with ChemPropRegressor #40
Comments
Hello @ahmed1212212 , and welcome to the QSARtuna community. This error may be specific to a windows installation of QSARtuna as I have not observed this myself. It might be possible that you need to provide permissions to cmd or the python process to resolve this. Please can you share the full error message so I can debug at what stage you are getting this error? Thanks |
import pandas as pd Load the CSV file containing SMILESfile_path = r"...\OneSidedSelection_Lipinski_All_Dataset\modified_OneSidedSelection_Lipinski_All_Dataset.csv" smiles_column = "SMILES" # The actual name of the column containing SMILES strings Generate RDKit molecules from SMILESmolecules = [Chem.MolFromSmiles(smiles) for smiles in df[smiles_column]] Generate Morgan fingerprints (bit vector) for each moleculefingerprints = [] for mol in molecules: Add the fingerprints as a new column to the original DataFramedf['fp'] = fingerprints Save the DataFrame (with the original columns + the fingerprint column) to a new CSV fileoutput_file_path = r"....\morgan_fingerprints_with_columns.csv" print(f"Data with Morgan fingerprints saved to: {output_file_path}") Then I run this code ..... vector_covariate_config = OptimizationConfig( precomputed_study = optimize(vector_covariate_config, study_name="precomputed_example")
|
The following code runs ok for me, please can you check?
|
FYI I just wanted to highlight that your implementation will present the ECFP 3 times for any given molecule: Twice within the composite fingerprint (one precomputed 512bit ECFP_4 fingerprint manually calculated and one default ECFP [2048 bit ECFP_6] from |
Issue Title:
PermissionError during model fitting in Optuna with ChemPropRegressor
Description:
When running the optimization script using optunaz with the ChemPropRegressor algorithm, the process fails during cross-validation due to a PermissionError when attempting to save temporary files to a specified directory. The error occurs while trying to save a DataFrame to CSV format in an invalid or restricted directory.
Error Message:
PermissionError: [Errno 13] Permission denied: 'C:\path\to\another\temp\folder\tmp5s1mkddb'
config = OptimizationConfig(
data=Dataset(
input_column="canonical",
response_column="molwt",
training_dataset_file=r"C:\Users\aalhilal\Downloads\train.csv", # This will be split into train and test.
),
descriptors=[
SmilesFromFile.new(),
],
algorithms=[
ChemPropRegressor.new(epochs=5), #epochs=5 to ensure run finishes quickly
],
settings=OptimizationConfig.Settings(
mode=ModelMode.REGRESSION,
cross_validation=2,
n_trials=2,
direction=OptimizationDirection.MAXIMIZATION,
),
)
study = optimize(config, study_name="my_study")
The text was updated successfully, but these errors were encountered: