Giter Site home page Giter Site logo

04mayukh / youngsheldon-at-semeval-2021-task-7-hahackathon Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 613 KB

This repository contains the code for submission made at SemEval 2021: Task 7: HaHackathon: Detecting and Rating Humor and Offense

License: MIT License

Jupyter Notebook 100.00%

youngsheldon-at-semeval-2021-task-7-hahackathon's People

Contributors

04mayukh avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ompsingh

youngsheldon-at-semeval-2021-task-7-hahackathon's Issues

slang.txt missing

It is referenced in the task 1b notebook but the file is not in this repository

Library Incompatabilities

I cannot install the required libraries due to incompatabilities in the currently available libraries.

This command fails
conda create --yes --name Haha_Mayukh nltk pandas tensorflow-gpu notebook tf-models-official --channel conda-forge --channel hcc

with a long list of libraries (mostly ones required by the above libraries) that are incompatible with each other.

pip doesn't check for incompatabilities as thoroughly as conda does, and I noticed that some libraries used in subtask 1b.ipynb weren't installed via pip commands in the notebook. So I'm not sure how to replicate this code.

Do you have any suggestions?

Task 1 a class weights

The model.fit has a class weights parameter that references an empty dictionary
class_weight=class_weight_

I think it was meant to say
class_weight=class_weight_motivation

Hardware-specific code hard-coded

Use of tensorflow.distribute modules needs to be rewritten to be hardware agnostic.
see get_strategy() in this webpage
https://www.tensorflow.org/guide/distributed_training

So I suggest using code like this

if tf.config.list_physical_devices('TPU'):
    resolver = tf.distribute.cluster_resolver.TPUClusterResolver(tpu='grpc://' + os.environ['COLAB_TPU_ADDR'])
    tf.config.experimental_connect_to_cluster(resolver)
    tf.tpu.experimental.initialize_tpu_system(resolver)
    print("All devices: ", tf.config.list_logical_devices('TPU'))
    strategy = tf.distribute.TPUStrategy(resolver)
elif tf.config.list_physical_devices('GPU'):
  strategy = tf.distribute.MirroredStrategy()
else:  # Use the Default Strategy
  strategy = tf.distribute.get_strategy()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.