Skip to content

Commit 89a34e9

Browse files
committed
Simplified imports
1 parent 867b105 commit 89a34e9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/hparams.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import .tensorboard_plugin_hparams.hparams: Interval, MetricInfo, MetricName, HParamInfo, Experiment, HParams
21
import .tensorboard_plugin_hparams.hparams: var"#DataType" as HParamDataType, DatasetType as HDatasetType
32
import .tensorboard_plugin_hparams.google.protobuf: ListValue as HListValue, Value as HValue
43
import .tensorboard_plugin_hparams.hparams as HP
5-
import .tensorboard: DataClass
64

75
struct HParamRealDomain
86
min_value::Float64
@@ -45,7 +43,7 @@ function _convert_value(v::T) where {T<:Union{String, Bool, Real}}
4543
end
4644

4745
_convert_hparam_domain(::Nothing) = nothing
48-
_convert_hparam_domain(domain::HParamRealDomain) = OneOf(:domain_interval, Interval(domain.min_value, domain.max_value))
46+
_convert_hparam_domain(domain::HParamRealDomain) = OneOf(:domain_interval, HP.Interval(domain.min_value, domain.max_value))
4947
_convert_hparam_domain(domain::HParamSetDomain) = OneOf(:domain_discrete, HListValue([_convert_value(v) for v in domain.values]))
5048

5149

@@ -68,11 +66,11 @@ function hparam_info(c::HParamConfig)
6866

6967
dtype = _to_proto_hparam_dtype(Val(datatype))
7068
converted_domain = _convert_hparam_domain(domain)
71-
return HParamInfo(c.name, c.displayname, c.description, dtype, converted_domain)
69+
return HP.HParamInfo(c.name, c.displayname, c.description, dtype, converted_domain)
7270
end
7371
function metric_info(c::MetricConfig)
74-
mname = MetricName("", c.name)
75-
return MetricInfo(mname, c.displayname, c.description, HDatasetType.DATASET_UNKNOWN)
72+
mname = HP.MetricName("", c.name)
73+
return HP.MetricInfo(mname, c.displayname, c.description, HDatasetType.DATASET_UNKNOWN)
7674
end
7775

7876
function encode_bytes(content::HP.HParamsPluginData)

0 commit comments

Comments
 (0)