aimodelshare 0.1.59__tar.gz → 0.1.60__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aimodelshare might be problematic. Click here for more details.

Files changed (278) hide show
  1. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/deploy-infra.yml +4 -0
  2. aimodelshare-0.1.60/.github/workflows/moral_compass_auth_test.yml +78 -0
  3. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/playground-integration-tests.yml +186 -119
  4. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/pypi-manual-publish.yml +1 -1
  5. {aimodelshare-0.1.59/aimodelshare.egg-info → aimodelshare-0.1.60}/PKG-INFO +1 -1
  6. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/aws.py +4 -4
  7. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/generatemodelapi.py +1 -1
  8. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/model.py +1 -1
  9. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/modeluser.py +67 -1
  10. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/moral_compass/README.md +41 -0
  11. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/moral_compass/_version.py +1 -1
  12. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/moral_compass/api_client.py +49 -1
  13. {aimodelshare-0.1.59 → aimodelshare-0.1.60/aimodelshare.egg-info}/PKG-INFO +1 -1
  14. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare.egg-info/SOURCES.txt +8 -0
  15. aimodelshare-0.1.60/infra/layer/requirements.txt +1 -0
  16. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/terraform.tfvars +1 -0
  17. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/variables.tf +2 -2
  18. aimodelshare-0.1.60/notebooks/compas_playground_multiframework.ipynb +1344 -0
  19. aimodelshare-0.1.60/notebooks/moral_compass_model_submissions_and_challenge_progress.ipynb +398 -0
  20. aimodelshare-0.1.60/notebooks/moral_compass_playground_setup.ipynb +1 -0
  21. aimodelshare-0.1.60/notebooks/notebooks_compas_playground_multiframework.ipynb +920 -0
  22. aimodelshare-0.1.60/tests/test_moral_compass_auth_create_table.py +165 -0
  23. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_moral_compass_client_minimal.py +92 -1
  24. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playground_compas_multiframework.py +36 -8
  25. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playground_compas_multiframework_short.py +115 -130
  26. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playground_keras_model_types.py +2 -2
  27. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playground_model_types.py +2 -2
  28. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playground_torch_model_types.py +2 -2
  29. aimodelshare-0.1.60/tests/unit/test_bucket_setup.py +161 -0
  30. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/aimodelshare-tests.yml +0 -0
  31. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/bootstrap-terraform.yml +0 -0
  32. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/destroy-infra.yml +0 -0
  33. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/publish-lambda-layers.yml +0 -0
  34. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/test-colab-install.yml +0 -0
  35. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/test-colab-simulated.yml +0 -0
  36. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.github/workflows/unit-tests.yml +0 -0
  37. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/.gitignore +0 -0
  38. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/CHANGES_SUMMARY.md +0 -0
  39. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/CODE_REVIEW.md +0 -0
  40. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/IMPLEMENTATION_SUMMARY.md +0 -0
  41. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/IMPLEMENTATION_SUMMARY_DIAGNOSTICS.md +0 -0
  42. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/IMPLEMENTATION_SUMMARY_REGION_AWARE.md +0 -0
  43. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/LICENSE +0 -0
  44. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/MANIFEST.in +0 -0
  45. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/METADATA_FIX_DOCUMENTATION.md +0 -0
  46. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/MODERNIZATION_SUMMARY.md +0 -0
  47. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/PLAYGROUND_TEST_ISOLATION.md +0 -0
  48. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/PREPROCESSOR_DIAGNOSTICS.md +0 -0
  49. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/PR_SUMMARY.md +0 -0
  50. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/README.md +0 -0
  51. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/README.md +0 -0
  52. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/__init__.py +0 -0
  53. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/aimsonnx.py +0 -0
  54. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/api.py +0 -0
  55. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/auth.py +0 -0
  56. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/aws_client.py +0 -0
  57. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/base_image.py +0 -0
  58. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/bucketpolicy.py +0 -0
  59. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/color_mappings/color_mapping_keras.csv +0 -0
  60. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/color_mappings/color_mapping_pytorch.csv +0 -0
  61. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/containerisation.py +0 -0
  62. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/containerization.py +0 -0
  63. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/containerization_templates/Dockerfile.txt +0 -0
  64. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/containerization_templates/Dockerfile_PySpark.txt +0 -0
  65. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/containerization_templates/buildspec.txt +0 -0
  66. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/containerization_templates/lambda_function.txt +0 -0
  67. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/custom_approach/__init__.py +0 -0
  68. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/custom_approach/lambda_function.py +0 -0
  69. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/custom_eval_metrics.py +0 -0
  70. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/__init__.py +0 -0
  71. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/data_sharing_templates/Dockerfile.txt +0 -0
  72. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/data_sharing_templates/__init__.py +0 -0
  73. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/data_sharing_templates/buildspec.txt +0 -0
  74. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/data_sharing_templates/codebuild_policies.txt +0 -0
  75. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/data_sharing_templates/codebuild_trust_relationship.txt +0 -0
  76. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/download_data.py +0 -0
  77. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/share_data.py +0 -0
  78. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/data_sharing/utils.py +0 -0
  79. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/deploy_custom_lambda.py +0 -0
  80. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/Makefile +0 -0
  81. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/__init__.py +0 -0
  82. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/_version.py +0 -0
  83. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/breadcrumbs.html +0 -0
  84. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/layout.html +0 -0
  85. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/search.html +0 -0
  86. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/searchbox.html +0 -0
  87. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/css/custom.css +0 -0
  88. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/css/custom.css.map +0 -0
  89. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/css/theme.css +0 -0
  90. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/css/theme.css.map +0 -0
  91. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/css/theme.min.css +0 -0
  92. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/css/theme.min.css.map +0 -0
  93. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/font/fontello.eot +0 -0
  94. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/font/fontello.svg +0 -0
  95. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/font/fontello.ttf +0 -0
  96. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/font/fontello.woff +0 -0
  97. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/font/fontello.woff2 +0 -0
  98. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/static/js/theme.js +0 -0
  99. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/karma_sphinx_theme/theme.conf +0 -0
  100. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/make.bat +0 -0
  101. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/requirements.txt +0 -0
  102. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/about.rst +0 -0
  103. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/advanced_features.rst +0 -0
  104. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/competition.rst +0 -0
  105. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/conf.py +0 -0
  106. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/create_credentials.rst +0 -0
  107. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/example_notebooks.rst +0 -0
  108. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/functions.rst +0 -0
  109. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/gettingstarted.rst +0 -0
  110. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/images/creds1.png +0 -0
  111. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/images/creds2.png +0 -0
  112. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/images/creds3.png +0 -0
  113. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/images/creds4.png +0 -0
  114. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/images/creds5.png +0 -0
  115. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/images/creds_file_example.png +0 -0
  116. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/images/predict_tab.png +0 -0
  117. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/index.rst +0 -0
  118. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/documentation/source/modelplayground.rst +0 -0
  119. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/exceptions.py +0 -0
  120. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/iam/codebuild_policy.txt +0 -0
  121. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/iam/codebuild_trust_relationship.txt +0 -0
  122. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/iam/lambda_policy.txt +0 -0
  123. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/iam/lambda_trust_relationship.txt +0 -0
  124. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/__init__.py +0 -0
  125. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/api_json.txt +0 -0
  126. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/auth/policy.txt +0 -0
  127. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/auth/role.txt +0 -0
  128. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/eval/policy.txt +0 -0
  129. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/eval/role.txt +0 -0
  130. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/function/policy.txt +0 -0
  131. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/function/role.txt +0 -0
  132. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/integration_response.txt +0 -0
  133. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/lambda_policy_1.txt +0 -0
  134. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/lambda_policy_2.txt +0 -0
  135. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/lambda_role_1.txt +0 -0
  136. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/json_templates/lambda_role_2.txt +0 -0
  137. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/leaderboard.py +0 -0
  138. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/1.txt +0 -0
  139. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/1B.txt +0 -0
  140. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/2.txt +0 -0
  141. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/3.txt +0 -0
  142. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/4.txt +0 -0
  143. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/5.txt +0 -0
  144. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/6.txt +0 -0
  145. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/7.txt +0 -0
  146. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/8.txt +0 -0
  147. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/__init__.py +0 -0
  148. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/authorization.txt +0 -0
  149. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/eval_classification.txt +0 -0
  150. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/eval_lambda.txt +0 -0
  151. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/eval_regression.txt +0 -0
  152. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/lambda_function.txt +0 -0
  153. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/main/nst.txt +0 -0
  154. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/moral_compass/__init__.py +0 -0
  155. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/moral_compass/challenge.py +0 -0
  156. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/moral_compass/config.py +0 -0
  157. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/placeholders/model.onnx +0 -0
  158. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/placeholders/preprocessor.zip +0 -0
  159. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/playground.py +0 -0
  160. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/postprocessormodules.py +0 -0
  161. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/preprocessormodules.py +0 -0
  162. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/1.txt +0 -0
  163. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/1B.txt +0 -0
  164. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/2.txt +0 -0
  165. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/3.txt +0 -0
  166. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/4.txt +0 -0
  167. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/5.txt +0 -0
  168. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/6.txt +0 -0
  169. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/7.txt +0 -0
  170. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/8.txt +0 -0
  171. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/__init__.py +0 -0
  172. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/authorization.txt +0 -0
  173. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/eval_classification.txt +0 -0
  174. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/eval_lambda.txt +0 -0
  175. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/eval_regression.txt +0 -0
  176. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/lambda_function.txt +0 -0
  177. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/pyspark/nst.txt +0 -0
  178. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/python/my_preprocessor.py +0 -0
  179. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/readme.md +0 -0
  180. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/reproducibility.py +0 -0
  181. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/Dockerfile.txt +0 -0
  182. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/Dockerfile_PySpark.txt +0 -0
  183. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/__init__.py +0 -0
  184. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/buildspec.txt +0 -0
  185. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/codebuild_policies.txt +0 -0
  186. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/codebuild_trust_relationship.txt +0 -0
  187. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/codepipeline_policies.txt +0 -0
  188. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/codepipeline_trust_relationship.txt +0 -0
  189. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/spark-class.txt +0 -0
  190. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/sam/template.txt +0 -0
  191. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/tools.py +0 -0
  192. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/utils/__init__.py +0 -0
  193. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/utils/optional_deps.py +0 -0
  194. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare/utils.py +0 -0
  195. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare.egg-info/dependency_links.txt +0 -0
  196. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare.egg-info/requires.txt +0 -0
  197. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/aimodelshare.egg-info/top_level.txt +0 -0
  198. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/docs/DEPRECATION_PLAN.md +0 -0
  199. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/docs/REGION_AWARE_NAMING.md +0 -0
  200. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/docs/aimodshare_banner.jpg +0 -0
  201. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/docs/justice_equity_challenge_example.md +0 -0
  202. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/README.md +0 -0
  203. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/ROLLOUT_GUIDE.md +0 -0
  204. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/bootstrap/README.md +0 -0
  205. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/bootstrap/main.tf +0 -0
  206. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/bootstrap/outputs.tf +0 -0
  207. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/bootstrap/variables.tf +0 -0
  208. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/lambda/app.py +0 -0
  209. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/lambda-layer-bucket/README.md +0 -0
  210. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/lambda-layer-bucket/main.tf +0 -0
  211. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/layer/build_layer.sh +0 -0
  212. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/main.tf +0 -0
  213. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/infra/outputs.tf +0 -0
  214. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/meta.yaml +0 -0
  215. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/notebooks/aimodelshare_colab_smoke.ipynb +0 -0
  216. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/pyproject.toml +0 -0
  217. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/requirements-auth.txt +0 -0
  218. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/requirements-eval.txt +0 -0
  219. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/requirements.txt +0 -0
  220. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/scripts/cache_terraform_outputs.sh +0 -0
  221. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/scripts/demo_moral_compass_metrics.py +0 -0
  222. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/scripts/verify_api_reachable.sh +0 -0
  223. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/setup.cfg +0 -0
  224. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/setup.py +0 -0
  225. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/about.rst +0 -0
  226. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/advanced_features.rst +0 -0
  227. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/competition.rst +0 -0
  228. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/conf.py +0 -0
  229. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/create_credentials.rst +0 -0
  230. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/example_notebooks.rst +0 -0
  231. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/functions.rst +0 -0
  232. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/gettingstarted.rst +0 -0
  233. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/images/creds1.png +0 -0
  234. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/images/creds2.png +0 -0
  235. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/images/creds3.png +0 -0
  236. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/images/creds4.png +0 -0
  237. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/images/creds5.png +0 -0
  238. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/images/creds_file_example.png +0 -0
  239. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/images/predict_tab.png +0 -0
  240. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/index.rst +0 -0
  241. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/source/modelplayground.rst +0 -0
  242. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/README.md +0 -0
  243. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/__init__.py +0 -0
  244. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/load_mixed_duration.py +0 -0
  245. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/load_multi_table.py +0 -0
  246. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/load_single_table.py +0 -0
  247. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/requirements.txt +0 -0
  248. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_aimsonnx.py +0 -0
  249. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_api_integration.py +0 -0
  250. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_api_pagination.py +0 -0
  251. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_moral_compass_auth.py +0 -0
  252. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_moral_compass_dynamic_metrics.py +0 -0
  253. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_moral_compass_unit.py +0 -0
  254. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playground.py +0 -0
  255. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playground_moral_compass_challenge.py +0 -0
  256. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_playgrounds_nodataimport.py +0 -0
  257. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/test_region_aware_naming.py +0 -0
  258. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/DEBUGGING_GUIDE.md +0 -0
  259. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/README.md +0 -0
  260. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/__init__.py +0 -0
  261. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/run_tests.sh +0 -0
  262. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_credentials.py +0 -0
  263. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_data_preprocessing.py +0 -0
  264. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_eval_metrics_smoke.py +0 -0
  265. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_model_helpers.py +0 -0
  266. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_model_training.py +0 -0
  267. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_modernization.py +0 -0
  268. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_playground_init.py +0 -0
  269. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_playground_operations.py +0 -0
  270. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_preprocessor_diagnostics.py +0 -0
  271. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_preprocessor_validation.py +0 -0
  272. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_setup_sanity.py +0 -0
  273. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_submit_model_returns.py +0 -0
  274. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_transformer_preprocessor.py +0 -0
  275. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/tests/unit/test_utils_imports.py +0 -0
  276. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/validate_modernization.py +0 -0
  277. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/verify_enhancements.py +0 -0
  278. {aimodelshare-0.1.59 → aimodelshare-0.1.60}/verify_preprocessor_diagnostics.py +0 -0
@@ -29,6 +29,10 @@ jobs:
29
29
  env:
30
30
  AWS_REGION: ${{ vars.AWS_REGION || 'us-east-1' }}
31
31
  TF_IN_AUTOMATION: "true"
32
+ username: ${{ secrets.AIMODELSHARE_USERNAME }}
33
+ password: ${{ secrets.AIMODELSHARE_PASSWORD }}
34
+ AWS_ACCESS_KEY_ID: ${{ secrets.DATA_AWS_ACCESS_KEY_ID }}
35
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.DATA_AWS_SECRET_ACCESS_KEY }}
32
36
 
33
37
  steps:
34
38
  - name: Checkout
@@ -0,0 +1,78 @@
1
+ name: Moral Compass Authentication Test
2
+
3
+ on:
4
+ push:
5
+ paths:
6
+ - 'aimodelshare/moral_compass/**'
7
+ - 'tests/test_moral_compass_auth_create_table.py'
8
+ - '.github/workflows/moral_compass_auth_test.yml'
9
+ pull_request:
10
+ paths:
11
+ - 'aimodelshare/moral_compass/**'
12
+ - 'tests/test_moral_compass_auth_create_table.py'
13
+ - '.github/workflows/moral_compass_auth_test.yml'
14
+ workflow_dispatch: # Manual trigger
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ concurrency:
20
+ group: moral-compass-auth-${{ github.ref }}
21
+ cancel-in-progress: true
22
+
23
+ jobs:
24
+ auth-integration-test:
25
+ runs-on: ubuntu-latest
26
+ timeout-minutes: 15
27
+ env:
28
+ TF_CPP_MIN_LOG_LEVEL: "2"
29
+ AIMODELSHARE_SUPPRESS_OPTIONAL_WARNINGS: "1"
30
+
31
+ strategy:
32
+ matrix:
33
+ python-version: ["3.11"]
34
+
35
+ steps:
36
+ - name: Checkout code
37
+ uses: actions/checkout@v4
38
+
39
+ - name: Set up Python ${{ matrix.python-version }}
40
+ uses: actions/setup-python@v4
41
+ with:
42
+ python-version: ${{ matrix.python-version }}
43
+
44
+ - name: Install dependencies
45
+ run: |
46
+ python -m pip install --upgrade pip
47
+ pip install -e .
48
+ pip install pytest pytest-cov
49
+
50
+ - name: Set up test environment
51
+ env:
52
+ MC_USERNAME: ${{ secrets.AIMODELSHARE_USERNAME }}
53
+ MC_PASSWORD: ${{ secrets.AIMODELSHARE_PASSWORD }}
54
+ MORAL_COMPASS_API_BASE_URL: ${{ secrets.MORAL_COMPASS_API_BASE_URL }}
55
+ run: |
56
+ # Export credentials for auto JWT generation
57
+ echo "AIMODELSHARE_USERNAME=$MC_USERNAME" >> $GITHUB_ENV
58
+ echo "AIMODELSHARE_PASSWORD=$MC_PASSWORD" >> $GITHUB_ENV
59
+ echo "MORAL_COMPASS_API_BASE_URL=$MORAL_COMPASS_API_BASE_URL" >> $GITHUB_ENV
60
+
61
+ - name: Run auto JWT integration test
62
+ run: |
63
+ # Run only the integration test for auto JWT generation
64
+ pytest tests/test_moral_compass_auth_create_table.py::test_auto_jwt_and_table_create -v -s
65
+
66
+ - name: Run unit tests for JWT generation
67
+ run: |
68
+ # Run unit/mock tests that don't require live API
69
+ pytest tests/test_moral_compass_auth_create_table.py::test_auto_jwt_generation_mock -v
70
+ pytest tests/test_moral_compass_auth_create_table.py::test_auto_jwt_no_credentials -v
71
+
72
+ - name: Test import and basic functionality
73
+ run: |
74
+ python -c "
75
+ from aimodelshare.moral_compass import MoralcompassApiClient
76
+ client = MoralcompassApiClient(api_base_url='https://example.com')
77
+ print('✓ Basic import and initialization successful')
78
+ "
@@ -22,6 +22,18 @@ on:
22
22
  - compas_short
