Commit 24c00ade authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

Several fixies to correct path

parent 573753cd
......@@ -8,7 +8,7 @@
"description": "In this tutorial two clustering methods, namely unsupervised k-means and supervised deep-aa, will be used to extract proto- and archetypes, respectively, along with corresponding clusters. The set of proto- or archetypes can be used as a substantially reduced training set for Single-Task SISSO, which outperforms random selection, while the corresponding clusters allow for an educated material2task-assignment of all training and test materials for Multi-Task SISSO, whose training on the whole training set outperforms corresponding training of Single-Task SISSO.",
"url": "https://gitlab.mpcdf.mpg.de/nomad-lab/proto_archetype_clustering_sisso",
"link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/proto_archetype_clustering_sisso.ipynb",
"link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/proto_archetype_sisso.ipynb",
"link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/proto_archetype_clustering_sisso.ipynb",
"updated": "2021-12-20",
"flags":{
"featured": false,
......
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"cell_type": "markdown",
"metadata": {
"ExecuteTime": {
"end_time": "2022-01-03T11:19:01.134826Z",
"start_time": "2022-01-03T11:19:01.078381Z"
"end_time": "2022-01-04T18:23:47.415171Z",
"start_time": "2022-01-04T18:23:47.405311Z"
}
},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'daa_luigi'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-1-3fa56a5b2bd1>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mcluster_based_sisso\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mPrimarySpaceParams\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mDerivedSpaceParams\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mMyKmeans\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mMyDeepAA\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mMySisso\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mRepr2Members\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mExecutionType\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mdata_csvpath\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"./data/cluster_based_sisso/cubic_perovskites.csv\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0minterm_results_path\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/Desktop/cluster_based_sisso/cluster_based_sisso/__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtyping_extensions\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mLiteral\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mre\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mdaa_luigi\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mcommon_functions\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mExecutionFolder\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mraise_exception\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mas_inputs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'daa_luigi'"
]
"source": [
"<img src=\"assets/proto_archetype_clustering_sisso/header.jpg\" width=\"900\"> "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img style=\"float: left;\" src=\"assets/proto_archetype_clustering_sisso/logo_NOMAD.png\" width=300>\n",
"<img style=\"float: right;\" src=\"assets/proto_archetype_clustering_sisso/logo_MPG.png\" width=170> "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2022-01-04T20:19:13.524952Z",
"start_time": "2022-01-04T20:19:13.465705Z"
}
],
},
"outputs": [],
"source": [
"from cluster_based_sisso import PrimarySpaceParams,DerivedSpaceParams,MyKmeans,MyDeepAA,MySisso,Repr2Members,ExecutionType\n",
"from proto_archetype_clustering_sisso import PrimarySpaceParams,DerivedSpaceParams,MyKmeans,MyDeepAA,MySisso,Repr2Members,ExecutionType\n",
"from copy import copy\n",
"\n",
"data_csvpath = \"./data/cluster_based_sisso/cubic_perovskites.csv\"\n",
"data_csvpath = \"./data/proto_archetype_clustering_sisso/cubic_perovskites.csv\"\n",
"interm_results_path = None\n",
"\n",
"basic_params = PrimarySpaceParams(data_csvpath,\"lat\").deterministic()\n",
......
%% Cell type:markdown id: tags:
<img src="assets/proto_archetype_clustering_sisso/header.jpg" width="900">
%% Cell type:markdown id: tags:
<img style="float: left;" src="assets/proto_archetype_clustering_sisso/logo_NOMAD.png" width=300>
<img style="float: right;" src="assets/proto_archetype_clustering_sisso/logo_MPG.png" width=170>
%% Cell type:code id: tags:
``` python
from cluster_based_sisso import PrimarySpaceParams,DerivedSpaceParams,MyKmeans,MyDeepAA,MySisso,Repr2Members,ExecutionType
from proto_archetype_clustering_sisso import PrimarySpaceParams,DerivedSpaceParams,MyKmeans,MyDeepAA,MySisso,Repr2Members,ExecutionType
from copy import copy
data_csvpath = "./data/cluster_based_sisso/cubic_perovskites.csv"
data_csvpath = "./data/proto_archetype_clustering_sisso/cubic_perovskites.csv"
interm_results_path = None
basic_params = PrimarySpaceParams(data_csvpath,"lat").deterministic()
primary_space_params = copy(basic_params)
derived_space_params = DerivedSpaceParams(**basic_params._asdict())
sisso_exe_params = copy(derived_space_params)
kmeans_prim_30 = MyKmeans(primary_space_params,30)
kmeans_der_30 = MyKmeans(derived_space_params,30)
deppaa_5 = MyDeepAA(primary_space_params,1,1,1,1,4,500)
ssisso_km_prim_30 = MySisso(sisso_exe_params,kmeans_prim_30,"singletask_on_representatives")
msisso_km_der_30 = MySisso(sisso_exe_params,kmeans_der_30,"multitask_on_all")
ssisso_deepaa_5 = MySisso(sisso_exe_params,deppaa_5,"singletask_on_representatives")
```
%%%% Output: error
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-3fa56a5b2bd1> in <module>
----> 1 from cluster_based_sisso import PrimarySpaceParams,DerivedSpaceParams,MyKmeans,MyDeepAA,MySisso,Repr2Members,ExecutionType
2 from copy import copy
3
4 data_csvpath = "./data/cluster_based_sisso/cubic_perovskites.csv"
5 interm_results_path = None
~/Desktop/cluster_based_sisso/cluster_based_sisso/__init__.py in <module>
2 from typing_extensions import Literal
3 import json,re
----> 4 import daa_luigi
5 from common_functions import ExecutionFolder,raise_exception,as_inputs
6 from copy import copy
ModuleNotFoundError: No module named 'daa_luigi'
%% Cell type:code id: tags:
``` python
```
......
......@@ -5,7 +5,7 @@ with open('metainfo.json') as file:
metainfo = json.load(file)
setup(
name='cluster_based_sisso',
name='proto_archetype_clustering_sisso',
version='1.0',
author=', '.join(metainfo['authors']),
author_email=metainfo['email'],
......@@ -13,5 +13,5 @@ setup(
description=metainfo['title'],
long_description=metainfo['description'],
packages=find_packages(),
install_requires=['sissopp', 'tensorflow','numpy','pandas','scipy','scikit-learn','seaborn','toml'],
install_requires=['tensorflow','numpy','pandas','scipy','scikit-learn','seaborn','toml'],
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment