Skip to content

Commit 8fce384

Browse files
qinyiyanrecml authors
authored andcommitted
Update copybara to follow the new code structure.
PiperOrigin-RevId: 745701568
1 parent 0f05067 commit 8fce384

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+106
-106
lines changed

mlrx/__init__.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

mlrx/metrics/__init__.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

recml/core/__init__.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2024 RecML authors <[email protected]>.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
"""Public API for MLRX."""
15+
16+
# pylint: disable=g-importing-member
17+
18+
from recml.core import metrics
19+
from recml.core import utils
20+
from recml.core.data.iterator import DatasetIterator
21+
from recml.core.data.iterator import TFDatasetIterator
22+
from recml.core.data.preprocessing import PreprocessingMode
23+
from recml.core.data.tf_dataset_factory import DatasetShardingInfo
24+
from recml.core.data.tf_dataset_factory import TFDatasetFactory
25+
from recml.core.data.tf_dataset_factory import TFDSMetadata
26+
from recml.core.metrics.base_metrics import Metric
27+
from recml.core.training.core import Experiment
28+
from recml.core.training.core import run_experiment
29+
from recml.core.training.core import Trainer
30+
from recml.core.training.jax import JaxState
31+
from recml.core.training.jax import JaxTask
32+
from recml.core.training.jax import JaxTrainer
33+
from recml.core.training.jax import KerasState
34+
from recml.core.training.optax_factory import AdagradFactory
35+
from recml.core.training.optax_factory import AdamFactory
36+
from recml.core.training.optax_factory import OptimizerFactory
37+
from recml.core.training.partitioning import DataParallelPartitioner
38+
from recml.core.training.partitioning import ModelParallelPartitioner
39+
from recml.core.training.partitioning import NullPartitioner
40+
from recml.core.training.partitioning import Partitioner
41+
from recml.core.utils.types import Factory
42+
from recml.core.utils.types import FactoryProtocol
43+
from recml.core.utils.types import ObjectFactory
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from absl import logging
2828
import jax
29-
from mlrx.utils import types
29+
from recml.core.utils import types
3030
import tensorflow.compat.v2 as tf
3131
import tensorflow_datasets as tfds
3232

recml/core/metrics/__init__.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2024 RecML authors <[email protected]>.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
"""Public API for metrics."""
15+
16+
# pylint: disable=g-importing-member
17+
18+
from recml.core.metrics.base_metrics import Metric
19+
from recml.core.metrics.base_metrics import scalar
20+
from recml.core.metrics.confusion_metrics import aucpr
21+
from recml.core.metrics.confusion_metrics import aucroc
22+
from recml.core.metrics.confusion_metrics import estimate_confusion_matrix
23+
from recml.core.metrics.confusion_metrics import f1_score
24+
from recml.core.metrics.confusion_metrics import fbeta_score
25+
from recml.core.metrics.confusion_metrics import precision
26+
from recml.core.metrics.confusion_metrics import precision_at_recall
27+
from recml.core.metrics.confusion_metrics import recall
28+
from recml.core.metrics.mean_metrics import accuracy
29+
from recml.core.metrics.mean_metrics import binary_accuracy
30+
from recml.core.metrics.mean_metrics import mean_squared_error
31+
from recml.core.metrics.mean_metrics import top_k_accuracy
32+
from recml.core.metrics.reduction_metrics import mean
33+
from recml.core.metrics.reduction_metrics import sum # pylint: disable=redefined-builtin
34+
from recml.core.metrics.tools import MetricAccumulator
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from absl.testing import absltest
1717
import jax.numpy as jnp
18-
from mlrx.metrics import base_metrics
18+
from recml.core.metrics import base_metrics
1919

2020

2121
class BaseMetricsTest(absltest.TestCase):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import jax.numpy as jnp
2121
import jaxtyping as jt
2222
import numpy as np
23-
from mlrx.metrics import base_metrics
23+
from recml.core.metrics import base_metrics
2424

2525
# pylint: disable=redefined-outer-name
2626
EPSILON = 1e-7

0 commit comments

Comments
 (0)