23
23
  - justice_equity_challenge
24
24
  - region_aware_naming
25
+ install_source:
26
+ description: 'Install aimodelshare from repo (editable) or PyPI'
27
+ required: false
28
+ default: 'repo'
29
+ type: choice
30
+ options:
31
+ - repo
32
+ - pypi
33
+ pypi_version:
34
+ description: 'Optional: specify a PyPI version (e.g. 0.6.3). Leave blank for latest.'
35
+ required: false
36
+ default: ''
25
37
 
26
38
  permissions:
27
39
  contents: read
@@ -48,10 +60,18 @@ jobs:
48
60
  uses: actions/setup-python@v5
49
61
  with:
50
62
  python-version: "3.10"
51
- - name: Install local aimodelshare (editable) + test dependencies
63
+ - name: Install dependencies + aimodelshare
52
64
  run: |
53
65
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
54
- pip install -e .
66
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
67
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
68
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
69
+ else
70
+ pip install aimodelshare
71
+ fi
72
+ else
73
+ pip install -e .
74
+ fi
55
75
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
56
76
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
57
77
  - name: Test credential configuration only
@@ -63,16 +83,22 @@ jobs:
63
83
  runs-on: ubuntu-latest
64
84
  timeout-minutes: 10
65
85
  steps:
66
- - name: Checkout repository
67
- uses: actions/checkout@v4
68
- - name: Set up Python
69
- uses: actions/setup-python@v5
86
+ - uses: actions/checkout@v4
87
+ - uses: actions/setup-python@v5
70
88
  with:
