mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-09 11:28:14 +08:00
fix conflict
This commit is contained in:
+4
-14
@@ -47,21 +47,10 @@ $ docker run -it --rm -p 8080:8080 -v `PWD`:/app -w /app sqlite:///db.sqlite3
|
||||
|
||||
```
|
||||
$ pip install -e .
|
||||
$ optuna-dashboard sqlite:///db.sqlite3
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Environment variables for development</summary>
|
||||
|
||||
If you set `OPTUNA_DASHBOARD_DEBUG=1`, the server will automatically restart when the source codes are changed.
|
||||
|
||||
```
|
||||
$ OPTUNA_DASHBOARD_DEBUG=1 optuna-dashboard sqlite:///db.sqlite3
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Note that `OPTUNA_DASHBOARD_DEBUG=1` makes the server will automatically restart when the source codes are changed.
|
||||
|
||||
## Running tests, lint checks and formatters
|
||||
|
||||
@@ -102,7 +91,7 @@ $ pip install -r requirements.txt
|
||||
$ flake8
|
||||
$ black --check .
|
||||
$ isort . --check
|
||||
$ mypy .
|
||||
$ mypy optuna_dashboard python_tests
|
||||
```
|
||||
|
||||
or
|
||||
@@ -118,10 +107,11 @@ $ tox -e flake8 -e black -e mypy
|
||||
$ npm run fmt
|
||||
```
|
||||
|
||||
### Auto-formatting Python files (by black)
|
||||
### Auto-formatting Python files
|
||||
|
||||
```
|
||||
$ black .
|
||||
$ isort .
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import warnings
|
||||
|
||||
import optuna
|
||||
from optuna import create_trial
|
||||
from optuna.distributions import BaseDistribution
|
||||
from optuna.distributions import UniformDistribution
|
||||
from optuna.exceptions import ExperimentalWarning
|
||||
from optuna.trial import TrialState
|
||||
@@ -18,7 +19,7 @@ class _CachedExtraStudyPropertySearchSpaceTestCase(TestCase):
|
||||
warnings.simplefilter("ignore", category=ExperimentalWarning)
|
||||
|
||||
def test_same_distributions(self) -> None:
|
||||
distributions = [
|
||||
distributions: List[Dict[str, BaseDistribution]] = [
|
||||
{
|
||||
"x0": UniformDistribution(low=0, high=10),
|
||||
"x1": UniformDistribution(low=0, high=10),
|
||||
@@ -49,7 +50,7 @@ class _CachedExtraStudyPropertySearchSpaceTestCase(TestCase):
|
||||
self.assertEqual(len(cached_extra_study_property.union), 2)
|
||||
|
||||
def test_different_distributions(self) -> None:
|
||||
distributions = [
|
||||
distributions: List[Dict[str, BaseDistribution]] = [
|
||||
{
|
||||
"x0": UniformDistribution(low=0, high=10),
|
||||
"x1": UniformDistribution(low=0, high=10),
|
||||
@@ -80,7 +81,7 @@ class _CachedExtraStudyPropertySearchSpaceTestCase(TestCase):
|
||||
self.assertEqual(len(cached_extra_study_property.union), 3)
|
||||
|
||||
def test_dynamic_search_space(self) -> None:
|
||||
distributions = [
|
||||
distributions: List[Dict[str, BaseDistribution]] = [
|
||||
{
|
||||
"x0": UniformDistribution(low=0, high=10),
|
||||
"x1": UniformDistribution(low=0, high=10),
|
||||
@@ -143,7 +144,7 @@ class _CachedExtraStudyPropertyIntermediateTestCase(TestCase):
|
||||
self.assertFalse(cached_extra_study_property.has_intermediate_values)
|
||||
|
||||
def test_some_trials_has_no_intermediate_value(self) -> None:
|
||||
intermediate_values = [
|
||||
intermediate_values: List[Dict] = [
|
||||
{0: 0.3, 1: 1.2},
|
||||
{},
|
||||
{0: 0.3, 1: 1.2},
|
||||
@@ -163,7 +164,7 @@ class _CachedExtraStudyPropertyIntermediateTestCase(TestCase):
|
||||
self.assertTrue(cached_extra_study_property.has_intermediate_values)
|
||||
|
||||
def test_all_trials_has_intermediate_value(self) -> None:
|
||||
intermediate_values = [{0: 0.3, 1: 1.2}, {0: 0.3, 1: 1.2}]
|
||||
intermediate_values: List[Dict] = [{0: 0.3, 1: 1.2}, {0: 0.3, 1: 1.2}]
|
||||
trials = [
|
||||
create_trial(
|
||||
state=TrialState.COMPLETE,
|
||||
|
||||
Reference in New Issue
Block a user