============
hops-util-py
============
|Downloads| |PypiStatus| |PythonVersions|
`hops-util-py` is a helper library for Hops that facilitates development by hiding the complexity of running applications, discovering services and interacting with HopsFS.
It provides an Experiment API to run Python programs such as TensorFlow, Keras and PyTorch on a Hops Hadoop cluster. A TensorBoard will be started when an Experiment begins and the contents of the logdir saved in your Project.
An Experiment could be a single Python program, which we refer to as an *Experiment*. Grid search or genetic hyperparameter optimization such as differential evolution which runs several Experiments in parallel, which we refer to as *Parallel Experiment*. The library supports ParameterServerStrategy and MultiWorkerMirroredStrategy, making multi-machine/multi-gpu training as simple as invoking a function for orchestration. This mode is referred to as *Distributed Training*.
Moreover it provides an easy-to-use API for defining TLS-secured Kafka producers and consumers on the Hopsworks platform as well as an API for interacting with the Hopsworks Feature Store
-----------
Quick Start
-----------
To Install:
>>> pip install hops
Sample usage:
>>> from hops import experiment
>>> from hops import hdfs
>>> experiment.launch(train_fn,
>>> name='mnist estimator',
>>> description='A minimal mnist example with two hidden layers')
------------------------
Development Instructions
------------------------
For development details such as how to test and build docs, see this reference: Development_.
.. _Development: ./Development.rst
-------------
Documentation
-------------
An overview of HopsML, a python-first ML pipeline is available here: hopsML_
Example notebooks for running deep learning and big data processing on Hops are available here: hops-examples_
API documentation is available here: API-docs_
.. _hops-examples: https://github.com/logicalclocks/hops-examples
.. _hopsML: https://hops.readthedocs.io/en/latest/hopsml/hopsML.html
.. _API-docs: http://hops-py.logicalclocks.com/
------------------------------------
Quick Start: Python with HopsML
------------------------------------
Hops uses PySpark to distribute the execution of Python programs in a cluster. PySpark applications consist of two main components, a Driver and one to many Executors. The Driver and the Executors can be started on potentially any host in the cluster and use both the network and the HDFS filesystem to coordinate.
Restructuring Python Programs as PySpark Programs
--------------------------------------------------------------------
If you want to run a Python program, e.g., to train a neural network on a GPU on Hops, you will need to restructure your code. The reason for this is that your single Python process needs to be restructured as a PySpark program, see the figure below.
.. _hopsml-pyspark.png: imgs/hopsml-pyspark.png
.. figure:: imgs/hopsml-pyspark.png
:alt: HopsML Python Program
:target: `hopsml-pyspark.png`_
:align: center
:scale: 75 %
:figclass: align-center
The good news is that all you will need to do to get started is to move your code inside a function. In the code snippet below, the Executor code is on lines 1-3 (the *train* function) and the Driver code is on lines 5-7. For the Executor, you define a function (e.g., *train*, but the function can have any name). The code in the function will get run on Executors (containers). To invoke the Executor function (*train*) from the Driver (the main part of your Python program), you use the Experiment API. Launch a single Executor with *experiment.launch(<fn_name>)*. Launch many Executors with *experiment.grid_search(<fn_name>)* for hyperparameter optimization, and *experiment.mirrored(<fn_name>)* for distributed training.
.. code-block:: python
def train():
import tensorflow as tf
# training code here
# Driver code starts here
from hops import experiment
experiment.launch(train)
.. _driver.png: imgs/driver.png
.. figure:: imgs/driver.png
:alt: HopsML Python Program
:target: `driver.png`_
:align: center
:scale: 90 %
:figclass: align-center
Logging in the Driver
---------------------------
When you print to stdout and stderr in the Driver program, the output is printed in the Jupyter console.
.. code-block:: python
# main scope of program or any non-Executor function
print('log message is printed to Jupyter cell output')
Logging to stdout/stderr in the Executor
------------------------------------------------------
If you execute print(‘...’) in the executor, it will send the output to stdout and stderr on the executor. This will not be displayed in Jupyter console. You can, however, read output in the executors using the Spark UI. As soon as the Spark application has exited, these logs are cleaned up - they are no longer available.
.. code-block:: python
train():
# This will write to stdout/stderr on the Spark Executors
# You can only view this log entry from the Spark UI while the application
# is running.
print("Executor log message - not visible in Jupyter, visible in Spark UI")
To access the Spark executor logs, you will need 4 clicks on your mouse:
1. Select the UI for the application you started running from Jupyter (click on the button inside the yellow highlighter in the image below):
.. _executor-stderr1.png: imgs/executor-stderr1.png
.. figure:: imgs/executor-stderr1.png
:alt: Stdout-err-1
:target: `executor-stderr1.png`_
:align: center
:scale: 75 %
:figclass: align-center
2. Select the “Executors” tab from the Spark UI (click on the button inside the yellow highlighter):
.. _executor-stderr2.png: imgs/executor-stderr2.png
.. figure:: imgs/executor-stderr2.png
:alt: Stdout-err-2
:target: `executor-stderr2.png`_
:align: center
:scale: 75 %
:figclass: align-center
3. Now you should see all the Executors that are running (active) or have finished running more than 90 seconds ago (dead). There will be stdout and stderr logs available for every Executor here - if you ran with 10 GPUs, with 1 GPU per Executor, there will be 10 different stdout and 10 different stderr log files available.. Click on the stderr or stdout log for the Executor you want to examine (yellow highlighted text below):
.. _executor-stderr3.png: imgs/executor-stderr3.png
.. figure:: imgs/executor-stderr3.png
:alt: Stdout-err-3
:target: `executor-stderr3.png`_
:align: center
:scale: 75 %
:figclass: align-center
4. Now you can see the logs for that Executor on the screen:
.. _executor-stderr4.png: imgs/executor-stderr4.png
.. figure:: imgs/executor-stderr4.png
:alt: Stdout-err-4
:target: `executor-stderr4.png`_
:align: center
:scale: 75 %
:figclass: align-center
Installing Python Libraries in Hopsworks
---------------------------------------------
You can use the ‘Conda’ and ‘Pip’ services in Hopsworks to install python libraries. In the ‘Conda’ service, you can change the conda repository by double-clicking on it and entering the URL for a new repo (or ‘default’ for the standard conda repository).
Note: Pillow and matplotlib do not work from conda. Install using “pip”, instead.
Plotting with Sparkmagic in Jupyter
---------------------------------------------
Hopsworks supports both the Python kernel and Sparkmagic kernel. Plotting in the Python kernel is usually handled by libraries such as matplotlib and seaborne. These libraries can also be used in the Sparkmagic kernel, but require more work from the developer, as dataframes in Spark are distributed in the cluster and need to be localized to the Jupyter notebook server as Pandas dataframes, in order to be plotted.
When you run a PySpark program with the Sparkmagic kernel in Jupyter, you will not need to initialize a Spark context, as it is done automatically for you (by Sparkmagic). However, as the PySpark application is not running on the same host as the Jupyter notebook server, plotting (with matplotlib) will not work as normal in a Python kernel. The main change you need to make is to use ‘magics’ in the sparkmagic kernel to get Spark or Pandas dataframes to be localized to the Jupyter notebook server, from where they can be visualized. More details are found in the reference notebook below. Information on the magics available in Sparkmagic are found in the link below.
Adding Python modules to a Jupyter notebook
---------------------------------------------
.. _add-python-module.png: imgs/add-python-module.png
.. figure:: imgs/add-python-module.png
:alt: add-python-module
:target: `add-python-module.png`_
:align: center
:scale: 75 %
:figclass: align-center
API for the Hopsworks Feature Store
--------------------------------------------------------------------
Hopsworks has a data management layer for machine learning, called a feature store.
The feature store enables simple and efficient versioning, sharing, governance and definition of features that can be used to both train machine learning models or to serve inference requests.
The featurestore serves as a natural interface between data engineering and data science.
The feature store can be accessed through the new `HSFS client libraries`_, available for Python and Scala.
.. _HSFS client libraries: https://docs.hopsworks.ai/
Model Serving API
--------------------------------------------------------------------
In the `serving` module you can find an API for creating/starting/stopping/updating models being served on Hopsworks as well as making inference requests.
.. code-block:: python
from hops import serving
from hops import model
# Tensorflow
export_path = work_dir + '/model'
builder = tf.saved_model.builder.SavedModelBuilder(export_path
... # tf specific export code
model.export(export_path, "mnist")
model_path="/Models/mnist/"
SERVING_NAME="mnist"
serving.create_or_update(SERVING_NAME, model_path, model_server="TENSORFLOW_SERVING", model_version=1)
# Alternatively, the kserve flag can be set to deploy the model server using this serving tool
serving.create_or_update(SERVING_NAME, model_path, model_server="TENSORFLOW_SERVING", model_version=1, kserve=True)
if serving.get_status("mnist") == 'Stopped':
serving.start("mnist")
data = {"signature_name": 'predict_images', "instances": [np.random.rand(784).tolist()]}
response = serving.make_inference_request(SERVING_NAME, data)
# SkLearn
script_path = "Jupyter/Serving/sklearn/iris_flower_classifier.py"
model.export(script_path, "irisClassifier")
if serving.exists("irisClassifier"):
serving.delete("irisClassifier")
serving.create_or_update("irisClassifier", script_path, model_server="PYTHON", model_version=1)
serving.start("irisClassifier")
data = {"inputs" : [[random.uniform(1, 8) for i in range(NUM_FEATURES)]]}
response = serving.make_inference_request(SERVING_NAME, data)
Kafka API
--------------------------------------------------------------------
In the `kafka` module you can find an API to interact with kafka topics in Hopsworks.
.. code-block:: python
from hops import kafka, serving
from confluent_kafka import Producer, Consumer, KafkaError
TOPIC_NAME = serving.get_kafka_topic(SERVING_NAME) # get inference logs
config = kafka.get_kafka_default_config()
config['default.topic.config'] = {'auto.offset.reset': 'earliest'}
consumer = Consumer(config)
topics = [TOPIC_NAME]
consumer.subscribe(topics)
json_schema = kafka.get_schema(TOPIC_NAME)
avro_schema = kafka.convert_json_schema_to_avro(json_schema)
msg = consumer.poll(timeout=1.0)
value = msg.value()
event_dict = kafka.parse_avro_msg(value, avro_schema)
HDFS API
--------------------------------------------------------------------
In the `hdfs` module you can find a high-level API for interacting with the distributed file system
.. code-block:: python
from hops import hdfs
hdfs.ls("Logs/")
hdfs.cp("Resources/test.txt", "Logs/")
hdfs.mkdir("Logs/test_dir")
hdfs.rmr("Logs/test_dir")
hdfs.move("Logs/README_dump_test.md", "Logs/README_dump_test2.md")
hdfs.chmod("Logs/README.md", 700)
hdfs.exists("Logs/")
hdfs.copy_to_hdfs("test.txt", "Resources", overwrite=True)
hdfs.copy_to_local("Resources/test.txt", overwrite=True)
Experiment API
--------------------------------------------------------------------
In the `experiment` module you can find an API for launching reproducible machine learning experiments.
Standalone experiments, distributed experiments, hyperparameter tuning and many more are supported.
.. code-block:: python
from hops import experiment
log_dir, best_params = experiment.differential_evolution(
train_fn,
search_dict,
name='team_position_prediction_hyperparam_search',
description='Evolutionary search through the search space of hyperparameters with parallel executors to find the best parameters',
local_logdir=True,
population=4,
generations = 1
)
References
--------------
- https://github.com/logicalclocks/hops-examples/blob/master/tensorflow/notebooks/Plotting/data_visualizations.ipynb
- https://github.com/jupyter-incubator/sparkmagic/blob/master/examples/Magics%20in%20IPython%20Kernel.ipynb
.. |Downloads| image:: https://pepy.tech/badge/hops
:target: https://pepy.tech/project/hops
.. |PypiStatus| image:: https://img.shields.io/pypi/v/hops.svg
:target: https://pypi.org/project/hops
.. |PythonVersions| image:: https://img.shields.io/pypi/pyversions/hops.svg
:target: https://travis-ci.org/hops
Raw data
{
"_id": null,
"home_page": "https://github.com/logicalclocks/hops-util-py",
"name": "hops",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Hops, Hadoop, TensorFlow, Spark",
"author": "Robin Andersson",
"author_email": "robin.eric.andersson@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/79/01/034ed365045bb40c3ab8cd5b8eba8857ce6f0b43a7515a2cf32d29d4dd1b/hops-3.8.0.0.tar.gz",
"platform": null,
"description": "============\nhops-util-py\n============\n\n|Downloads| |PypiStatus| |PythonVersions|\n\n`hops-util-py` is a helper library for Hops that facilitates development by hiding the complexity of running applications, discovering services and interacting with HopsFS.\n\nIt provides an Experiment API to run Python programs such as TensorFlow, Keras and PyTorch on a Hops Hadoop cluster. A TensorBoard will be started when an Experiment begins and the contents of the logdir saved in your Project.\n\nAn Experiment could be a single Python program, which we refer to as an *Experiment*. Grid search or genetic hyperparameter optimization such as differential evolution which runs several Experiments in parallel, which we refer to as *Parallel Experiment*. The library supports ParameterServerStrategy and MultiWorkerMirroredStrategy, making multi-machine/multi-gpu training as simple as invoking a function for orchestration. This mode is referred to as *Distributed Training*.\n\nMoreover it provides an easy-to-use API for defining TLS-secured Kafka producers and consumers on the Hopsworks platform as well as an API for interacting with the Hopsworks Feature Store\n\n-----------\nQuick Start\n-----------\n\nTo Install:\n\n>>> pip install hops\n\nSample usage:\n\n>>> from hops import experiment\n>>> from hops import hdfs\n>>> experiment.launch(train_fn,\n>>> name='mnist estimator',\n>>> description='A minimal mnist example with two hidden layers')\n\n\n------------------------\nDevelopment Instructions\n------------------------\n\nFor development details such as how to test and build docs, see this reference: Development_.\n\n.. _Development: ./Development.rst\n\n-------------\nDocumentation\n-------------\n\nAn overview of HopsML, a python-first ML pipeline is available here: hopsML_\n\nExample notebooks for running deep learning and big data processing on Hops are available here: hops-examples_\n\nAPI documentation is available here: API-docs_\n\n\n.. _hops-examples: https://github.com/logicalclocks/hops-examples\n.. _hopsML: https://hops.readthedocs.io/en/latest/hopsml/hopsML.html\n.. _API-docs: http://hops-py.logicalclocks.com/\n\n\n\n------------------------------------\nQuick Start: Python with HopsML\n------------------------------------\n\nHops uses PySpark to distribute the execution of Python programs in a cluster. PySpark applications consist of two main components, a Driver and one to many Executors. The Driver and the Executors can be started on potentially any host in the cluster and use both the network and the HDFS filesystem to coordinate.\n\n\nRestructuring Python Programs as PySpark Programs\n--------------------------------------------------------------------\n\nIf you want to run a Python program, e.g., to train a neural network on a GPU on Hops, you will need to restructure your code. The reason for this is that your single Python process needs to be restructured as a PySpark program, see the figure below.\n\n.. _hopsml-pyspark.png: imgs/hopsml-pyspark.png\n.. figure:: imgs/hopsml-pyspark.png\n :alt: HopsML Python Program\n :target: `hopsml-pyspark.png`_\n :align: center\n :scale: 75 %\n :figclass: align-center\n\nThe good news is that all you will need to do to get started is to move your code inside a function. In the code snippet below, the Executor code is on lines 1-3 (the *train* function) and the Driver code is on lines 5-7. For the Executor, you define a function (e.g., *train*, but the function can have any name). The code in the function will get run on Executors (containers). To invoke the Executor function (*train*) from the Driver (the main part of your Python program), you use the Experiment API. Launch a single Executor with *experiment.launch(<fn_name>)*. Launch many Executors with *experiment.grid_search(<fn_name>)* for hyperparameter optimization, and *experiment.mirrored(<fn_name>)* for distributed training.\n\n\n.. code-block:: python\n\n def train():\n import tensorflow as tf\n # training code here\n\n # Driver code starts here\n from hops import experiment\n experiment.launch(train)\n\n\n.. _driver.png: imgs/driver.png\n.. figure:: imgs/driver.png\n :alt: HopsML Python Program\n :target: `driver.png`_\n :align: center\n :scale: 90 %\n :figclass: align-center\n\n\nLogging in the Driver\n---------------------------\nWhen you print to stdout and stderr in the Driver program, the output is printed in the Jupyter console.\n\n.. code-block:: python\n\n # main scope of program or any non-Executor function\n print('log message is printed to Jupyter cell output')\n\n\nLogging to stdout/stderr in the Executor\n------------------------------------------------------\n\nIf you execute print(\u2018...\u2019) in the executor, it will send the output to stdout and stderr on the executor. This will not be displayed in Jupyter console. You can, however, read output in the executors using the Spark UI. As soon as the Spark application has exited, these logs are cleaned up - they are no longer available.\n\n.. code-block:: python\n\n train():\n # This will write to stdout/stderr on the Spark Executors\n # You can only view this log entry from the Spark UI while the application\n # is running.\n print(\"Executor log message - not visible in Jupyter, visible in Spark UI\")\n\n\nTo access the Spark executor logs, you will need 4 clicks on your mouse:\n1. Select the UI for the application you started running from Jupyter (click on the button inside the yellow highlighter in the image below):\n\n.. _executor-stderr1.png: imgs/executor-stderr1.png\n.. figure:: imgs/executor-stderr1.png\n :alt: Stdout-err-1\n :target: `executor-stderr1.png`_\n :align: center\n :scale: 75 %\n :figclass: align-center\n\n\n2. Select the \u201cExecutors\u201d tab from the Spark UI (click on the button inside the yellow highlighter):\n\n.. _executor-stderr2.png: imgs/executor-stderr2.png\n.. figure:: imgs/executor-stderr2.png\n :alt: Stdout-err-2\n :target: `executor-stderr2.png`_\n :align: center\n :scale: 75 %\n :figclass: align-center\n\n\n3. Now you should see all the Executors that are running (active) or have finished running more than 90 seconds ago (dead). There will be stdout and stderr logs available for every Executor here - if you ran with 10 GPUs, with 1 GPU per Executor, there will be 10 different stdout and 10 different stderr log files available.. Click on the stderr or stdout log for the Executor you want to examine (yellow highlighted text below):\n\n.. _executor-stderr3.png: imgs/executor-stderr3.png\n.. figure:: imgs/executor-stderr3.png\n :alt: Stdout-err-3\n :target: `executor-stderr3.png`_\n :align: center\n :scale: 75 %\n :figclass: align-center\n\n\n4. Now you can see the logs for that Executor on the screen:\n\n.. _executor-stderr4.png: imgs/executor-stderr4.png\n.. figure:: imgs/executor-stderr4.png\n :alt: Stdout-err-4\n :target: `executor-stderr4.png`_\n :align: center\n :scale: 75 %\n :figclass: align-center\n\nInstalling Python Libraries in Hopsworks\n---------------------------------------------\n\nYou can use the \u2018Conda\u2019 and \u2018Pip\u2019 services in Hopsworks to install python libraries. In the \u2018Conda\u2019 service, you can change the conda repository by double-clicking on it and entering the URL for a new repo (or \u2018default\u2019 for the standard conda repository).\n\nNote: Pillow and matplotlib do not work from conda. Install using \u201cpip\u201d, instead.\n\n\nPlotting with Sparkmagic in Jupyter\n---------------------------------------------\n\nHopsworks supports both the Python kernel and Sparkmagic kernel. Plotting in the Python kernel is usually handled by libraries such as matplotlib and seaborne. These libraries can also be used in the Sparkmagic kernel, but require more work from the developer, as dataframes in Spark are distributed in the cluster and need to be localized to the Jupyter notebook server as Pandas dataframes, in order to be plotted.\nWhen you run a PySpark program with the Sparkmagic kernel in Jupyter, you will not need to initialize a Spark context, as it is done automatically for you (by Sparkmagic). However, as the PySpark application is not running on the same host as the Jupyter notebook server, plotting (with matplotlib) will not work as normal in a Python kernel. The main change you need to make is to use \u2018magics\u2019 in the sparkmagic kernel to get Spark or Pandas dataframes to be localized to the Jupyter notebook server, from where they can be visualized. More details are found in the reference notebook below. Information on the magics available in Sparkmagic are found in the link below.\n\n\nAdding Python modules to a Jupyter notebook\n---------------------------------------------\n\n.. _add-python-module.png: imgs/add-python-module.png\n.. figure:: imgs/add-python-module.png\n :alt: add-python-module\n :target: `add-python-module.png`_\n :align: center\n :scale: 75 %\n :figclass: align-center\n\n\nAPI for the Hopsworks Feature Store\n--------------------------------------------------------------------\nHopsworks has a data management layer for machine learning, called a feature store.\nThe feature store enables simple and efficient versioning, sharing, governance and definition of features that can be used to both train machine learning models or to serve inference requests.\nThe featurestore serves as a natural interface between data engineering and data science.\n\nThe feature store can be accessed through the new `HSFS client libraries`_, available for Python and Scala.\n\n.. _HSFS client libraries: https://docs.hopsworks.ai/\n\nModel Serving API\n--------------------------------------------------------------------\n\nIn the `serving` module you can find an API for creating/starting/stopping/updating models being served on Hopsworks as well as making inference requests.\n\n.. code-block:: python\n\n from hops import serving\n from hops import model\n\n # Tensorflow\n export_path = work_dir + '/model'\n builder = tf.saved_model.builder.SavedModelBuilder(export_path\n ... # tf specific export code\n model.export(export_path, \"mnist\")\n model_path=\"/Models/mnist/\"\n SERVING_NAME=\"mnist\"\n serving.create_or_update(SERVING_NAME, model_path, model_server=\"TENSORFLOW_SERVING\", model_version=1)\n # Alternatively, the kserve flag can be set to deploy the model server using this serving tool\n serving.create_or_update(SERVING_NAME, model_path, model_server=\"TENSORFLOW_SERVING\", model_version=1, kserve=True)\n if serving.get_status(\"mnist\") == 'Stopped':\n serving.start(\"mnist\")\n data = {\"signature_name\": 'predict_images', \"instances\": [np.random.rand(784).tolist()]}\n response = serving.make_inference_request(SERVING_NAME, data)\n\n # SkLearn\n script_path = \"Jupyter/Serving/sklearn/iris_flower_classifier.py\"\n model.export(script_path, \"irisClassifier\")\n if serving.exists(\"irisClassifier\"):\n serving.delete(\"irisClassifier\")\n serving.create_or_update(\"irisClassifier\", script_path, model_server=\"PYTHON\", model_version=1)\n serving.start(\"irisClassifier\")\n data = {\"inputs\" : [[random.uniform(1, 8) for i in range(NUM_FEATURES)]]}\n response = serving.make_inference_request(SERVING_NAME, data)\n\nKafka API\n--------------------------------------------------------------------\n\nIn the `kafka` module you can find an API to interact with kafka topics in Hopsworks.\n\n.. code-block:: python\n\n from hops import kafka, serving\n from confluent_kafka import Producer, Consumer, KafkaError\n TOPIC_NAME = serving.get_kafka_topic(SERVING_NAME) # get inference logs\n config = kafka.get_kafka_default_config()\n config['default.topic.config'] = {'auto.offset.reset': 'earliest'}\n consumer = Consumer(config)\n topics = [TOPIC_NAME]\n consumer.subscribe(topics)\n json_schema = kafka.get_schema(TOPIC_NAME)\n avro_schema = kafka.convert_json_schema_to_avro(json_schema)\n msg = consumer.poll(timeout=1.0)\n value = msg.value()\n event_dict = kafka.parse_avro_msg(value, avro_schema)\n\n\nHDFS API\n--------------------------------------------------------------------\n\nIn the `hdfs` module you can find a high-level API for interacting with the distributed file system\n\n.. code-block:: python\n\n from hops import hdfs\n hdfs.ls(\"Logs/\")\n hdfs.cp(\"Resources/test.txt\", \"Logs/\")\n hdfs.mkdir(\"Logs/test_dir\")\n hdfs.rmr(\"Logs/test_dir\")\n hdfs.move(\"Logs/README_dump_test.md\", \"Logs/README_dump_test2.md\")\n hdfs.chmod(\"Logs/README.md\", 700)\n hdfs.exists(\"Logs/\")\n hdfs.copy_to_hdfs(\"test.txt\", \"Resources\", overwrite=True)\n hdfs.copy_to_local(\"Resources/test.txt\", overwrite=True)\n\nExperiment API\n--------------------------------------------------------------------\n\nIn the `experiment` module you can find an API for launching reproducible machine learning experiments.\nStandalone experiments, distributed experiments, hyperparameter tuning and many more are supported.\n\n.. code-block:: python\n\n from hops import experiment\n log_dir, best_params = experiment.differential_evolution(\n train_fn,\n search_dict,\n name='team_position_prediction_hyperparam_search',\n description='Evolutionary search through the search space of hyperparameters with parallel executors to find the best parameters',\n local_logdir=True,\n population=4,\n generations = 1\n )\n\n\nReferences\n--------------\n\n- https://github.com/logicalclocks/hops-examples/blob/master/tensorflow/notebooks/Plotting/data_visualizations.ipynb\n- https://github.com/jupyter-incubator/sparkmagic/blob/master/examples/Magics%20in%20IPython%20Kernel.ipynb\n\n.. |Downloads| image:: https://pepy.tech/badge/hops\n :target: https://pepy.tech/project/hops\n.. |PypiStatus| image:: https://img.shields.io/pypi/v/hops.svg\n :target: https://pypi.org/project/hops\n.. |PythonVersions| image:: https://img.shields.io/pypi/pyversions/hops.svg\n :target: https://travis-ci.org/hops",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Client library for interacting with Hopsworks, a full-stack platform for scale-out data science.",
"version": "3.8.0.0",
"project_urls": {
"Download": "http://snurran.sics.se/hops/hops-util-py/hops-3.8.0.0.tar.gz",
"Homepage": "https://github.com/logicalclocks/hops-util-py"
},
"split_keywords": [
"hops",
" hadoop",
" tensorflow",
" spark"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7901034ed365045bb40c3ab8cd5b8eba8857ce6f0b43a7515a2cf32d29d4dd1b",
"md5": "00558cd6ff756db65cb04152f6f92ca0",
"sha256": "18aa0a9bd85446cdf7fb4e2c06126802899088e5716667036c3d7c6ff1a261c7"
},
"downloads": -1,
"filename": "hops-3.8.0.0.tar.gz",
"has_sig": false,
"md5_digest": "00558cd6ff756db65cb04152f6f92ca0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 74698,
"upload_time": "2024-06-14T09:08:18",
"upload_time_iso_8601": "2024-06-14T09:08:18.662173Z",
"url": "https://files.pythonhosted.org/packages/79/01/034ed365045bb40c3ab8cd5b8eba8857ce6f0b43a7515a2cf32d29d4dd1b/hops-3.8.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-14 09:08:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "logicalclocks",
"github_project": "hops-util-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "hops"
}