71
89
  python-version: "3.10"
72
- - name: Install local aimodelshare (editable) + test dependencies
90
+ - name: Install dependencies + aimodelshare
73
91
  run: |
74
92
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
75
- pip install -e .
93
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
94
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
95
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
96
+ else
97
+ pip install aimodelshare
98
+ fi
99
+ else
100
+ pip install -e .
101
+ fi
76
102
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
77
103
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
78
104
  - name: Test data loading from seaborn
@@ -91,16 +117,22 @@ jobs:
91
117
  runs-on: ubuntu-latest
92
118
  timeout-minutes: 10
93
119
  steps:
94
- - name: Checkout repository
95
- uses: actions/checkout@v4
96
- - name: Set up Python
97
- uses: actions/setup-python@v5
120
+ - uses: actions/checkout@v4
121
+ - uses: actions/setup-python@v5
98
122
  with:
99
123
  python-version: "3.10"
100
- - name: Install local aimodelshare (editable) + test dependencies
124
+ - name: Install dependencies + aimodelshare
101
125
  run: |
102
126
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
103
- pip install -e .
127
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
128
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
129
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
130
+ else
131
+ pip install aimodelshare
132
+ fi
133
+ else
134
+ pip install -e .
135
+ fi
104
136
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
105
137
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
106
138
  - name: Test data preprocessing
