summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 09:33:54 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 09:33:54 +0000
commitc95690be792c5b06bd3771cd0a93c948b29df7fe (patch)
tree71a0a4a4eff5759b3265a80be10579cbfc579490
parentc6e62bed56ee212cc1622ee7cfe8851458d20c25 (diff)
automatic import of python-gym-discrete
-rw-r--r--.gitignore1
-rw-r--r--python-gym-discrete.spec181
-rw-r--r--sources1
3 files changed, 183 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..3fc62b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gym_discrete-1.5.6.tar.gz
diff --git a/python-gym-discrete.spec b/python-gym-discrete.spec
new file mode 100644
index 0000000..016fd84
--- /dev/null
+++ b/python-gym-discrete.spec
@@ -0,0 +1,181 @@
+%global _empty_manifest_terminate_build 0
+Name: python-gym-discrete
+Version: 1.5.6
+Release: 1
+Summary: A OpenAI Gym Env for discrete
+License: MIT
+URL: https://pypi.org/project/gym-discrete/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/73/45/0d3abf89b2522e1266da6048491349b8a0714b88b6755605383dc18b8e6e/gym_discrete-1.5.6.tar.gz
+BuildArch: noarch
+
+Requires: python3-gym
+
+%description
+# Gym-style API
+
+The domanin features a continuos state and a dicrete action space.
+
+The environment initializes:
+- cross-sectional dataset with variables X_a, X_s, Y and N observations;
+- logit model fitted on the dataset, retrieving parameters \theta_0, \theta_1, \theta_2;
+
+The agent:
+- sees all patients;
+- predict risk of admission \rho, using initialized parameters
+- sample an action (50 possible values between -2 and 2)
+- if risk > 0.2:
+ - replace Xa by g, where g(\rho, Xa) is obtained using the patient's risk and Xa value
+- else:
+ - do not intervene, X_a stays the same
+- give reward equal to average risk of admission, using predicted Y, initial parameters and sampled values
+
+
+# To install
+- git clone https://github.com/claudia-viaro/gym-discrete.git
+- cd gym-discrete
+
+- !pip install gym-discrete
+- import gym_discrete
+- env =gym.make('discrete-v0')
+
+# To change version
+- change version to, e.g., 1.0.7 from setup.py file
+- git clone https://github.com/claudia-viaro/gym-discrete.git
+- cd gym-discrete
+- python setup.py sdist bdist_wheel
+- twine check dist/*
+- twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
+
+
+
+
+%package -n python3-gym-discrete
+Summary: A OpenAI Gym Env for discrete
+Provides: python-gym-discrete
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-gym-discrete
+# Gym-style API
+
+The domanin features a continuos state and a dicrete action space.
+
+The environment initializes:
+- cross-sectional dataset with variables X_a, X_s, Y and N observations;
+- logit model fitted on the dataset, retrieving parameters \theta_0, \theta_1, \theta_2;
+
+The agent:
+- sees all patients;
+- predict risk of admission \rho, using initialized parameters
+- sample an action (50 possible values between -2 and 2)
+- if risk > 0.2:
+ - replace Xa by g, where g(\rho, Xa) is obtained using the patient's risk and Xa value
+- else:
+ - do not intervene, X_a stays the same
+- give reward equal to average risk of admission, using predicted Y, initial parameters and sampled values
+
+
+# To install
+- git clone https://github.com/claudia-viaro/gym-discrete.git
+- cd gym-discrete
+
+- !pip install gym-discrete
+- import gym_discrete
+- env =gym.make('discrete-v0')
+
+# To change version
+- change version to, e.g., 1.0.7 from setup.py file
+- git clone https://github.com/claudia-viaro/gym-discrete.git
+- cd gym-discrete
+- python setup.py sdist bdist_wheel
+- twine check dist/*
+- twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
+
+
+
+
+%package help
+Summary: Development documents and examples for gym-discrete
+Provides: python3-gym-discrete-doc
+%description help
+# Gym-style API
+
+The domanin features a continuos state and a dicrete action space.
+
+The environment initializes:
+- cross-sectional dataset with variables X_a, X_s, Y and N observations;
+- logit model fitted on the dataset, retrieving parameters \theta_0, \theta_1, \theta_2;
+
+The agent:
+- sees all patients;
+- predict risk of admission \rho, using initialized parameters
+- sample an action (50 possible values between -2 and 2)
+- if risk > 0.2:
+ - replace Xa by g, where g(\rho, Xa) is obtained using the patient's risk and Xa value
+- else:
+ - do not intervene, X_a stays the same
+- give reward equal to average risk of admission, using predicted Y, initial parameters and sampled values
+
+
+# To install
+- git clone https://github.com/claudia-viaro/gym-discrete.git
+- cd gym-discrete
+
+- !pip install gym-discrete
+- import gym_discrete
+- env =gym.make('discrete-v0')
+
+# To change version
+- change version to, e.g., 1.0.7 from setup.py file
+- git clone https://github.com/claudia-viaro/gym-discrete.git
+- cd gym-discrete
+- python setup.py sdist bdist_wheel
+- twine check dist/*
+- twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
+
+
+
+
+%prep
+%autosetup -n gym-discrete-1.5.6
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-gym-discrete -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 1.5.6-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..b768c1d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+955e6d8e487ad90ff5b3cbe3676585e4 gym_discrete-1.5.6.tar.gz