-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/comet-ml/comet-examples i…
…nto nerf_integration
- Loading branch information
Showing
12 changed files
with
253 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
integrations/model-optimization/optuna/optuna-hello-world/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Optuna integration with Comet.ml | ||
|
||
[Optuna](https://optuna.org/) is an automatic hyperparameter optimization software framework, particularly designed for machine learning. | ||
|
||
Log each Optuna trial to Comet to monitor in real-time the progress of your study and analyse the hyper-parameters importance, giving you full debuggability and reproducibility. | ||
|
||
|
||
## See it | ||
|
||
Take a look at this [public Comet Project](https://www.comet.com/examples/comet-example-optuna-hello-world/view/45MrjyCtPcJPpKG2gGbkbAHZo/panels). | ||
|
||
## Setup | ||
|
||
Install dependencies | ||
|
||
```bash | ||
python -m pip install -r requirements.txt | ||
``` | ||
|
||
## Run the example | ||
|
||
This example is based on the [official quickstart example](https://colab.research.google.com/github/optuna/optuna-examples/blob/main/quickstart.ipynb). | ||
|
||
|
||
```bash | ||
python optuna-hello-world.py | ||
``` |
32 changes: 32 additions & 0 deletions
32
integrations/model-optimization/optuna/optuna-hello-world/optuna-hello-world.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# coding: utf-8 | ||
from comet_ml import Experiment, init | ||
|
||
import optuna | ||
|
||
# Login to Comet if needed | ||
init() | ||
|
||
|
||
def objective(trial): | ||
x = trial.suggest_float("x", -10, 10) | ||
objective = (x - 2) ** 2 | ||
|
||
experiment = Experiment(project_name="comet-example-optuna-hello-world") | ||
|
||
experiment.log_optimization( | ||
optimization_id=trial.study.study_name, | ||
metric_name="objective", | ||
metric_value=objective, | ||
parameters={"x": x}, | ||
objective="minimize", | ||
) | ||
|
||
return objective | ||
|
||
|
||
study = optuna.create_study() | ||
study.optimize(objective, n_trials=20) | ||
|
||
best_params = study.best_params | ||
found_x = best_params["x"] | ||
print("Found x: {}, (x - 2)^2: {}".format(found_x, (found_x - 2) ** 2)) |
2 changes: 2 additions & 0 deletions
2
integrations/model-optimization/optuna/optuna-hello-world/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
comet_ml>=3.33.10 | ||
optuna |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
integrations/workflow-orchestration/vertex/vertex-hello-world/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
comet_ml>=3.33.7 | ||
comet_ml>=3.33.10 | ||
google-cloud-aiplatform | ||
kfp<2 |
29 changes: 29 additions & 0 deletions
29
integrations/workflow-orchestration/vertex/vertex-v2-hello-world/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Vertex AI integration with Comet.ml | ||
|
||
Comet integrates with Google Vertex AI. | ||
|
||
[Google Vertex AI](https://cloud.google.com/vertex-ai/) lets you build, deploy, and scale ML models faster, with pre-trained and custom tooling within a unified artificial intelligence platform. | ||
|
||
## Documentation | ||
|
||
For more information on using and configuring the Vertex integration, see: [https://www.comet.com/docs/v2/integrations/third-party-tools/vertex-ai/](https://www.comet.com/docs/v2/integrations/third-party-tools/vertex-ai/?utm_source=comet-examples&utm_medium=referral&utm_campaign=github_repo_2023&utm_content=vertex) | ||
|
||
## See it | ||
|
||
Take a look at this [public Comet Project](https://www.comet.com/examples/comet-example-vertex-v2-hello-world/view/mz2vYWFTYZ3vNzgWIK0r4ZRUR/panels?utm_source=comet-examples&utm_medium=referral&utm_campaign=github_repo_2023&utm_content=vertex). | ||
|
||
## Setup | ||
|
||
Install dependencies | ||
|
||
```bash | ||
python -m pip install -r requirements.txt | ||
``` | ||
|
||
## Run the example | ||
|
||
The following example demonstrates how to use the Comet pipelines integration to track the state of pipelines run on Vertex. Before running, make sure that you are correctly authenticated against your Google Cloud Platform account and project, the easiest way to do so is by using the [Google Cloud CLI](https://cloud.google.com/sdk/docs/). | ||
|
||
```bash | ||
python demo_pipeline.py | ||
``` |
Oops, something went wrong.