@@ -127,16 +159,22 @@ jobs:
127
159
  runs-on: ubuntu-latest
128
160
  timeout-minutes: 10
129
161
  steps:
130
- - name: Checkout repository
131
- uses: actions/checkout@v4
132
- - name: Set up Python
133
- uses: actions/setup-python@v5
162
+ - uses: actions/checkout@v4
163
+ - uses: actions/setup-python@v5
134
164
  with:
135
165
  python-version: "3.10"
136
- - name: Install local aimodelshare (editable) + test dependencies
166
+ - name: Install dependencies + aimodelshare
137
167
  run: |
138
168
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
139
- pip install -e .
169
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
170
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
171
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
172
+ else
173
+ pip install aimodelshare
174
+ fi
175
+ else
176
+ pip install -e .
177
+ fi
140
178
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
141
179
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
142
180
  - name: Test model training
@@ -148,8 +186,6 @@ jobs:
148
186
  from sklearn.preprocessing import StandardScaler
149
187
  from sklearn.linear_model import LogisticRegression
150
188
  from sklearn.model_selection import train_test_split
151
- from unittest.mock import patch
152
-
153
189
  penguins = sns.load_dataset('penguins').dropna()
154
190
  X = penguins[['bill_length_mm','bill_depth_mm','flipper_length_mm','body_mass_g']]
155
191
  y = penguins['sex']
@@ -177,16 +213,22 @@ jobs:
177
213
  TF_CPP_MIN_LOG_LEVEL: "2"
178
214
  AIMODELSHARE_SUPPRESS_OPTIONAL_WARNINGS: "1"
179
215
  steps:
180
- - name: Checkout repository
181
- uses: actions/checkout@v4
182
- - name: Set up Python
183
- uses: actions/setup-python@v5
216
+ - uses: actions/checkout@v4
217
+ - uses: actions/setup-python@v5
184
218
  with:
185
219
  python-version: "3.12"
186
- - name: Install local aimodelshare (editable) + test dependencies
220
+ - name: Install dependencies + aimodelshare
187
221
  run: |
188
222
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
189
- pip install -e .
223
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
224
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
225
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
226
+ else
227
+ pip install aimodelshare
228
+ fi
229
+ else
230
+ pip install -e .
231
+ fi
190
232
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
191
233
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
192
234
  - name: Test model submission + leaderboard retrieval
@@ -199,51 +241,41 @@ jobs:
199
241
  from sklearn.preprocessing import StandardScaler
200
242
  from sklearn.linear_model import LogisticRegression
201
243
  from sklearn.model_selection import train_test_split
202
- from aimodelshare.playground import ModelPlayground
203
244
  from aimodelshare.playground import ModelPlayground, Experiment, Competition
204
- from aimodelshare.aws import set_credentials, get_aws_token
245
+ from aimodelshare.aws import get_aws_token
205
246
  from aimodelshare.modeluser import get_jwt_token, create_user_getkeyandpassword
206
- import aimodelshare as ai
207
- from aimodelshare.data_sharing.utils import redo_with_write
208
- import traceback
209
- import logging
210
-
211
-
212
- #Validate Username & Password
213
- try:
247
+ import traceback, logging
248
+ try:
214
249
  os.environ['AWS_TOKEN']=get_aws_token()
215
250
  os.environ['AWS_ACCESS_KEY_ID_AIMS']=os.environ.get('AWS_ACCESS_KEY_ID')
216
251
  os.environ['AWS_SECRET_ACCESS_KEY_AIMS']=os.environ.get('AWS_SECRET_ACCESS_KEY')
217
252
  os.environ['AWS_REGION_AIMS']=os.environ.get('AWS_REGION')
