Skip to content

Commit 5bfca55

Browse files
authored
Fix callback import error (#1279)
1 parent 7f147e8 commit 5bfca55

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

keras_cv/callbacks/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
from keras_cv.callbacks.pycoco_callback import PyCOCOCallback
14+
try:
15+
from keras_cv.callbacks.pycoco_callback import PyCOCOCallback
16+
except ImportError:
17+
print(
18+
"You do not have pyococotools installed, so the `PyCOCOCallback` API is not available."
19+
)
1520

1621
try:
1722
from keras_cv.callbacks.waymo_evaluation_callback import WaymoEvaluationCallback

0 commit comments

Comments
 (0)