218
- except Exception as e:
253
+ except Exception:
219
254
  logging.error(traceback.format_exc())
220
-
221
- # Validate AWS Creds
222
-
223
- try:
255
+ try:
224
256
  import boto3
225
- client = boto3.client('sts', aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID'), aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY'))
226
- details = client.get_caller_identity()
227
- except Exception as e:
257
+ client = boto3.client('sts',
258
+ aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID'),
259
+ aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY'))
260
+ client.get_caller_identity()
261
+ except Exception:
228
262
  logging.error(traceback.format_exc())
229
-
230
- try:
231
- # Set Environment Variables for deploy models
263
+ try:
232
264
  os.environ['AWS_TOKEN']=get_aws_token()
233
-
234
- get_jwt_token(os.environ.get('username'), os.environ.get('password')) # check two different cognito functions here
265
+ get_jwt_token(os.environ.get('username'), os.environ.get('password'))
235
266
  create_user_getkeyandpassword()
236
- except Exception as e:
267
+ except Exception:
237
268
  logging.error(traceback.format_exc())
238
-
239
269
  penguins = sns.load_dataset('penguins').dropna()
240
270
  X = penguins[['bill_length_mm','bill_depth_mm','flipper_length_mm','body_mass_g']]
241
- y = penguins['sex']
271
+ y = penguins['sex']
272
+ from sklearn.model_selection import train_test_split
242
273
  X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2,random_state=42)
243
274
  eval_labels = list(y_test)
244
275
  preprocess = ColumnTransformer([('num', Pipeline([('scaler', StandardScaler())]), X.columns.tolist())])
245
276
  preprocess.fit(X_train)
246
277
  def preprocessor(d): return preprocess.transform(d)
278
+ from sklearn.linear_model import LogisticRegression
247
279
  model = LogisticRegression()
248
280
  model.fit(preprocessor(X_train), y_train)
249
281
  preds = model.predict(preprocessor(X_test))
@@ -260,21 +292,19 @@ jobs:
260
292
  input_dict={'description':'CI test','tags':'integration'},
261
293
  submission_type='experiment')
262
294
  data = playground.get_leaderboard()
263
- # Depending on library version, this may be a dict or DataFrame; adapt assertion
264
295
  if isinstance(data, dict):
265
- import pandas as pd
266
- df = pd.DataFrame(data)
267
- assert not df.empty, 'Leaderboard dict converted to empty DataFrame'
268
- print(df.head())
296
+ import pandas as pd
297
+ df = pd.DataFrame(data)
298
+ assert not df.empty, 'Leaderboard dict converted to empty DataFrame'
299
+ print(df.head())
269
300
  else:
270
- import pandas as pd
271
- assert isinstance(data, pd.DataFrame), 'Leaderboard did not return a DataFrame'
272
- assert not data.empty, 'Leaderboard DataFrame is empty'
273
- print(data.head())
301
+ import pandas as pd
302
+ assert isinstance(data, pd.DataFrame), 'Leaderboard did not return a DataFrame'
303
+ assert not data.empty, 'Leaderboard DataFrame is empty'
304
+ print(data.head())
274
305
  print('✓ Leaderboard retrieval test passed')
275
306
  "
276
307
 
277
-
278
308
  test-playground-sklearn-model-types:
279
309
  if: ${{ github.event.inputs.test_step == 'all' || github.event.inputs.test_step == 'model_types' }}
280
310
  runs-on: ubuntu-latest
@@ -288,23 +318,28 @@ jobs:
288
318
  TF_CPP_MIN_LOG_LEVEL: "2"
289
319
  AIMODELSHARE_SUPPRESS_OPTIONAL_WARNINGS: "1"
290
320
  steps:
291
- - name: Checkout repository
292
- uses: actions/checkout@v4
293
- - name: Set up Python
294
- uses: actions/setup-python@v5
321
+ - uses: actions/checkout@v4
322
+ - uses: actions/setup-python@v5
295
323
  with:
296
324
  python-version: "3.12"
297
- - name: Install local aimodelshare (editable) + test dependencies
325
+ - name: Install dependencies + aimodelshare
298
326
  run: |
299
327
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
300
- pip install -e .
328
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
329
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
330
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
331
+ else
332
+ pip install aimodelshare
333
+ fi
334
+ else
335
+ pip install -e .
336
+ fi
301
337
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
302
338
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
303
339
  - name: Test sklearn model types submission
304
340
  run: |
305
341
  pytest -vv tests/test_playground_model_types.py
306
342
 
307
-
308
343
  test-playground-keras-model-types:
309
344
  if: ${{ github.event.inputs.test_step == 'all' || github.event.inputs.test_step == 'keras_model_types' }}
310
345
  runs-on: ubuntu-latest
@@ -318,23 +353,28 @@ jobs:
318
353
  TF_CPP_MIN_LOG_LEVEL: "2"
319
354
  AIMODELSHARE_SUPPRESS_OPTIONAL_WARNINGS: "1"
320
355
  steps:
321
- - name: Checkout repository
322
- uses: actions/checkout@v4
323
- - name: Set up Python
324
- uses: actions/setup-python@v5
356
+ - uses: actions/checkout@v4
357
+ - uses: actions/setup-python@v5
325
358
  with:
326
359
  python-version: "3.12"
327
- - name: Install local aimodelshare (editable) + test dependencies
360
+ - name: Install dependencies + aimodelshare
328
361
  run: |
329
362
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
330
- pip install -e .
363
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
364
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
365
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
366
+ else
367
+ pip install aimodelshare
368
+ fi
369
+ else
370
+ pip install -e .
371
+ fi
331
372
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
332
373
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
333
374
  - name: Test keras model types submission
334
375
  run: |
335
376
  pytest -vv tests/test_playground_keras_model_types.py
336
377
 
337
-
338
378
  test-playground-torch-model-types:
339
379
  if: ${{ github.event.inputs.test_step == 'all' || github.event.inputs.test_step == 'torch_model_types' }}
340
380
  runs-on: ubuntu-latest
@@ -348,23 +388,28 @@ jobs:
348
388
  AIMODELSHARE_SUPPRESS_OPTIONAL_WARNINGS: "1"
349
389
  AIMS_NON_INTERACTIVE: "1"
350
390
  steps:
351
- - name: Checkout repository
352
- uses: actions/checkout@v4
353
- - name: Set up Python
354
- uses: actions/setup-python@v5
391
+ - uses: actions/checkout@v4
392
+ - uses: actions/setup-python@v5
355
393
  with:
356
394
  python-version: "3.12"
357
- - name: Install local aimodelshare (editable) + test dependencies
395
+ - name: Install dependencies + aimodelshare
358
396
  run: |
359
397
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
360
- pip install -e .
398
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
399
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
400
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
401
+ else
402
+ pip install aimodelshare
403
+ fi
404
+ else
405
+ pip install -e .
406
+ fi
361
407
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
362
408
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
363
409
  - name: Test torch model types submission
364
410
  run: |
365
411
  pytest -vv tests/test_playground_torch_model_types.py
366
412
 
367
-
368
413
  test-playground-compas-multiframework:
369
414
  if: ${{ github.event.inputs.test_step == 'all' || github.event.inputs.test_step == 'compas_multiframework' }}
370
415
  runs-on: ubuntu-latest
@@ -379,22 +424,27 @@ jobs:
379
424
  AIMODELSHARE_SUPPRESS_OPTIONAL_WARNINGS: "1"
380
425
  AIMS_NON_INTERACTIVE: "1"
381
426
  steps:
382
- - name: Checkout repository
383
- uses: actions/checkout@v4
384
- - name: Set up Python
385
- uses: actions/setup-python@v5
427
+ - uses: actions/checkout@v4
428
+ - uses: actions/setup-python@v5
386
429
  with:
387
430
  python-version: "3.12"
388
- - name: Install local aimodelshare (editable) + test dependencies
431
+ - name: Install dependencies + aimodelshare
389
432
  run: |
390
433
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
391
- pip install -e .
434
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
435
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
436
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
437
+ else
438
+ pip install aimodelshare
439
+ fi
440
+ else
441
+ pip install -e .
442
+ fi
392
443
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript requests
393
444
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
394
445
  - name: Test COMPAS multi-framework submission
395
446
  run: |
396
- pytest -vv tests/test_playground_compas_multiframework.py
397
-
447
+ pytest -vv -s tests/test_playground_compas_multiframework.py
398
448
 
399
449
  test-playground-compas-short:
400
450
  if: ${{ github.event.inputs.test_step == 'all' || github.event.inputs.test_step == 'compas_short' }}
@@ -410,22 +460,27 @@ jobs:
410
460
  AIMODELSHARE_SUPPRESS_OPTIONAL_WARNINGS: "1"
411
461
  AIMS_NON_INTERACTIVE: "1"
412
462
  steps:
413
- - name: Checkout repository
414
- uses: actions/checkout@v4
415
- - name: Set up Python
416
- uses: actions/setup-python@v5
463
+ - uses: actions/checkout@v4
464
+ - uses: actions/setup-python@v5
417
465
  with:
418
466
  python-version: "3.12"
419
- - name: Install local aimodelshare (editable) + test dependencies
467
+ - name: Install dependencies + aimodelshare
420
468
  run: |
421
469
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
422
- pip install -e .
470
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
471
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
472
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
473
+ else
474
+ pip install aimodelshare
475
+ fi
476
+ else
477
+ pip install -e .
478
+ fi
423
479
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript requests
424
480
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
425
481
  - name: Test COMPAS short multi-framework submission
426
482
  run: |
427
- pytest -vv tests/test_playground_compas_multiframework_short.py
428
-
483
+ pytest -vv -s tests/test_playground_compas_multiframework_short.py
429
484
 
430
485
  test-playground-justice-equity-challenge:
431
486
  if: ${{ github.event.inputs.test_step == 'all' || github.event.inputs.test_step == 'justice_equity_challenge' }}
@@ -451,14 +506,11 @@ jobs:
451
506
  working-directory: infra
452
507
  run: |
453
508
  terraform init
454
- # Select or create dev workspace
455
509
  terraform workspace select dev || terraform workspace new dev
456
- # Get API base URL from terraform outputs
457
- set +e # Don't exit on error
510
+ set +e
458
511
  API_URL=$(terraform output -raw api_base_url 2>&1)
459
512
  TF_EXIT_CODE=$?
460
- set -e # Re-enable exit on error
461
-
513
+ set -e
462
514
  if [ $TF_EXIT_CODE -eq 0 ] && [ -n "$API_URL" ] && [ "$API_URL" != "null" ]; then
463
515
  echo "MORAL_COMPASS_API_BASE_URL=$API_URL" >> $GITHUB_ENV
464
516
  echo "✓ API base URL set: $API_URL"
@@ -466,16 +518,23 @@ jobs:
466
518
  echo "⚠ Could not retrieve API base URL from terraform outputs (exit code: $TF_EXIT_CODE)"
467
519
  echo "Test will be skipped if URL cannot be resolved"
468
520
  fi
469
- - name: Install dependencies
521
+ - name: Install dependencies + aimodelshare
470
522
  run: |
471
523
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
472
- pip install -e .
524
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
525
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
526
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
527
+ else
528
+ pip install aimodelshare
529
+ fi
530
+ else
531
+ pip install -e .
532
+ fi
473
533
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython 'PyJWT<2.0' matplotlib seaborn importlib_resources onnxscript requests
474
534
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
475
535
  - name: Run Justice & Equity moral compass challenge integration test
476
536
  run: |
477
- pytest -vv tests/test_playground_moral_compass_challenge.py
478
-
537
+ pytest -vv -s tests/test_playground_moral_compass_challenge.py
479
538
 
480
539
  test-region-aware-naming:
481
540
  if: ${{ github.event.inputs.test_step == 'all' || github.event.inputs.test_step == 'region_aware_naming' }}
@@ -484,22 +543,27 @@ jobs:
484
543
  env:
485
544
  AWS_REGION: us-east-1
486
545
  steps:
487
- - name: Checkout repository
488
- uses: actions/checkout@v4
489
- - name: Set up Python
490
- uses: actions/setup-python@v5
546
+ - uses: actions/checkout@v4
547
+ - uses: actions/setup-python@v5
491
548
  with:
492
549
  python-version: "3.12"
493
- - name: Install local aimodelshare (editable) + test dependencies
550
+ - name: Install dependencies + aimodelshare
494
551
  run: |
495
552
  pip install boto3 onnx onnxmltools onnxruntime Pympler scikeras shortuuid skl2onnx tf2onnx wget
496
- pip install -e .
553
+ if [ "${{ github.event.inputs.install_source }}" = "pypi" ]; then
554
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
555
+ pip install "aimodelshare==${{ github.event.inputs.pypi_version }}"
556
+ else
557
+ pip install aimodelshare
558
+ fi
559
+ else
560
+ pip install -e .
561
+ fi
497
562
  pip install pytest scikit-learn pandas numpy opencv-python-headless tensorflow pydot regex psutil IPython "PyJWT<2.0" matplotlib seaborn importlib_resources onnxscript
498
563
  pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision
499
564
  - name: Run region-aware naming tests
500
565
  run: |
501
- pytest -vv tests/test_region_aware_naming.py
502
-
566
+ pytest -vv -s tests/test_region_aware_naming.py
503
567
 
504
568
  integration-summary:
505
569
  needs:
@@ -515,13 +579,16 @@ jobs:
515
579
  - test-playground-compas-short
516
580
  - test-playground-justice-equity-challenge
517
581
  - test-region-aware-naming
518
-
519
582
  runs-on: ubuntu-latest
520
583
  if: always()
521
584
  steps:
522
585
  - name: Summary
523
586
  run: |
524
587
  echo "=== Integration Test Summary ==="
588
+ echo "Install Source: ${{ github.event.inputs.install_source }}"
589
+ if [ -n "${{ github.event.inputs.pypi_version }}" ]; then
590
+ echo "PyPI Version: ${{ github.event.inputs.pypi_version }}"
591
+ fi
525
592
  echo "Credentials: ${{ needs.test-credentials.result }}"
526
593
  echo "Data Loading: ${{ needs.test-data-loading.result }}"
527
594
  echo "Preprocessing: ${{ needs.test-preprocessing.result }}"
@@ -121,7 +121,7 @@ jobs:
121
121
  # Install the built wheel locally to catch missing package_data
122
122
  WHEEL_FILE=$(ls dist/*.whl | head -n 1)
123
123
  pip install "$WHEEL_FILE"
124
- python -c "import aimodelshare; print('Smoke test passed. Version:', aimodelshare.__version__)"
124
+ python -c "from importlib.metadata import version; print('Smoke test passed. Version:', version('aimodelshare'))"
125
125
 
126
126
  - name: Dry run (skip upload)
127
127
  if: inputs.dry_run == 'true'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aimodelshare
3
- Version: 0.1.59
3
+ Version: 0.1.60
4
4
  Summary: Deploy locally saved machine learning models to a live REST API and integrated dashboard.
5
5
  Author-email: Michael Parrott <mikedparrott@modelshare.ai>
6
6
  License: